iRetail PRO store node 1.0.0-m1: roles

2 операции

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/roles Roles of the organization.

operationId listRoles · Право role.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).

Ответы

  • 200 OK array of Role
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
PUT /v1/roles/{code} Create or change a custom role; built-in roles are read-only.

The role as written is no wider than the editor over the request's scope and every scope it is assigned in, kept permissions included (spec/RBAC.md, Bounded by one's own rights); 403 forbidden names the first permission not held, with limit and value when a limit fails.

operationId putRole · Право role.edit

Параметры

Имя Где Тип Описание
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).
code обязательный path string Role code.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

  • 200 OK Role
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (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

LocalizedText map of string

Text by language code; the organization's default language must be present.

Role object

code обязательный string
name обязательный LocalizedText
scope обязательный "network" | "store" | "workplace"
permissions обязательный array of string
limits обязательный map of integer (int64)
builtin обязательный boolean

RolePut object

name обязательный LocalizedText
scope обязательный "network" | "store" | "workplace"
permissions обязательный array of string
limits обязательный map of integer (int64)