DescribePurgeTasks

Last updated: 2020-06-24 10:47:51

1. API Description

Domain name for API request: cdn.tencentcloudapi.com.

This API is used to query the record and progress of URL or directory purge tasks submitted via the PurgePathCache or PurgeUrlsCache APIs.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 parameter. The value used for this API: DescribePurgeTasks.
Version Yes String Common parameter. The value used for this API: 2018-06-06.
Region No String Common parameter. This parameter is not required for this API.
PurgeType No String Specifies a purge type:
url: URL purge record
path: Directory purge record
StartTime No Timestamp Specifies the starting time of the period you want to query, such as 2018-08-08 00:00:00
EndTime No Timestamp Specifies the end time of the period you want to query, such as 2018-08-08 23:59:59
TaskId No String Specifies a task ID when you want to query by task ID.
You must specify either a task ID or a starting time for your query.
Offset No Integer Offset for paginated queries. Default value: 0
Limit No Integer Limit on paged queries. Default value: 20
Keyword No String You can filter the results by domain name or a complete URL beginning with http(s)://
Status No String Specifies a task state for your query:
fail: purge failed
done: purge succeeded
process: purge in progress
Area No String Specifies a purge region for your query:
mainland: within Mainland China
overseas: outside Mainland China
global: global

3. Output Parameters

Parameter Name Type Description
PurgeLogs Array of PurgeTask Detailed purge record.
Note: This field may return null, indicating that no valid values can be obtained.
TotalCount Integer Total number of tasks, which is used for pagination.
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Describe Purge Tasks

Input Example

https://cdn.tencentcloudapi.com/?Action=DescribePurgeTasks
&PurgeType=url&TaskId=1234567&PurgeType=url&Area=mainland
&<common request parameters>

Output Example

{
  "Response": {
    "RequestId": "4d5a83f8-a61f-445b-8036-5636be640bef",
    "PushLogs": [
      {
        "TaskId": "153303185323131331",
        "Url": "http://www.test.com/",
        "Status": "Done",
        "PurgeType": "url",
        "FlushType": "flush",
        "CreateTime": "2018-07-30 18:10:53"
      }
    ],
    "TotalCount": 1
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.CdnDbError Internal data error. Please submit a ticket for troubleshooting.
InternalError.CdnSystemError System error. Please submit a ticket for troubleshooting.
InvalidParameter.CdnParamError Parameter error. Please see the sample parameters in the documentation.
UnauthorizedOperation.CdnCamUnauthorized No CAM policy is configured for the sub-account.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help