Add new root endpoints (#1193)

This commit is contained in:
Joakim Sørensen 2022-01-24 10:38:52 +01:00 committed by GitHub
parent fa3322fc96
commit 4330a6f0c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1478,7 +1478,59 @@ Validate an ingress session, extending it's validity period.
</ApiEndpoint>
### Misc
### Root
<ApiEndpoint path="/available_updates" method="get">
Returns information about available updates
**Example response:**
```json
{
"available_updates": [
{
"panel_path": "/update-available/core",
"update_type": "core",
"version_latest": "321",
},
{
"panel_path": "/update-available/os",
"update_type": "os",
"version_latest": "321",
},
{
"panel_path": "/update-available/supervisor",
"update_type": "supervisor",
"version_latest": "321",
},
{
"name": "Awesome addon",
"icon": "/addons/awesome_addon/icon",
"panel_path": "/update-available/awesome_addon",
"update_type": "addon",
"version_latest": "321",
}
]
}
```
**Returned data:**
| key | type | description |
-- | -- | --
update_type | string | `addon`, `os`, `core` or `supervisor`
name | string | Returns the name (only if the `update_type` is `addon`)
icon | string | Returns the path for the icon if any (only if the `update_type` is `addon`)
version_latest | string | Returns the available version
panel_path | string | Returns path where the UI can be loaded
</ApiEndpoint>
<ApiEndpoint path="/refresh_updates" method="post">
This reloads information about add-on repositories and fetches new version files.
</ApiEndpoint>
<ApiEndpoint path="/info" method="get">
Returns a dict with selected keys from other `/*/info` endpoints.
@ -2278,54 +2330,6 @@ Returns information about the security features
### Supervisor
<ApiEndpoint path="/supervisor/available_updates" method="get">
Returns information about available updates
**Example response:**
```json
{
"available_updates": [
{
"panel_path": "/update-available/core",
"update_type": "core",
"version_latest": "321",
},
{
"panel_path": "/update-available/os",
"update_type": "os",
"version_latest": "321",
},
{
"panel_path": "/update-available/supervisor",
"update_type": "supervisor",
"version_latest": "321",
},
{
"name": "Awesome addon",
"icon": "/addons/awesome_addon/icon",
"panel_path": "/update-available/awesome_addon",
"update_type": "addon",
"version_latest": "321",
}
]
}
```
**Returned data:**
| key | type | description |
-- | -- | --
update_type | string | `addon`, `os`, `core` or `supervisor`
name | string | Returns the name (only if the `update_type` is `addon`)
icon | string | Returns the path for the icon if any (only if the `update_type` is `addon`)
version_latest | string | Returns the available version
panel_path | string | Returns path where the UI can be loaded
</ApiEndpoint>
<ApiEndpoint path="/supervisor/info" method="get">
Returns information about the supervisor