.. include:: /atkeywords.rst .. _Contract_RestApiModule_Device: #################################### RestApiModule - Device Api #################################### .. _Contract_RestApiModule_Device_GetDeviceInfoForAllOrbyNodeId: 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** * :red:`30 (RestApiModuleGetData )` **URL parameters** * **endcustomerId**: Endcustomer Id. * **assetId**: Asset Id. * **nodeId** (optional): NodeId of the device in the fieldbus network .. http:get:: /endcustomers/{endcustomerId}/assets/{assetId}/restapi/hal/devices/info?nodeId={nodeId} **Example request**: .. sourcecode:: http 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**: .. sourcecode:: http 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 ] :statuscode 200: OK :statuscode 400: Bad Request, parameters validation failed :statuscode 401: Unauthorized. Something is wrong with the :mailheader:`Authorization` header of the request :statuscode 403: Forbidden. :statuscode 429: Too Many Requests. :statuscode 500: Internal Server Error :resheader Content-Type: application/json; charset=utf-8 :resheader Api-Supported-Versions: supported api versions :>json array info: array of device info of devices matching the query parameters 'nodeId'. See :ref:`"get device info by device id" ` for more info about device info. .. _Contract_RestApiModule_Device_GetDeviceInfoById: Get device info by deviceId **************************** Gets basic device information for one specific device using its device id. **Authorization level** * :red:`30 (RestApiModuleGetData )` **URL parameters** * **endcustomerId**: Endcustomer Id. * **assetId**: Asset Id. * **deviceId**: Device Id of peripheral linked to the asset. .. http:get:: /endcustomers/{endcustomerId}/assets/{assetId}/restapi/hal/devices/{deviceId}/info **Example request**: .. sourcecode:: http 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**: .. sourcecode:: http 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" } :statuscode 200: OK :statuscode 400: Bad Request, parameters validation failed :statuscode 401: Unauthorized. Something is wrong with the :mailheader:`Authorization` header of the request :statuscode 403: Forbidden. :statuscode 429: Too Many Requests. :statuscode 500: Internal Server Error :resheader Content-Type: application/json; charset=utf-8 :resheader Api-Supported-Versions: supported api versions :>json string deviceId: id of the device :>json string name: user friendly device name :>json string hardwareType: hardware type of the device :>json string hardwareVersion: hardware version of the device :>json string firmwareVersion: firmware version of the device :>json integer type: device type (see :ref:`device types `) :>json integer connectionState: connection state of the device. Possible values: 1 (connected), 0 (disconnected) :>json boolean enabled: indicates whether the device is enabled or not :>json string nodeId: nodeId of the device in the fieldbus network :>json string serialNumber: serial number of the device :>json integer type: channel type (see :ref:`channel types `) :>json string type: channel name .. _Contract_RestApiModule_Device_DeviceTypes: 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 .. _Contract_RestApiModule_Device_ChannelTypes: ChannelTypes ************ * CAN = 1, * TCPIP = 2 * SERIALPORT = 3 * PCSC = 4 * UVC = 5 * UDPIP = 6 * DIGITALIO = 7 * BLE = 8 * WEB = 9 * DISPLAY = 10