github.com/decred/dcrlnd@v0.7.6/lnrpc/autopilotrpc/autopilot.swagger.json (about)

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "autopilotrpc/autopilot.proto",
     5      "version": "version not set"
     6    },
     7    "tags": [
     8      {
     9        "name": "Autopilot"
    10      }
    11    ],
    12    "consumes": [
    13      "application/json"
    14    ],
    15    "produces": [
    16      "application/json"
    17    ],
    18    "paths": {
    19      "/v2/autopilot/modify": {
    20        "post": {
    21          "summary": "ModifyStatus is used to modify the status of the autopilot agent, like\nenabling or disabling it.",
    22          "operationId": "Autopilot_ModifyStatus",
    23          "responses": {
    24            "200": {
    25              "description": "A successful response.",
    26              "schema": {
    27                "$ref": "#/definitions/autopilotrpcModifyStatusResponse"
    28              }
    29            },
    30            "default": {
    31              "description": "An unexpected error response.",
    32              "schema": {
    33                "$ref": "#/definitions/rpcStatus"
    34              }
    35            }
    36          },
    37          "parameters": [
    38            {
    39              "name": "body",
    40              "in": "body",
    41              "required": true,
    42              "schema": {
    43                "$ref": "#/definitions/autopilotrpcModifyStatusRequest"
    44              }
    45            }
    46          ],
    47          "tags": [
    48            "Autopilot"
    49          ]
    50        }
    51      },
    52      "/v2/autopilot/scores": {
    53        "get": {
    54          "summary": "QueryScores queries all available autopilot heuristics, in addition to any\nactive combination of these heruristics, for the scores they would give to\nthe given nodes.",
    55          "operationId": "Autopilot_QueryScores",
    56          "responses": {
    57            "200": {
    58              "description": "A successful response.",
    59              "schema": {
    60                "$ref": "#/definitions/autopilotrpcQueryScoresResponse"
    61              }
    62            },
    63            "default": {
    64              "description": "An unexpected error response.",
    65              "schema": {
    66                "$ref": "#/definitions/rpcStatus"
    67              }
    68            }
    69          },
    70          "parameters": [
    71            {
    72              "name": "pubkeys",
    73              "in": "query",
    74              "required": false,
    75              "type": "array",
    76              "items": {
    77                "type": "string"
    78              },
    79              "collectionFormat": "multi"
    80            },
    81            {
    82              "name": "ignore_local_state",
    83              "description": "If set, we will ignore the local channel state when calculating scores.",
    84              "in": "query",
    85              "required": false,
    86              "type": "boolean"
    87            }
    88          ],
    89          "tags": [
    90            "Autopilot"
    91          ]
    92        },
    93        "post": {
    94          "summary": "SetScores attempts to set the scores used by the running autopilot agent,\nif the external scoring heuristic is enabled.",
    95          "operationId": "Autopilot_SetScores",
    96          "responses": {
    97            "200": {
    98              "description": "A successful response.",
    99              "schema": {
   100                "$ref": "#/definitions/autopilotrpcSetScoresResponse"
   101              }
   102            },
   103            "default": {
   104              "description": "An unexpected error response.",
   105              "schema": {
   106                "$ref": "#/definitions/rpcStatus"
   107              }
   108            }
   109          },
   110          "parameters": [
   111            {
   112              "name": "body",
   113              "in": "body",
   114              "required": true,
   115              "schema": {
   116                "$ref": "#/definitions/autopilotrpcSetScoresRequest"
   117              }
   118            }
   119          ],
   120          "tags": [
   121            "Autopilot"
   122          ]
   123        }
   124      },
   125      "/v2/autopilot/status": {
   126        "get": {
   127          "summary": "Status returns whether the daemon's autopilot agent is active.",
   128          "operationId": "Autopilot_Status",
   129          "responses": {
   130            "200": {
   131              "description": "A successful response.",
   132              "schema": {
   133                "$ref": "#/definitions/autopilotrpcStatusResponse"
   134              }
   135            },
   136            "default": {
   137              "description": "An unexpected error response.",
   138              "schema": {
   139                "$ref": "#/definitions/rpcStatus"
   140              }
   141            }
   142          },
   143          "tags": [
   144            "Autopilot"
   145          ]
   146        }
   147      }
   148    },
   149    "definitions": {
   150      "QueryScoresResponseHeuristicResult": {
   151        "type": "object",
   152        "properties": {
   153          "heuristic": {
   154            "type": "string"
   155          },
   156          "scores": {
   157            "type": "object",
   158            "additionalProperties": {
   159              "type": "number",
   160              "format": "double"
   161            }
   162          }
   163        }
   164      },
   165      "autopilotrpcModifyStatusRequest": {
   166        "type": "object",
   167        "properties": {
   168          "enable": {
   169            "type": "boolean",
   170            "description": "Whether the autopilot agent should be enabled or not."
   171          }
   172        }
   173      },
   174      "autopilotrpcModifyStatusResponse": {
   175        "type": "object"
   176      },
   177      "autopilotrpcQueryScoresResponse": {
   178        "type": "object",
   179        "properties": {
   180          "results": {
   181            "type": "array",
   182            "items": {
   183              "$ref": "#/definitions/QueryScoresResponseHeuristicResult"
   184            }
   185          }
   186        }
   187      },
   188      "autopilotrpcSetScoresRequest": {
   189        "type": "object",
   190        "properties": {
   191          "heuristic": {
   192            "type": "string",
   193            "description": "The name of the heuristic to provide scores to."
   194          },
   195          "scores": {
   196            "type": "object",
   197            "additionalProperties": {
   198              "type": "number",
   199              "format": "double"
   200            },
   201            "description": "A map from hex-encoded public keys to scores. Scores must be in the range\n[0.0, 1.0]."
   202          }
   203        }
   204      },
   205      "autopilotrpcSetScoresResponse": {
   206        "type": "object"
   207      },
   208      "autopilotrpcStatusResponse": {
   209        "type": "object",
   210        "properties": {
   211          "active": {
   212            "type": "boolean",
   213            "description": "Indicates whether the autopilot is active or not."
   214          }
   215        }
   216      },
   217      "protobufAny": {
   218        "type": "object",
   219        "properties": {
   220          "type_url": {
   221            "type": "string"
   222          },
   223          "value": {
   224            "type": "string",
   225            "format": "byte"
   226          }
   227        }
   228      },
   229      "rpcStatus": {
   230        "type": "object",
   231        "properties": {
   232          "code": {
   233            "type": "integer",
   234            "format": "int32"
   235          },
   236          "message": {
   237            "type": "string"
   238          },
   239          "details": {
   240            "type": "array",
   241            "items": {
   242              "$ref": "#/definitions/protobufAny"
   243            }
   244          }
   245        }
   246      }
   247    }
   248  }