Superfy Platform API Documentation


Get Allocated Sensor Data (Chart) API

Require Authentication

This API is used to get allocated sensor data, processed for chart data, based on combination of deviceID and token.

It will display MAX data of each hour from date min to date max. No data will be consider as 0 or using previous data. Date format is Y-m-d H:00. The minute will always be 00, but it calculate data inside that hour, from minute 0 to 59.


URL

api/sensors/sensordatachart/:sensorallocatedID/:charttype

Required parameter (POST)

Optional parameter (GET)

Example JSON Payload

{
  "deviceID": "ABCD-EFGH-IJKL-MNOP",
  "token": "c43fa596e7916827106b591e2bb026cd"
}

Possible return HTTP status code

Return message

{
  "status": "success",
  "message": {
    "current_parameter": "?offset=0",
    "next_parameter": "",
    "previous_parameter": "",
    "start": 0,
    "total": 111,
    "lists": [
      {
        "date": "2016-05-19 13:00",
        "data": 48,
        "configdata": 48
      },
      {
        "date": "2016-05-21 09:00",
        "data": 50,
          "configdata": 48
      },
      {
        "date": "2016-05-21 12:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-23 15:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 11:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 12:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 13:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 14:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 15:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 16:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 17:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 18:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 19:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 20:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 21:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 22:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-25 23:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-26 00:00",
        "data": 0,
        "configdata": 48
      },
      {
        "date": "2016-05-26 01:00",
        "data": 0,
        "configdata": 48
      }
    ],
    "fillLevelSource": "ultrasound"
  }
}