全部产品
阿里云办公

刷新接口

更新时间:2018-09-05 16:39:10

概述

刷新节点上的文件内容,刷新指定URL内容至Cache节点。支持URL批量刷新。

注意:一个 ID 每天最多可提交2000条URL和100个目录预热刷新类请求。

请求参数

参数 类型 是否必需 描述
Action String 操作接口名。系统规定参数,取值:RefreshDcdnObjectCaches
ObjectPath String 输入示例:abc.com/image/1.png
多个URL用换行符(\n或\r\n)分隔。
ObjectType String 刷新类型。取值范围:
  • File
  • Directory
默认值:File

返回参数

名称 类型 描述
RefreshTaskId String 刷新返回的任务ID。多个ID用半角逗号分隔。

示例

请求示例

  1. https://dcdn.aliyuncs.com?&Action=RefreshDcdnObjectCaches&ObjectPath=test.test.com/test.txt&ObjectType=File&<公共请求参数>

返回示例

JSON格式:

  1. {
  2. "RefreshTaskId":"704222904","RequestId":"D61E4801-EAFF-4A63-AAE1-FBF6CE1CFD1C"
  3. }
  4. XML格式:
  5. <?xml version="1.0" encoding="utf-8"?>
  6. <RefreshDcdnObjectCachesResponse>
  7. <RefreshTaskId>704225667</RefreshTaskId>
  8. <RequestId>AB14769A-A5F2-4CCD-B85B-3368DFF63C0A</RequestId>
  9. </RefreshDcdnObjectCachesResponse>

错误码

错误代码 错误信息 HTTP 状态码 说明
Throttling Request was denied due to request throttling. 503 请求被流量控制限制
IllegalOperation Illegal domain operate is not permitted. 403 非法域名, 无法操作
OperationDenied Your account does not open CDN service yet. 403 未开通CDN服务
OperationDenied Your CDN service is suspended. 403 CDN服务已被停止
InvalidDomain.NotFound The domain provided does not belong to you. 404 域名不存在或不属于当前用户
InvalidDomain.Offline The domain provided is offline. 404 域名已下线
QuotaExceeded.Refresh You’ve exceeded the prescribed refresh limits. 400 超出当日刷新限制
ServiceBusy The specified Domain is configuring, please retry later. 403 域名正在配置中, 请稍后再试
InvalidDomain.Configure_failed Failed to configure the provided domain. 500 域名配置失败, 无法刷新
MissingParameter The input parameter “ObjectPath” that is mandatory for processing this request is not supplied. 400 缺少ObjectPath参数
InvalidObjectType.ValueNotSupported The specified value of “ObjectType” is not supported. 400 ObjectType值不支持
InvalidObjectPath.Malformed The specific value of parameter ObjectPath is malformed. 400 ObjectPath值格式错误
InvalidExtensiveDomain.ValueNotSupported Extensive domain not supported. 400 不支持泛域名
QuotaPerMinuteExceeded.Refresh You’ve exceeded the prescribed refresh limits per minute. 400 超出每分钟刷新限制