POST api/DeviceV2/Modify
修改一个设备
Request Information
URI Parameters
None.
Body Parameters
M_ModifyDevice| Name | Description | Type | Additional information |
|---|---|---|---|
| SN |
序号 |
integer |
Required |
| Attr |
属性 |
integer |
Required |
| ParentSN |
父节点SN |
integer |
Required |
| Name |
名称 |
string |
Required |
| IMEI |
设备序列号 |
string |
Required |
| ICCID |
设备卡号 |
string |
Required |
| Secret |
密码 |
string |
Required |
| AddCount |
批量追加数量 |
integer |
Required |
| Note |
备注信息 |
string |
Required |
| DeviceClassSN |
产品类别序号 |
integer |
Required |
| DeviceGroupSN |
产品分组序号 |
integer |
Required |
| StrategySN |
策略序号 |
integer |
Required |
| PSN |
协议序号 |
integer |
Required |
| Icon |
图标,如无指定,则根据产品分类自动生成。 |
string |
Required |
| Lat |
纬度 |
string |
Required |
| Lon |
经度 |
string |
Required |
| Cycle |
上报周期,如无指定,则根据产品分类自动生成 |
integer |
Required |
| Count |
终端数量,如无指定,则根据产品分类自动生成 |
integer |
Required |
Request Formats
application/json, text/json
Sample:
{
"SN": 1,
"Attr": 2,
"ParentSN": 3,
"Name": "sample string 4",
"IMEI": "sample string 5",
"ICCID": "sample string 6",
"Secret": "sample string 7",
"AddCount": 8,
"Note": "sample string 9",
"DeviceClassSN": 10,
"DeviceGroupSN": 11,
"StrategySN": 12,
"PSN": 13,
"Icon": "sample string 14",
"Lat": "sample string 15",
"Lon": "sample string 16",
"Cycle": 17,
"Count": 18
}
application/xml, text/xml
Sample:
<M_ModifyDevice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.DP.Models"> <AddCount>8</AddCount> <Count>18</Count> <Cycle>17</Cycle> <DeviceClassSN>10</DeviceClassSN> <DeviceGroupSN>11</DeviceGroupSN> <ICCID>sample string 6</ICCID> <IMEI>sample string 5</IMEI> <Icon>sample string 14</Icon> <Lat>sample string 15</Lat> <Lon>sample string 16</Lon> <Name>sample string 4</Name> <Note>sample string 9</Note> <PSN>13</PSN> <ParentSN>3</ParentSN> <Secret>sample string 7</Secret> <StrategySN>12</StrategySN> <Attr>2</Attr> <SN>1</SN> </M_ModifyDevice>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
M_Response| Name | Description | Type | Additional information |
|---|---|---|---|
| Contant |
内容,包含返回所需要的类 |
Object |
Required |
| Status |
状态 |
integer |
Required |
| Msg |
信息 |
string |
Required |
| Num |
数值,数据变动条数或增加时返回的ID |
integer |
Required |
Response Formats
application/json, text/json
Sample:
{
"Contant": {},
"Status": 2,
"Msg": "sample string 3",
"Num": 4
}
application/xml, text/xml
Sample:
<M_Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.DP.Models"> <Msg>sample string 3</Msg> <Num>4</Num> <Status>2</Status> <Contant /> </M_Response>