功能描述
DescribeMediaJobs 接口用来拉取符合条件的任务。
请求
请求示例
GET /jobs?size=&states=&queueId=&startCreationTime=&endCreationTime= HTTP/1.1Host: <BucketName-APPID>.ci.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
说明:
请求头
请求体
该请求无请求体。
参数的具体内容如下:
节点名称(关键字) | 父节点 | 描述 | 类型 | 必选 |
queueId | 无 | 拉取该队列 ID 下的任务 | String | 是 |
tag | 无 | 任务的 Tag:SuperResolution | String | 是 |
orderByTime | 无 | Desc 或者 Asc。默认为 Desc | String | 否 |
nextToken | 无 | 请求的上下文,用于翻页。上次返回的值 | String | 否 |
size | 无 | 拉取的最大任务数。默认为10。最大为100 | Integer | 否 |
states | 无 | 拉取该状态的任务,以,分割支持多状态 All,Submitted,Running,Success,Failed,Pause,Cancel。默认为 All | String | 否 |
startCreationTime | 无 | 拉取创建时间大于该时间的任务。格式为: %Y-%m-%dT%H:%m:%S%z | String | 否 |
endCreationTime | 无 | 拉取创建时间小于该时间的任务。格式为: %Y-%m-%dT%H:%m:%S%z | String | 否 |
响应
响应头
响应体
该响应体返回为 application/xml 数据,包含完整节点数据的内容展示如下:
<Response><JobsDetail></JobsDetail><NextToken></NextToken></Response>
具体的数据内容如下:
节点名称(关键字) | 父节点 | 描述 | 类型 |
Response | 无 | 保存结果的容器 | Container |
Container 节点 Response 的内容:
节点名称(关键字) | 父节点 | 描述 | 类型 |
JobsDetail | Response | 任务的详细信息,同 CreateMediaJobs 接口中的 Response.JobsDetail 节点 | Container |
NextToken | Response | 翻页的上下文 Token | String |
错误码
实际案例
请求
GET /jobs?queueId=aaaaaaaaaaa&tag=SuperResolution HTTP/1.1Authorization:q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************Host:bucket-1250000000.ci.ap-beijing.myqcloud.com
响应
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 666Connection: keep-aliveDate: Thu, 15 Jun 2017 12:37:29 GMTServer: tencent-cix-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhfMjc=<Response><JobsDetail><Code>Success</Code><Message>Success</Message><JobId>jabcxxxxfeipplsdfwe</JobId><State>Submitted</State><CreationTime>2019-07-07T12:12:12+0800</CreationTime><StartTime></StartTime><EndTime></EndTime><QueueId>p893bcda225bf4945a378da6662e81a89</QueueId><Tag>SuperResolution<Tag><Input><Object>test.mp4</Object></Input><Operation><TranscodeTemplateId>t160606b9752148c4absdfaf2f55163b1f</TranscodeTemplateId><TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId><Output><Region>ap-beijing</Region><Bucket>abc-1250000000</Bucket><Object>test-montage.mp4</Object></Output></Operation></JobsDetail><JobsDetail><Code>Success</Code><Message>Success</Message><JobId>jabcxxxxfeipplsdfwe</JobId><State>Submitted</State><CreationTime>2019-07-07T12:12:12+0800</CreationTime><StartTime></StartTime><EndTime></EndTime><QueueId>p893bcda225bf4945a378da6662e81a89</QueueId><Tag>SuperResolution<Tag><Input><Object>test.mp4</Object></Input><Operation><SuperResolution><Resolution>sdtohd</Resolution><EnableScaleUp>true</EnableScaleUp></SuperResolution><TranscodeTemplateId>t160606b9752148c4absdfaf2f55163b1f</TranscodeTemplateId><WatermarkTemplateId></WatermarkTemplateId><Output><Region>ap-beijing</Region><Bucket>abc-1250000000</Bucket><Object>test-montage.gif</Object></Output></Operation></JobsDetail></Response>