Efficiency Data API
Require Authentication
This API is used to generate Efficiency Data Report (Efficiency Heatmap and its Raw Data) for the company based on combination of deviceID and token. It returns all bins including its efficiency level. Efficiency = 100 - ABS(fill level - 100)
URL
api/reports/efficiencydata
Required parameter (POST)
- deviceID
- token
Optional parameter (GET)
All optional parameters use GET method. So it should be embedded in the URL, e.g: api/reports/efficiencydata?o=efficiency
- o «used to sort data, contains field name. Available value: name, efficiency, timestampdata. Default value: efficiency»
- 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»
Optional parameter (POST)
All optional parameters use POST method.
- date_min «filter date minimum based from sensor data»
- date_max «filter date maximum based from sensor data»
- 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»
- latmin «contains minimum latitude that want to be looked for. If passed, value must be numeric.»
- latmax «contains maximum latitude that want to be looked for. If passed, value must be numeric.»
- longmin «contains minimum longitude that want to be looked for. If passed, value must be numeric.»
- longmax «contains maximum longitude that want to be looked for. If passed, value must be numeric.»
Example JSON Payload
{ "deviceID": "ABCD-EFGH-IJKL-MNOP", "token": "c43fa596e7916827106b591e2bb026cd", "projectID": [1, 2], "pintypeID": [1, 2], "latmin": -6.802423572540, "latmax": -5.202423572540, "longmin": 105.779052734375, "longmax": 107.779052734375 }
Possible return HTTP status code
- 200
- 401
- 405
Return message
{ "status": "success", "message": { "current_parameter": "?offset=0", "next_parameter": "?offset=0", "previous_parameter": "?offset=0", "start": 0, "total": 1, "lists": [{ "projectpinID": 9, "name": "test pin type API aedit", "projectID": 1, "pintypeID": 2, "customlocationID": 1, "projectgroupID": 1, "pinAddress1": "Jalan Yunus III 64", "pinAddress2": "", "pinCity": "Kota Jakarta Barat", "pinState": "Daerah Khusus Ibukota Jakarta", "pinCountry": "ID", "pinZipCode": "11540", "latitude": -6.203551769257, "longitude": 106.78137969971, "timestampdata": 1470123190, "efficiency": 43, "configefficiency": -242 }], "fillLevelSource": "ultrasound" } }