Skip to content

Commit d905151

Browse files
committed
Document fields added and changed from continued cloud backup effort
1 parent d93a074 commit d905151

File tree

2 files changed

+82
-57
lines changed

2 files changed

+82
-57
lines changed

docs/api/supervisor/endpoints.md

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,12 @@ Return a list of [Backups](api/supervisor/models.md#backup)
785785
"protected": true,
786786
"location": "MountedBackups",
787787
"locations": ["MountedBackups"],
788+
"location_attributes": {
789+
"MountedBackups": {
790+
"protected": true,
791+
"size_bytes": 44070259
792+
}
793+
},
788794
"compressed": true,
789795
"content": {
790796
"homeassistant": true,
@@ -825,6 +831,12 @@ Return information about backup manager.
825831
"compressed": true,
826832
"location": null,
827833
"locations": [null],
834+
"location_attributes": {
835+
".local": {
836+
"protected": true,
837+
"size_bytes": 44070259
838+
}
839+
},
828840
"content": {
829841
"homeassistant": true,
830842
"addons": ["awesome_addon"],
@@ -849,10 +861,11 @@ Create a full backup.
849861
| name | string | True | The name you want to give the backup |
850862
| password | string | True | The password you want to give the backup |
851863
| compressed | boolean | True | `false` to create uncompressed backups |
852-
| location | list, string or null | True | Name of a backup mount or `null` for /backup. Use a list of backup mounts or `null` to make backup in multiple places |
864+
| location | list or string | True | Name of a backup mount or `.local` for `/backup`. Use a list to make the backup in multiple places |
853865
| homeassistant_exclude_database | boolean | True | Exclude the Home Assistant database file from backup |
854866
| background | boolean | True | Return `job_id` immediately, do not wait for backup to complete. Clients must check job for status and slug. |
855867
| extra | dictionary | True | Extra metadata to store with the backup for client-specific use cases |
868+
| filename | string | True | The name for the backup file created |
856869

857870
**Example response:**
858871

@@ -880,13 +893,15 @@ Upload a backup.
880893

881894
| key | multiple | description |
882895
| --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
883-
| location | Yes | The name of the backup mount to upload to. Use empty string for `/backup`. Provide multiple locations to upload to multiple places |
896+
| location | Yes | The name of the backup mount to upload to. Use `.local` for `/backup`. Provide multiple locations to upload to multiple places |
897+
| filename | No | The name for the backup file created |
884898

885899
*Examples*
886900

887-
- `?location=` - Upload to `/backup`
901+
- `?location=.local` - Upload to `/backup`
888902
- `?location=MountedBackups` - Upload to backup mount named `MountedBackup`
889-
- `?location=&location=MountedBackups` - Upload to both of the above places
903+
- `?location=.local&location=MountedBackups` - Upload to both of the above places
904+
- `?filename=my_backup.tar` - Create backup file in default backup location with name `my_backup.tar`
890905

891906
**Example response:**
892907

@@ -920,10 +935,11 @@ Create a partial backup.
920935
| addons | list or `ALL` | Content | A list of strings representing add-on slugs. Provide the string `ALL` instead of a list to include all currently installed add-ons |
921936
| folders | list | Content | A list of strings representing directories |
922937
| compressed | boolean | True | `false` to create uncompressed backups |
923-
| location | list, string or null | True | Name of a backup mount or `null` for /backup. Use a list of backup mounts or `null` to make backup in multiple places |
938+
| location | list or string | True | Name of a backup mount or `.local` for /backup. Use a list to the make backup in multiple places |
924939
| homeassistant_exclude_database | boolean | True | Exclude the Home Assistant database file from backup |
925940
| background | boolean | True | Return `job_id` immediately, do not wait for backup to complete. Clients must check job for status and slug. |
926941
| extra | dictionary | True | Extra metadata to store with the backup for client-specific use cases |
942+
| filename | string | True | The name for the backup file created |
927943

928944
**You need to supply at least one key of the ones marked "Content" in the optional column in the payload.**
929945

@@ -996,13 +1012,13 @@ Download the backup file with the given slug.
9961012

9971013
**Query**
9981014

999-
| key | multiple | description |
1000-
| --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1001-
| location | No | Specify which location to download the backup from of the ones it exists in. Use empty string for `/backup` (equivalent to `null` in the `locations` field of [Backup](api/supervisor/models.md#backup)) |
1015+
| key | multiple | description |
1016+
| --------- | -------- | ------------------------------------------------------------------------------------------------------- |
1017+
| location | No | Specify which location to download the backup from of the ones it exists in. Use `.local` for `/backup` |
10021018

10031019
*Examples*
10041020

1005-
- `?location=` - Download from `/backup`
1021+
- `?location=.local` - Download from `/backup`
10061022
- `?location=MountedBackups` - Download from backup mount named `MountedBackup`
10071023

10081024
</ApiEndpoint>
@@ -1019,9 +1035,9 @@ Removes the backup file with the given slug.
10191035

10201036
**Payload:**
10211037

1022-
| key | type | optional | description |
1023-
| -------- | ---- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1024-
| location | list | True | Specify which locations to remove the backup from instead of removing it from all locations. See `locations` field of [Backup](api/supervisor/models.md#backup)|
1038+
| key | type | optional | description |
1039+
| -------- | ---- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1040+
| location | list | True | Specify which locations to remove the backup from instead of removing it from all locations. See `location_attributes` field from `/backups/<backup>/info` for locations |
10251041

10261042
</ApiEndpoint>
10271043

@@ -1031,11 +1047,11 @@ Does a full restore of the backup with the given slug.
10311047

10321048
**Payload:**
10331049

1034-
| key | type | optional | description |
1035-
| ---------- | -------------- | -------- | ------------------------------------ |
1036-
| password | string | True | The password for the backup if any |
1037-
| background | boolean | True | Return `job_id` immediately, do not wait for restore to complete. Clients must check job for status. |
1038-
| location | string or null | True | Specify which location to restore the backup from of the ones it exists in. See `locations` field of [Backup](api/supervisor/models.md#backup) |
1050+
| key | type | optional | description |
1051+
| ---------- | ------- | -------- | ------------------------------------ |
1052+
| password | string | True | The password for the backup if any |
1053+
| background | boolean | True | Return `job_id` immediately, do not wait for restore to complete. Clients must check job for status. |
1054+
| location | string | True | Specify which location to restore the backup from of the ones it exists in. See `location_attributes` field from `/backups/<backup>/info` for locations |
10391055

10401056
**Example response:**
10411057

@@ -1060,14 +1076,14 @@ Does a partial restore of the backup with the given slug.
10601076

10611077
**Payload:**
10621078

1063-
| key | type | optional | description |
1064-
| ------------- | -------------- | -------- | ---------------------------------------------- |
1065-
| homeassistant | boolean | Content | `true` if Home Assistant should be restored |
1066-
| addons | list | Content | A list of add-on slugs that should be restored |
1067-
| folders | list | Content | A list of directories that should be restored |
1068-
| password | string | True | The password for the backup if any |
1069-
| background | boolean | True | Return `job_id` immediately, do not wait for restore to complete. Clients must check job for status. |
1070-
| location | string or null | True | Specify which location to restore the backup from of the ones it exists in. See `locations` field of [Backup](api/supervisor/models.md#backup) |
1079+
| key | type | optional | description |
1080+
| ------------- | ------- | -------- | ---------------------------------------------- |
1081+
| homeassistant | boolean | Content | `true` if Home Assistant should be restored |
1082+
| addons | list | Content | A list of add-on slugs that should be restored |
1083+
| folders | list | Content | A list of directories that should be restored |
1084+
| password | string | True | The password for the backup if any |
1085+
| background | boolean | True | Return `job_id` immediately, do not wait for restore to complete. Clients must check job for status. |
1086+
| location | string | True | Specify which location to restore the backup from of the ones it exists in. See `location_attributes` field from `/backups/<backup>/info` for locations |
10711087

10721088
**You need to supply at least one key of the ones marked "Content" in the optional column in the payload.**
10731089

0 commit comments

Comments
 (0)