device-docking/爱牵挂/HA02-HA10/community.md
2023-12-20 11:07:38 +08:00

57 lines
2.2 KiB
Markdown
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

如果是post请求把参数带到body里面禁止写到URL后面。URL后面带参数的全是get请求。 我们的测试服虽然get和post请求都可以使用但是要是用规范改post请求的时候必须post请求并且把参数放到body下不要放到URL后面。我们的正式服因为换过架构所以会更加规范修改接口必须是post且放到body下进行请求
社区信息
========
# 查看社区内所有NB设备的设备号IMEI号
- 地址: /api/community/gethomedevicelist/
- 方法: GET
- 验证方法: Cookie: user
- 响应对象: 返回单个对象,如果对应的数据项有数据,则返回数据对象;如果没有则返回'{}'
- 权限要求: superuser/operator角色 或 社区成员
- 响应对象: [Community](object.md#community)
- URL参数: device oid
- 请求参数:
| 名称 | 必须 | 类型 | 说明 |
| --------------- | ---- | ------------ | ------------------------------ |
| communityid | 是 | string | 机构id |
- 请求范例:
curl -v -A CURL -b cookies.txt http://api.aiqiangua.com:8888/api/community/gethomedevicelist/?communityid=61a86a9b15f71628c6d11d95
> GET /api/community/gethomedevicelist/?communityid=61a86a9b15f71628c6d11d95 HTTP/1.1
> User-Agent: CURL
> Host: api.aiqiangua.com:8888
> Accept: */*
> Cookie: ""2|1:0|10:1502846059|4:user|8:YWRtaW4y|f92dad6929734b005ea153a4585f3c02ea9f7a70432a0410518df8a108030f7d""
- 响应范例:
{
"objs": [
{
"name": "",
"power_type": 1,
"chip_temperature_statu": 1,
"heart_beat_time": "24",
"community_id": "61a86a9b15f71628c6d11d95",
"version": "V4.2.3_NBSOB",
"maze_statu": 1,
"imei": "861964046796186",
"iccid": "89861121241012317411",
"type": "HA07",
"circuit_statu": 1
}
],
"page": {
"page_count": 1,
"rows_per_page": 20,
"total": 1,
"page_current": 1
},
"success": true,
"obj_name": "homedevice"
}