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

Subscription

Request Method: POST

URL: http://iot.zong.com.pk:8000/nbiot/observe

http Header

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

url Parameter

Parameter Name Format Required Description
imei string yes identity code of nbiot device
cancel bool yes true for unsubscribing, false for subscribing
obj_id int yes object id of device, determined according to sdk of terminal device
obj_inst_id int no a specific instance id under nbiot device object, determined according to sdk of terminal device
res_id int no resource id of nbiot device, determined according to sdk of terminal device
pmin int no minimum time interval for uploading data, default to 0, at this time,upload once data exist
pmax int no maximum time interval for uploading data
gt double no upload when the data value is greater than this value
lt double no upload when the data value is less than this value
st double no upload when the difference between the front and back data greater than or equal to this value
timeout int no time for request timeout, default to 25 (unit: second), range of values [5, 40]

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
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)

when both pmin and pmax exist, pmax >= pmin and both need to be greater than 0. lt < gt, and lt + 2*st < gt If gt, lt, st exist, then res_id is required cancel is non-true|false will be default to false

Example of Request

POST http://iot.zong.com.pk:8000/nbiot/observe HTTP/1.1
api-key: WhI*************v1c=
Content-Type:application/json
Host: iot.zong.com.pk:8000

返回示例

Example of Return

{
    "errno": 0,
    "error": "succ"
}

results matching ""

    No results matching ""