iRetail PRO store node 1.0.0-m1: network

4 операции

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/devices/me/wireguard This device's private-network profile (spec/NETWORK.md).

operationId getDeviceWireguard

Параметры

Имя Где Тип Описание
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).

Ответы

PUT /v1/devices/me/wireguard Register this device's WireGuard public key; the node assigns its address and answers its profile.

operationId putDeviceWireguard

Параметры

Имя Где Тип Описание
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).

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

Ответы

DELETE /v1/devices/me/wireguard Remove this device's peer.

operationId deleteDeviceWireguard

Параметры

Имя Где Тип Описание
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).

Ответы

  • 204 Done
  • 401 Error (spec/API.md). Error
GET /v1/network The private network as this store sees it - on or off, its profile, the tunnel, its devices' peers (spec/NETWORK.md).

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

Ответы

Схемы

Error object

Every error response.

error обязательный string Stable code, see spec/API.md.
message обязательный string English text for logs.
details object

DeviceWireguardPut object

public_key обязательный string A WireGuard public key, 32 bytes in standard base64.

DeviceNetworkProfile object

enabled обязательный boolean The network is on for this device's store; while false the app uses its node's ordinary address.
address обязательный string The device's address, with /32.
peer_public_key обязательный string | null The store node's public key, or null when the node has no key.
endpoint_port обязательный integer The node's UDP port for devices; the host is the one the device reaches its node by.
node_address обязательный string
hub_address обязательный string
allowed_ips обязательный array of string
persistent_keepalive обязательный integer

StoreNetworkState object

enabled обязательный boolean The network is on for this store (spec/NETWORK.md, "The switch").
address обязательный string | null The node's address with its block; null when the store has no block that fits.
hub_address обязательный string | null
endpoint обязательный string | null Where the node reaches the hub, host:port; null outside a chain or while unset.
tunnel_state обязательный "off" | "up" | "down"
last_handshake_at обязательный string (date-time) | null
public_key обязательный string | null The node's own public key, or null without a key file.
devices обязательный array of object