From 137ba0a5532c2bbb7be2a6133e1f09150250f487 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 15 Mar 2021 10:42:08 +0100 Subject: [PATCH] API calls for the check management (#847) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Sørensen --- docs/api/supervisor/endpoints.md | 25 +++++++++++++++++++++++++ docs/api/supervisor/models.md | 7 +++++++ 2 files changed, 32 insertions(+) diff --git a/docs/api/supervisor/endpoints.md b/docs/api/supervisor/endpoints.md index 1debbb13..c13f7e0a 100644 --- a/docs/api/supervisor/endpoints.md +++ b/docs/api/supervisor/endpoints.md @@ -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. + + +Set options for this check. + +**Payload:** + +| key | type | description | +| ------- | ------ | -------------------------------------------------------------- | +| enabled | bool | If the check should be enabled or disabled | + + + + + +Execute a specific check right now. + + + ### Service diff --git a/docs/api/supervisor/models.md b/docs/api/supervisor/models.md index 928759c6..98a837e0 100644 --- a/docs/api/supervisor/models.md +++ b/docs/api/supervisor/models.md @@ -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 |