智能客服
你问我答,随时在线为你解决问题
此接口用于更新第三方平台中平台级的域名配置信息。
| 承载协议 | HTTPS POST |
|---|---|
| 接口方向 | 服务商服务器 -> 华为服务器 |
| 接口URL | https://connect-api.cloud.huawei.com/api/tpp/v1/domain-manage/domain |
| 数据格式 | 请求:Content-Type: application/json 响应:Content-Type: application/json |
| 参数 | 必选(M)/可选(O) | 类型 | 说明 |
|---|---|---|---|
| client_id | M | String | API客户端ID。 创建第三方平台成功后系统自动分配的客户端ID,可在第三方管理平台“开发配置 > 开发资料设置”页面中获取,详情请参见获取平台访问凭据。 |
| Authorization | M | String | 认证信息。 格式为“Authorization: Bearer ${access_token}”。 其中,${access_token}为获取平台级Token中获取的access_token。 |
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| category | M | String(32) | 域名分类。 取值范围:
|
请求Body中使用JSON格式携带测试群组信息,参数如下表所示。
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| domains | M | List<UpdateDomainInfo> | 域名全量数据。 集合长度最大3000。 |
UpdateDomainInfo
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| type | M | String(32) | 域名类型。 取值范围:
|
| value | M | String(128) | 域名。 请输入完整的域名,例如https://baidu.com:8080。 |
- POST /api/tpp/v1/domain-manage/domain?category=server HTTP/1.1
- Host: connect-api.cloud.huawei.com
- client_id: 4141******68
- Content-Type: application/json
- Authorization: Bearer *******
- {
- "domains": [
- {
- "type": "httpRequest",
- "value": "https://xxx.xxx.com"
- }
- ]
- }
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| ret | M | 包含返回码及描述信息。 返回码详情请参见错误码。 | |
| invalidDomains | O | List<DomainInfo> | 不合法的域名列表。 当ret不为成功的时候存在,供前台按需展示。 |
CodeAndMsg
| 参数 | 必选(M)/可选(O) | 类型 | 说明 |
|---|---|---|---|
| code | M | Integer | 返回码。 |
| msg | M | String | 返回码描述信息。 |
DomainInfo
| 参数名称 | 必选(M)/可选(O) | 类型 | 参数说明 |
|---|---|---|---|
| type | M | String(32) | 域名类型。 取值范围:
|
| value | M | String(128) | 域名。 请输入完整的域名,例如https://baidu.com:8080。 |
| errorCode | O | Integer(32) | 非法原因错误码。 新增、修改域名时如果域名不合法,返回失败原因,调用接口新增修改域名配置时无需传入。 |
| errorMsg | O | String(128) | 非法原因错误描述。 新增、修改域名时如果域名不合法,返回失败原因,调用接口新增修改域名配置时无需传入。 |
- {
- "ret": {
- "code": 0,
- "msg": "success"
- },
- "invalidDomains": [
- {
- "type": "httpRequest",
- "value": "https://xxx.xxx.com",
- "errorCode": 0,
- "errorMsg": "******"
- }
- ]
- }