Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to create a preheating task.
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: CreatePrefetchTask. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Zone ID. If you wish to quickly submit Targets Url under different sites, you can fill it in as *, but the premise is that the account calling the API must have permission for all site resources under the root account. |
| Targets.N | No | Array of String | List of resources to be preheated. Required. The format of each element is as follows: http://www.example.com/example.txt. Note: The number of submitted tasks is limited by the quota of a billing package. Check EO billing packages (https://www.tencentcloud.com/document/product/1552/77380?from_cn_redirect=1). |
| Mode | No | String | Preheat mode. Valid values: Notes: 1. Edge layer traffic generated by preheating to the edge is included in billing traffic; 2. Edge preheating is assigned a separate preheating amount of 1,000 entries per day by default and does not consume the normal preheating amount. Note: This parameter is an allowlist feature. If needed, contact Tencent Cloud Engineers. |
| Headers.N | No | Array of Header | If you need to carry HTTP header information for preheating, you can pass in this parameter. Otherwise, leave it empty. |
| PrefetchMediaSegments | No | String | Media fragment preheating control. Valid values: Notes: 1. The supported description file is M3U8, and the corresponding shard is TS; 2. The description file is required to handle normal requests and describe the fragment path according to industry standards. 3. Recursive resolution depth no more than 3 levels; 4. Parsed shards accumulate the daily preheating amount normally. When the amount exceeds the quota, it is handled silently and preheating is no longer executed. Note: This parameter is an allowlist feature. If needed, contact Tencent Cloud Engineers. |
| Parameter Name | Type | Description |
|---|---|---|
| JobId | String | Task ID. |
| FailedList | Array of FailReason | List of failed tasks. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Submit preheat task.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreatePrefetchTask
<Common request parameters>
{
"Targets": [
"http://www.qq.com/a.txt"
],
"ZoneId": "zone-ajj243dwrew",
"EncodeUrl": true
}
{
"Response": {
"JobId": "20ga521cpwch",
"FailedList": [],
"RequestId": "3c140219-cfe9-470e-b241-907877d6fb03"
}
}
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 |
|---|---|
| InternalError.BackendError | Error in background processing. |
| InternalError.DomainConfig | Failed to get configuration. |
| InternalError.FailedToGenerateUrl | Failed to generate the upload URL. |
| InternalError.QuotaSystem | Quota system processing failure. |
| InvalidParameter.DomainNotFound | The domain name does not exist or does not belong to this account. |
| InvalidParameter.ParameterError | Parameter error: invalid "end time", not in the allowed query range: [start time, start + 7 days] |
| InvalidParameter.Target | The resource has an error. |
| InvalidParameter.TaskNotGenerated | Task unable to generate. |
| InvalidParameter.UploadUrl | The file upload link has an issue. |
| LimitExceeded.BatchQuota | Resource count in this submission exceeds the upper limit. |
| LimitExceeded.DailyQuota | Resource count submitted on the day exceeds the upper limit. |
| UnauthorizedOperation.CamUnauthorized | Unauthorized Cam operation. |
| UnauthorizedOperation.NoPermission | The sub-account does not have operation permissions. Add the required permissions and try again. |
| UnauthorizedOperation.Unknown | Unknown error occurs on the real server. |
피드백