POST api/Agent/Dev/Concent/New

添加一个主机。返回的TAG值为创建的主机的ID

Request Information

URI Parameters

None.

Body Parameters

DevConcentNewOrModifyParm
NameDescriptionTypeAdditional information
address

地址,与T_Dev_Dosimiter表中的Address全局唯一。

string

Required

Max length: 12

typecode

主机的型号 ,此处的型号不是指表的型号,则是约定的一个字符串的值,可以输入。后台根据这个型号的值,加载不同的驱动DLL。主机的型号与表的型号不是同一个型号。不要理解为表的型号。

string

Required

Max length: 12

centid

表的ID号,在新增时,些值可以是任意的值(会被重新计算)。

integer

Required

Request Formats

application/json, text/json

Sample:
{
  "address": "sample string 1",
  "typecode": "sample string 2",
  "centid": 3
}

application/xml, text/xml

Sample:
<DevConcentNewOrModifyParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Dosimeter">
  <address>sample string 1</address>
  <centid>3</centid>
  <typecode>sample string 2</typecode>
</DevConcentNewOrModifyParm>

application/x-www-form-urlencoded

Sample:

Sample not available.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

添加一个主机。返回的TAG值为创建的主机的ID

CommonOperationResultWithTagOfInt64
NameDescriptionTypeAdditional information
errcode

integer

None.

errmsg

string

None.

tag

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": 3
}

application/xml, text/xml

Sample:
<CommonOperationResultWithTagOflong xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer">
  <errcode>1</errcode>
  <errmsg>sample string 2</errmsg>
  <tag>3</tag>
</CommonOperationResultWithTagOflong>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.