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 MQ
Other Service Common Question

Get Resource List

Request Method: GET

URL: http://api.heclouds.com/nbiot/resources

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
imei string yes identity code of nbiot device
obj_id int no object id of device, determined according to sdk of terminal device

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 resource related information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
total_count int number of entries returned
item array-json for the detail of the returned item, see item description table
item Description Table
Parameter Name Format Description
obj_id int object id of device, determined according to sdk of terminal device
instances array-json instance entries under obj_id object, see instances description table
instance Description Table
Parameter Name Format Description
inst_id int instances id of device , determined according to sdk of terminal device
resources array-int list of all resources under instances id of device
Description

For the meaning of returned errno status code, can [download to view] in the OneNET Documentation Center -> Device Development Guide -> Protocol Document -> “Description of Returned Status Code of Northbound api in NB Protocol” in LWM2M (/book/device-develop/multpro /sdk-doc-tool/doc.md)

Example of Request

GET http://api.heclouds.com/nbiot/resources HTTP/1.1
api-key: WhI*************v1c=
Host: api.heclouds.com

Example of Return

{
    "errno": 0,
    "data": {
        "total_count": 12,
        "item": [
            {
                "obj_id": 3200,
                "instances": [
                    {
                        "inst_id": 0,
                        "resources": [5505, 5050]
                    }
                ]
            }
        ]
    },
    "error": "succ"
}

results matching ""

    No results matching ""