All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

GetBlockUrlTask

Last updated:2021-03-17 10:55:14

GetBlockUrlTask

Description

You can call this operation to query the progress and status of URL blocking or unblocking tasks and check whether the tasks take effect globally.

  • You can query data by task ID, URL, domain name, or operation type.
  • You can query data by start time and end time. Both the start time and end time must be specified.
  • If no parameter is specified, the data of the last 24 hours is queried and up to 20 data records on the first page are returned by default.
  • You can specify the start time, end time, task ID, URL, domain name, and operation type at the same time. They are in AND relationships.
  • You can query only data of the last seven days.

Note:

  • This operation supports only the POST request method.

Request syntax

The API request contains the specified directory /2016-09-01/content/GetBlockUrlTask, common request headers, and operation-specific request parameters. For more information, see the sample request.

Request parameters

Parameter Required Type Description
StartTime No String The beginning of the time range to query. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm+0800 format. The time must be in UTC+8. Example: 2016-08-01T21:14+0800. Default value: 24 hours before the current time.
EndTime No String The end of the time range to query. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm+0800 format. The time must be in UTC+8. The end time must be later than the start time. Example: 2016-08-01T21:14+0800. Default value: current time.
TaskId No String The ID of the task. You can specify only one ID at a time.
BlockType No String The type of the operation. Valid values: block and unblock. If this parameter is not specified, both blocking and unblocking tasks are queried.
DomainName No String The domain name. You can specify only one domain name at a time.
Urls No Url[] The array of URLs. You can query data by exact URL.
PageSize No Long The number of entries to return on each page. Default value: 20. Valid values: 1 to 50.
PageNumber No Long The number of the page to return. Default value: 1. Valid values: 1 to 100000.

Url

Parameter Required Type Description
Url Yes {} The URL to be queried.

Response parameters

Parameter Type Description
StartTime Long The beginning of the time range that is queried.
EndTime Long The end of the time range that is queried.
PageSize Long The number of entries returned per page.
PageNumber Long The page number of the returned page.
TotalCount Long The total number of URLs.
Datas UrlData[] The progress and status of the task.

UrlData

Parameter Type Description
TaskId String The ID of the task.
BlockType String The type of the operation. Valid values: block and unblock.
Url String The URL to be blocked or unblocked.
Progress Double The progress of the task. The value indicates the blocking progress when the value of the BlockUrlStatus parameter is blocking, the unblocking progress when the value of the BlockUrlStatus parameter is unblocking, or the refreshing progress when the value of the BlockUrlStatus parameter is refreshing.
BlockUrlStatus String The status of the task. For more information, see the appendix.
BlockTime String The time when the URL was blocked or unblocked.
ExpireTime String The blocking expiration time. This parameter is empty when the value of the BlockType parameter is unblock.
Submitter String The submitter of the task. Valid values: customer, ksyun, and ISMS.

Examples

Sample request

POST method:

POST /2016-09-01/statistics/ GetBlockUrlTask
Host: cdn.api.ksyun.com 
X-Amz-Date: date  
Authorization:authorization string 
x-action: GetBlockUrlTask
x-version: 2016-09-01 
Content-Type: application/json

{
"Urls":[{"Url":"http://www.zhaofang360.com/abc.txt"},{"Url":"http://www.zhaofang360.com/abc.ed"}]
}

Sample response

{
"StartTime": "2016-09-01T17:55+0800",
"EndTime": "2016-09-02T17:55+0800",
"PageSize": 1,
"PageNumber": 2,
"TotalCount": 10,
"Datas":
[
{
"TaskId": "ad07ce4f-59a5-4c32-b857-2d8ac9a929b8",
"BlockType":"block",
"Url":"http://www.zhaofang360.com/abc.txt",
"Progress":22.0,
"BlockUrlStatus":"blocking",
"BlockTime":"2016-09-01T19:13+0800",
"ExpireTime":"2016-09-08T19:13+0800",
"Submitter":"ksyun"
},
{
"TaskId": "26ba2c41-6f00-438f-b268-30be326f131c",
"BlockType":"block",
"Url":"http://www.zhaofang360.com/abc.ed",
"Progress":22.0,
"BlockUrlStatus":"blocking",
"BlockTime":"2016-09-01T19:13+0800",
"ExpireTime":"2016-09-08T19:13+0800",
"Submitter":"ksyun"
},
]
}

UrlData

BlockUrlStatus structure

Valid values of BlockUrlStatus:

  • blocking
  • block_success
  • block_fail
  • unblocking
  • unblock_success (not returned in this operation)
  • ublock_fail
  • refreshing
  • refresh_success (not returned in this operation)
  • refresh_fail
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback