功能描述
搜索媒体处理队列。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
请求
请求示例
GET /queue HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml
说明:
请求头
此接口仅使用公共请求头部,详情请参见 公共请求头部 文档。
请求体
该请求的请求体为空。
请求参数
参数名称(关键字) | 描述 | 类型 | 是否必选 |
---|---|---|---|
queueId | 队列 ID,以“,”符号分割字符串。 | String | 否 |
state | 1. Active 表示队列内的作业会被媒体处理服务调度执行。 2. Paused 表示队列暂停,作业不再会被媒体处理调度执行,队列内的所有作业状态维持在暂停状态,已经执行中的任务不受影响。 |
String | 否 |
category | 1. CateAll:所有类型。 2. Transcoding:媒体处理队列。 3. SpeedTranscoding:媒体处理倍速转码队列。 4. 默认为 Transcoding。 |
String | 否 |
pageNumber | 第几页,默认值1。 | String | 否 |
pageSize | 每页个数,默认值10。 | String | 否 |
响应
响应头
此接口仅返回公共响应头部,详情请参见 公共响应头部 文档。
响应体
该响应体返回为 application/xml 数据,当指定 pageNumber 和 pageSize 时包含完整节点数据的内容展示如下:
<Response>
<RequestId>NjJmMzI5MmRfOTBmYTUwNjRfNjcwM18x</RequestId>
<TotalCount>2</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<QueueList>
<QueueId>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId>
<Name>queue-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>Transcoding</Category>
</QueueList>
<QueueList>
<QueueId>pbf17a810dce74c18a641b663aede6803</QueueId>
<Name>queue-speed-transcoding-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>SpeedTranscoding</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 /queue?queueIds=p4a17eeea29334bf499b7e20e2fbfd99d,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>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId>
<Name>queue-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>Transcoding</Category>
</QueueList>
<NonExistPIDs>A</NonExistPIDs>
<NonExistPIDs>B</NonExistPIDs>
</Response>
请求2:查询队列列表
GET /queue?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>2</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<QueueList>
<QueueId>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId>
<Name>queue-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>Transcoding</Category>
</QueueList>
<QueueList>
<QueueId>pbf17a810dce74c18a641b663aede6803</QueueId>
<Name>queue-speed-transcoding-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>SpeedTranscoding</Category>
</QueueList>
</Response>