2020-05-06 16:43:56 +02:00
{
"swagger" : "2.0" ,
"info" : {
"title" : "autopilotrpc/autopilot.proto" ,
"version" : "version not set"
} ,
2021-07-27 12:59:59 +02:00
"tags" : [
{
"name" : "Autopilot"
}
] ,
2020-05-06 16:43:56 +02:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
2020-05-28 13:07:31 +02:00
"paths" : {
"/v2/autopilot/modify" : {
"post" : {
"summary" : "ModifyStatus is used to modify the status of the autopilot agent, like\nenabling or disabling it." ,
2021-07-27 12:59:59 +02:00
"operationId" : "Autopilot_ModifyStatus" ,
2020-05-28 13:07:31 +02:00
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcModifyStatusResponse"
}
} ,
"default" : {
2021-07-27 12:59:59 +02:00
"description" : "An unexpected error response." ,
2020-05-28 13:07:31 +02:00
"schema" : {
2021-07-27 12:59:59 +02:00
"$ref" : "#/definitions/rpcStatus"
2020-05-28 13:07:31 +02:00
}
}
} ,
"parameters" : [
{
"name" : "body" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcModifyStatusRequest"
}
}
] ,
"tags" : [
"Autopilot"
]
}
} ,
"/v2/autopilot/scores" : {
"get" : {
"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." ,
2021-07-27 12:59:59 +02:00
"operationId" : "Autopilot_QueryScores" ,
2020-05-28 13:07:31 +02:00
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcQueryScoresResponse"
}
} ,
"default" : {
2021-07-27 12:59:59 +02:00
"description" : "An unexpected error response." ,
2020-05-28 13:07:31 +02:00
"schema" : {
2021-07-27 12:59:59 +02:00
"$ref" : "#/definitions/rpcStatus"
2020-05-28 13:07:31 +02:00
}
}
} ,
"parameters" : [
{
"name" : "pubkeys" ,
"in" : "query" ,
"required" : false ,
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "multi"
} ,
{
"name" : "ignore_local_state" ,
"description" : "If set, we will ignore the local channel state when calculating scores." ,
"in" : "query" ,
"required" : false ,
2021-07-27 12:59:59 +02:00
"type" : "boolean"
2020-05-28 13:07:31 +02:00
}
] ,
"tags" : [
"Autopilot"
]
} ,
"post" : {
"summary" : "SetScores attempts to set the scores used by the running autopilot agent,\nif the external scoring heuristic is enabled." ,
2021-07-27 12:59:59 +02:00
"operationId" : "Autopilot_SetScores" ,
2020-05-28 13:07:31 +02:00
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcSetScoresResponse"
}
} ,
"default" : {
2021-07-27 12:59:59 +02:00
"description" : "An unexpected error response." ,
2020-05-28 13:07:31 +02:00
"schema" : {
2021-07-27 12:59:59 +02:00
"$ref" : "#/definitions/rpcStatus"
2020-05-28 13:07:31 +02:00
}
}
} ,
"parameters" : [
{
"name" : "body" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcSetScoresRequest"
}
}
] ,
"tags" : [
"Autopilot"
]
}
} ,
"/v2/autopilot/status" : {
"get" : {
"summary" : "Status returns whether the daemon's autopilot agent is active." ,
2021-07-27 12:59:59 +02:00
"operationId" : "Autopilot_Status" ,
2020-05-28 13:07:31 +02:00
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcStatusResponse"
}
} ,
"default" : {
2021-07-27 12:59:59 +02:00
"description" : "An unexpected error response." ,
2020-05-28 13:07:31 +02:00
"schema" : {
2021-07-27 12:59:59 +02:00
"$ref" : "#/definitions/rpcStatus"
2020-05-28 13:07:31 +02:00
}
}
} ,
"tags" : [
"Autopilot"
]
}
}
} ,
2020-05-06 16:43:56 +02:00
"definitions" : {
"QueryScoresResponseHeuristicResult" : {
"type" : "object" ,
"properties" : {
"heuristic" : {
"type" : "string"
} ,
"scores" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "number" ,
"format" : "double"
}
}
}
} ,
2020-05-28 13:07:31 +02:00
"autopilotrpcModifyStatusRequest" : {
"type" : "object" ,
"properties" : {
"enable" : {
"type" : "boolean" ,
"description" : "Whether the autopilot agent should be enabled or not."
}
}
} ,
2020-05-06 16:43:56 +02:00
"autopilotrpcModifyStatusResponse" : {
"type" : "object"
} ,
"autopilotrpcQueryScoresResponse" : {
"type" : "object" ,
"properties" : {
"results" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/QueryScoresResponseHeuristicResult"
}
}
}
} ,
2020-05-28 13:07:31 +02:00
"autopilotrpcSetScoresRequest" : {
"type" : "object" ,
"properties" : {
"heuristic" : {
"type" : "string" ,
"description" : "The name of the heuristic to provide scores to."
} ,
"scores" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "number" ,
"format" : "double"
} ,
"description" : "A map from hex-encoded public keys to scores. Scores must be in the range\n[0.0, 1.0]."
}
}
} ,
2020-05-06 16:43:56 +02:00
"autopilotrpcSetScoresResponse" : {
"type" : "object"
} ,
"autopilotrpcStatusResponse" : {
"type" : "object" ,
"properties" : {
"active" : {
"type" : "boolean" ,
"description" : "Indicates whether the autopilot is active or not."
}
}
2020-05-28 13:07:31 +02:00
} ,
"protobufAny" : {
"type" : "object" ,
"properties" : {
"type_url" : {
"type" : "string"
} ,
"value" : {
"type" : "string" ,
"format" : "byte"
}
}
} ,
2021-07-27 12:59:59 +02:00
"rpcStatus" : {
2020-05-28 13:07:31 +02:00
"type" : "object" ,
"properties" : {
"code" : {
"type" : "integer" ,
"format" : "int32"
} ,
"message" : {
"type" : "string"
} ,
"details" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/protobufAny"
}
}
}
2020-05-06 16:43:56 +02:00
}
}
}