POST api/Device/AddDeviceToUserGroup
将设备添加到用户分组,使用选定关系[手表]
Request Information
Body Parameters
AddDeviceToUserGroupModel| Name | Description | Type | Additional information |
|---|---|---|---|
| UserId |
用户id |
integer |
None. |
| GroupId |
角色 id |
integer |
None. |
| DeviceId |
设备 id |
integer |
None. |
| Info |
附加信息 |
string |
None. |
| RelationName |
关系名称 |
string |
None. |
| RelationPhone |
电话号码 |
string |
None. |
| Icon |
图标 |
integer |
None. |
| DeviceType |
1 儿童背包, 2 是成人背包 |
integer |
None. |
| Token |
登录后获取到的 Token |
string |
None. |
| Language |
语言选项 |
string |
None. |
| AppId |
APP应用标识 |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"UserId": 1,
"GroupId": 2,
"DeviceId": 3,
"Info": "sample string 4",
"RelationName": "sample string 5",
"RelationPhone": "sample string 6",
"Icon": 7,
"DeviceType": 8,
"Token": "sample string 9",
"Language": "sample string 10",
"AppId": "sample string 11"
}
application/xml, text/xml
Sample:
<AddDeviceToUserGroupModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel"> <AppId>sample string 11</AppId> <Language>sample string 10</Language> <Token>sample string 9</Token> <DeviceId>3</DeviceId> <DeviceType>8</DeviceType> <GroupId>2</GroupId> <Icon>7</Icon> <Info>sample string 4</Info> <RelationName>sample string 5</RelationName> <RelationPhone>sample string 6</RelationPhone> <UserId>1</UserId> </AddDeviceToUserGroupModel>
Response Information
Resource Description
State状态码:
0. 成功
1000. 用户不存在
1100. 设备不存在
1500. 设备存在主控号,并且已向主控号申请查看设备请求
1550. 设备存在主控号,申请查看失败
| Name | Description | Type | Additional information |
|---|---|---|---|
| Message |
消息 [大多数情况下可通过该消息做为提示语] |
string |
None. |
| State |
状态码 |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"Message": "sample string 1",
"State": 2
}
application/xml, text/xml
Sample:
<NormalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel"> <State>2</State> <Message>sample string 1</Message> </NormalResult>