btcpayserver/BTCPayServer/wwwroot/swagger/v1/swagger.template.json

97 lines
4.7 KiB
JSON
Raw Normal View History

2020-03-18 20:08:09 +09:00
{
"openapi": "3.0.0",
"info": {
"title": "BTCPay Greenfield API",
"description": "A full API to use your BTCPay Server",
"contact": {
"name": "BTCPay Server",
2020-03-20 14:05:23 +01:00
"url": "https://btcpayserver.org"
2020-03-18 20:08:09 +09:00
},
"version": "v1"
},
"servers": [
],
"components": {
"schemas": {
2020-03-18 20:51:50 +09:00
"ValidationProblemDetails": {
"allOf": [
{
"$ref": "#/components/schemas/ProblemDetails"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "object",
"nullable": true,
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
]
},
"ProblemDetails": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"nullable": true
},
"title": {
"type": "string",
"nullable": true
},
"status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"detail": {
"type": "string",
"nullable": true
},
"instance": {
"type": "string",
"nullable": true
},
"extensions": {
"type": "object",
"nullable": true,
"additionalProperties": {}
}
}
},
2020-03-18 20:08:09 +09:00
},
"securitySchemes": {
"API Key": {
2020-03-18 20:08:09 +09:00
"type": "apiKey",
2020-03-20 14:05:23 +01:00
"description": "BTCPay Server supports authenticating and authorizing users through an API Key that is generated by them. Send the API Key as a header value to Authorization with the format: `token {token}`. For a smoother experience, you can generate a url that redirects users to an API key creation screen.\n\n The following permissions applies to the context of the user creating the API Key:\n * `unrestricted`: Allow unrestricted access to your account.\n * `btcpay.server.canmodifyserversettings`: Allow total control on the server settings. (only if user is administrator)\n * `btcpay.server.cancreateuser`: Allow the creation of new users on this server. (only if user is an administrator)\n * `btcpay.user.canviewprofile`: Allow view access to your user profile.\n * `btcpay.user.canmodifyprofile`: Allow view and modification access to your user profile.\n\nThe following permissions applies to all stores of the user, you can limit to a specific store with the following format: `btcpay.store.cancreateinvoice:6HSHAEU4iYWtjxtyRs9KyPjM9GAQp8kw2T9VWbGG1FnZ`:\n * `btcpay.store.canviewstoresettings`: Allow view access to the stores settings. \n * `btcpay.store.canmodifystoresettings`: Allow view and modification access to the stores settings.\n * `btcpay.store.cancreateinvoice`: Allow invoice creation of the store.\n\nNote that API Keys only limits permission of a user and can never expand it. If an API Key has the permission `btcpay.server.canmodifyserversettings` but that the user account creating this API Key is not administrator, the API Key will not be able to modify the server settings.\n",
2020-03-18 20:08:09 +09:00
"name": "Authorization",
2020-03-20 14:05:23 +01:00
"in": "header",
"scheme": "token"
},
"Basic": {
"type": "http",
"description": "BTCPay Server supports authenticating and authorizing users through the Basic HTTP authentication scheme. Send the user and password encoded in base64 with the format `Basic {base64(username:password)}`. Using this authentication method implicitly provides you with the `unrestricted` permission",
"name": "Authorization",
"in": "header",
"scheme": "Basic"
2020-03-18 20:08:09 +09:00
}
}
},
"security": [
{
"API Key": [],
"Basic": []
2020-03-18 20:08:09 +09:00
}
],
"tags": []
2020-03-18 20:08:09 +09:00
}