iRetail PRO hub 1.0.0-m5: backups

5 операций

← Вся документация · Источник: контракты, openapi/hub-v1.yaml на коммите 8000474.

Справочники на английском — на языке контрактов, из которых они созданы.

← iRetail PRO hub 1.0.0-m5

Операции

GET /v1/backup-policy The organization's backup policy (spec/BACKUP.md).

operationId getBackupPolicy · Право backup.read

Параметры

Имя Где Тип Описание
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).

Ответы

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 · Право backup.manage

Параметры

Имя Где Тип Описание
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.

Тело запроса обязательный

Ответы

GET /v1/backups Stored and failed archives, newest first.

operationId listBackups · Право backup.read

Параметры

Имя Где Тип Описание
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.

Ответы

  • 200 OK object
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
POST /v1/backups Ask a store (or the hub) for an archive now. 409 backup_disabled without an enabled policy.

operationId requestBackup · Право backup.manage

Параметры

Имя Где Тип Описание
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).

Тело запроса обязательный

Ответы

  • 202 Asked; the archive arrives in the list when stored. object
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
GET /v1/backups/{id}/download The encrypted archive, with its file name; only the organization's age identities open it.

operationId downloadBackup · Право backup.read

Параметры

Имя Где Тип Описание
id обязательный 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).

Ответы

  • 200 The archive. string (binary)
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error

Схемы

BackupPolicyPut object

enabled обязательный boolean
recipients обязательный array of string age X25519 public keys; at least one when enabled.
daily_at обязательный string
retention_days обязательный integer
keep_last обязательный integer

BackupPolicy object

enabled обязательный boolean
recipients обязательный array of string
daily_at обязательный string
retention_days обязательный integer
keep_last обязательный integer
storage обязательный "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 обязательный integer (int64)

BackupRequest object

store_id string (uuid)
hub boolean The hub's own database instead of a store's.