Get the latest data of the device

GET
{host}/view_latest_telemetry_data
Returns the latest telemetry data for the device within a year.If channel_index is not specified,return the latest data point under each channel of the device.

Request

Query Parameters
device_eui
(required)
string
device eui
channel_index
string
query data from this channel
measurement_id
string
sensor measurement ID

Response

Name Description
channel_index The channel number
measurement_value Measured value
measurement_id Measured value id
time Measured time

Example request

curl --request GET \
     --url {host}/view_latest_telemetry_data?device_eui=2CF7F12010700001&measurement_id=4104&channel_index=32 \
     --user '<username>:<password>' \
     --include
     
{
    "code": "0",
    "data": [
        {
            "channel_index": 32,
            "points": [
                {
                    "measurement_value": 185,
                    "measurement_id": "4104",
                    "time": "2020-03-26T07:28:28.575Z"
                }
            ]
        }
    ]
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Get the history data of the device

GET
{host}/list_telemetry_data

To obtain the historical data of the specified sensor node device, the data returned for a maximum of one month can only be queried for the last three months

Request

Query Parameters
device_eui
(required)
string
device eui
channel_index
string
query data from this channel
measurement_id
string
sensor measurement ID
limit
number
the number of records you want to query
time_start
number
timestamp, unit millisecond,
the default date is one day ago
time_end
number
timestamp, unit millisecond,Default current time

Response

Returns the representation of the format sampled column data

Name Description
list[0] The channel number and measured value id
list[1] Measured value,contains the measured value and the measured time

Example request

curl --request GET \
  --url {host}/list_telemetry_data?device_eui=2CF7F12210400082 \
  --user '<username>:<password>' \
  --include
  
  
{
    "code": "0",
    "data": {
        "list": [
            [[1, "4097"], [1, "4098"], [2, "4097"]],
            [
                [ [22, "2020-03-06T23:48:00Z"], [23, "2020-03-06T23:48:00Z"], [24, "2020-03-06T23:48:00Z"]]
                [ [22, "2020-03-06T23:48:00Z"], [23, "2020-03-06T23:48:00Z"] ]
                [ [22, "2020-03-06T23:48:00Z"], [23, "2020-03-06T23:48:00Z"] ]
            ]

        ]
    }
}

The following example returns the following:

  • list[0][0]:Represents the channel and the measured value id.In this example, the channel is 1 and the measured value id is 4097
  • list[1][0]:Corresponding to the measurement results of list[0][0]
  • list[1][1]:Corresponding to the measurement results of list[0][1]
  • list[1][0][0]:In this example, the first measurement result corresponding to the measurement value id of channel 1 is 4097, the measurement value is 22, and the measurement time is 2020-03-06 t23:48:00Z

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Get the segment data of the device

GET
{host}/aggregate_chart_points

Divide the large data segment into small data segments, then output the average value of each segment. The return data is up to one year and 250 points each measurement at most.If more than 250 points, it will automatically re-divide the time period to return 250 points.

Request

Query Parameters
device_eui
(required)
string
device eui
channel_index
string
sensor measurement ID
measurement_id
string
query data from this channel
interval
string
The length of the time period to get, unit minute.
60 minutes for default
time_start
number
timestamp, unit millisecond,
the default date is one day ago
time_end
number
timestamp, unit millisecond,
Default current time

Response

Returns the representation of the format sampled column data

Name Description
channel The channel number
average_value Measured average value
measurement_id Measured value id
time Measured time

Example request

curl --request GET \
  --url {host}/aggregate_chart_points?device_eui=2CF7F12210400082 \
  --user '<username>:<password>' \
  --include
  
{
    "code": "0",
    "data": [
        {
            "channel": 1,
            "lists": [
                {
                    "average_value": 7.27,
                    "measurement_id": "4106",
                    "time": "2019-05-25T23:42:00.000Z"
                },
                {
                    "average_value": 6.85,
                    "measurement_id": "4106",
                    "time": "2019-05-27T10:45:00.000Z"
                }
            ]
        }
    ]
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended