- 请求方式:POST
- 请求路径:/v1/domain/manage
请求JSON参数
domain | string | 域名 | 是 | (字符串) |
product_code | string | 产品业务类型 | 是 | "001":静态加速,"003": 下载加速, "004":视频点播加速,"005":"视频直播加速","006": "全站加速" (字符串) |
action | int | 域名操作动作 | 是 | 1-创建 2-配置 (数字类型) |
origin | list | 源站信息 | 是 | (数组类型) |
origin:origin | string | 源站ip或域名 | 是 | (字符串) |
origin:port | int | 源站端口 | 是 | 支持http自定义端口,http不支持下发443端口 (数字类型) |
origin:weight | int | 权重 | 是 | 范围:1-100 (数字类型) |
origin:role | string | 源站角色 | 是 | 取值: master, slave (字符串) |
origin:protocol | string | 源站类型 | 否 | 默认http,目前不支持自定义配置https源站。 (字符串) |
black_referer | dict | referer黑名单 | 否 | 黑白名单只允许存在一个,若同时存在只处理黑名单 (字典类型) |
black_referer:allow_list | list | referer黑名单列表 | 是 | (数组类型) |
black_referer:allow_empty | string | 取值"on":允许为空 "off":不允许为空 | 是 | (字符串) |
white_referer | dict | referer白名单 | 否 | 黑白名单只允许存在一个,若同时存在只处理黑名单 (字典类型) |
white_referer:allow_list | list | referer白名单列表 | 是 | 支持通配,支持IP,支持端口,如:*.test.com、test.com:80、127.0.0..1、localhost (数组类型) |
white_referer:allow_empty | string | 取值"on":允许为空 "off":不允许为空 | 是 | (字符串) |
filetype_ttl | list | 文件过期时间设置 | 否 | (数组类型) |
filetype_ttl:file_type | string | 缓存文件类型,多个以逗号隔开 | 是 | 0:文件后缀,例如jpg,png,css(以","分割) 1:目录,例如/test,/a/b/c(不能以"/"结尾) 2: 首页,固定为/ 3: 全部文件,固定为/ 4: 全路径,例如/index.html,/test/*.jpg (字符串) |
filetype_ttl:ttl | int | 缓存时间,单位秒 | 是 | (数字类型) |
filetype_ttl:cache_type | int | 缓存类型 | 是 | 1:不缓存,2:优先遵循源站 3:强制缓存 (数字类型) |
filetype_ttl:cache_with_args | int | 是否带参数缓存 | 是 | 0:不带参数缓存,1:带参数缓存 (数字类型) |
filetype_ttl:mode | int | 模式 | 否 | 默认0, 0:文件后缀 1:目录 2: 首页 3: 全部文件 4: 全路径 (数字类型) |
filetype_ttl:priority | int | 优先级,数字越大优先级越高 | 否 | 默认10 (数字类型) |
ip_black_list | string | ip黑名单 | 否 | 黑白名单只允许存在一个,若同时存在只处理黑名单,多个ip以逗号分隔,示例:1.1.1.1,2.2.2.2,::1 (字符串) |
ip_white_list | string | ip白名单 | 否 | 黑白名单只允许存在一个,若同时存在只处理黑名单,多个ip以逗号分隔,示例:1.1.1.1,2.2.2.2,::1 (字符串) |
req_headers | list | 自定义回源请求头 | 否 | (数组类型) |
req_headers:key | string | 自定义回源请求头名称 | 是 | (字符串) |
req_headers:value | string | 自定义回源请求头值 | 是 | (字符串) |
resp_headers | list | 自定义响应请求头 | 否 | (数组类型) |
resp_headers:key | string | 自定义响应请求头名称 | 是 | (字符串) |
resp_headers:value | string | 自定义响应请求头值 | 是 | (字符串) |
cert_name | string | 证书备注名 | 否 | 证书备注名,如果证书存在,此备注名必须存在,该参数只在https_status是on的时候才会生效 (字符串) |
req_host | string | 回源host | 否 | (字符串) |
live_conf | dict | 直播加速信息 | 否 | (字典类型) |
live_conf:protocol_type | int | 直播协议类型 | 是 | 1:http直播, 2: RTMP直播 (数字类型) |
live_conf:domain_type | int | 域名类型 | 是 | 1:拉流域名, 2: 推流域名 (数字类型) |
live_conf:mode | int | 拉流模式 | 是 | 1:推拉流, 2: 回源拉流 (数字类型) |
live_conf:publish_point | string | 发布点 | 否 | 多个用逗号分割 (字符串) |
live_conf:related_domain | string | 关联推拉流域名 | 否 | (字符串) |
live_conf:multi_protocol | int | 多协议输出 | 否 | 多协议输出,取值: 0: 否, 1: 是 (数字类型) |
test_url | string | 测试url | 否 | (字符串) |
area_scope | int | 服务区域 | 否 | 1-国内 2-海外 3-国内+海外。缺省:1 (数字类型) |
basic_conf | dict | http配置基础信息 | 否 | (字典类型) |
basic_conf:follow302 | int | 是否拉取跳转后文件 | 否 | 0: 否 1:是 (数字类型) |
basic_conf:use_http2 | int | 是否开启http2 | 否 | 取值0:不开启,1:开启 默认0,该字段只有在证书开启状态下才会有效 (数字类型) |
error_code | list | 错误码缓存配置 | 否 | (数组类型) |
error_code:code | list | 错误状态码 | 是 | 整型数组 (数组类型) |
error_code:ttl | int | 缓存时间 | 是 | 单位秒 (数字类型) |
shared_host | string | 共享缓存域名 | 否 | (字符串) |
user_agent | dict | user_agent黑白名单配置 | 否 | (字典类型) |
user_agent:type | int | 类型 | 是 | 0: 黑名单, 1: 白名单 (数字类型) |
user_agent:ua | list | user_agent列表 | 是 | 多个用,隔开 (数组类型) |
https_status | string | 是否开启https | 否 | 取值:on、off,取值为on时,cert_name为必传字段 (字符串) |
https_basic | dict | https基础配置 | 否 | (字典类型) |
https_basic:https_force | string | https强制跳转 | 否 | 取值:"on":跳转 "off":不跳转 (字符串) |
https_basic:http_force | string | http强制跳转 | 否 | 取值:"on":跳转 "off":不跳转 (字符串) |
https_basic:force_status | string | 强制跳转状态码 | 否 | 默认:302 (字符串) |
https_basic:origin_protocol | string | https回源协议 | 是 | 取值: http:用http协议回源 https:用https协议回源,follow_request:跟随访问协议进行回源 (字符串) |
record_num | string | 备案号 | 否 | (字符串) |
record_status | int | 备案状态 | 否 | 1:未备案,2:已备案 (数字类型) |
ignore_headers | string | 要忽略的请求头 | 否 | 全局忽略,多个用逗号隔开 (字符串) |
响应Json参数
code | int | 状态码 | |
message | string | 描述信息 |
示例
请求文档
{ "area_scope": 1, "filetype_ttl": [ { "mode": 0, "split": 0, "file_type": "js,css,xml,htm,html,mp4,avi,mpg,mpeg,f4v,hlv,rmvb,rm,3gp,img", "cache_type": 3, "priority": 10, "ttl": 1800, "cache_with_args": 0 }, { "mode": 1, "split": 0, "file_type": "/test,/a,/b,/c", "cache_type": 3, "priority": 20, "ttl": 80, "cache_with_args": 0 }, { "mode": 2, "split": 0, "file_type": "/", "cache_type": 3, "priority": 30, "ttl": 80, "cache_with_args": 0 }, { "mode": 3, "split": 0, "file_type": "/", "cache_type": 3, "priority": 40, "ttl": 80, "cache_with_args": 0 } ], "origin": [ { "role": "master", "port": 80, "origin": "192.255.0.5", "weight": 130 } ], "shared_host": "cache.test.OlQh.com", "https_basic": { "https_force": "off", "force_status": "302", "origin_protocol": "follow_request", "http_force": "on" }, "product_code": "001", "https_status": "off", "basic_conf": { "http_server_port": "80", "secure_conf": 0, "cors_origin": 1, "https_origin_port": 443, "follow_302": 0, "https_server_port": "443", "xff": 0, "default_cache_rule": "on", "http_origin_port": 80, "buffer": "on", "https_return": "off" }, "req_host": "req.test.com", "domain": "test_create.xxxx.com", "action": 1, "error_code": [ { "code": [ 400, 403, 404 ], "ttl": 6912000 }, { "code": [ 500 ], "ttl": 6912000 } ], "user_agent": { "type": 0, "ua": [ "linux", "windows" ] } }