iRetail PRO store node 1.0.0-m1: audit
3 операции
← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.
Справочники на английском — на языке контрактов, из которых они созданы.
← iRetail PRO store node 1.0.0-m1
Операции
GET
/v1/audit
The audit log.
operationId
listAudit · Право audit.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). |
limit
|
query | integer |
Page size, 1–200. |
after
|
query | string |
Cursor from the previous page. |
Ответы
GET
/v1/audit/export
The audit log as JSON lines, with its hashes (spec/AUDIT.md).
One AuditRecord per line in id order after after_id; an empty body is the end.
operationId
exportAudit · Право audit.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). |
after_id
|
query | integer (int64) |
Start after this entry. |
limit
|
query | integer |
Lines at most. |
Ответы
-
200OKAuditRecord -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
GET
/v1/audit/verify
Walk the audit chain and say where it breaks (spec/AUDIT.md).
operationId
verifyAudit · Право audit.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). |
Ответы
-
200OKAuditVerification -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
Схемы
Error object
Every error response.
error обязательный
|
string |
Stable code, see spec/API.md. |
message обязательный
|
string |
English text for logs. |
details
|
object |
Principal object
kind обязательный
|
"employee" | "device" | "integration" |
|
id обязательный
|
string (uuid) |
|
display_name обязательный
|
string |
AuditEntry object
id обязательный
|
integer (int64) |
|
at обязательный
|
string (date-time) |
|
actor обязательный
|
Principal |
|
approved_by обязательный
|
Principal | null |
|
action обязательный
|
string |
|
entity обязательный
|
string |
|
entity_id обязательный
|
string | null |
|
workplace_id обязательный
|
string (uuid) | null |
|
before обязательный
|
any |
|
after обязательный
|
any |
|
prev_hash обязательный
|
string |
Lower-case hex SHA-256 (spec/AUDIT.md). |
hash обязательный
|
string |
Lower-case hex SHA-256 (spec/AUDIT.md). |
AuditRecord object
One line of the audit export; exactly what the hash covers, plus the hashes (spec/AUDIT.md).
id обязательный
|
integer (int64) |
|
at обязательный
|
string |
|
actor_kind обязательный
|
"employee" | "device" | "integration" | "system" |
|
actor_id обязательный
|
string (uuid) |
|
approved_by обязательный
|
string (uuid) | null |
|
action обязательный
|
string |
|
store_id обязательный
|
string (uuid) |
|
workplace_id обязательный
|
string (uuid) | null |
|
entity обязательный
|
string |
|
entity_id обязательный
|
string | null |
|
before обязательный
|
any |
|
after обязательный
|
any |
|
prev_hash обязательный
|
string |
Lower-case hex SHA-256 (spec/AUDIT.md). |
hash обязательный
|
string |
Lower-case hex SHA-256 (spec/AUDIT.md). |
AuditVerification object
checked обязательный
|
integer (int64) |
|
head обязательный
|
object | null |
|
broken обязательный
|
object | null |
AuditPage object
items обязательный
|
array of AuditEntry |
|
next обязательный
|
string | null |