Get device information from html5 page
New group
##Interface Description
#Create a new device group. There are only a maximum of 1000 groups under each account.
Interface calling instructions
http request method: POST (please use https protocol) https:/ /api.weixin.qq.com/shakearound/device/group/add?access_token=ACCESS_TOKENPOST data format: jsonPOST data example:
{
"group_name":"test"
}
Parameter Description
Parameter | Is it required | Description |
access_token | is the | calling interface credential |
group_name | is | Group name, no more than 100 Chinese characters or 200 English letters |
Return description
Example of normal returned JSON data packet:
{
"data": {
"group_id" : 123,
"group_name" : "test"
},
"errcode": 0 ,
"errmsg": "success."
}
Parameter Description
参数 | 说明 |
group_id | 分组唯一标识,全局唯一 |
group_name | 分组名 |
Edit group information
##Interface description
Edit device group information, currently only the group name can be modified.
Interface calling instructions
http request method: POST (please use https protocol) https:/ /api.weixin.qq.com/shakearound/device/group/update?access_token=ACCESS_TOKENPOST data format: jsonPOST data example:
{
"group_id":123,
"group_name" :"test update"
}
Parameter Description
Parameter | Is it required | Description |
access_token | is the | calling interface credential |
group_id | is | Group unique identifier, globally unique |
group_name | is | Group name, no more than 100 Chinese characters or 200 English letters |
Return description
Example of normal returned JSON data packet:
{
"data": {
},
"errcode": 0,
"errmsg": "success."
}
Interface Description
Delete the device group. If there are still devices in the group, then Unable to delete successfully. The device needs to be removed before it can be deleted.
Interface calling instructions
http request method: POST (please use https protocol) https:/ /api.weixin.qq.com/shakearound/device/group/delete?access_token=ACCESS_TOKENPOST data format: json
POST data example:
{
"group_id":123
}
Parameter Description
Parameter | Is it required | Description |
access_token | is the | calling interface credential |
group_id | is | Group unique identifier, globally unique |
Return description
Example of normal returned JSON data packet:
{
"data": {
},
"errcode": 0,
"errmsg": "success."
}
Interface Description
Query all groups under the account.
Interface calling instructions
http request method: POST (please use https protocol) https:/ /api.weixin.qq.com/shakearound/device/group/getlist? access_token=ACCESS_TOKEN
POST data format: json
POST data example:
{
"begin": 0,
"count" 10
}
Parameter Description
Parameter | Is it required | Description |
access_token | is the | calling interface credential |
begin | is | The starting index value of the grouping list |
count | is | The number of groups to be queried cannot exceed 1000 |
Return description
Example of normal returned JSON data packet:
{
"data": {
"total_count": 100,
"groups":[
"{
"group_id" : 123,
"group_name" : "test1"
},
"group_id" : 124,
"group_name" : "test2"
}
]
},
"errcode": 0,
"errmsg": "success."
}
Parameter Description
Parameter Description | total_count | |
is | The total number of existing groups under this account | ##groups |
is | group list | |
group_id | is the unique identifier of the | group and is globally unique |
group_name | is | group name |
Query group details
# #Interface description
Query group details, including group name, group id, and device list in the group.
Interface calling instructions
http request method: POST (please use https protocol) https:/ /api.weixin.qq.com/shakearound/device/group/getdetail?access_token=ACCESS_TOKENPOST data format: jsonPOST data example:
{
"group_id":123
"begin": 0,
"count":100
}
Parameter Description
Parameter | Is it required | Description |
access_token | is the | calling interface credential |
group_id | is | Group unique identifier, globally unique |
begin | is | The starting index value of the device in the group |
count | is | The number of devices in the group to be queried cannot exceed 1,000 |
Return description
Example of normal returned JSON data packet:
{ Parameter Description
"data": {
"group_id" : 123,
"group_name" : "test",
"total_count": 100,
"devices" :[
"devices_id" ,
" minor" : 10001,
"comment" : "test device1",
"poi_id" : 12345,
},
"device_id" : 123457,
"uuid" : "FDA50693-A4E2-4FB1-AFCF-C6EB07647825",
"major" : 10001,
"minor" : 10002,
"comment" : "test device2",
"poi_ id" : 12345,
}
#