iRetail PRO hub 1.0.0-m5: alerts

4 operations

← All documentation · Source: contracts openapi/hub-v1.yaml at 8000474.

← iRetail PRO hub 1.0.0-m5

Operations

GET /v1/alerts The chain's alerts, newest first (spec/HEALTH.md).

operationId listAlerts · Permission alert.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).
state query "open" | "all"
store_id query string (uuid)
limit query integer
after query string The cursor of the previous page.

Responses

  • 200 OK object
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
POST /v1/alerts/{id}/acknowledge Acknowledge an open alert; it stays open and sends no further notice. 409 alert_resolved for one already resolved.

operationId acknowledgeAlert · Permission alert.manage

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

  • 200 OK Alert
  • 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/alerts/settings The alert thresholds and the webhook's name.

operationId getAlertSettings · Permission alert.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

PUT /v1/alerts/settings Set the alert thresholds and the webhook's name (its URL is read from IRETAIL_ALERT_WEBHOOK_<NAME>).

operationId putAlertSettings · Permission alert.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

Responses

Schemas

AlertKind "node_silent" | "node_behind" | "shift_open_long" | "certificate_expiring" | "redis_down" | "backup_overdue"

node_silent · node_behind · shift_open_long · certificate_expiring · redis_down · backup_overdue

Alert object

id required string (uuid)
kind required AlertKind
store_id required string (uuid)
node_id required string (uuid)
state required "open" | "resolved"
opened_at required string (date-time)
resolved_at required string (date-time) | null
acknowledged_by required string (uuid) | null
acknowledged_at required string (date-time) | null
details required object By kind (spec/HEALTH.md, "Alerts"); times as RFC 3339, counts as integers.
notice required "sent" | "pending" | "failed" | null The webhook notice's state, or null without a webhook.

AlertSettingsPut object

silent_minutes required integer
behind_entries required integer
behind_minutes required integer
shift_hours required integer
certificate_days required integer
backup_hours required integer
webhook required string | null The webhook's name; the hub reads its URL from IRETAIL_ALERT_WEBHOOK_<NAME> (or …_FILE). Null for none.

AlertSettings object

silent_minutes required integer
behind_entries required integer
behind_minutes required integer
shift_hours required integer
certificate_days required integer
backup_hours required integer
webhook required string | null
webhook_configured required boolean The hub found the named webhook's URL in its environment; the URL itself is never shown.
version required integer (int64)