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

525 lines
20 KiB
JSON

{
"paths": {
"/api/v1/server/lightning/{cryptoCode}/info": {
"get": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Get node information",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "View information about the lightning node",
"operationId": "InternalLightningNodeApi_GetInfo",
"responses": {
"200": {
"description": "Lightning node information such as reachable nodeinfos",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LightningNodeInformationData"
}
}
}
},
"422": {
"description": "A list of errors that occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationProblemDetails"
}
}
}
},
"400": {
"description": "An error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
}
},
"/api/v1/server/lightning/{cryptoCode}/connect": {
"post": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Connect to lightning node",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "Connect to another lightning node.",
"operationId": "InternalLightningNodeApi_ConnectToNode",
"responses": {
"200": {
"description": "Successfully connected"
},
"422": {
"description": "A list of errors that occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationProblemDetails"
}
}
}
},
"400": {
"description": "An error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectToNodeRequest"
}
}
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
}
},
"/api/v1/server/lightning/{cryptoCode}/channels": {
"get": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Get channels",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "View information about the current channels of the lightning node",
"operationId": "InternalLightningNodeApi_GetChannels",
"responses": {
"200": {
"description": "list of channels",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LightningChannelData"
}
}
}
}
},
"400": {
"description": "An error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
},
"post": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Open channel",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "Open a channel with another lightning node. You should connect to that node first.",
"operationId": "InternalLightningNodeApi_OpenChannel",
"responses": {
"200": {
"description": "Successfully opened"
},
"422": {
"description": "A list of errors that occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationProblemDetails"
}
}
}
},
"400": {
"description": "An error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OpenLightningChannelRequest"
}
}
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
}
},
"/api/v1/server/lightning/{cryptoCode}/address": {
"get": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Get deposit address",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "Get an on-chain deposit address for the lightning node ",
"operationId": "InternalLightningNodeApi_GetDepositAddress",
"responses": {
"200": {
"description": "deposit address",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
}
},
"/api/v1/server/lightning/{cryptoCode}/invoices/{id}": {
"get": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Get invoice",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
} , {
"name": "id",
"in": "path",
"required": true,
"description": "The id of the lightning invoice.",
"schema": {
"type": "string"
}
}
],
"description": "View information about the requested lightning invoice",
"operationId": "InternalLightningNodeApi_GetInvoice",
"responses": {
"200": {
"description": "Lightning invoice data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LightningInvoiceData"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration or the specified invoice was not found "
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
}
},
"/api/v1/server/lightning/{cryptoCode}/invoices/pay": {
"post": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Pay Lightning Invoice",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "Pay a lightning invoice.",
"operationId": "InternalLightningNodeApi_PayInvoice",
"responses": {
"200": {
"description": "Successfully paid"
},
"422": {
"description": "A list of errors that occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationProblemDetails"
}
}
}
},
"400": {
"description": "An error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PayLightningInvoiceRequest"
}
}
}
},
"security": [
{
"API Key": [
"btcpay.server.canuseinternallightningnode"
],
"Basic": []
}
]
}
},
"/api/v1/server/lightning/{cryptoCode}/invoices": {
"post": {
"tags": [
"Lightning (Internal Node)"
],
"summary": "Create lightning invoice",
"parameters": [
{
"name": "cryptoCode",
"in": "path",
"required": true,
"description": "The cryptoCode of the lightning-node to query",
"schema": {
"type": "string"
}
}
],
"description": "Create a lightning invoice.",
"operationId": "InternalLightningNodeApi_CreateInvoice",
"responses": {
"200": {
"description": "Successfully created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LightningInvoiceData"
}
}
}
},
"422": {
"description": "A list of errors that occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationProblemDetails"
}
}
}
},
"400": {
"description": "An error occurred",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "If you are authenticated but forbidden"
},
"404": {
"description": "The lightning node configuration was not found"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PayLightningInvoiceRequest"
}
}
}
},
"security": [
{
"API Key": [
"btcpay.server.cancreatelightninginvoiceinternalnode"
],
"Basic": []
}
]
}
}
},
"tags": [
{
"name": "Lightning (Internal Node)"
}
]
}