删除加速域名接口
更新时间:2025-12-11
接口
本接口用于删除指定的域名,此域名必须是本用户并属于GEO产品的,否则会返回403失败。
请求接口
| Method | Path | 说明 |
|---|---|---|
| POST | /v2/geo/domain?action=delete | 删除一个加速域名 |
请求体
| 参数 | 类型 | 可选 | 说明 |
|---|---|---|---|
| domain | String | 必选 | 删除一个加速域名,优先级高于 domains。 |
| domains | String[] | 必选 | 批量删除域名。 |
您可以根据需要,选择一个域名作为请求体或者域名数组作为请求体进行删除域名操作。
响应码
| HTTP Status Code | 说明 |
|---|---|
| 200 | 删除成功 |
| 400 | 要删除的域名请求参数无效。 |
| 403 | 域名不属于该用户,用户不可操作。 |
响应体
| 参数 | 类型 | 说明 |
|---|---|---|
| status | String | 操作的结果,当前有效值为: • OK:操作全部成功; • PartialFailed:部分成功。 |
| total | Int | 需要操作的域名数目。 |
| success | Int | 操作成功的域名数目。 |
| errMsg | String | 当 status 不为 OK 时,此字段表示错误详情。 |
请求示例1:批量删除域名
Plain Text
1POST /v2/geo/domain?action=delete HTTP/1.1
2Host: geo.baidubce.com
3Content-Length: 46
4Authorization: xxx
5Content-Type: application/json;charset=utf-8
6Accept-Encoding: gzip
7
8{
9 "domains":[
10 "1.test.com",
11 "2.test.com"
12 ]
13}
请求示例2:删除一个域名
Plain Text
1POST /v2/geo/domain?action=delete HTTP/1.1
2Host: geo.baidubce.com
3Content-Length: 46
4Authorization: xxx
5Content-Type: application/json;charset=utf-8
6Accept-Encoding: gzip
7
8{
9 "domain":"1.test.com"
10}
响应示例
Plain Text
1HTTP/1.1 200 OK
2Server: nginx/1.16.1
3Content-Type: application/json; charset=utf-8
4Transfer-Encoding: chunked
5Connection: keep-alive
6
7{
8 "total":1,
9 "success":1,
10 "status":"OK"
11}
评价此篇文章
