Updated on 2023-12-22 GMT+08:00

Adding a Terminal

Description

This API is used by an enterprise administrator to add a professional meeting terminal. Professional meeting terminals include DP300, HUAWEI Bar series, HUAWEI Board, and TE series.

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

POST

Request Address

/v1/usg/dcs/corp/device

Transport Protocol

HTTPS

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Location

Description

X-Access-Token

Yes

String

Header

Authorization token. Use the value of accessToken in the response to the request for Authenticating an App ID.

X-Request-Id

No

String

Header

Request ID, which is used for fault tracing and locating. You are advised to use a UUID. If this parameter is not carried, a request ID is automatically generated.

Accept-Language

No

String

Header

Language. Values: zh-CN for Chinese (default) and en-US for English.

country

No

String

Body

Country or region that the mobile number belongs to.

Default value: chinaPR.

deptCode

No

String

Body

Department code. The default value is the root department code.

Default value: 1.

description

No

String

Body

Terminal description.

maxLength: 128

minLength: 0

email

No

String

Body

Unified email address format.

model

Yes

String

Body

Device model. The value is an enumerated type. Currently, only TE series and some third-party hard terminals are supported. You can obtain the terminal models using the API in Obtaining All Terminal Models.

name

Yes

String

Body

Terminal name, which can be customized. You are advised to set this parameter to a specific location for easy identification.

maxLength: 64

minLength: 1

phone

No

String

Body

Mobile number, which must contain the country code. For example, a mobile number in Chinese mainland is +86xxxxxxxxxxx. This parameter is combined with the country parameter.

The mobile number can contain only numbers.

NOTE:

The mobile number or email address must be specified.

prjCodeMode

No

Integer

Body

Projection code generation mode. Default value: 0.

  • 0: automatic mode.

    In this mode, the code complexity is controlled based on the IP address reported in the message. For a private IP address, a simple projection code is generated. For a public IP address, a complex projection code is generated.

  • 1: simple mode.
  • 2: complex mode.

sendNotify

No

string

Body

Whether to send email and SMS notifications.

  • 0: no.
  • If this parameter is null or set to other values, email and SMS notifications are sent.

sn

No

String

Body

Terminal SN. The value can contain only numbers, letters, and underscores (_).

status

No

Integer

Body

Terminal status. Default value: 0.

  • 0: normal.
  • 1: frozen.

Status Codes

Table 3 Status codes

HTTP Status Code

Description

200

Operation successful.

400

Invalid parameters.

401

Authentication is not performed or fails.

403

Insufficient permissions.

500

Server exception.

Response Parameters

Table 4 Response parameters

Parameter

Type

Description

account

String

Built-in account of the hard terminal.

country

String

Country or region that the mobile number belongs to.

deptCode

String

Department code.

deptName

String

Department name.

deptNamePath

String

Department name path.

description

String

Terminal description.

email

String

Email address.

model

String

Device model. The value is an enumerated type. Currently, only TE series hard terminals are supported. You can obtain the terminal models using the API in Obtaining All Terminal Models.

name

String

Device name.

number

String

SIP number bound to the terminal.

phone

String

Mobile number.

prjCodeMode

Integer

Projection code generation mode.

  • 0: automatic mode.

    In this mode, the code complexity is controlled based on the IP address reported in the message. For a private IP address, a simple projection code is generated. For a public IP address, a complex projection code is generated.

  • 1: simple mode.
  • 2: complex mode.

sn

String

Terminal SN. The value can contain only numbers, letters, and underscores (_).

status

Integer

Terminal status.

  • 0: normal.
  • 1: frozen.

type

String

Terminal type, which is used to distinguish Huawei-developed or third-party terminals.

Example Request

POST /v1/usg/dcs/corp/device
Connection: keep-alive
X-Access-Token: stbVbWSIgzfOQ8JnbmPIoBIR3ig8xnVScQOF
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": "TE20",
    "name": "Hangzhou Z5-3-A29",
    "deptCode": "1",
    "phone": "+86**********",
    "email": "****@huawei.com",
    "sn": "asdasfscasd",
    "country": "chinaPR"
}

Example Response

HTTP/1.1 200 
Date: Wed, 18 Dec 2019 06:20:40 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 164
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Server: api-gateway
X-Request-Id: 65c132ec8939a66775df1382e7d35fc9

{
    "name": "Hangzhou Z5-3-A29",
    "type": "TE",
    "model": "TE20",
    "sn": "asdasfscasd",
    "account": "df8bce2178294683bb83a4985fef7165",
    "number": "+991118029589",
    "prjCodeMode": 0,
    "deptCode": "1",
    "deptName": "wangyue",
    "deptNamePath": "wangyue",
    "phone": "+86***********",
    "country": "chinaPR",
    "email": "****@huawei.com",
    "description": null,
    "status": 0
}

Error Codes

If an error code starting with MMC or USG is returned when you use this API, rectify the fault by following the instructions provided in Huawei Cloud API Error Center.

Example cURL Command

curl -k -i -H 'content-type: application/json' -X POST -H 'X-Access-Token: stbVbWSIgzfOQ8JnbmPIoBIR3ig8xnVScQOF' -d '{"model": "TE20","name": "test20","deptCode": "1","phone": "+86**********","email": "****@huawei.com","sn": "asdasfscasd","country": "chinaPR"}' https://api.meeting.huaweicloud.com/v1/usg/dcs/corp/device