tencent cloud

masukan

Triggering Job

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

    Feature Description

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

    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
    
    <body>
    Note:
    Authorization: Auth String (for more information, see Request Signature).
    When this feature is used by a sub-account, relevant permissions must be granted as instructed in 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>Workflow</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>
    <WorkflowIds>w7476ff3564ee45b7b490d64bccaba6cc</WorkflowIds>
    </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: Workflow.
    String
    No
    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
    WorkflowIds
    Request.Operation
    ID of the triggered workflow
    String
    Yes
    TimeInterval
    Request.Operation
    Trigger range filtered by time
    Container
    No
    TimeInterval has the following sub-nodes:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Required
    Default Value
    Constraints
    Start
    Request.TimeInterval
    Start time
    String
    No
    0
    Upload time of the scanned object
    %Y-%m-%dT%H:%m:%S%z
    End
    Request.TimeInterval
    End time
    String
    No
    Current time
    Upload time of the scanned object
    %Y-%m-%dT%H:%m:%S%z

    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>
    <JobsDetail>
    <Code>Success</Code>
    <Message/>
    <Type>Workflow</Type>
    <Name>demo</Name>
    <JobId>b3deffea2f84911ec9cb15254008618d9</JobId>
    <State>Running</State>
    <CreationTime>2022-06-27T15:23:10+0800</CreationTime>
    <StartTime>-</StartTime>
    <EndTime>-</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>
    <WorkflowIds>w7476ff3564ee45b7b490d64bccaba6cc</WorkflowIds>
    </Operation>
    </JobsDetail>
    </Response>
    The nodes are as described below:
    Node Name (Keyword)
    Parent Node
    Description
    Type
    Response
    None
    Response 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 is returned only if State is Failed
    String
    Message
    Response.JobsDetail
    Error message, which is returned only if State is Failed
    String
    Type
    Response.JobsDetail
    Batch operation job type
    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
    Same as Request.Input in the request
    Container
    Operation
    Response.JobsDetail
    Same as Request.Operation 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>Workflow</Name>
    <Input>
    <Prefix>input</Prefix>
    </Input>
    <Operation>
    <TimeInterval>
    <Start>2022-02-01T12:00:00+0800</Start>
    <End>2022-05-01T12:00:00+0800</End>
    </TimeInterval>
    <WorkflowIds>w7476ff3564ee45b7b490d64bccaba6cc</WorkflowIds>
    </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: NTk0MjdmODlfMjQ4OGY3XzYzYzh****=
    
    <Response>
    <JobsDetail>
    <Code>Success</Code>
    <Type>Workflow</Type>
    <Message/>
    <Name>demo</Name>
    <JobId>b3deffea2f84911ec9cb15254008618d9</JobId>
    <State>Running</State>
    <CreationTime>2022-06-27T15:23:10+0800</CreationTime>
    <StartTime>-</StartTime>
    <EndTime>-</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>
    <WorkflowIds>w7476ff3564ee45b7b490d64bccaba6cc</WorkflowIds>
    </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