mirror of https://github.com/Hypfer/Valetudo.git
232 lines
6.5 KiB
JSON
232 lines
6.5 KiB
JSON
{
|
|
"/api/v2/robot": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"manufacturer": {
|
|
"type": "string"
|
|
},
|
|
"modelName": {
|
|
"type": "string"
|
|
},
|
|
"modelDetails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"supportedAttachments": {
|
|
"type": "array",
|
|
"description": "Attachments that are detected and reported by the robot",
|
|
"items": {
|
|
"$ref": "#/components/schemas/AttachmentStateAttributeType"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"implementation": {
|
|
"type": "string",
|
|
"description": "Valetudo robot implementation in use"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/properties": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot-specific properties",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A flat key/value object containing 0..* properties that are specific to this robot.\n\nThis can for example be the firmware version.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/state": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot state",
|
|
"description": "Retrieve the robot state.\n\nNote! If the map is available, trying this out on Swagger will likely **use lots of RAM and hang your\nbrowser tab.**\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attributes": {
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AttachmentStateAttribute"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/BatteryStateAttribute"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ConsumableStateAttribute"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PresetSelectionStateAttribute"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"map": {
|
|
"$ref": "#/components/schemas/ValetudoMap"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/state/attributes": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot state attributes",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AttachmentStateAttribute"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/BatteryStateAttribute"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ConsumableStateAttribute"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PresetSelectionStateAttribute"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/state/map": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot map",
|
|
"description": "Retrieve the robot map.\n\nNote! If the map is available, trying this out on Swagger will likely **use lots of RAM and hang your\nbrowser tab.**\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ValetudoMap"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/state/sse": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot state (SSE events)",
|
|
"description": "Retrieve the robot state.\n\nNote! This endpoint provides SSE events. Swagger does not support it.\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/state/attributes/sse": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot state attributes (SSE events)",
|
|
"description": "Retrieve the robot state attributes.\n\nNote! This endpoint provides SSE events. Swagger does not support it.\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/robot/state/map/sse": {
|
|
"get": {
|
|
"tags": [
|
|
"Robot"
|
|
],
|
|
"summary": "Get robot map (SSE events)",
|
|
"description": "Retrieve the robot map\n\nNote! This endpoint provides SSE events. Swagger does not support it.\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ValetudoMap"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|