Domain name for API request: cdn.tencentcloudapi.com.
This API is used to submit multiple directory purge tasks, which are carried out according to the acceleration region of the domain names.
By default, a maximum of 100 directories can be purged per day for acceleration regions either within or outside the Chinese mainland, and up to 500 tasks can be submitted at a time.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: PurgePathCache. |
Version | Yes | String | Common Params. The value used for this API: 2018-06-06. |
Region | No | String | Common Params. This parameter is not required for this API. |
Paths.N | Yes | Array of String | List of directories. The protocol header such as "http://" or "https://" needs to be included. |
FlushType | Yes | String | Purge type:flush : purges updated resourcesdelete : purges all resources |
UrlEncode | No | Boolean | Whether to encode Chinese characters before purge. |
Area | No | String | Region to purge The acceleration region of the acceleration domain name will be purged if this parameter is not passed in. If mainland is passed in, only the content cached on nodes in the Chinese mainland will be purged.If overseas is passed in, only the content cached on nodes outside the Chinese mainland will be purged.The specified region to purge should match the domain name’s acceleration region. |
Parameter Name | Type | Description |
---|---|---|
TaskId | String | Purge task ID. Directories submitted in one request share a task ID. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: cdn.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: PurgePathCache
<Common request parameters>
{
"Paths": [
"http://www.test.com/test/"
],
"FlushType": "flush"
}
{
"Response": {
"RequestId": "4d5a83f8-a61f-445b-8036-5636be640bef",
"TaskId": "1533045796-i60rfmzm"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
AuthFailure.InvalidAuthorization | Authentication error. Please check and try again. |
InternalError.CamSystemError | Authentication system internal error. |
InternalError.CdnConfigError | Failed to update the domain name configuration. |
InternalError.CdnDbError | Internal data error. Please submit a ticket for troubleshooting. |
InternalError.CdnQueryParamError | Internal error. Please try again or contact the customer service for assistance. |
InternalError.CdnQuerySystemError | Internal error. Please try again or contact the customer service for assistance. |
InternalError.CdnSystemError | System error. Please submit a ticket for troubleshooting. |
InternalError.Error | Service internal error. Please submit a ticket for troubleshooting. |
InternalError.ProxyServer | Internal service error. Please submit a ticket for troubleshooting. |
InvalidParameter.CdnHostInvalidStatus | Invalid domain name status. |
InvalidParameter.CdnInterfaceError | Internal API error. Please submit a ticket for troubleshooting. |
InvalidParameter.CdnParamError | Parameter error. Please see the sample parameters in the documentation. |
InvalidParameter.CdnPurgeWildcardNotAllowed | Cache purge does not support wildcard domain names. |
InvalidParameter.CdnStatInvalidDate | Invalid date. Please see the sample date in the documentation. |
InvalidParameter.CdnUrlExceedLength | The URL exceeds the length limit. |
LimitExceeded.CdnPurgeExceedBatchLimit | |
LimitExceeded.CdnPurgeExceedDayLimit | |
LimitExceeded.CdnPurgePathExceedBatchLimit | The number of directories to be purged exceeds the limit. |
LimitExceeded.CdnPurgePathExceedDayLimit | The number of directories to be purged exceeds the daily limit. |
LimitExceeded.CdnPurgeUrlExceedBatchLimit | The number of URLs to be purged exceeds the limit. |
LimitExceeded.CdnPurgeUrlExceedDayLimit | The number of URLs to be purged exceeds the daily limit. |
ResourceNotFound.CdnHostNotExists | Unable to find the domain name. Please make sure the domain name is correct. |
ResourceNotFound.CdnUserNotExists | The CDN service has not been activated. Please activate it first before using this API. |
UnauthorizedOperation.CdnCamUnauthorized | No CAM policy is configured for the sub-account. |
UnauthorizedOperation.CdnHostUnauthorized | The sub-account has no access to the CDN-accelerated domain name. |
UnauthorizedOperation.CdnUserAuthFail | Fail to authenticate the CDN user. |
UnauthorizedOperation.CdnUserAuthWait | The CDN user is pending authentication. |
UnauthorizedOperation.CdnUserIsSuspended | The CDN service has been suspended. Please restart it and try again. |
UnauthorizedOperation.OperationTooOften | Too many calling attempts. |
Was this page helpful?