2020-05-06 16:43:56 +02:00
{
"swagger" : "2.0" ,
"info" : {
"title" : "autopilotrpc/autopilot.proto" ,
"version" : "version not set"
},
"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." ,
"operationId" : "ModifyStatus" ,
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcModifyStatusResponse"
}
},
"default" : {
"description" : "An unexpected error response" ,
"schema" : {
"$ref" : "#/definitions/runtimeError"
}
}
},
"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." ,
"operationId" : "QueryScores" ,
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcQueryScoresResponse"
}
},
"default" : {
"description" : "An unexpected error response" ,
"schema" : {
"$ref" : "#/definitions/runtimeError"
}
}
},
"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 ,
"type" : "boolean" ,
"format" : "boolean"
}
],
"tags" : [
"Autopilot"
]
},
"post" : {
"summary" : "SetScores attempts to set the scores used by the running autopilot agent,\nif the external scoring heuristic is enabled." ,
"operationId" : "SetScores" ,
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcSetScoresResponse"
}
},
"default" : {
"description" : "An unexpected error response" ,
"schema" : {
"$ref" : "#/definitions/runtimeError"
}
}
},
"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." ,
"operationId" : "Status" ,
"responses" : {
"200" : {
"description" : "A successful response." ,
"schema" : {
"$ref" : "#/definitions/autopilotrpcStatusResponse"
}
},
"default" : {
"description" : "An unexpected error response" ,
"schema" : {
"$ref" : "#/definitions/runtimeError"
}
}
},
"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" ,
"format" : "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" ,
"format" : "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"
}
}
},
"runtimeError" : {
"type" : "object" ,
"properties" : {
"error" : {
"type" : "string"
},
"code" : {
"type" : "integer" ,
"format" : "int32"
},
"message" : {
"type" : "string"
},
"details" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/protobufAny"
}
}
}
2020-05-06 16:43:56 +02:00
}
}
}