Help Center/ Meeting/ Server API Reference/ Enterprise Management/ APIs/ Creating an Enterprise as an SP Administrator
Updated on 2023-12-22 GMT+08:00

Creating an Enterprise as an SP Administrator

Description

This API is used to create an enterprise, assign the default enterprise administrator, and allocate resources to the enterprise.

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

POST

Request Address

/v1/usg/dcs/sp/corp

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.

adminInfo

Yes

AdminDTO object

Body

Administrator details.

basicInfo

Yes

CorpBasicDTO object

Body

Basic enterprise details.

groupId

No

String

Body

Media ingestion (including SBC and MCU) group ID, which can be obtained through the API for Querying Resource Information as an SP Administrator.

propertyInfo

No

Array of OrgPropertyDTO objects

Body

Information about configurable items.

resInfo

No

AddCorpResDTO object

Body

Enterprise resource details.

Table 3 AdminDTO data structure

Parameter

Mandatory

Type

Location

Description

account

Yes

String

Body

User account. The value can contain letters, numbers, underscores (_), hyphens (-), periods (.), and at signs (@), and cannot contain only numbers. The at sign (@) cannot be followed by a period(.).

country

No

String

Body

Country or region that the mobile number belongs to.

email

No

String

Body

Email address of the administrator. The mobile number or email address of the administrator must be specified. Otherwise, the administrator password cannot be reset later. If the enterprise does not enable SMS notifications, the email address is mandatory. The format is (^$|^[\w-+]+(\.[\w-+]+)@[\w-]+(\.[\w-]+)(\.[\w-]{1,})$).

name

Yes

String

Body

Administrator name.

phone

No

String

Body

Mobile number. The mobile number must contain the country code, for example, a mobile number in Chinese mainland is +86xxxxxxxx. This parameter is combined with the country parameter. The mobile number is in the format of (^$|^[+]?[0-9]+$).

pwd

Yes

String

Body

If this parameter is carried, the actual value is used. Otherwise, the value is generated by the backend by default. The password must meet the following requirements:

  • The password contains 6 to 32 characters.
  • The password cannot be the same as the account or the account spelled backwards.
  • The password must contain at least two of the following: lowercase letters, uppercase letters, numbers, and special characters (`~!@#$%^&*()-_=+\|[{}];:",'<.>/?).
Table 4 CorpBasicDTO data structure

Parameter

Mandatory

Type

Location

Description

address

No

String

Body

Address.

country

No

String

Body

Country or region that the mobile number belongs to.

description

No

String

Body

Remarks.

domain

No

String

Body

Enterprise domain name.

email

No

String

Body

Email address, in the format of (^$|^[\w-+]+(.[\w-+]+)@[\w-]+(.[\w-]+)(.[\w-]{1,})$).

fax

No

String

Body

Fax number, in the format of ^$|^[+]?[0-9]+$.

language

No

String

Body

Voice language. Options: zh-CN and en-US.

name

Yes

String

Body

Enterprise name, in the format of ^[^#%&'+;<>="'??\....../]*$.

phone

No

String

Body

Mobile number. The mobile number must contain the country code, for example, a mobile number in Chinese mainland is +86xxxxxxxx. This parameter is combined with the country parameter. The mobile number is in the format of (^$|^[+]?[0-9]+$).

spId

No

String

Body

ID of the SP to which the enterprise belongs. This parameter is returned only during query.

timeZoneId

No

String

Body

Time zone ID. For example, the time zone ID of Beijing GMT+08:00 is 56. For details about the mapping between time zone IDs and time zones, see Time Zone Table.

Table 5 AddCorpResDTO data structure

Parameter

Mandatory

Type

Location

Description

resource

No

Array of ResourceDTO objects

Body

List of resources to be added to the enterprise.

Table 6 OrgPropertyDTO data structure

Parameter

Mandatory

Type

Location

Description

propertyKey

No

String

Body

Configuration item key.

To enable local recording, set this parameter to enableClientRecord.

propertyValue

No

String

Body

Configuration item value.

To enable local recording, set this parameter to true.

Table 7 ResourceDTO data structure

Parameter

Mandatory

Type

Location

Description

id

No

String

Body

Resource ID. If this parameter is not passed, the value is automatically generated.

count

Yes

Integer

Body

Resource quantity.

expireDate

Yes

Long

Body

UTC time when the resource expires.

type

Yes

String

Body

Resource type.

  • VMR: cloud meeting room.
  • CONF_CALL: concurrent participant.
  • HARD_1080P: 1080p hard terminal access account.
  • HARD_720P: 720p hard terminal access account.
  • SOFT: user account.
  • ROOM: whiteboard account.
  • LIVE: live broadcast port.
  • RECORD: recording storage space.
  • HARD_THIRD_PARTY: third-party hard terminal access account.
  • HUAWEI_VISION: smart TV account.
  • IDEA_HUB - ideahub

typeId

No

String

Body

Resource type ID. For example, cloud meeting rooms can be divided into 5-participant and 10-participant cloud meeting rooms. In this case, the resource type is cloud meeting room, and typeId is vmrPkgId. vmrPkgId is used to distinguish the following resource subtypes:

  • vmr10:ff808081699b56d40169c410d5080179
  • vmr50:ff808081699b56cb0169c411a0980152
  • vmr100:ff808081699b56cb0169c41167850151
  • vmr200:ff808081699b56d40169c410913d0178
  • vmr25:ff808081699b56d40169c4111fe5017a
  • vmr300:ff8080816b9ec3ab016bdff237962e83
  • vmr400:ff8080816b9ec475016bdff37efc279f
  • vmr500:ff8080816b9ec3ab016bdff338542e84

Status Codes

Table 8 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 9 Response Parameters

Parameter

Type

Description

value

String

Response.

Example Request

POST /v1/usg/dcs/sp/corp
Connection: keep-alive
X-Access-Token: stbVbWSIgzfOQ8JnbmPIoBIR3ig8xnVScQOF
Content-Type: application/json
Content-Length: 561
Host: api.meeting.huaweicloud.com 
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)

{
    "adminInfo": {
        "account": "zhangsan@corp",
        "country": "chinaPR",
        "email": "zhangsan@huawei.com",
        "name": "zhangsan",
        "phone": "+86191****9092",
        "pwd": "cnp200@HW"
    },
    "basicInfo": {
        "address": "Hangzhou, Zhejiang",
        "country": "chinaPR",
        "description": "description",
        "domain": "huawei.com",
        "email": "zhangsan@huawei.com",
        "fax": "+123456789",
        "language": "zh-CN",
        "name": "Huawei Technologies Co., Ltd.",
        "phone": "+86191****9092",
        "spId": "",
        "timeZoneId": "56"
    },
    "groupId": "297e87ec7713734b01771458c2d80000",
    "resInfo": {
        "resource": [
            {
                "count": 10,
                "expireDate": 2549030400000,
                "id": "36f2c0117cf14c3db61a7880eb73cee6",
                "type": "VMR",
                "typeId": "2c90bb2871e577590171e57bfec908b2"
            }
        ]
    }
}

Example Response

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

{
  "value": "818803911"
}

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 '{"account": "zhangsan@corp","country": "chinaPR","email": "zhangsan@huawei.com","name": "zhangsan","phone": "+86191****9092","pwd": "cnp200@HW","sendNotify": false},"basicInfo": {"address": "Hangzhou Zhejiang","country": "chinaPR","description": "description","domain": "huawei.com","email": "zhangsan@huawei.com","fax": "+123456789","language": "zh-CN","name": "Huawei Technologies Co., Ltd.","phone": "+86191****9092","spId": "","timeZoneId": "56"},"groupId": "297e87ec7713734b01771458c2d80000","resInfo": {"resource": [{"count": 10,"expireDate": 2549030400000,"id": "36f2c0117cf14c3db61a7880eb73cee6","type": "VMR","typeId": "2c90bb2871e577590171e57bfec908b2"}]}}' https://api.meeting.huaweicloud.com/v1/usg/dcs/sp/corp