POST api/DeviceClass/Add
增加一个设备分类
Request Information
URI Parameters
None.
Body Parameters
M_AddDeviceClass| Name | Description | Type | Additional information |
|---|---|---|---|
| Name |
名称 |
string |
Required |
| Model |
型号 |
string |
Required |
| PSN |
协议序号 |
integer |
Required |
| Icon |
图标链接 |
string |
Required |
| Note |
备注 |
string |
Required |
| Cycle |
上报周期,单位:秒 |
integer |
Required |
Request Formats
application/json, text/json
Sample:
{
"Name": "sample string 1",
"Model": "sample string 2",
"PSN": 3,
"Icon": "sample string 4",
"Note": "sample string 5",
"Cycle": 6
}
application/xml, text/xml
Sample:
<M_AddDeviceClass xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.DP.Models"> <Cycle>6</Cycle> <Icon>sample string 4</Icon> <Model>sample string 2</Model> <Name>sample string 1</Name> <Note>sample string 5</Note> <PSN>3</PSN> </M_AddDeviceClass>
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>