Content MGMT
Proactively pre - fetch the content from the origin server to the CDN nodes. When users visit for the first time, they can directly hit the cache. This not only improves the first - visit speed but also effectively alleviates the pressure on the origin server.
Single user trigger frequency: 10/5min
| Name | Description |
|---|---|
*urlsList | To submit URLs for prefetch (pre-loading) onto CDN edge nodes, the following requirements must be met:
The URL must begin with http:// or https://.
Example: http://www.a.com/image/test.png.
Each individual URL has a maximum length of 2,000 characters.
The domain specified in the URL must be an active domain currently under our CDN acceleration service and authorized for prefetch.
If the URL contains non-ASCII characters (e.g., Chinese characters), the submitted URL must be percent-encoded (URL-escaped) using UTF-8 encoding.
Daily limits (per account, adjustable via technical support):
- Maximum 20,000 URLs.
- Maximum 200 GB of total file size.
The total number of URLs submitted per single API call must not exceed 400. |
*viewsList | IPB view identifiers (line/view). Must be an array; an empty array [] is allowed. Valid values depend on platform configuration. |
*headersString | |
fetchOptionString | Prefetch option/strategy identifier (optional). If omitted, default strategy applies. Valid options depend on platform conventions. |
isRangeInteger | Only prefetch a range segment of the file header. The user get the file from the beginning, and they will select quickly their interested. If the file header is cached, the first pack time of the user's http request will be short.This feature allows users to filter content faster. For example, if a file has 200MB, only the size of the file 0~range is prefetched, instead of prefetching the entire file. Each account can be configured with a size of the range. If you need to modify the size, please contact us. If this element is assigned a value of 1, the default prefetch is 0~512KB. |
aliasDomainString | Alias domain (optional). When the account feature is enabled, the domain must be authorized for prefetch and belong to the current account. |
parentDirString | Parent directory (optional). Used together with aliasDomain to specify directory-level attribution or management path for prefetch. |
fetchAreaInteger | Default value: 0. Allowed values: 0, 1, 2. Specifies the prefetch region. The default is 0, which prefetches all regions; 1 prefetches the Mainland China region; 2 prefetches regions outside Mainland China. |
| Name | Description |
|---|---|
CodeInteger | The status code of the task creation result:
1) 1 means success,
2) 0 means failure. |
MessageString | Content system response message after submitting the task. |
itemIdString | After calling the API once and submitting the task successfully, the content system will return an itemId. This ID is the unique identifier for each submission. You can use itemId to batch query the status (success/failure) of the task. |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| 1 | success | 200 | success |
| 0 | parse json/xml error | 200 | parse json/xml error |
| 0 | fetchArea is error, must be 0 or 1 or 2 | 200 | fetchArea is error, must be 0 or 1 or 2 |
| 0 | urls must be array | 200 | urls must be array |
| 0 | username is invalid | 200 | username is invalid |
| 0 | storage today has reached the limit | 200 | storage today has reached the limit |
| 0 | urls can not be empty | 200 | urls can not be empty |
| 0 | the remaining number of urls today can submit is [] | 200 | the remaining number of urls today can submit is [] |
| 0 | the number of url out of limit | 200 | the number of url out of limit |
| 0 | urls submitted today has reached the limit [] | 200 | urls submitted today has reached the limit [] |
| 0 | Part of the submitted URLs do not allow prefetching or incorrect URL format (for example, do not start with http: //, https: //) or the domain name has no association with the user (the correct URL prefetching task submitted this time will not be executed ) | 200 | Part of the submitted URLs do not allow prefetching or incorrect URL format (for example, do not start with http: //, https: //) or the domain name has no association with the user (the correct URL prefetching task submitted this time will not be executed ) |
| 0 | The domain names in all submitted URLs do not allow prefetching or URL format errors (for example, do not start with http: //, https: //) or the domain name has no association with the user | 200 | The domain names in all submitted URLs do not allow prefetching or URL format errors (for example, do not start with http: //, https: //) or the domain name has no association with the user |
| 0 | system error | 200 | system error |
#!/bin/bash
username="username"
apiKey='apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.atomile.com/ccm/fetch/ItemIdReceiver" \
-X "POST" \
-u "$username:$password" \
-H "Date:$date" \
-H "Content-Type: application/json" \
-H "X-Time-Zone: Asia/Shanghai" \
-d '{
"urls": [
"https://www.abc.com/test/test1.txt",
"https://www.abc.com/test/test2.txt"
],
"views": [
"viewA",
"viewB"
],
"headers": "{\"User-Agent\":\"MyFetcher/1.0\",\"Accept\":\"*/*\"}",
"fetchOption": "default",
"isRange": 0,
"aliasDomain": "download.abc.com",
"parentDir": "/test/"
}'HTTP/1.1 200 OK
Date: Fri, 26 Oct 2012 06:33:26 GMT
Content-Type: application/json;charset=UTF-8
x-cnc-request-id:{id string auto generated by cloud server}
{
"Code": 1,
"Message": "success",
"itemId": "a2cfcc6fe79c4a8abcab806578f9bada"
}