OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
API
API Usage API List SDK MQTT LwM2M EDP Modbus TCP
HTTP Push



Batch Inquire Device Status

Request Method: GET

URL: http://iot.zong.com.pk:8000/devices/status

http Header

Parameter Name Format Required Description
api-key string yes must be masterkey or apikey with access authority of the device

url Parameter

Parameter Name Format Required Description
devIds string yes device id, multiple device ids separated by commas, upper limits: 1000 devices

Return Parameter

Parameter Name Format Description
errno int code for call error , 0 indicates call is successful
error string error description, "succ" indicates call is successful
data json device related information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
total_count int total number
devices array-json json array of device status, see devices description table
device Description Table
Parameter Name Format Description
id string device id
title string device name
online bool online status

Example of Request

GET http://iot.zong.com.pk:8000/devices/status?devIds=1221,12233,1123 HTTP/1.1
api-key: WhI*************v1c=
Content-Type: application/json
Host: iot.zong.com.pk:8000

Example of Return

{
    "errno": 0,
    "data": {
        "total_count":121,
        "devices":[
            {
                "id":1221,
                "title":"device1",
                "online":false
            },
            {
                "id":12333,
                "title":"device2",
                "online":true
            },
            ...
        ]
    },
    "error": "succ"
}

results matching ""

    No results matching ""