mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
77 lines
4.3 KiB
JSON
77 lines
4.3 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "BTCPay Greenfield API",
|
|
"description": "A full API to use your BTCPay Server",
|
|
"contact": {
|
|
"name": "BTCPay Server",
|
|
"url": "https://btcpayserver.org"
|
|
},
|
|
"version": "v1"
|
|
},
|
|
"servers": [
|
|
],
|
|
"components": {
|
|
"schemas": {
|
|
"ValidationProblemDetails": {
|
|
"type": "array",
|
|
"description": "An array of validation errors of the request",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A specific validation error on a json property",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"nullable": false,
|
|
"description": "The json path of the property which failed validation"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"nullable": false,
|
|
"description": "User friendly error message about the validation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ProblemDetails": {
|
|
"type": "object",
|
|
"description": "Description of an error happening during processing of the request",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"nullable": false,
|
|
"description": "An error code describing the error"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"nullable": false,
|
|
"description": "User friendly error message about the error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"API Key": {
|
|
"type": "apiKey",
|
|
"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",
|
|
"name": "Authorization",
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"API Key": [],
|
|
"Basic": []
|
|
}
|
|
],
|
|
"tags": []
|
|
}
|