๐ฅ๏ธDevices
This page provides a description of the available API routes for managing devices.
In the PORTOS ecosystem, each cash register, mobile cashier, BackOffice, or any other software application is represented by a device that stores its settings and preferences.
Device is represented by Device
class.
API methods
Get devices
GET
http://{server-address}/devices
Returns all devices that matches query parameters. Result is of type QueryResult<Device>
.
Query Parameters
Name | Type | Description |
---|---|---|
name | string | Supports NData syntax. |
$skip | int | Pagination property. Describing number of records to skip from beginning of result collection. |
$take | int | Pagination property. Maximum count of items to be returned. |
$sort | string[] | Comma separated list of property names. Please see NData syntax. |
$count | bool | If set to |
isActive | bool | Supports NData syntax. |
envName | string | Supports NData syntax. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Get device by name
GET
http://{server-address}/devices/{name}
Result is of type Device.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique device name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Create device
POST
http://{server-address}/devices
Creates new device. Result is of type Device.
Required rights
Authorized user must have DeviceCreate
right assigned.
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | Device | Model to create. |
Create or update device
PUT
http://{server-address}/devices/{name}
Creates new or updates existing device. Result is of type Device.
Required rights
Authorized user must have assigned DeviceCreate
or DeviceUpdate
right.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique device name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | Device | Model to create or update. |
Delete device by name
DELETE
http://{server-address}/devices/{name}
Required rights
Authorized user must have DeviceDelete
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique device name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Last updated