tencent cloud

masukan

Triggering Job (Independent Node)

Terakhir diperbarui:2024-06-12 16:01:53

    Feature Description

    This API is used to trigger a batch data processing job through independent job parameters.
    

    Request

    Sample request

    POST /inventorytriggerjob HTTP/1.1
    Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
    Date: <GMT Date>
    Authorization: <Auth String>
    Content-Length: <length>
    Content-Type: application/xml
    
    Note:
    Authorization: Auth String (for more information, see Request Signature).
    When this feature is used by a sub-account, relevant permissions must be granted. For more information, see Authorization Granularity Details.

    Request headers

    This API only uses common request headers. For more information, see Common Request Headers.

    Request body

    This request requires the following request body:
    <Request>
    <Name>demo</Name>
    <Type>Job</Type>
    <Input>
    <Prefix>input</Prefix>
    </Input>
    <Operation>
    <TimeInterval>
    <Start>2022-02-01T12:00:00+0800</Start>
    <End>2022-05-01T12:00:00+0800</End>
    </TimeInterval>
    <QueueId>p893bcda225bf4945a378da6662e81a89</QueueId>
    <UserData>this is my inventorytriggerjob</UserData>
    <CallBack>https://www.callback.com</CallBack>
    <Tag>Transcode</Tag>
    <JobParam>
    <TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
    </JobParam>
    <Output>
    <Region>ap-chongqing</Region>
    <Bucket>test-1234567890</Bucket>
    <Object>output/${InventoryTriggerJobId}/out.mp4</Object>
    </Output>
    <JobLevel>0</JobLevel>
    </Operation>
    </Request>
    The nodes are described as follows:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Request
    None
    Request container
    Container
    Yes
    Request has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Name
    Request
    Batch data processing job name, which can contain up to 128 letters, digits, hyphens, and underscores.
    String
    Yes
    Type
    Request
    Batch operation job type: Job
    String
    Yes
    Input
    Request
    Information of the media file to be processed
    Container
    Yes
    Operation
    Request
    Operation rule
    Container
    Yes
    Input has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Manifest
    Request.Input
    Name of the COS inventory file, i.e., the manifest.json file generated by the COS inventory feature.
    String
    No
    UrlFile
    Request.Input
    Name of the URL file, where each URL is a COS object access address.
    String
    No
    Prefix
    Request.Input
    Object prefix
    String
    No
    Object
    Request.Input
    Media filename
    String
    No
    Operation has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    TimeInterval
    Request.Operation
    Trigger range filtered by time
    Container
    No
    Tag
    Request.Operation
    Tag of the created media job
    String
    Yes
    Output
    Request.Operation
    Output address
    If the media job type is not VideoTag, ExtractDigitalWatermark, MediaInfo, or QualityEstimate, this parameter will be required.
    Container
    No
    JobParam
    Request.Operation
    Job parameter
    Container
    Yes
    QueueId
    Request.Operation
    Queue ID
    String
    Yes
    UserData
    Request.Operation
    User information
    String
    No
    JobLevel
    Request.Operation
    Job priority. The greater the value, the higher the priority. Valid values: 0, 1, 2. Default value: 0.
    String
    No
    CallBackFormat
    Request.Operation
    Job callback format, which can be JSON or XML (default). It has a higher priority than that of the queue.
    String
    No
    CallBackType
    Request.Operation
    Job callback type, which can be Url (default) or TDMQ. It has a higher priority than that of the queue.
    String
    No
    CallBack
    Request.Operation
    Job callback address, which has a higher priority than that of the queue. If it is set to no, no callbacks will be generated at the callback address of the queue.
    String
    No
    CallBackMqConfig
    Request.Operation
    TDMQ configuration for job callback, which will be required if CallBackType is TDMQ.
    Container
    No
    CallBackMqConfig has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    MqRegion
    Request.Operation.CallBackMqConfig
    Message queue region. Valid values: sh (Shanghai), bj (Beijing), gz (Guangzhou), cd (Chengdu), hk (Hong Kong, China).
    String
    Yes
    MqMode
    Request.Operation.CallBackMqConfig
    Message queue mode. Default value: Queue.
    Topic: Topic subscription
    Queue: Queue service
    String
    Yes
    MqName
    Request.Operation.CallBackMqConfig
    TDMQ topic name
    String
    Yes
    Operation.Tag supports the following types:
    Job Type
    Tag
    Video-to-animated image conversion
    Animatin
    Intelligent thumbnail
    SmartCover
    Audio/Video transcoding
    Transcode
    Screenshot
    Snapshot
    Speech recognition
    SpeechRecognition
    Audio/Video splicing
    Concat
    Voice/Sound separation
    VoiceSpearte
    Video montage
    VideoMontage
    SDR to HDR
    SDRtoHDR
    Voice/Sound separation
    VoiceSeparate
    Video enhancement
    VideoProcess
    Super resolution
    SuperResolution
    Audio/Video remuxing
    Segment
    Video tagging
    VideoTag
    Image processing
    PicProcess
    Digital watermark
    DigitalWatermark
    Digital watermark extraction
    ExtractDigitalWatermark
    Async media information query
    MediaInfo
    Audio/Video stream separation
    StreamExtract
    Text to speech
    Tts
    Audio noise cancellation
    NoiseReduction
    Video quality analysis
    QualityEstimate
    TimeInterval has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Default Value
    Constraints
    Start
    Request.Operation.TimeInterval
    Start time
    String
    No
    0
    Upload time of the scanned object
    %Y-%m-%dT%H:%m:%S%z
    End
    Request.Operation.TimeInterval
    End time
    String
    No
    Current time
    Upload time of the scanned object
    %Y-%m-%dT%H:%m:%S%z
    Output has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Constraints
    Region
    Request.Operation.Output
    Bucket region
    String
    Yes
    None
    Bucket
    Request.Operation.Output
    Bucket name
    String
    Yes
    None
    Object
    Request.Operation.Output
    Result filename
    String
    No
    If the media job type is not Snapshot, VoiceSeparate, or StreamExtract, this parameter will be required.
    If the media job type is SmartCover and Request.Operation.JobParam.SmartCover.Count is greater than 1, the ${Number} parameter must be included.
    If the media job type is Snapshot and Snapshot.Count is greater than 1, the ${Number} parameter must be included.
    AuObject
    Request.Operation.Output
    Voice/Sound result filename
    String
    No
    If the media job type is VideoSeParete, this parameter will take effect. This parameter and Object cannot be empty at the same time.
    SpriteObject
    Request.Operation.Output
    Image sprite name
    String
    No
    If the media job type is Snapshot, this parameter will take effect. This parameter and Object cannot be empty at the same time.
    If Snapshot.Count is greater than 1, the ${Number} parameter must be included.
    Only the jpg format is supported.
    StreamExtract
    Request.Operation.Output
    Configuration information of the stream separation result file. If the media job type is StreamExtract, this parameter will take effect and be required.
    Container
    Yes
    None
    StreamExtract has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Index
    Request.Operation.Output.StreamExtract
    Stream number, which corresponds to Response.MediaInfo.Stream.Video.Index and Response.MediaInfo.Stream.Audio.Index in the media information. For more information, see Getting Media File Information. If the input media format is mxf, only video streams can be extracted.
    String
    Yes
    Object
    Request.Operation.Output.StreamExtract
    Result output filename
    String
    Yes
    JobParam has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    TemplateId
    Request.Operation.JobParam
    Template ID
    String
    No
    TranscodeTemplateId
    Request.Operation.JobParam
    Transcoding template ID, which will take effect if the media job type is VideoProcess, SuperResolution, or SDR2HDR.
    Container
    No
    Animation
    Request.Operation.JobParam
    Animated image job parameter, which will take effect if the media job type is Animation.
    Container
    No
    Transcode
    Request.Operation.JobParam
    Transcoding job parameter, which will take effect if the media job type is Transcode, VideoProcess, SuperResolution, or SDR2HDR.
    String
    No
    SmartCover
    Request.Operation.JobParam
    Intelligent thumbnail job parameter, which will take effect if the media job type is SmartCover.
    Container
    No
    DigitalWatermark
    Request.Operation.JobParam
    Digital watermark parameter, which will take effect if the media job type is Transcode, VideoProcess, SuperResolution, or DigitalWatermark.
    Container
    No
    Watermark
    Request.Operation.JobParam
    Watermark template parameter, which is the same as Request.Watermark in the watermark template creation API CreateMediaTemplate and will take effect if the media job type is Transcode, SDR2HDR, VideoProcess, or SuperResolution.
    Container
    No
    RemoveWatermark
    Request.Operation.JobParam
    Digital watermark removal parameter, which will take effect if the media job type is Transcode.
    Container
    No
    WatermarkTemplateId
    Request.Operation.JobParam
    Watermark template parameter, which is the same as Request.Watermark in the watermark template creation API CreateMediaTemplate and will take effect if the media job type is Transcode, SDR2HDR, VideoProcess, or SuperResolution.
    Container
    No
    RemoveWatermark
    Request.Operation.JobParam
    Digital watermark removal parameter, which will take effect if the media job type is Transcode.
    Container
    No
    Snapshot
    Request.Operation.JobParam
    Screenshot job parameter, which will take effect if the media job type is Snapshot.
    Container
    No
    SpeechRecognition
    Request.Operation.JobParam
    Speech recognition job parameter, which will take effect if the media job type is SpeechRecognition.
    Container
    No
    ConcatTemplate
    Request.Operation.JobParam
    Splicing job parameter, which will take effect if the media job type is Concat.
    Container
    No
    VoiceSeparate
    Request.Operation.JobParam
    Voice/Sound separation job parameter, which will take effect if the media job type is VoiceSeparate.
    Container
    No
    VideoMontage
    Request.Operation.JobParam
    Video montage job parameter, which will take effect if the media job type is VideoMontage.
    Container
    No
    SDRtoHDR
    Request.Operation.JobParam
    SDR-to-HDR job parameter, which will take effect if the media job type is SDRtoHDR.
    Container
    No
    VideoProcess
    Request.Operation.JobParam
    Video enhancement job parameter, which will take effect if the media job type is VideoProcess.
    Container
    No
    SuperResolution
    Request.Operation.JobParam
    Super resolution job parameter, which will take effect if the media job type is SuperResolution.
    Container
    No
    Segment
    Request.Operation.JobParam
    Remuxing job parameter, which will take effect if the media job type is Segment.
    Container
    No
    ExtractDigitalWatermark
    Request.Operation.JobParam
    Digital watermark extraction job parameter, which will take effect if the media job type is ExtractDigitalWatermark.
    Container
    No
    VideoTag
    Request.Operation.JobParam
    Video tagging job parameter, which will take effect if the media job type is VideoTag.
    Container
    No
    TtsTpl
    Request.Operation.JobParam
    Text-to-speech template parameter, which will take effect if the media job type is Tts.
    Container
    No
    Note:
    TemplateId is used first. If TemplateId is unavailable, the corresponding job type parameter is used.
    DigitalWatermark has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Message
    Request.Operation.JobParam.DigitalWatermark
    The string embedded by the digital watermark, which can contain up to 64 letters, digits, underscores (_), hyphens (-), and asterisks (*).
    String
    Yes
    Type
    Request.Operation.JobParam.DigitalWatermark
    Watermark type, which currently can be set to Text only.
    String
    Yes
    Version
    Request.Operation.JobParam.DigitalWatermark
    Watermark version, which currently can be set to V1 only.
    String
    Yes
    IgnoreError
    Request.Operation.JobParam.DigitalWatermark
    Whether to ignore the watermarking failure and continue the job. Valid values: true, false (default).
    If Request.Operation.Tag is DigitalWatermark, this parameter will not take effect, and the job will fail if watermark adding fails.
    String
    No
    Animation has the following sub-nodes: Same as Request.Operation.Animation as described in Submitting Video-to-Animated Image Conversion Job.
    Transcode has the following sub-nodes: Same as Request.Operation.Transcode as described in Submitting Audio/Video Transcoding Job.
    Watermark has the following sub-nodes: Same as Request.Operation.Watermark as described in Submitting Audio/Video Transcoding Job.
    RemoveWatermark has the following sub-nodes: Same as Request.Operation.RemoveWatermark as described in Submitting Audio/Video Transcoding Job.
    SmartCover has the following sub-nodes: Same as Request.Operation.SmartCover as described in Submitting Intelligent Thumbnail Job.
    Snapshot has the following sub-nodes: Same as Request.Operation.Snapshot as described in Submitting Video Frame Capturing Job.
    SpeechRecognition has the following sub-nodes: Same as Request.Operation.SpeechRecognition as described in Submitting Speech Recognition Job.
    ConcatTemplate has the following sub-nodes: Same as Request.Operation.ConcatTemplate as described in Submitting Video Splicing Job.
    VoiceSeparate has the following sub-nodes: Same as Request.Operation.VoiceSeparate as described in Submitting Voice/Sound Separation Job.
    VideoMontage has the following sub-nodes: Same as Request.Operation.VideoMontage as described in Submitting Video Montage Job.
    SDRtoHDR has the following sub-nodes: Same as Request.Operation.SDRtoHDR as described in Submitting SDR-to-HDR Job.
    VideoProcess has the following sub-nodes: Same as Request.Operation.VideoProcess as described in Submitting Video Enhancement Job.
    SuperResolution has the following sub-nodes: Same as Request.Operation.SuperResolution as described in Submitting Super Resolution Job.
    Segment has the following sub-nodes: Same as Request.Operation.Segment as described in Submitting Remuxing Job.
    ExtractDigitalWatermark has the following sub-nodes: Same as Request.Operation.ExtractDigitalWatermark as described in Submitting Digital Watermark Extracting Job.
    VideoTag has the following sub-nodes: Same as Request.Operation.VideoTag as described in Submitting Video Tagging Job.
    TtsTpl has the following sub-nodes: Same as Request.Operation.TtsTpl as described in Submitting Text-to-Speech Job.

    Response

    Response headers

    This API only returns common response headers. For more information, see Common Response Headers.

    Response body

    The response body returns application/xml data. The following contains all the nodes:
    <Response>
    <RequestId>NjJiZDU1ZmZfOTBmYTUwNjRfNzdjY18xYQ==<RequestId>
    <JobsDetail>
    <Code>Success</Code>
    <Type>Job</Type>
    <Message/>
    <Name>demo</Name>
    <JobId>be8f65004eb8511eaaed4f377124a303c</JobId>
    <State>Running</State>
    <CreationTime>2022-06-27T15:23:10+0800</CreationTime>
    <StartTime>2022-06-27T15:23:11+0800</StartTime>
    <EndTime>2022-06-27T15:25:10+0800</EndTime>
    <Input>
    <Prefix>input</Prefix>
    </Input>
    <Operation>
    <TimeInterval>
    <Start>2022-02-01T12:00:00+0800</Start>
    <End>2022-05-01T12:00:00+0800</End>
    </TimeInterval>
    <QueueId>p893bcda225bf4945a378da6662e81a89</QueueId>
    <UserData>this is my inventorytriggerjob</UserData>
    <CallBack>https://www.callback.com</CallBack>
    <Tag>Transcode</Tag>
    <JobParam>
    <TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
    </JobParam>
    <Output>
    <Region>ap-chongqing</Region>
    <Bucket>test-1234567890</Bucket>
    <Object>output/${InventoryTriggerJobId}/out.mp4</Object>
    </Output>
    <JobLevel>0</JobLevel>
    </Operation>
    </JobsDetail>
    </Response>
    The nodes are as described below:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Response
    None
    Result storage container
    Container
    Response has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    RequestId
    Response
    Unique ID of the request
    String
    JobsDetail
    Response
    Job details
    Container
    JobsDetail has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Code
    Response.JobsDetail
    Error code, which will be returned only if State is Failed
    String
    Message
    Response.JobsDetail
    Error message, which will be returned only if State is Failed
    String
    Type
    Response.JobsDetail
    Batch operation job type: Job
    String
    Name
    Response.JobsDetail
    Job name
    String
    JobId
    Response.JobsDetail
    Job ID
    String
    State
    Response.JobsDetail
    Job status. Valid values: Submitted, Running, Success, Failed, Pause, Cancel.
    String
    CreationTime
    Response.JobsDetail
    Job creation time
    String
    StartTime
    Response.JobsDetail
    Job start time
    String
    EndTime
    Response.JobsDetail
    Job end time
    String
    Input
    Response.JobsDetail
    Input resource address of the job, which is the same as the Request.Input node in the request.
    Container
    Operation
    Response.JobsDetail
    Operation rule, which is the same as the Request.Input Operation node in the request.
    Container

    Error codes

    There are no special error messages for this request. For common error messages, see Error Codes.

    Samples

    Request

    POST /inventorytriggerjob HTTP/1.1
    Authorization:q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=28e9a4986df11bed0255e97ff90500557e0ea057
    Host:bucket-1250000000.ci.ap-beijing.myqcloud.com
    Content-Length: 166
    Content-Type: application/xml
    
    <Request>
    <Name>demo</Name>
    <Type>Job</Type>
    <Input>
    <Prefix>input</Prefix>
    </Input>
    <Operation>
    <TimeInterval>
    <Start>2022-02-01T12:00:00+0800</Start>
    <End>2022-05-01T12:00:00+0800</End>
    </TimeInterval>
    <QueueId>p893bcda225bf4945a378da6662e81a89</QueueId>
    <UserData>this is my inventorytriggerjob</UserData>
    <CallBack>https://www.callback.com</CallBack>
    <Tag>Transcode</Tag>
    <JobParam>
    <TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
    </JobParam>
    <Output>
    <Region>ap-chongqing</Region>
    <Bucket>test-1234567890</Bucket>
    <Object>output/${InventoryTriggerJobId}/out.mp4</Object>
    </Output>
    <JobLevel>0</JobLevel>
    </Operation>
    </Request>

    Response

    HTTP/1.1 200 OK
    Content-Type: application/xml
    Content-Length: 230
    Connection: keep-alive
    Date: Mon, 28 Jun 2022 15:23:12 GMT
    Server: tencent-ci
    x-ci-request-id: NjJiZDU1ZmZfOTBmYTUwNjRfNzdjY18xYQ==
    
    <Response>
    <RequestId>NjJiZDU1ZmZfOTBmYTUwNjRfNzdjY18xYQ==<RequestId>
    <JobsDetail>
    <Code>Success</Code>
    <Type>Job</Type>
    <Message/>
    <Name>demo</Name>
    <JobId>be8f65004eb8511eaaed4f377124a303c</JobId>
    <State>Running</State>
    <CreationTime>2022-06-27T15:23:10+0800</CreationTime>
    <StartTime>2022-06-27T15:23:11+0800</StartTime>
    <EndTime>2022-06-27T15:25:10+0800</EndTime>
    <Input>
    <Prefix>input</Prefix>
    </Input>
    <Operation>
    <TimeInterval>
    <Start>2022-02-01T12:00:00+0800</Start>
    <End>2022-05-01T12:00:00+0800</End>
    </TimeInterval>
    <QueueId>p893bcda225bf4945a378da6662e81a89</QueueId>
    <UserData>this is my inventorytriggerjob</UserData>
    <CallBack>https://www.callback.com</CallBack>
    <Tag>Transcode</Tag>
    <JobParam>
    <TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
    </JobParam>
    <Output>
    <Region>ap-chongqing</Region>
    <Bucket>test-1234567890</Bucket>
    <Object>output/${InventoryTriggerJobId}/out.mp4</Object>
    </Output>
    <JobLevel>0</JobLevel>
    </Operation>
    </JobsDetail>
    </Response>
    
    Hubungi Kami

    Hubungi tim penjualan atau penasihat bisnis kami untuk membantu bisnis Anda.

    Dukungan Teknis

    Buka tiket jika Anda mencari bantuan lebih lanjut. Tiket kami tersedia 7x24.

    Dukungan Telepon 7x24