Get Specific Sensor Detail API
Require Authentication
This API is used to get specific sensor detailed information for the company based on combination of deviceID and token.
URL
api/sensors/detail/:sensorsID
Required parameter (in URL)
- :sensorsID «contains sensorsID that want to be looked for. It must be put in the URL, e.g: api/sensors/detail/1»
Required parameter (POST)
- deviceID
- token
Optional parameter
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2"
}
Possible return HTTP status code
- 200
- 401
- 404
- 405
Return message
{
"status": "success",
"message": {
"sensorsID": 12001,
"sensorstokenID": 3,
"sensorCompany": "SmartsensorNew",
"sensorDeviceID": "aaaaaaaaaaaaaaab",
"firmwareVersion": "0.1.0",
"sensorName": "aaab",
"isAllocated": "N",
"currentPinAllocated": null,
"description": "sensor description",
"heartbeatFrequency": 0,
"companyID": 16,
"createdDate": 1692363203,
"updatedDate": 1692363203,
"createdByUserID": 90,
"updatedByUserID": 90,
"connectivityType": "LORAWAN AS923",
"simCardNumber": "",
"connectivityProvider": "Actility",
"latest_sensorsdata": {
"sensorsdataID": 21547633,
"sensorallocation": null,
"sensorEventID": "",
"sensorDeviceID": "aaaaaaaaaaaaaaab",
"firmwareVersion": "",
"headerMethod": "heartbeat",
"reason": "SAMPLE_PERIOD",
"temperatureExist": "Y",
"temperatureValue": 720,
"temperatureOkay": "N",
"accelerometer_x": 0,
"accelerometer_y": 0,
"accelerometer_z": -0.649999976158,
"ultrasoundExist": "Y",
"ultrasound": 59,
"batteryLevel": 100,
"signalStrengthExist": "Y",
"signalStrength_rssi_dbm": -93,
"signalStrength_bitErrorRate": 0,
"laserDistance1": 112,
"laserDistance2": 118,
"averageDistance": 96,
"laserAverageDistance": 115,
"timestampdata": 1673881939
},
"fillLevelSource": "laseravg",
"sensorallocatedID": 0
}
}
Note:
"latest_sensorsdata" may have null value if there is no latest sensor data.
"currentPinAllocated", "latest_sensorsdata", and "sensorallocation" might be null if there is no data