Fix API for new resolution center (#685)

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
Pascal Vizeli 2020-10-16 12:56:19 +02:00 committed by GitHub
parent 093465ac84
commit 3030df64cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 6 deletions

View File

@ -1772,35 +1772,56 @@ Update Home Assistant OS
| key | type | description |
| -------- | ---------- | ------------------------------------------------ |
| unsupported | list | A list of reasons why a installation is marked as unsupported (container, dbus, docker_configuration, docker_version, lxc, network_manager, os, privileged, systemd) |
| issues | list | A list of issues |
| suggestions | list | A list of suggested actions |
| 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 |
**Example response:**
```json
{
"unsupported": ["os"],
"issues": ["free_space"],
"suggestions": ["clear_snapshots"]
"issues": [
{
"uuid": "A89924620F9A11EBBDC3C403FC2CA371",
"type": "free_space",
"context": "system",
"reference": null
}
],
"suggestions": [
{
"uuid": "B9923620C9A11EBBDC3C403FC2CA371",
"type": "clear_snapshots",
"context": "system",
"reference": null
}
]
}
```
</details>
<details>
<summary className="endpoint post protected">/resolution/[suggestion]</summary>
<summary className="endpoint post protected">/resolution/suggestion/[uuid]</summary>
Apply a suggested action
</details>
<details>
<summary className="endpoint post protected">/resolution/[suggestion]/dismiss</summary>
<summary className="endpoint delete protected">/resolution/suggestion/[uuid]</summary>
Dismiss a suggested action
</details>
<details>
<summary className="endpoint delete protected">/resolution/issue/[uuid]</summary>
Dismiss a issue
</details>
### Service
<details>

View File

@ -165,3 +165,21 @@ These models are describing objects that are getting returned from the superviso
| network_rx | int | Network receiver usage |
| blk_read | int | File system read usage |
| blk_write | int | File system write usage |
## Issue
| key | type | description |
| ----------| ----------- | --------------------------------------------------- |
| uuid | str | A generated uuid as issue ID |
| type | str | Type of the issue |
| context | str | In which context the issue occorse |
| reference | str or null | Depend on the Context, a reference to a other Model |
## Suggestion
| key | type | description |
| ----------| ----------- | --------------------------------------------------- |
| uuid | str | A generated uuid as suggestion ID |
| type | str | Type of the suggestion |
| context | str | In which context the suggestion occorse |
| reference | str or null | Depend on the Context, a reference to a other Model |