SP管理员创建企业
描述
创建企业、默认管理员及分配资源。
调试
您可以在API Explorer中调试该接口。
URI
POST /v1/usg/dcs/sp/corp
请求参数
|
参数 |
是否必须 |
类型 |
位置 |
描述 |
|---|---|---|---|---|
|
X-Access-Token |
是 |
String |
Header |
授权令牌。获取“执行App ID鉴权”响应的accessToken。 |
|
X-Request-Id |
否 |
String |
Header |
请求requestId,用来标识一路请求,用于问题跟踪定位,建议使用UUID,若不携带,则后台自动生成。 |
|
Accept-Language |
否 |
String |
Header |
语言参数,默认为中文zh-CN,英文为en-US。 |
|
adminInfo |
是 |
AdminDTO object |
Body |
管理员信息。 |
|
basicInfo |
是 |
CorpBasicDTO object |
Body |
企业的基本信息。 |
|
groupId |
否 |
String |
Body |
媒体接入(包括SBC和MCU)分组id,可通过“SP管理员查询资源信息”接口查询获取。 |
|
propertyInfo |
否 |
Array of OrgPropertyDTO objects |
Body |
可配置项信息。 |
|
resInfo |
否 |
AddCorpResDTO object |
Body |
企业的资源信息。 |
|
参数 |
是否必须 |
类型 |
位置 |
描述 |
|---|---|---|---|---|
|
account |
是 |
String |
Body |
用户账号,账号只能包含大小写字母、数字、_、-、.、@符号,不能为纯数字和@后面带.号。 |
|
country |
否 |
String |
Body |
|
|
|
否 |
String |
Body |
邮箱,管理员手机和邮箱必填其一,否则无法重置密码。如果企业短信开关关闭,则邮箱必填。格式必须满足(^$|^[\w-+]+(\.[\w-+]+)@[\w-]+(\.[\w-]+)(\.[\w-]{1,})$)。 |
|
name |
是 |
String |
Body |
名称。 |
|
phone |
否 |
String |
Body |
手机号,必须加上国家码,例如中国大陆手机+86xxxxxxx,当填写手机号时“country”参数必填,手机格式必须满足(^$|^[+]?[0-9]+$)。 |
|
pwd |
是 |
String |
Body |
若携带则以前台携带为准,否则后台默认生成,密码必须满足:
|
|
参数 |
是否必须 |
类型 |
位置 |
描述 |
|---|---|---|---|---|
|
address |
否 |
String |
Body |
地址。 |
|
country |
否 |
String |
Body |
|
|
description |
否 |
String |
Body |
备注。 |
|
domain |
否 |
String |
Body |
企业域名。 |
|
|
否 |
String |
Body |
邮箱地址,格式必须满足(^$|^[\w-+]+(.[\w-+]+)@[\w-]+(.[\w-]+)(.[\w-]{1,})$)。 |
|
fax |
否 |
String |
Body |
传真号码,格式必须满足(^$|^[+]?[0-9]+$)。 |
|
language |
否 |
String |
Body |
企业提示音语言设置,zh-CN或en-US。 |
|
name |
是 |
String |
Body |
企业名称,格式必须满足^[^#%&'+;<>="'??\....../]*$。 |
|
phone |
否 |
String |
Body |
手机号,必须加上国家码,例如中国大陆手机+86xxxxxxx,当填写手机号时“country”参数必填,手机格式必须满足(^$|^[+]?[0-9]+$)。 |
|
spId |
否 |
String |
Body |
企业归属的SP ID。仅在查询时返回。 |
|
timeZoneId |
否 |
String |
Body |
时区Id设置,例如北京东8区timeZoneId值为56,时区Id和时区的对应关系请参考: 时区表 |
|
参数 |
是否必须 |
类型 |
位置 |
描述 |
|---|---|---|---|---|
|
propertyKey |
否 |
String |
Body |
配置项key。 开通本地录制功能,参数填写:enableClientRecord。 |
|
propertyValue |
否 |
String |
Body |
配置项值。 开通本地录制功能,参数填写:true。 |
|
参数 |
是否必须 |
类型 |
位置 |
描述 |
|---|---|---|---|---|
|
id |
否 |
String |
Body |
资源标识,不携带则后台自动生成。 |
|
count |
是 |
Integer |
Body |
资源数量。 |
|
expireDate |
是 |
Long |
Body |
到期时间,utc时间戳。 |
|
type |
是 |
String |
Body |
资源类型。
|
|
typeId |
否 |
String |
Body |
类型标识,比如资源类型为vmr,vmr又分为5方,10方等,该参数为vmrPkgId,用来区分子类别,详见如下:
|
状态码
|
HTTP状态码 |
描述 |
|---|---|
|
200 |
操作成功。 |
|
400 |
参数异常。 |
|
401 |
未鉴权或鉴权失败。 |
|
403 |
权限受限。 |
|
500 |
服务端异常 |
响应参数
|
参数 |
类型 |
描述 |
|---|---|---|
|
value |
String |
返回结果。 |
请求消息示例
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": "******",
"name": "zhangsan",
"phone": "+86191****9092",
"pwd": "******"
},
"basicInfo": {
"address": "浙江杭州",
"country": "chinaPR",
"description": "description",
"domain": "huawei.com",
"email": "******",
"fax": "+123456789",
"language": "zh-CN",
"name": "华为技术有限公司",
"phone": "+86191****9092",
"spId": "",
"timeZoneId": "56"
},
"groupId": "297e87ec7713734b01771458c2d80000",
"resInfo": {
"resource": [
{
"count": 10,
"expireDate": 2549030400000,
"id": "36f2c0117cf14c3db61a7880eb73cee6",
"type": "VMR",
"typeId": "2c90bb2871e577590171e57bfec908b2"
}
]
}
}
响应消息示例
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"
}
错误码
当您使用华为云会议服务端API时,如果遇到“MMC”或者“USG”开头的错误码,请参考华为云API错误中心。
CURL命令示例
curl -k -i -H 'content-type: application/json' -X POST -H 'X-Access-Token: stbVbWSIgzfOQ8JnbmPIoBIR3ig8xnVScQOF' -d '{"account": "zhangsan@corp","country": "chinaPR","email": "******","name": "zhangsan","phone": "+86191****9092","pwd": "******","sendNotify": false},"basicInfo": {"address": "浙江杭州","country": "chinaPR","description": "description","domain": "huawei.com","email": "******","fax": "+123456789","language": "zh-CN","name": "华为技术有限公司","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