Get Allocated Sensor Data (Raw) API
Require Authentication
This API is used to get allocated sensor data, unprocessed/raw data, based on combination of deviceID and token.
URL
api/sensors/rawsensordata/:sensorallocatedID
Required parameter (POST)
- deviceID
- token
- sensorallocatedID «It must be put in the URL, e.g: api/sensors/rawsensordata/1»
Optional parameter
- dmin «contains timestampdata minimum that want to be allocated. dmin should be numeric in unix time format»
- dmax «contains timestampdata maximum that want to be allocated. dmax should be numeric in unix time format»
- o «used to sort data, contains field name. Available value: timestampdata, temperatureValue, ultrasound, batteryVoltage_mV, signalStrength_rssi_dbm. Default value: timestampdata»
- ot «used to sort data, contains sort type. Available value: asc, desc. Default value: asc»
- per_page «indicates how many data that will be displayed in each call. Value must be a number between 1 to 500. Default value: none (unlimited result)»
- offset «indicates the first data index that will be displayed in each call. Value must be a number with minimum value is 0. Default value: 0»
Example JSON Payload
{ "deviceID": "ABCD-EFGH-IJKL-MNOP", "token": "c43fa596e7916827106b591e2bb026cd" }
Possible return HTTP status code
- 200
- 401
- 405
Return message
{ "status": "success", "message": { "current_parameter": "?offset=0", "next_parameter": "", "previous_parameter": "", "lastCollected": "1669821379", "start": 0, "depthWhenEmpty_cm": 20, "distanceSensorToFillLine_cm": 2, "lists": [ { "sensorsdataID": 11960240, "sensorstokenID": 3, "sensorallocatedID": 3609, "sensorEventID": "", "sensorDeviceID": "aaaaaaaaaaaaaaab", "firmwareVersion": "", "headerMethod": "heartbeat", "reason": "SAMPLE_PERIOD", "temperatureExist": "Y", "temperatureValue": 700, "temperatureOkay": "N", "accelerometer_x": 0, "accelerometer_y": 0, "accelerometer_z": -0.649999976158, "ultrasoundExist": "Y", "ultrasound": 59, "batteryLevel": 99, "signalStrengthExist": "Y", "signalStrength_rssi_dbm": -93, "signalStrength_bitErrorRate": 0, "laserDistance1": 132, "laserDistance2": 138, "averageDistance": 109, "laserAverageDistance": 135, "timestampdata": 1636395309, "version": "119", "gpsLat": "-6.159944534302", "gpsLon": "106.806343078613", "payloadTransport": "LORAWAN AS923" }, { "sensorsdataID": 11960242, "sensorstokenID": 3, "sensorallocatedID": 3609, "sensorEventID": "", "sensorDeviceID": "aaaaaaaaaaaaaaab", "firmwareVersion": "", "headerMethod": "heartbeat", "reason": "SAMPLE_PERIOD", "temperatureExist": "Y", "temperatureValue": 700, "temperatureOkay": "N", "accelerometer_x": 0, "accelerometer_y": 0, "accelerometer_z": -0.649999976158, "ultrasoundExist": "Y", "ultrasound": 59, "batteryLevel": 99, "signalStrengthExist": "Y", "signalStrength_rssi_dbm": -93, "signalStrength_bitErrorRate": 0, "laserDistance1": 2, "laserDistance2": 8, "averageDistance": 23, "laserAverageDistance": 5, "timestampdata": 1636395319, "version": "120", "gpsLat": "-6.159944534302", "gpsLon": "106.806343078613", "payloadTransport": "LORAWAN AS923" } ], "fillLevelSource": "laseravg" } }