This commit is contained in:
Mateusz Gruszczyński
2026-09-16 16:56:13 +02:00
parent 143ff0d272
commit 1862fed87f
27 changed files with 1368 additions and 178 deletions
+174 -1
View File
@@ -104,7 +104,7 @@
"System"
],
"summary": "Health check",
"description": "Public lightweight process and control-engine health check. `control_ready=false` means the process is alive but initial physical device synchronization has not completed.",
"description": "Lightweight process and control-engine health check. In standalone mode it is public. When Home Assistant Supervisor authentication is active, anonymous health requests are accepted only from the Supervisor peer for the add-on watchdog; direct network requests require the administrator app token. `control_ready=false` means the process is alive but initial physical device synchronization has not completed.",
"operationId": "health",
"security": [],
"responses": {
@@ -5591,6 +5591,179 @@
}
}
}
},
"/api/charts/custom/share": {
"post": {
"tags": [
"History"
],
"summary": "Create Custom Chart share",
"description": "Persists a validated Custom Chart definition and returns an opaque random chart-only path. The share token is returned only in the URL; SQLite stores its SHA-256 hash.",
"operationId": "createPublicCustomChart",
"security": [
{
"BearerToken": []
},
{
"ApiTokenHeader": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"series"
],
"properties": {
"title": {
"type": [
"string",
"null"
],
"maxLength": 120
},
"series": {
"type": "array",
"minItems": 1,
"maxItems": 16,
"items": {
"type": "string",
"maxLength": 256
}
},
"hours": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 87600,
"default": 24
},
"lang": {
"type": [
"string",
"null"
],
"enum": [
"en",
"pl",
null
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Generated chart-only share path",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"example": "/charts/custom/chart_example"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
}
}
},
"/api/public/charts/custom/{token}": {
"get": {
"tags": [
"History"
],
"summary": "Read shared Custom Chart data",
"description": "Read-only public data endpoint for exactly one persisted Custom Chart share. Possession of the unguessable share URL is the authorization; arbitrary metric selectors are not accepted.",
"operationId": "publicCustomChart",
"security": [],
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^chart_"
}
}
],
"responses": {
"200": {
"description": "Chart definition and selected time-series points",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
}
}
},
"/charts/custom/{token}": {
"get": {
"tags": [
"History"
],
"summary": "Open standalone shared Custom Chart",
"description": "Returns a chart-only HTML page without the application dashboard. The page loads data only through the matching opaque share token.",
"operationId": "publicCustomChartPage",
"security": [],
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^chart_"
}
}
],
"responses": {
"200": {
"description": "Standalone Custom Chart HTML page",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {