list device EUIs

GET
{host}/device/list_euis
this is a quick method to get all device EUIs belonging to the organization
Query Parameters
offset
number
current page number, start from 1, default = 1
length
string
the number of rows in page, default = 20

response

{
    "code": "0",
    "data": {
        "gateway": [
            "2CF7F1........",
            "2CF7F1........",
            "2CF7F1........"
        ],
        "node": [
            "2CF7F1........",
            "2CF7F1........",
            "2CF7F1........",
            "2CF7F1........",
            "2CF7F1........"
        ]
    }
}

Example request

curl --request GET \
  --url {host}/device/list_euis \
  --user '<username>:<password>'

get the latest data of the device

Return the latest telemetry data from the device within a year

GET
{host}/channel/view_latest/:node_eui
Path Parameters
node_eui
(required)
string
Node EUI
Query Parameters
measure_id
string
sensor measurement ID,
eg. measure_id=4097
channel
string
query data from this channel, if omitted,
measurements of all channels will be returned

response

{
    "code": "0",
    "data": [
        {
            "channel": "32", // channel number
            "points": [
                {
                    "value": "185", // the measurement value
                    "measurement_id": "4104", // the measurement id
                    "created": "1585207708575" // when the record is created 
                }
            ]
        }
    ]
}

Example request

curl --request GET \
     --url {host}/channel/view_latest/:node_eui?measure_id:measure_id&channel:channel \
     --user '<username>:<password>' \
     --include

get the history data of the device

GET
{host}/channel/view_raw/:node_eui
Get the history data of a specified node.

To obtain the historical data of the specified sensor node device, the data returned for a maximum of one month

Path Parameters
node_eui
(required)
string
Node EUI
Query Parameters
measure_id
string
sensor measurement ID,
eg. measure_id=4097
channel
string
query data from this channel, if omitted,
measurements of all channels will be returned
limit
number
the number of records you want to query, max is 400
time_start
number
timestamp, unit millisecond
time_end
number
timestamp, unit millisecond

response

{
    "code": "0",
    "data": [
        {
            "channel": "1", // channale number
            "points": [
                {
                    "measurement_id": "4099", // the measurement id
                    "value": "0",  // measurement value
                    "created": "1585207694901" // when the record is created 
                },
                {
                    "measurement_id": "4099",
                    "value": "0",
                    "created": "1585207626265"
                }
            ],
            "channel_name": ""
        },
        {
            "channel": "2",
            "points": [
                {
                    "measurement_id": "4102",
                    "value": "25.7",
                    "created": "1585207695572"
                },
                {
                    "measurement_id": "4103",
                    "value": "0.0",
                    "created": "1585207695572"
                }
            ],
            "channel_name": ""
        }
    ]
}

Example request

curl --request GET \
  --url {host}/channel/view_raw/:node_eui?limit=:limit&time_start=:time_start&time_end=:time_end \
  --user '<username>:<password>' \
  --include

get the segment data of the device

GET
{host}/channel/view_segment/:node_eui

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.

Path Parameters
node_eui
(required)
string
Node EUI
Query Parameters
measure_id
string
sensor measurement ID,
eg. measure_id=4097
channel
string
query data from this channel, if omitted,
measurements of all channels will be returned
segment
string
time length of segment, unit minute
time_start
string
timestamp, unit millisecond
time_end
string
timestamp, unit millisecond

response

{
    "code": "0",
    "data": [
        {
            "channel": "1", // channel number
            "lists": [
                {
                    "avg": "9.72",  // avgrage value of the segment
                    "measurement_id": "4099", // the measurement id
                    "created": "1556051760000"
                },
                {
                    "avg": "6.07",
                    "measurement_id": "4099",
                    "created": "1556177940000"
                }
            ]
        }
    ]
}

Example request

curl --request GET \
  --url {host}/channel/view_segment/:node_eui?measure_id:measure_id&channel:channel&segment:segment&time_start:time_start&time_end:time_end \
  --user '<username>:<password>' \
  --include