mirror of https://github.com/Hypfer/Valetudo.git
353 lines
8.3 KiB
JSON
353 lines
8.3 KiB
JSON
{
|
|
"/api/v2/valetudo": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get basic Valetudo info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"embedded": {
|
|
"type": "boolean"
|
|
},
|
|
"systemId": {
|
|
"type": "string"
|
|
},
|
|
"welcomeDialogDismissed": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/action": {
|
|
"put": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Interact with Valetudo",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"enum": [
|
|
"dismissWelcomeDialog",
|
|
"restoreDefaultConfiguration"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"dismiss_welcome_dialog": {
|
|
"description": "Dismiss the OOBE welcome dialog",
|
|
"value": {
|
|
"action": "dismissWelcomeDialog"
|
|
}
|
|
},
|
|
"restore_default_configuration": {
|
|
"description": "Restore the default configuration",
|
|
"value": {
|
|
"action": "restoreDefaultConfiguration"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/version": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get Valetudo version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"release": {
|
|
"type": "string"
|
|
},
|
|
"commit": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/log/content": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get full log",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"text/plain": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/log/content/sse": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get new log lines (SSE events)",
|
|
"description": "Retrieve new log lines.\n\nNote! This endpoint provides SSE events. Swagger does not support it.\nNote! This endpoint provides raw text, do not try to decode it as JSON.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/log/level": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get log level",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"current": {
|
|
"type": "string"
|
|
},
|
|
"presets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Set log level",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"level": {
|
|
"type": "string",
|
|
"enum": [
|
|
"trace",
|
|
"debug",
|
|
"info",
|
|
"warn",
|
|
"error"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Log level retrieved from GET presets",
|
|
"responses": {
|
|
"200": {
|
|
"$ref": "#/components/responses/200"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/config/interfaces/mqtt": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get MQTT configuration",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MqttConfigDTO"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Update MQTT configuration",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MqttConfigDTO"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"$ref": "#/components/responses/200"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/config/interfaces/http/auth/basic": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get HTTP basic auth configuration",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BasicAuthConfigDTO"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Update HTTP basic auth configuration",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BasicAuthConfigDTO"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"$ref": "#/components/responses/200"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/valetudo/config/customizations": {
|
|
"get": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Get Valetudo customizations",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Ok",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ValetudoCustomizationsDTO"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Valetudo"
|
|
],
|
|
"summary": "Update Valetudo customizations",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ValetudoCustomizationsDTO"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"$ref": "#/components/responses/200"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|