tencent cloud



Last updated: 2024-03-27 16:08:38

    1. API Description

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

    • This API is used to get event notifications from the business server through reliable callback.
    • The API gets event data through long polling. That is, if there is any unconsumed event on the server, the event notification will be returned to the requester immediately. If there is no unconsumed event on the server, the request will be suspended in the backend until a new event is generated.
    • The request can be suspended for up to 5 seconds. It's recommended to set the request timeout period to 10 seconds.
    • Event notifications not pulled will be retained for up to 4 days and may be cleared after this period.
    • After the API returns an event, the caller must call the ConfirmEvents API within 30 seconds to confirm that the event notification has been processed. Otherwise, the event notification will be pulled again after 30 seconds.
    • This API can get up to 16 event notifications at a time.

    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 Params. The value used for this API: PullEvents.
    Version Yes String Common Params. The value used for this API: 2018-07-17.
    Region No String Common Params. This parameter is not required.
    ExtInfo No String Reserved field for special purposes.
    SubAppId No Integer The VOD application ID. For customers who activate VOD service from December 25, 2023, if they want to access resources in a VOD application (whether it's the default application or a newly created one), they must fill in this field with the application ID.

    3. Output Parameters

    Parameter Name Type Description
    EventSet Array of EventContent List of events.
    Note: this field may return null, indicating that no valid values can be obtained.
    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 Pull events

    Pull events

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: PullEvents
    <Public Request Parameter>

    Output Example

        "Response": {
            "EventSet": [
                    "EventHandle": "EventHandle1",
                    "EventType": "ProcedureStateChanged",
                    "FileUploadEvent": null,
                    "ExtractCopyRightWatermarkCompleteEvent": null,
                    "QualityInspectCompleteEvent": null,
                    "ProcedureStateChangeEvent": {
                        "TaskId": "1256712345-Procedure-475b7237438a39560b9879a4556cb177t2",
                        "Status": "FINISH",
                        "ErrCode": 0,
                        "Message": "",
                        "FileId": "5285890784246869930",
                        "FileName": "small",
                        "FileUrl": "https://123.vod2.myqcloud.com/d042887avodtransgzp1256768367/c643347c5285890784246869930/1546950643_4191274987.100_0.jpg",
                        "SessionContext": "",
                        "SessionId": "",
                        "OperationType": "",
                        "TasksNotifyMode": "Finish",
                        "TasksPriority": 0,
                        "Operator": "",
                        "MetaData": {
                            "AudioDuration": 59.990001678467,
                            "AudioStreamSet": [
                                    "Bitrate": 383854,
                                    "Codec": "aac",
                                    "SamplingRate": 48000
                            "Md5": "07d635581e7f295b623f40bad0fbfd4c1",
                            "Bitrate": 1021028,
                            "Container": "mov,mp4,m4a,3gp,3g2,mj2",
                            "Duration": 60,
                            "Height": 480,
                            "Rotate": 0,
                            "Size": 7700180,
                            "VideoDuration": 60,
                            "VideoStreamSet": [
                                    "Bitrate": 637174,
                                    "Codec": "h264",
                                    "CodecTag": "",
                                    "Fps": 23,
                                    "Height": 480,
                                    "Width": 640,
                                    "DynamicRangeInfo": {
                                        "HDRType": "",
                                        "Type": "SDR"
                            "Width": 640
                        "MediaProcessResultSet": [
                                "Type": "Transcode",
                                "TranscodeTask": {
                                    "Status": "SUCCESS",
                                    "ErrCode": 0,
                                    "ErrCodeExt": "",
                                    "Message": "SUCCESS",
                                    "Progress": 100,
                                    "BeginProcessTime": "2023-09-08T02:23:29Z",
                                    "FinishTime": "2023-09-08T03:23:29Z",
                                    "Input": {
                                        "Definition": 20,
                                        "WatermarkSet": [],
                                        "TraceWatermark": {
                                            "Switch": "ON",
                                            "Definition": 1
                                        "CopyRightWatermark": {
                                            "Text": "copyRightxxx"
                                        "MosaicSet": [],
                                        "HeadTailSet": [],
                                        "StartTimeOffset": 2,
                                        "EndTimeOffset": 3
                                    "Output": {
                                        "Url": "http://123.vod2.myqcloud.com/d042887avodtransgzp1256768367/c643347c5285890784246869930/v.f20.mp4",
                                        "Size": 4189073,
                                        "Container": "mov,mp4,m4a,3gp,3g2,mj2",
                                        "Height": 480,
                                        "Width": 640,
                                        "Bitrate": 552218,
                                        "Md5": "eff7031ad7877865f9a3240e9ab165ad",
                                        "Duration": 60.04700088501,
                                        "VideoStreamSet": [
                                                "Bitrate": 503727,
                                                "Codec": "h264",
                                                "CodecTag": "",
                                                "Fps": 24,
                                                "Height": 480,
                                                "Width": 640,
                                                "DynamicRangeInfo": {
                                                    "HDRType": "",
                                                    "Type": "SDR"
                                        "AudioStreamSet": [
                                                "Bitrate": 48491,
                                                "Codec": "aac",
                                                "SamplingRate": 44100
                                        "Definition": 0,
                                        "DigitalWatermarkType": "None",
                                        "CopyRightWatermarkText": ""
                                "AnimatedGraphicTask": null,
                                "SnapshotByTimeOffsetTask": null,
                                "SampleSnapshotTask": null,
                                "ImageSpriteTask": null,
                                "CoverBySnapshotTask": null
                        "AiContentReviewResultSet": [],
                        "AiAnalysisResultSet": [],
                        "AiRecognitionResultSet": []
                    "FileDeleteEvent": null,
                    "PullCompleteEvent": null,
                    "EditMediaCompleteEvent": null,
                    "SplitMediaCompleteEvent": null,
                    "ComposeMediaCompleteEvent": null,
                    "WechatPublishCompleteEvent": null,
                    "TranscodeCompleteEvent": null,
                    "ConcatCompleteEvent": null,
                    "ClipCompleteEvent": null,
                    "CreateImageSpriteCompleteEvent": null,
                    "SnapshotByTimeOffsetCompleteEvent": null,
                    "WechatMiniProgramPublishCompleteEvent": null,
                    "RemoveWatermarkCompleteEvent": null,
                    "RestoreMediaCompleteEvent": null,
                    "RebuildMediaCompleteEvent": null,
                    "ExtractTraceWatermarkCompleteEvent": null,
                    "ReviewAudioVideoCompleteEvent": null,
                    "DescribeFileAttributesCompleteEvent": null,
                    "ReduceMediaBitrateCompleteEvent": null
            "RequestId": "5ca61a3a-6b8e-4b4e-9256-fdc001190064ef0"

    5. Developer Resources


    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 Operation failed.
    FailedOperation.InvalidVodUser The VOD service is not activated.
    InternalError Internal error.
    InvalidParameterValue Incorrect parameter value.
    ResourceNotFound The resource does not exist.
    UnauthorizedOperation Unauthorized operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support