iRetail PRO store node 1.0.0-m1: audit

3 operations

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

← iRetail PRO store node 1.0.0-m1

Operations

GET /v1/audit The audit log.

operationId listAudit · Permission audit.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).
limit query integer Page size, 1–200.
after query string Cursor from the previous page.

Responses

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 · Permission audit.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).
after_id query integer (int64) Start after this entry.
limit query integer Lines at most.

Responses

GET /v1/audit/verify Walk the audit chain and say where it breaks (spec/AUDIT.md).

operationId verifyAudit · Permission audit.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

Schemas

Error object

Every error response.

error required string Stable code, see spec/API.md.
message required string English text for logs.
details object

Principal object

kind required "employee" | "device" | "integration"
id required string (uuid)
display_name required string

AuditEntry object

id required integer (int64)
at required string (date-time)
actor required Principal
approved_by required Principal | null
action required string
entity required string
entity_id required string | null
workplace_id required string (uuid) | null
before required any
after required any
prev_hash required string Lower-case hex SHA-256 (spec/AUDIT.md).
hash required 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 required integer (int64)
at required string
actor_kind required "employee" | "device" | "integration" | "system"
actor_id required string (uuid)
approved_by required string (uuid) | null
action required string
store_id required string (uuid)
workplace_id required string (uuid) | null
entity required string
entity_id required string | null
before required any
after required any
prev_hash required string Lower-case hex SHA-256 (spec/AUDIT.md).
hash required string Lower-case hex SHA-256 (spec/AUDIT.md).

AuditVerification object

checked required integer (int64)
head required object | null
broken required object | null

AuditPage object

items required array of AuditEntry
next required string | null