PullUpload

Last updated: 2020-11-24 18:53:30

1. API Description

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

This API is used to pull a video on the internet to the VOD platform.

A maximum of 100 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: PullUpload.
Version Yes String Common parameter. The value used for this API: 2018-07-17.
Region No String Common parameter. This parameter is not required for this API.
MediaUrl Yes String URL of the media to be pulled. Supported media format: HLS; unsupported media format: DASH.
For more information about supported extensions, please see Media Types.
MediaName No String Media name.
CoverUrl No String URL of video cover to be pulled. Only gif, jpeg, and png formats are supported.
Procedure No String Subsequent task for media. For more information, please see Specifying Task Flow After Upload.
ExpireTime No Timestamp ISO8601 Expiration time of media file in ISO 8601 format. For more information, please see Notes on ISO Date Format.
StorageRegion No String Specifies upload region. This is only applicable to users that have special requirements for the upload region:
  • If it is left empty, the upload region is your default region;
  • If it is specified, please make sure that the upload region has been enabled for storage.
  • ClassId No Integer Category ID, which is used to categorize the media for management. A category can be created and its ID can be obtained by using the CreateClass API.
    SessionContext No String The source context which is used to pass through the user request information. After Procedure is specified, the task flow status change callback will return the value of this field. It can contain up to 1,000 characters.
    SessionId No String The ID used for deduplication. If there was a request with the same ID in the last three days, the current request will return an error. The ID can contain up to 50 characters. If this parameter is left empty or a blank string is entered, no deduplication will be performed.
    ExtInfo No String Reserved field for special purposes.
    SubAppId No Integer Subapplication ID in VOD. If you need to access a resource in a subapplication, enter the subapplication ID in this field; otherwise, leave it empty.
    SourceContext No String Source context, which is used to pass through the user request information. The upload callback API will return the value of this field. It can contain up to 250 characters.

    3. Output Parameters

    Parameter Name Type Description
    TaskId String Video pull for upload task ID, which can be used to query the status of pull for upload task.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Pulling an MP4 video from URL http://www.abc.com/abc.mp4 for upload

    Input Example

    https://vod.tencentcloudapi.com/?Action=PullUpload
    &MediaUrl=http://www.abc.com/abc.mp4
    &<Public request parameters>

    Output Example

    {
      "Response": {
        "RequestId": "5ca61e3a-6b8e-4b4e-9256-fdc701190064ef0",
        "TaskId": "125xxxxxx07-pull-893dc41e6fdc22dcf24aa6e9c61cp94"
      }
    }

    Example2 Pulling an MP4 video from URL http://www.abc.com/abc.mp4 in Chinese mainland and uploading it to the Chongqing region.

    Input Example

    https://vod.tencentcloudapi.com/?Action=PullUpload
    &MediaUrl=http://www.abc.com/abc.mp4
    &StorageRegion=ap-chongqing
    &<Public request parameters>

    Output Example

    {
      "Response": {
        "RequestId": "6ca61e3a-6b8e-4b4e-9256-fdc701190064ef0",
        "TaskId": "125xxxxxx07-pull-793dc41e6fdc22dcf24aa6e9c61cp94"
      }
    }

    Example3 Pulling an MP4 video from URL http://www.abc.com/abc.mp4 outside Chinese mainland and uploading it to the Singapore region

    Input Example

    https://vod.tencentcloudapi.com/?Action=PullUpload
    &MediaUrl=http://www.abc.com/abc.mp4
    &StorageRegion=ap-singapore
    &<Public request parameters>

    Output Example

    {
      "Response": {
        "RequestId": "5ca61e3a-6b8e-4b4e-9256-fdc701190064ef0",
        "TaskId": "125xxxxxx07-pull-693dc41e6fdc22dcf24aa6e9c61cp94"
      }
    }

    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
    FailedOperation.CoverType Operation failed: unsupported cover type.
    FailedOperation.InvalidVodUser The VOD service is not activated.
    FailedOperation.MediaType Operation failed: unsupported media type.
    InternalError Internal error.
    InvalidParameter.ExpireTime Incorrect parameter value: expiration time.
    InvalidParameter.StorageRegion Incorrect parameter value: storage region.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.CoverUrl Incorrect parameter value: cover URL.
    InvalidParameterValue.ExpireTime Incorrect parameter value: incorrect ExpireTime format.
    InvalidParameterValue.MediaUrl Incorrect parameter value: media file URL.
    InvalidParameterValue.SessionContextTooLong SessionContext is too long.
    InvalidParameterValue.SessionId The deduplication ID already exists. The request is removed due to duplication.
    InvalidParameterValue.SessionIdTooLong SessionId is too long.
    InvalidParameterValue.StorageRegion Incorrect parameter value: storage region.
    ResourceNotFound.CoverUrl The resource does not exist: the cover does not exist.
    ResourceNotFound.UserNotExist The user does not exist.
    UnauthorizedOperation Unauthorized operation.

    Was this page helpful?

    Was this page helpful?

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