Raw Sensor Data API
Require Authentication
This API is used to generate Raw Sensor Data Report for the company based on combination of deviceID and token.
URL
api/reports/sensorrawdata
Required parameter (POST)
- deviceID
- token
- date_min «filter date minimum from sensor data»
- date_max «filter date maximum from sensor data»
Optional parameter (GET)
All optional parameters use GET method. So it should be embedded in the URL, e.g: api/reports/sensorrawdata?ot=desc&per_page=100
- o «used to sort data, contains field name. Available value: timestampdata. Default value: timestampdata»
- ot «used to sort data, contains sort type. Available value: asc, desc. Default value: desc»
- per_page «indicates how many data that will be displayed in each call. Value must be a number between 1 to 500. Default value: 500»
- 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»
Optional parameter (POST)
All optional parameters use POST method.
- pintypeID «filter pintypeID that want to be looked for. Can be in array format to filter multiple pintypeID at the same time. Value must exist in database. To get available pintypeID, please visit Get Available Asset Types»
- projectID «filter projectID that want to be looked for. Can be in array format to filter multiple projectID at the same time. Value must exist in database. To get available projectID, please visit Get Available Zones»
- projectgroupID «filter projectgroupID that want to be looked for. Can be in array format to filter multiple projectgroupID at the same time. Value must exist in database. To get available projectgroupID, please visit Get Available Groups»
- pinstagsID «filter pinstagsID that want to be looked for. Can be in array format to filter multiple pinstagsID at the same time. Value must exist in database. To get available pinstagsID, please visit Get Available Tags»
- sensorsID «filter sensorsID that want to be looked for. Can be in array format to filter multiple sensorsID at the same time. Value must exist in database. To get available sensorsID, please visit Get Available Sensors»
- projectpinID «filter projectpinID that want to be looked for. Can be in array format to filter multiple projectpinID at the same time. Value must exist in database. To get available projectID, please visit Get Available Pins on Map (Specific or All Zone) without mention latitude and longitude»
Example JSON Payload
{ "deviceID": "ABCD-EFGH-IJKL-MNOP", "token": "c43fa596e7916827106b591e2bb026cd", "date_min": 1463638887, "date_max": 1470123190 }
Possible return HTTP status code
- 200
- 401
- 405
Return message
{ "status": "success", "message": { "lists": [ { "timestampdata": 1690468563, "sensorallocatedID": 4236, "sensorsID": 7819, "projectpinID": 6975, "name": "Waste Insights Test G20005962", "pintypeID": 233, "projectID": 324, "projectgroupID": 0, "allocationDate": 1643935861, "endDate": 0, "ultrasoundExist": "N", "fill_level": 125, "nearest_object_to_fill_line": -25, "temperatureOkay": "Y", "temperatureExist": "Y", "temperatureValue": 2, "batteryLevel": 1470477021, "signalStrength_rssi_dbm": 0, "accelerometer_x": -1.27999997139, "accelerometer_y": -1.27999997139, "accelerometer_z": -1.27999997139, "version": "26", "gpsLat": "-6.203731536865", "gpsLon": "106.820159912109", "ultrasound": 0, "laserDistance1": 0, "laserDistance2": 0, "companyID": 16, "configfilllevel": 125, "configheight": "-25" }, { "timestampdata": 1690466997, "sensorallocatedID": 4236, "sensorsID": 7819, "projectpinID": 6975, "name": "Waste Insights Test G20005962", "pintypeID": 233, "projectID": 324, "projectgroupID": 0, "allocationDate": 1643935861, "endDate": 0, "ultrasoundExist": "N", "fill_level": 125, "nearest_object_to_fill_line": -25, "temperatureOkay": "Y", "temperatureExist": "Y", "temperatureValue": 2, "batteryLevel": 1815663110, "signalStrength_rssi_dbm": 0, "accelerometer_x": -1.27999997139, "accelerometer_y": -1.27999997139, "accelerometer_z": -1.27999997139, "version": "23", "gpsLat": "-6.203731536865", "gpsLon": "106.820159912109", "ultrasound": 0, "laserDistance1": 0, "laserDistance2": 0, "companyID": 16, "configfilllevel": 125, "configheight": "-25" } ], "current_parameter": "?offset=0", "next_parameter": "?offset=500", "previous_parameter": "", "start": 0, "total": 2, "fillLevelSource": "laseravg" } }