域名缓存设置

最新更新时间:2020.05.02

接口说明

请求URL:http://openapi.tropcdn.com/api/domain/setDomainCache

请求方式:POST

请求参数

参数名 变量 类型 必填 描述
域名 domainName string
+缓存配置json数组 cacheList array(object)
参数名 变量 类型 必填 描述
缓存类型 type string 可选值 [ file: 文件类型, dir: 文件夹, fullFile: 全路径文件, index: 首页, all: 全部, text: 文本, img: 图片, media: 媒体, download: 下载]
缓存内容值 content string
时间值 time integer
时间单位 timeUnit string 可选值 [second: 秒, minute: 分钟, hour: 小时, daily: 天]

请求示例


{
    "domainName": "aa.exp***.com",
    "cacheList": [
        {
            "type": "file",
            "content": ".jpg",
            "time": "60",
            "timeUnit": "second"
        },
        {
            "type": "dir",
            "content": "/php/aa",
            "time": 30,
            "time_unit": "daily"
        }
    ]
}
    
    

返回参数

参数名 变量 类型 必填 描述
状态码 code int(8) 业务状态码
示例值:正常为0
提示信息 message string 业务信息

返回示例


{
    "code": 0, # 《参照附录七》、《参照附录⼋》
    "message": "添加成功"
}