tencent cloud

APIs

CreatePrefetchTask

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-25 17:00:06

1. API Description

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.

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 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:
  • default: default mode, which means preheating to the middle layer;
  • edge: Edge preheating mode, which preheats to the edge and middle layer.
  • If left empty, the default value is default.
    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:
  • on: enable shard preheating, preheat the description file, and perform recursive resolution on the description file shards for preheating;
  • off: only preheat the description file of the submission;
  • If left empty, the default value is off.
    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.

    3. Output Parameters

    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.

    4. Example

    Example1 Preheat a URL

    Submit preheat task.

    Input Example

    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
    }

    Output Example

    {
        "Response": {
            "JobId": "20ga521cpwch",
            "FailedList": [],
            "RequestId": "3c140219-cfe9-470e-b241-907877d6fb03"
        }
    }

    5. Developer Resources

    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.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.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック