iRetail PRO hub 1.0.0-m5: backups
5 operations
← All documentation · Source: contracts openapi/hub-v1.yaml at 8000474.
Operations
GET
/v1/backup-policy
The organization's backup policy (spec/BACKUP.md).
operationId
getBackupPolicy · Permission backup.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Responses
-
200OKBackupPolicy -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
PUT
/v1/backup-policy
Set the backup policy; it reaches every store with its record. 409 backup_storage_missing to enable it without storage at the hub.
Recipients that differ from the kept ones, as a set, need backup.recipients too (403 forbidden naming it); the change is audited and posted to the alerts' webhook (spec/BACKUP.md, Changing the recipients).
operationId
putBackupPolicy · Permission backup.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
If-Match
|
header | string |
The version the change is based on. |
Request body required
application/jsonBackupPolicyPut
Responses
GET
/v1/backups
Stored and failed archives, newest first.
operationId
listBackups · Permission backup.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
store_id
|
query | string (uuid) |
|
hub
|
query | boolean |
Only the hub's own archives. |
limit
|
query | integer |
|
after
|
query | string |
The cursor of the previous page. |
Responses
POST
/v1/backups
Ask a store (or the hub) for an archive now. 409 backup_disabled without an enabled policy.
operationId
requestBackup · Permission backup.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Request body required
application/jsonBackupRequest
Responses
GET
/v1/backups/{id}/download
The encrypted archive, with its file name; only the organization's age identities open it.
operationId
downloadBackup · Permission backup.read
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required
|
path | string (uuid) |
|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
Responses
Schemas
BackupPolicyPut object
enabled required
|
boolean |
|
recipients required
|
array of string |
age X25519 public keys; at least one when enabled. |
daily_at required
|
string |
|
retention_days required
|
integer |
|
keep_last required
|
integer |
BackupPolicy object
enabled required
|
boolean |
|
recipients required
|
array of string |
|
daily_at required
|
string |
|
retention_days required
|
integer |
|
keep_last required
|
integer |
|
storage required
|
"s3" | "directory" | null |
Where the hub keeps archives, or null without storage (then the policy cannot be enabled). |
recipients_changed_at
|
string (date-time) | null |
When the recipients last changed; null before any change since 1.0. |
recipients_changed_by
|
string (uuid) | null |
The employee who last changed them; null with recipients_changed_at. |
version required
|
integer (int64) |
BackupRequest object
store_id
|
string (uuid) |
|
hub
|
boolean |
The hub's own database instead of a store's. |