Valetudo/backend/lib/webserver/doc/NTPClientRouter.openapi.json

97 lines
2.5 KiB
JSON

{
"/api/v2/ntpclient/status": {
"get": {
"tags": [
"NTP"
],
"summary": "Get NTPClient status",
"responses": {
"200": {
"description": "The NTPClient's current status.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/ValetudoNTPClientDisabledState"
},
{
"$ref": "#/components/schemas/ValetudoNTPClientEnabledState"
},
{
"$ref": "#/components/schemas/ValetudoNTPClientErrorState"
},
{
"$ref": "#/components/schemas/ValetudoNTPClientSyncedState"
}
]
},
"robotTime": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/api/v2/ntpclient/config": {
"get": {
"tags": [
"NTP"
],
"summary": "Get NTPClient configuration",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NTPClientConfigDTO"
}
}
}
}
}
},
"put": {
"tags": [
"NTP"
],
"summary": "Update NTPClient configuration",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NTPClientConfigDTO"
},
"examples": {
"custom":{
"description": "Set custom NTP server",
"value": {
"enabled": true,
"server": "ntp_host_or_ip",
"port": 123,
"interval": 7200000,
"timeout": 10000
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
}
}