获取资源列表
请求方式:GET
URL: http(s)://openapi.heclouds.com/lwm2m-online?action=resources
我只想看示例!!!
url参数
| 参数名称 | 格式 | 是否必须 | 说明 |
| imei | string | 是 | nbiot设备的身份码 |
| obj_id | int | 否 | 设备的objectid,根据终端设备sdk确定 |
返回参数
| 参数名称 | 格式 | 说明 |
| errno | int | 调用错误码,为0表示调用成功 |
| error | string | 错误描述,为"succ"表示调用成功 |
| data | json | 接口调用成功之后返回的设备相关信息,见data描述表 |
data描述表
| 参数名称 | 格式 | 说明 |
| total_count | int | 返回的条目数 |
| item | array-json | 返回的条目详情,见item描述表 |
item描述表
| 参数名称 | 格式 | 说明 |
| obj_id | int | 设备的object id,根据终端设备sdk确定 |
| instances | array-json | obj_id对象下的实例条目,见instances描述表 |
instances描述表
| 参数名称 | 格式 | 说明 |
| inst_id | int | 设备的instances id,根据终端设备sdk确定 |
| resources | array-int | 设备instances id下所有的资源列表 |
说明
返回errno状态码所对应的含义,可以查看API状态码。
HTTP内容部分选填。
请求示例
GET http://openapi.heclouds.com/lwm2m-online?action=resources?imei=***&obj_id=3200 HTTP/1.1
authorization: version=2020-05-29&res=userid%2F38055&et=1623982416&method=sha1&sign=S04GcvafYIjtAMHJthkGPevbNwE%3D
返回示例
{
"errno": 0,
"error": "succ",
"data":{
"total_count":123,
"item":[
{
"obj_id":3200,
"instances":[
{
"inst_id":0,
"resources":[5500,5050]
},
{…},
…
]
},
{……},
……
]
}
}