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

# Inquire Device Which Subscribes Topic

Request Method: GET

URL: http://iot.zong.com.pk:8000/mqtt/topic_device

URL Parameter

Parameter Name Format Required Description
topic string yes publish message to specified topic, only support publishing messages with qos=0
page int yes specify page number
per_page int yes specify number of devices output per page, default to 30, up to 1000

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 number of devices in query result
page int current page
per_page int number of devices per page
devices array-int device ID array

Example of Request Header

GET http://iot.zong.com.pk:8000/mqtt/topic_device?topic=topic/test/01&page=1&per_page=100 HTTP/1.1

Example of Return

{
    "errno": 0,
    "data": {
        "per_page": 100,
        "devices": [39587277,39587272],
        "total_count": 2,
        "page": 1
    },
    "error": "succ"
}

results matching ""

    No results matching ""