更新时间:2019-11-20
企业管理员通过该接口添加硬终端。
请求方法 |
POST |
---|---|
请求地址 |
/rest/usg/datacenter/v1/corp/device |
传输协议 |
HTTPS |
参数 |
是否必须 |
类型 |
位置 |
描述 |
---|---|---|---|---|
Authorization |
是 |
String |
Header |
授权令牌。将执行鉴权响应的accessToken进行Base64转码操作。 样例:Basic Base64(accessToken) |
name |
是 |
String |
Body |
终端名称,可以自定义,建议为具体位置,方便识别。 长度:1-64。 |
model |
是 |
String |
Body |
终端型号,枚举类型。当前支持TE系列硬件终端,具体的终端类型可以通过获取所有终端类型接口查询。 长度:1-128。 |
sn |
否 |
String |
Body |
终端SN码,仅可包含数字、字母和下划线。 长度:1-30。 |
deptCode |
否 |
String |
Body |
部门编号,默认为根部门。 长度:1-32。 |
prjCodeMode |
否 |
String |
Body |
投影码生成模式,默认为自动。
|
phone |
否 |
String |
Body |
手机号,必须加上国家码,例如中国大陆手机为“+86xxxxxxxxxxx”。当填写手机号时 “country”参数必填。 手机号只允许输入纯数字。 长度:0-32。
说明:
手机号或者邮箱至少填写一个。 |
country |
否 |
String |
Body |
默认值:chinaPR。 长度:0-255。 |
|
否 |
String |
Body |
统一邮箱格式。 长度:0-255。 |
description |
否 |
String |
Body |
终端描述。 长度:0-128。 |
status |
否 |
Integer |
Body |
终端状态。
默认值:0。 |
sendNotify |
否 |
String |
Body |
是否发送邮件和短信通知。
长度:0-32。 |
参数 |
类型 |
描述 |
---|---|---|
returnCode |
String |
业务返回码。 |
returnMessage |
String |
返回描述。 |
achievementTime |
String |
响应产生时间。 |
requestId |
String |
请求唯一标识。 |
data |
String |
返回终端SN码。 |
POST /rest/usg/datacenter/v1/corp/device Connection: keep-alive Authorization: Basic ZFZzaWpIank3RVBWWElaZm00Y1BtVFFvbzBRMXc2bnBY Content-Type: application/json Content-Length: 155 Host: api.meeting.huaweicloud.com User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191) { "model": "DP300", "name": "test5", "deptCode": "1", "phone": "+86136********", "email": "test5@huawei.com", "sn": "asdasfscasd", "country": "chinaPR" }
HTTP/1.1 200 Date: Tue, 16 Apr 2019 09:22:44 GMT Content-Type: application/json;charset=UTF-8 Content-Length: 164 Connection: keep-alive Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Server: api-gateway X-Request-Id: 65c132ec8939a66775df1382e7d35fc9 { "returnCode": "000000000", "returnMessage": "Success", "achievementTime": "2019-04-16 09:21:25.115 UTC", "requestId": "e8466aa24cf5d299cecc161ceb2dc4af", "data": { "name": "test52", "type": "TE", "model": "DP300", "sn": "asdasfscaas", "account": "013e65319ab24d9586777114a40441eb", "number": "+991116003902", "prjCodeMode": null, "deptCode": "1", "deptName": "chen001", "deptNamePath": "chen001", "phone": null, "country": "chinaPR", "email": "test5@huawei.com", "description": null, "status": 0 } }
curl -k -i -H 'content-type: application/json' -X POST -H 'Authorization: Basic T3IxeXdMUGwzeU9Gb3JnWENNWWZldnBHM0JTQVA5N2FS' -d '{"model": "DP300","name": "test5","deptCode": "1","phone": "+86136********","email": "test5@huawei.com","sn": "asdasfscasd","country": "chinaPR"}' https://api.meeting.huaweicloud.com/rest/usg/datacenter/v1/corp/device