POST api/Sub/Modify
修改一个订阅。
Request Information
URI Parameters
None.
Body Parameters
SubcriberUpdateParmName | Description | Type | Additional information |
---|---|---|---|
SubscriberId |
@ char(4),/*订阅的ID*/ |
string |
Required Max length: 4 Min length: 4 |
SubscriberName |
@ varchar(60),/*订阅的名称*/ |
string |
Required Max length: 30 |
TargetAddress |
@ varchar(60),/*目标地址*/ |
string |
Required Max length: 60 |
TargetPort |
@ varchar(10),/*订阅者的目标地址*/ |
string |
Max length: 10 |
NeedHeartBeat |
@ char(1),/*是否需要心跳,1是,0否*/ |
string |
Required Max length: 1 Min length: 1 |
BeingAccessedAble |
@ char(1),/*是否接受来自订阅者的抄读/控制,1是,0否。*/ |
string |
Required Max length: 1 Min length: 1 |
TimeOutTimeInSec |
@ int ,/*数据过期时间*/ |
integer |
Required |
RefDataFreezeAble |
@ char(1),/*响应第三方抄读冻结 “1“表示是,为”1”时,如果某个订阅的流量计处于“第三方抄读冻结“,将被视为在线。*/ |
string |
Required Max length: 1 Min length: 1 |
FreezedHeatBeatInteval |
@ int,/*抄读冻结时心跳发送间隔 此值受NeedHeartBeat影响,当NeedHeartBeat为“0“时,此值无意义,心跳不会发送。否NeedHeartBeat为”1“且RefDataFreezeAble为”1“时,此值表示模拟心跳的发送间隔,单位为秒。当此值为空时,默认为60。*/ |
integer |
None. |
FreezedDataRptInteval |
@ int ,/*抄读冻结时数据发送间隔 单位为秒。当RefDataFreezeAble为“1“时,此值有意义,表示冻结时刻的有效数据以本值指定的秒数间隔发送。当此值为空时,默认为60。*/ |
integer |
None. |
OtherConfig |
@ varchar(2000),/*可以定义一个JSON串,用于实际的执行器进行解析。*/ |
string |
Max length: 2000 |
UsedStatus |
@ char(1)/*启用标志*/ |
string |
Required Max length: 1 Min length: 1 |
Request Formats
application/json, text/json
{ "SubscriberId": "sample string 1", "SubscriberName": "sample string 2", "TargetAddress": "sample string 3", "TargetPort": "sample string 4", "NeedHeartBeat": "sample string 5", "BeingAccessedAble": "sample string 6", "TimeOutTimeInSec": 7, "RefDataFreezeAble": "sample string 8", "FreezedHeatBeatInteval": 1, "FreezedDataRptInteval": 1, "OtherConfig": "sample string 9", "UsedStatus": "sample string 10" }
application/xml, text/xml
<SubcriberUpdateParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Dosimeter"> <BeingAccessedAble>sample string 6</BeingAccessedAble> <FreezedDataRptInteval>1</FreezedDataRptInteval> <FreezedHeatBeatInteval>1</FreezedHeatBeatInteval> <NeedHeartBeat>sample string 5</NeedHeartBeat> <OtherConfig>sample string 9</OtherConfig> <RefDataFreezeAble>sample string 8</RefDataFreezeAble> <SubscriberId>sample string 1</SubscriberId> <SubscriberName>sample string 2</SubscriberName> <TargetAddress>sample string 3</TargetAddress> <TargetPort>sample string 4</TargetPort> <TimeOutTimeInSec>7</TimeOutTimeInSec> <UsedStatus>sample string 10</UsedStatus> </SubcriberUpdateParm>
application/x-www-form-urlencoded
Sample not available.
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
修改一个订阅。
CommonOperationResultName | Description | Type | Additional information |
---|---|---|---|
errcode |
错误代码,通常0表示成功,其他值表示错误。 |
integer |
None. |
errmsg |
错误描述,当errcode不为零时,此值可以用于呈现给用户。 |
string |
None. |
tag |
操作同时,服务器端需要返回的其他值。 |
string |
None. |
Response Formats
application/json, text/json
{ "errcode": 1, "errmsg": "sample string 2", "tag": "sample string 3" }
application/xml, text/xml
<CommonOperationResult 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>sample string 3</tag> </CommonOperationResult>
application/bson
Binary JSON content. See http://bsonspec.org for details.