API calls for the check management (#847)

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
Pascal Vizeli 2021-03-15 10:42:08 +01:00 committed by GitHub
parent 1221ccae4d
commit 137ba0a553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View File

@ -1681,6 +1681,7 @@ Update Home Assistant OS
| unhealthy | list | A list of reasons why a installation is marked as unhealthy (docker, supervisor, privileged, setup) |
| issues | list | A list of [Issue models](api/supervisor/models.md#issues) |
| suggestions | list | A list of [Suggestion models](api/supervisor/models.md#suggestion) actions |
| checks | list | A list of [Check models](api/supervisor/models.md#check) |
**Example response:**
@ -1703,6 +1704,12 @@ Update Home Assistant OS
"context": "system",
"reference": null
}
],
"checks": [
{
"slug": "free_space",
"enabled": true
}
]
}
```
@ -1733,6 +1740,24 @@ Execute a healthcheck and autofix & notifcation.
</ApiEndpoint>
<ApiEndpoint path="/resolution/check/<slug>/options" method="post">
Set options for this check.
**Payload:**
| key | type | description |
| ------- | ------ | -------------------------------------------------------------- |
| enabled | bool | If the check should be enabled or disabled |
</ApiEndpoint>
<ApiEndpoint path="/resolution/check/<slug>/run" method="post">
Execute a specific check right now.
</ApiEndpoint>
### Service
<ApiEndpoint path="/services" method="get">

View File

@ -222,6 +222,13 @@ These models are describing objects that are getting returned from the superviso
| context | str | In which context the suggestion occorse |
| reference | str or null | Depend on the Context, a reference to a other Model |
## Check
| key | type | description |
| ----------| ----------- | --------------------------------------------------- |
| slug | str | A generated slug for the check |
| enable | bool | The enabled state of the check |
## Device
| key | type | description |