简要描述:
请求URL:
https://api.chuangcache.com/content/purge
请求方式:
请求参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
access_token | 是 | string | 密钥 |
type | 是 | string | 刷新类型,支持file、dir |
urls | 是 | array | 刷新内容URLS列表,如:[{"url_name": "http://www.test.com/a.jpg"}] ,单次最多提交 200 条URL |
请求示例
curl -i -X POST https://api.chuangcache.com/content/purge -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"access_token": "ACCESS_TOKEN", "type": "file", "urls": [{"url_name": "http://www.test.com/1.jpg"},{"url_name": "http://www.test.com/2.jpg"}]}'
响应示例
文件刷新返回:
{
"status" : 1,
"info" : "success",
"data" : {
"task_id": "085ca0d2a7525bcf8f0dc01c5bfefcab",
"status": "InProgress",
"createtime": 1474184811
}
}
目录刷新返回:
{
"status": 1,
"info": "success",
"data": [
{
"task_id": "e9ee983f4964a83f961c17d47aee90af",
"url_name": "http://www.test.com/07201104.css/",
"status": "InProgress",
"start_time": 1535335971
},
{
"task_id": "e9ee983f4964a83f961c17d47aee90af",
"url_name": "http://www.test.com/07201103.css/",
"status": "InProgress",
"start_time": 1535335971
}
]
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
status | int | 接口返回码 [ 0(操作失败)、1(操作成功)] |
info | string | 接口返回信息 [ 操作失败 / 操作成功 ] |
data | object | 接口返回数据对象 |
data.task_id | string | 任务ID |
data.url_name | string | 刷新URL(当前为目录刷新时返回) |
data.status | string | 刷新状态 |
data.createtime | int | 创建时间 |