查询状态码缓存配置
更新时间:2026-06-05
接口
本接口用于查询站点的状态码缓存配置。
请求接口
| Method | Path | 说明 |
|---|---|---|
| GET | /v2/geo/site/{site}/config | 查询状态码缓存配置接口 |
site:表示要查询的站点。
响应码
| HTTP Status Code | 说明 |
|---|---|
| 200 | 查询状态码缓存配置成功 |
响应体
| 参数 | 类型 | 说明 |
|---|---|---|
| cacheCodeTtl | List<CacheTtlCode> | 该接口会返回站点所有的配置,其中 “cacheCodeTtl” 参数表示该站点的状态码缓存配置。 |
请求示例
Plain Text
1GET /v2/geo/site/test.com/config HTTP/1.1
2Host: geo.baidubce.com
3Content-Length: 46
4Authorization: xxx
5Content-Type: application/json;charset=utf-8
6Accept-Encoding: gzip
响应示例
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 "cacheCodeTtl": [
9 {
10 "value": "404",
11 "weight": 100,
12 "overrideOrigin": true,
13 "ttl": 10,
14 "type": "code"
15 },
16 {
17 "value": "400",
18 "weight": 100,
19 "overrideOrigin": true,
20 "ttl": 10,
21 "type": "code"
22 }
23 ]
24}
评价此篇文章
