iRetail PRO hub 1.0.0-m5: nodes
4 операции
← Вся документация · Источник: контракты, openapi/hub-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
Store nodes registered with the hub.
Операции
POST
/v1/stores/{id}/registration-tokens
A one-time token a store's node registers with (spec/SYNC.md, Registration); shown once.
operationId
createRegistrationToken · Право node.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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). |
Ответы
-
201CreatedRegistrationToken -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error -
404Error (spec/API.md).Error -
409Error (spec/API.md).Error
GET
/v1/nodes
Registered store nodes and their sync state.
operationId
listNodes · Право node.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). |
Ответы
GET
/v1/nodes/{id}
One node and its sync state.
operationId
getNode · Право node.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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). |
Ответы
POST
/v1/nodes/{id}/revoke
Refuse the node's certificate from now on; the store keeps selling, cut off from the hub.
operationId
revokeNode · Право node.manage
Параметры
| Имя | Где | Тип | Описание |
|---|---|---|---|
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). |
Ответы
Схемы
RegistrationToken object
token обязательный
|
string |
Shown once; works once (spec/SYNC.md, Registration). |
store_id обязательный
|
string (uuid) |
|
expires_at обязательный
|
string (date-time) |
Node object
id обязательный
|
string (uuid) |
|
store_id обязательный
|
string (uuid) |
|
status обязательный
|
"active" | "revoked" |
|
version обязательный
|
string |
The node's version at its last exchange. |
connected обязательный
|
boolean |
An exchange is open now. |
last_seen_at обязательный
|
string (date-time) | null |
|
hub_cursor обязательный
|
integer (int64) |
The last hub seq the store applied. |
hub_head обязательный
|
integer (int64) |
The hub's newest seq for this store; hub_head − hub_cursor is how far behind the store is. |
store_ack обязательный
|
integer (int64) |
The last store seq the hub applied. |
store_head обязательный
|
integer (int64) |
The store's newest seq at its last exchange; store_head − store_ack is what waits to arrive. |
certificate_expires_at обязательный
|
string (date-time) |
|
registered_at обязательный
|
string (date-time) |
|
health обязательный
|
NodeHealth | null |
The store's last health report (spec/HEALTH.md), or null before the first. |
compatibility обязательный
|
Compatibility | null |
Why the hub refuses this node at the exchange (spec/RELEASES.md, Compatibility), until it connects; null otherwise. |
NodeHealth object
reported_at обязательный
|
string (date-time) |
|
started_at обязательный
|
string (date-time) |
|
shifts_open обязательный
|
integer |
|
oldest_shift_opened_at обязательный
|
string (date-time) | null |
|
journal_pending обязательный
|
integer (int64) |
|
search_queue обязательный
|
integer (int64) |
|
redis_ok обязательный
|
boolean |
|
tunnel_state обязательный
|
"off" | "up" | "down" | null |
The store's tunnel to the hub (spec/NETWORK.md); null from a node that does not report it. |
audit_head обязательный
|
object | null |
The head of the store's audit chain from its last report (spec/AUDIT.md, Anchors); null from a node that does not report it. |
update обязательный
|
NodeUpdate | null |
The store's update from its last report (spec/RELEASES.md); null from a node that does not report it. |
apps обязательный
|
array of AppVersionCount |
Per app, platform and version, how many of the store's devices run it, failed it and are silent, from its last report (spec/RELEASES.md, Reporting); empty from a node that does not report them. |
app_offers обязательный
|
array of AppOffer |
The store's offers of the release it runs (spec/RELEASES.md, One device first). |
NodeUpdate object
The update fields of a store's last health report (spec/HEALTH.md, spec/RELEASES.md).
running_version обязательный
|
string |
|
previous_version обязательный
|
string | null |
|
target_version обязательный
|
string | null |
|
target_record_version обязательный
|
integer (int64) |
|
state обязательный
|
UpdateState |
|
state_since обязательный
|
string (date-time) | null |
|
step обязательный
|
UpdateStep | null |
|
error обязательный
|
string | null |
|
healthz обязательный
|
"ok" | "failing" | null |
|
backup обязательный
|
UpdateBackup | null |
The pre-update archive of the target's attempt; null before it or from a node that does not report it. |
rehearsal обязательный
|
UpdateRehearsal | null |
|
background_tasks_running обязательный
|
integer |
The store's background tasks pending or running (spec/RELEASES.md, Migrations). |
background_tasks_failed обязательный
|
integer |