iRetail PRO store node 1.0.0-m1: network
4 operations
← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.
← iRetail PRO store node 1.0.0-m1
Operations
GET
/v1/devices/me/wireguard
This device's private-network profile (spec/NETWORK.md).
operationId
getDeviceWireguard
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
-
200OKDeviceNetworkProfile -
401Error (spec/API.md).Error -
404Error (spec/API.md).Error
PUT
/v1/devices/me/wireguard
Register this device's WireGuard public key; the node assigns its address and answers its profile.
operationId
putDeviceWireguard
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). |
Request body required
application/jsonDeviceWireguardPut
Responses
-
200OKDeviceNetworkProfile -
400Error (spec/API.md).Error -
401Error (spec/API.md).Error -
409Error (spec/API.md).Error
DELETE
/v1/devices/me/wireguard
Remove this device's peer.
operationId
deleteDeviceWireguard
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
-
204Done -
401Error (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 · Permission network.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
-
200OKStoreNetworkState -
401Error (spec/API.md).Error -
403Error (spec/API.md).Error
Schemas
Error object
Every error response.
error required
|
string |
Stable code, see spec/API.md. |
message required
|
string |
English text for logs. |
details
|
object |
DeviceWireguardPut object
public_key required
|
string |
A WireGuard public key, 32 bytes in standard base64. |
DeviceNetworkProfile object
enabled required
|
boolean |
The network is on for this device's store; while false the app uses its node's ordinary address. |
address required
|
string |
The device's address, with /32. |
peer_public_key required
|
string | null |
The store node's public key, or null when the node has no key. |
endpoint_port required
|
integer |
The node's UDP port for devices; the host is the one the device reaches its node by. |
node_address required
|
string |
|
hub_address required
|
string |
|
allowed_ips required
|
array of string |
|
persistent_keepalive required
|
integer |
StoreNetworkState object
enabled required
|
boolean |
The network is on for this store (spec/NETWORK.md, "The switch"). |
address required
|
string | null |
The node's address with its block; null when the store has no block that fits. |
hub_address required
|
string | null |
|
endpoint required
|
string | null |
Where the node reaches the hub, host:port; null outside a chain or while unset. |
tunnel_state required
|
"off" | "up" | "down" |
|
last_handshake_at required
|
string (date-time) | null |
|
public_key required
|
string | null |
The node's own public key, or null without a key file. |
devices required
|
array of object |