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
Request Method |
POST |
---|---|
Request Address |
/v1/usg/dcs/sp/corp |
Transport Protocol |
HTTPS |
Request 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. |
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 |
|
|
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:
|
Parameter |
Mandatory |
Type |
Location |
Description |
---|---|---|---|---|
address |
No |
String |
Body |
Address. |
country |
No |
String |
Body |
|
description |
No |
String |
Body |
Remarks. |
domain |
No |
String |
Body |
Enterprise domain name. |
|
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. |
Parameter |
Mandatory |
Type |
Location |
Description |
---|---|---|---|---|
resource |
No |
Array of ResourceDTO objects |
Body |
List of resources to be added to the enterprise. |
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. |
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.
|
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:
|
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
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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot