tencent cloud

文档反馈

查询队列

最后更新时间:2024-01-18 15:11:52

    功能描述

    搜索图片处理队列。
    

    请求

    请求示例

    GET /picqueue HTTP/1.1
    Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
    Date: <GMT Date>
    Authorization: <Auth String>
    Content-Length: <length>
    Content-Type: application/xml
    
    说明:
    Authorization: Auth String(详情请参见 请求签名 文档)。
    通过子账号使用时,需要授予相关的权限,详情请参见 授权粒度详情 文档。

    请求头

    此接口仅使用公共请求头部,详情请参见 公共请求头部 文档。

    请求体

    该请求的请求体为空。

    请求参数

    参数名称(关键字)
    描述
    类型
    是否必选
    queueIds
    队列 ID,以“,”符号分割字符串
    String
    state
    1. Active 表示队列内的作业会被媒体处理服务调度执行。
    2. Paused 表示队列暂停,作业不再会被媒体处理调度执行,队列内的所有作业状态维持在暂停状态,已经执行中的任务不受影响。
    String
    pageNumber
    第几页,默认值1
    String
    pageSize
    每页个数,默认值10
    String

    响应

    响应头

    此接口仅返回公共响应头部,详情请参见 公共响应头部 文档。

    响应体

    该响应体返回为 application/xml 数据,当指定 pageNumber 和 pageSize 时包含完整节点数据的内容展示如下:
    <Response>
    <RequestId>NjJmMzI5MmRfOTBmYTUwNjRfNjcwM18x</RequestId>
    <TotalCount>1</TotalCount>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <QueueList>
    <QueueId>p8366c460c67b4c65a9bf81b41eaa3c4b</QueueId>
    <Name>queue-pic-process-1</Name>
    <State>Active</State>
    <NotifyConfig>
    <Url>http://callback.demo.com</Url>
    <Event>TaskFinish,WorkflowFinish</Event>
    <Type>Url</Type>
    <State>On</State>
    <ResultFormat>JSON</ResultFormat>
    </NotifyConfig>
    <MaxSize>10000</MaxSize>
    <MaxConcurrent>10</MaxConcurrent>
    <UpdateTime>2022-08-09T16:23:11+0800</UpdateTime>
    <CreateTime>2022-08-09T16:23:11+0800</CreateTime>
    <Category>PicProcessing</Category>
    </QueueList>
    </Response>
    具体的数据内容如下:
    节点名称(关键字)
    父节点
    描述
    类型
    Response
    保存结果的容器
    Container
    Container 节点 Response 的内容:
    节点名称(关键字)
    父节点
    描述
    类型
    RequestId
    Response
    请求的唯一 ID
    String
    TotalCount
    Response
    队列总数
    Int
    PageNumber
    Response
    当前页数,同请求中的 pageNumber
    Int
    PageSize
    Response
    每页个数,同请求中的 pageSize
    Int
    QueueList
    Response
    队列数组
    Container数组
    NonExistPIDs
    Response
    不存在的队列 ID 列表
    String数组
    Container 节点 QueueList 的内容:
    节点名称(关键字)
    父节点
    描述
    类型
    QueueId
    Response.QueueList
    队列 ID
    String
    Name
    Response.QueueList
    队列名字
    String
    State
    Response.QueueList
    当前状态,Active 或者 Paused
    String
    NotifyConfig
    Response.QueueList
    回调配置
    Container
    MaxSize
    Response.QueueList
    队列最大长度
    Int
    MaxConcurrent
    Response.QueueList
    当前队列最大并行执行的任务数
    Int
    Category
    Response.QueueList
    队列类型
    String
    UpdateTime
    Response.QueueList
    更新时间
    String
    CreateTime
    Response.QueueList
    创建时间
    String
    Container 节点 NotifyConfig 的内容:
    节点名称(关键字)
    父节点
    描述
    类型
    Url
    Response.QueueList.NotifyConfig
    回调地址
    String
    State
    Response.QueueList.NotifyConfig
    开关状态,On 或者 Off
    String
    Type
    Response.QueueList.NotifyConfig
    回调类型,Url
    String
    Event
    Response.QueueList.NotifyConfig
    任务完成:TaskFinish;工作流完成:WorkflowFinish
    String
    ResultFormat
    Response.QueueList.NotifyConfig
    回调类型, XML 或者 JSON
    String

    错误码

    该请求操作无特殊错误信息,常见的错误信息请参见 错误码 文档。

    实际案例

    请求1:搜索指定队列

    GET /picqueue?queueIds=pb926e1dce3ed4e47a4f08692164f4869,A,B 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=28e9a4986df11bed0255e97ff90500557e0e****
    Host: test-1234567890.ci.ap-chongqing.myqcloud.com
    Content-Length: 0
    Content-Type: application/xml

    响应1

    HTTP/1.1 200 OK
    Content-Type: application/xml
    Content-Length: 100
    Connection: keep-alive
    Date: Thu, 09 Aug 2022 16:23:12 GMT
    Server: tencent-ci
    x-ci-request-id: NjJmMzJjNDFfOTBmYTUwNjRfNjQ5NF8x
    
    <Response>
    <RequestId>NjJmMzJjNDFfOTBmYTUwNjRfNjQ5NF8x</RequestId>
    <QueueList>
    <QueueId>p8366c460c67b4c65a9bf81b41eaa3c4b</QueueId>
    <Name>queue-pic-process-1</Name>
    <State>Active</State>
    <NotifyConfig>
    <Url>http://callback.demo.com</Url>
    <Event>TaskFinish,WorkflowFinish</Event>
    <Type>Url</Type>
    <State>On</State>
    <ResultFormat>JSON</ResultFormat>
    </NotifyConfig>
    <MaxSize>10000</MaxSize>
    <MaxConcurrent>10</MaxConcurrent>
    <UpdateTime>2022-08-09T16:23:11+0800</UpdateTime>
    <CreateTime>2022-08-09T16:23:11+0800</CreateTime>
    <Category>PicProcessing</Category>
    </QueueList>
    <NonExistPIDs>A</NonExistPIDs>
    <NonExistPIDs>B</NonExistPIDs>
    </Response>

    请求2:查询队列列表

    GET /picqueue?pageSize=10&pageNumber=1&category=CateAll 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=28e9a4986df11bed0255e97ff90500557e0e****
    Host: test-1234567890.ci.ap-chongqing.myqcloud.com
    Content-Length: 0
    Content-Type: application/xml
    

    响应2

    HTTP/1.1 200 OK
    Content-Type: application/xml
    Content-Length: 100
    Connection: keep-alive
    Date: Thu, 09 Aug 2022 16:23:12 GMT
    Server: tencent-ci
    x-ci-request-id: NjJmMzI5MmRfOTBmYTUwNjRfNjcwM18x
    
    <Response>
    <RequestId>NjJmMzI5MmRfOTBmYTUwNjRfNjcwM18x</RequestId>
    <TotalCount>1</TotalCount>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <QueueList>
    <QueueId>p8366c460c67b4c65a9bf81b41eaa3c4b</QueueId>
    <Name>queue-pic-process-1</Name>
    <State>Active</State>
    <NotifyConfig>
    <Url>http://callback.demo.com</Url>
    <Event>TaskFinish,WorkflowFinish</Event>
    <Type>Url</Type>
    <State>On</State>
    <ResultFormat>JSON</ResultFormat>
    </NotifyConfig>
    <MaxSize>10000</MaxSize>
    <MaxConcurrent>10</MaxConcurrent>
    <UpdateTime>2022-08-09T16:23:11+0800</UpdateTime>
    <CreateTime>2022-08-09T16:23:11+0800</CreateTime>
    <Category>PicProcessing</Category>
    </QueueList>
    </Response>