Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document system managed field for addons #2226

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions docs/api/supervisor/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Return overview information about installed add-ons.
"build": false,
"url": null,
"icon": false,
"logo": false
"logo": false,
"system_managed": false
}
]
}
Expand Down Expand Up @@ -164,7 +165,9 @@ Get details about an add-on
| startup | string | The stage when the add-on is started (initialize, system, services, application, once) |
| state | string or null | The state of the add-on (started, stopped) |
| stdin | boolean | `true` if the add-on accepts stdin commands |
| translations | dictionary | A dictionary containing content of translation files for the add-on |
| system_managed | boolean | Indicates whether the add-on is managed by Home Assistant |
| system_managed_config_entry | string | Provides the configuration entry ID if the add-on is managed by Home Assistant |
| translations | dictionary | A dictionary containing content of translation files for the add-on |
| udev | boolean | `true` if udev access is granted is enabled |
| update_available | boolean | `true` if an update is available |
| url | string or null | URL to more information about the add-on |
Expand Down Expand Up @@ -239,6 +242,8 @@ Get details about an add-on
"startup": "application",
"state": "started",
"stdin": false,
"system_managed": true,
"system_managed_config_entry": "abc123",
mdegat01 marked this conversation as resolved.
Show resolved Hide resolved
"translations": {
"en": {
"configuration": {
Expand Down Expand Up @@ -273,9 +278,7 @@ Get the add-on logo
</ApiEndpoint>

<ApiEndpoint path="/addons/<addon>/options" method="post">
Set the protection mode on an add-on.

This function is not callable by itself and you can not use `self` as the slug here.
Set the options for an add-on.

:::tip
To reset customized network/audio/options, set it `null`.
Expand Down Expand Up @@ -314,6 +317,31 @@ To reset customized network/audio/options, set it `null`.

</ApiEndpoint>

<ApiEndpoint path="/addons/<addon>/sys_options" method="post">
Change options specific to system managed addons.

This endpoint is only callable by Home Assistant and not by any other client.

**Payload**
Comment on lines +320 to +325
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the heading formatting.

Use a proper heading instead of emphasis for the payload section to adhere to Markdownlint rules.

- **Payload**
+ #### Payload
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<ApiEndpoint path="/addons/<addon>/sys_options" method="post">
Change options specific to system managed addons.
This endpoint is only callable by Home Assistant and not by any other client.
**Payload**
<ApiEndpoint path="/addons/<addon>/sys_options" method="post">
Change options specific to system managed addons.
This endpoint is only callable by Home Assistant and not by any other client.
#### Payload
Tools
Markdownlint

325-325: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


| key | type | description |
| --------------------------- | ------------- | --------------------------------------- |
| system_managed | boolean | `true` if managed by Home Assistant |
| system_managed_config_entry | boolean | ID of config entry managing addon |

**You need to supply at least one key in the payload.**

**Example payload:**

```json
{
"system_managed": true,
"system_managed_config_entry": "abc123"
}
```

</ApiEndpoint>

<ApiEndpoint path="/addons/<addon>/options/validate" method="post">
Run a configuration validation against the current stored add-on configuration or payload.

Expand Down
1 change: 1 addition & 0 deletions docs/api/supervisor/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ These models are describing objects that are getting returned from the superviso
| icon | bool | The add-on has an icon file |
| logo | bool | The add-on has a logo file |
| state | string | The state of the add-on (started, stopped) |
| system_managed | bool | Indicates whether the add-on is managed by Home Assistant |

## Application

Expand Down