RestApiModule - Device Api
Get device info for all devices or by nodeId
Gets basic device information for all devices or for one specific device using its node id.
Authorization level
30 (RestApiModuleGetData )
URL parameters
endcustomerId: Endcustomer Id.
assetId: Asset Id.
nodeId (optional): NodeId of the device in the fieldbus network
- GET /endcustomers/{endcustomerId}/assets/{assetId}/restapi/hal/devices/info?nodeId={nodeId}
Example request:
GET /endcustomers/edfd1133-88ec-4f2d-abb8-16238c6ad926/assets/10401990013-123455789/restapi/hal/devices/info HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS... X-API-Version: 1.0
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Api-Supported-Versions: 1.0 [ { "deviceId": "WTIO1", "name": "wutio1", "hardwareType": "", "hardwareVersion": "", "firmwareVersion": "", "type": 12, "connectionState": 1, "enabled": true, "nodeId": "", "serialNumber": "", "channelType": 2, "channelName": "10.5.255.5:4840" }, { //device info }, //other devices ]
- Status Codes:
200 OK – OK
400 Bad Request – Bad Request, parameters validation failed
401 Unauthorized – Unauthorized. Something is wrong with the Authorization header of the request
403 Forbidden – Forbidden.
429 Too Many Requests – Too Many Requests.
500 Internal Server Error – Internal Server Error
- Response Headers:
Content-Type – application/json; charset=utf-8
Api-Supported-Versions – supported api versions
- Response JSON Object:
info (array) – array of device info of devices matching the query parameters ‘nodeId’. See “get device info by device id” for more info about device info.
Get device info by deviceId
Gets basic device information for one specific device using its device id.
Authorization level
30 (RestApiModuleGetData )
URL parameters
endcustomerId: Endcustomer Id.
assetId: Asset Id.
deviceId: Device Id of peripheral linked to the asset.
- GET /endcustomers/{endcustomerId}/assets/{assetId}/restapi/hal/devices/{deviceId}/info
Example request:
GET /endcustomers/edfd1133-88ec-4f2d-abb8-16238c6ad926/assets/10401990013-123455789/restapi/hal/devices/{deviceId}/info HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS... X-API-Version: 1.0
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Api-Supported-Versions: 1.0 { "deviceId": "WTIO1", "name": "wutio1", "hardwareType": "", "hardwareVersion": "", "firmwareVersion": "", "type": 12, "connectionState": 1, "enabled": true, "nodeId": "", "serialNumber": "", "channelType": 2, "channelName": "10.5.255.5:4840" }
- Status Codes:
200 OK – OK
400 Bad Request – Bad Request, parameters validation failed
401 Unauthorized – Unauthorized. Something is wrong with the Authorization header of the request
403 Forbidden – Forbidden.
429 Too Many Requests – Too Many Requests.
500 Internal Server Error – Internal Server Error
- Response Headers:
Content-Type – application/json; charset=utf-8
Api-Supported-Versions – supported api versions
- Response JSON Object:
deviceId (string) – id of the device
name (string) – user friendly device name
hardwareType (string) – hardware type of the device
hardwareVersion (string) – hardware version of the device
firmwareVersion (string) – firmware version of the device
type (string) – device type (see device types)
connectionState (integer) – connection state of the device. Possible values: 1 (connected), 0 (disconnected)
enabled (boolean) – indicates whether the device is enabled or not
nodeId (string) – nodeId of the device in the fieldbus network
serialNumber (string) – serial number of the device
type – channel type (see channel types)
type – channel name
DeviceTypes
AP286 = 0
DBK = 1
STID = 2
AP338 = 4
AP298 = 5
AP3010 = 6
SmartOne = 7 (EOL)
SmartCover = 8 (EOL)
SmartCardReader = 9
BarcodeScanner = 10
UvcWebcam = 11
WutWebIO = 12
AvutecANPR = 13
RGBTechnologyDisplay = 14
PayterApollo = 15
RPI4Gateway = 16
OAIII = 17
SuloWeighingBin = 18
WHBerlinCoinAcceptor = 19
RPI4GatewayDisplay = 20
ChannelTypes
CAN = 1,
TCPIP = 2
SERIALPORT = 3
PCSC = 4
UVC = 5
UDPIP = 6
DIGITALIO = 7
BLE = 8
WEB = 9
DISPLAY = 10