Multiprotocol Access Product Introduction QuickStart User Guide Development Guide
EDP TCP transparent transmission MQTT Modbus HTTP
FAQ

Query topic subscribing device

Request format: GET

URL: http://api.onenet.hk.chinamobile.com/mqtt/topic_device

URL Parameters

Name Format Required or not Description
topic string Yes Publish messages to the specified topic, supporting qos=0 messages only
page int Yes Specify the page number.
per_page int Yes Specify the number of output devices per page, 30 by default, max. 1000

Return Parameters

Name Format Description
errno int Call error code, where 0 means success.
error string Error description. “succ” means the call is successful.
data json Device-related information returned after interface is successfully called. See the Data Description Table.
Data Description Table
Name Format Description
total_count int Number of devices in the 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://api.onenet.hk.chinamobile.com//mqtt/topic_device?topic=topic/test/01&page=1&per_page=100 HTTP/1.1

Return Example

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

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “