From 162389d597a16623f59ade909298057aaccc37bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 15 Jun 2023 16:18:59 +0200 Subject: [PATCH] Add documentation for the location key in backups (#1791) * Add documentation for the location key in backups * Apply suggestions from code review * Tiny tweak. My mistake from before. --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- docs/api/supervisor/endpoints.md | 2 ++ docs/api/supervisor/models.md | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/api/supervisor/endpoints.md b/docs/api/supervisor/endpoints.md index a8139bb1..fa347b54 100644 --- a/docs/api/supervisor/endpoints.md +++ b/docs/api/supervisor/endpoints.md @@ -705,6 +705,7 @@ Return a list of [Backups](api/supervisor/models.md#backup) "type": "partial", "size": 44, "protected": true, + "location": "MountedBackups", "compressed": true, "content": { "homeassistant": true, @@ -742,6 +743,7 @@ Return information about backup manager. "size": 44, "protected": true, "compressed": true, + "location": null, "content": { "homeassistant": true, "addons": ["awesome_addon"], diff --git a/docs/api/supervisor/models.md b/docs/api/supervisor/models.md index c77d8991..9b25d543 100644 --- a/docs/api/supervisor/models.md +++ b/docs/api/supervisor/models.md @@ -190,18 +190,19 @@ The `content` key of a backup object contains the following keys: ## Backup details -| key | type | description | -| ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- | -| slug | string | A generated slug for the backup | -| type | string | The type of backup (full, partial) | -| name | string | The name given to the backup | -| date | string | ISO date string representation of the date the backup was created | -| size | string | The size of the backup in MB | -| protected | boolean | `true` if the backup is password protected | -| homeassistant | string | The version of Home Assistant that was in use | -| addons | list | A list of add-ons in the backup, addons are represented as a dictionary with these keys [`slug`,`name`,`version`,`size`] | -| repositories | list | A list of add-on repository URL's as strings | -| folders | list | A list of strings representing directories | +| key | type | description | +| ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------ | +| slug | string | A generated slug for the backup | +| type | string | The type of backup (full, partial) | +| name | string | The name given to the backup | +| date | string | ISO date string representation of the date the backup was created | +| size | string | The size of the backup in MB | +| protected | boolean | `true` if the backup is password protected | +| location | string or null | The name of the backup mount it's stored on. `null` if it's stored locally. | +| homeassistant | string | The version of Home Assistant that was in use | +| addons | list | A list of add-ons in the backup. Add-ons are represented as a dictionary with these keys [`slug`,`name`,`version`,`size`] | +| repositories | list | A list of add-on repository URL's as strings | +| folders | list | A list of strings representing directories | ## Stats