POST api/Dev/MaintenaceKey/AddNew
向系统中添加一个新的维护密钥。
Request Information
URI Parameters
None.
Body Parameters
DevMaintenanceKeyAddParmName | Description | Type | Additional information |
---|---|---|---|
KeyId |
密钥ID KeyId Char(4) PK |
string |
Required Max length: 4 Min length: 4 |
StartAddress |
起始地址 Char(12) NN |
string |
Required Max length: 12 Min length: 12 |
EndAddress |
结束地址 Char(12) NN |
string |
Required Max length: 12 Min length: 12 |
KeyValue |
密钥内容 Binary[24] NN |
Collection of byte |
Required Max length: 24 |
Algorithm |
加密算法 Char(1) NN 加密算法,1-DES,使用KEYVALUE的前8个字节,2TripleDes 使用KEYVALUE的全部24字节。 |
string |
Required Matching regular expression pattern: [1|2] Max length: 1 |
SignAlgorithm |
签名算法 Char(1) NN 1 MD5 2 SHA-1 3 SHA-256 |
string |
Required Matching regular expression pattern: [1|2|3] Max length: 1 |
Request Formats
application/json, text/json
Sample:
{ "KeyId": "sample string 1", "StartAddress": "sample string 2", "EndAddress": "sample string 3", "KeyValue": "QEA=", "Algorithm": "sample string 4", "SignAlgorithm": "sample string 5" }
application/xml, text/xml
Sample:
<DevMaintenanceKeyAddParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter"> <Algorithm>sample string 4</Algorithm> <EndAddress>sample string 3</EndAddress> <KeyId>sample string 1</KeyId> <KeyValue>QEA=</KeyValue> <SignAlgorithm>sample string 5</SignAlgorithm> <StartAddress>sample string 2</StartAddress> </DevMaintenanceKeyAddParm>
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
向系统中添加一个新的维护密钥。
CommonOperationResultName | Description | Type | Additional information |
---|---|---|---|
errcode |
错误代码,通常0表示成功,其他值表示错误。 |
integer |
None. |
errmsg |
错误描述,当errcode不为零时,此值可以用于呈现给用户。 |
string |
None. |
tag |
操作同时,服务器端需要返回的其他值。 |
string |
None. |
Response Formats
application/json, text/json
Sample:
{ "errcode": 1, "errmsg": "sample string 2", "tag": "sample string 3" }
application/xml, text/xml
Sample:
<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
Sample:
Binary JSON content. See http://bsonspec.org for details.