调用该接口查询任务详情。
QPS限制
单个阿里云账号调用该接口的每秒请求数(QPS)最大限制为5。
RAM用户共享阿里云账号配额。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryJob | 系统规定参数。取值:QueryJob。 |
JobId | String | 是 | 450407b*** | 任务ID。任务的全局唯一标识符。 |
IotInstanceId | String | 否 | iot-cn-0pp1n8t**** | 实例ID。您可在物联网平台控制台的实例概览页面,查看当前实例的ID。
实例的更多信息,请参见实例概述。 |
调用API时,除了本文介绍的该API的特有请求参数,还需传入公共请求参数。公共请求参数说明,请参见公共参数文档。
返回数据
示例
请求示例
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryJob
&JobId=XUbmsMHmkqv0PiAG****010001
&公共请求参数
正常返回示例
XML
格式
<QueryJobResponse>
<RequestId>A6BEAB33-03E6-4CE0-A94F-9E24C5512BAD</RequestId>
<Data>
<Status>CANCELLED</Status>
<ScheduledTime>1557062301656</ScheduledTime>
<Type>SET_PROPERTY</Type>
<TimeoutConfig>
<InProgressTimeoutInMinutes>5</InProgressTimeoutInMinutes>
</TimeoutConfig>
<Description>jobDescription</Description>
<UtcCreate>2020-12-13T04:09:51.000Z</UtcCreate>
<JobFile>
<FileUrl>https://iotx-***.oss-cn-shanghai.aliyuncs.com/job***/7u***.sh?Expires=16***&OSSAccessKeyId=LTA***&Signature=TTTejn***</FileUrl>
<Sign>1235</Sign>
<SignMethod>SHA256</SignMethod>
</JobFile>
<JobDocument>{}</JobDocument>
<JobName>test</JobName>
<UtcModified>2020-12-13T04:10:00.000Z</UtcModified>
<JobId>450407b***</JobId>
<TargetConfig>
<TargetDevices>
<targetDevices>
<ProductKey>nCwf***</ProductKey>
<DeviceName>a1IxS***</DeviceName>
</targetDevices>
<targetDevices>
<ProductKey>24VI***</ProductKey>
<DeviceName>a1***</DeviceName>
</targetDevices>
<targetDevices>
<ProductKey>6NDWQ***</ProductKey>
<DeviceName>a1I***</DeviceName>
</targetDevices>
<targetDevices>
<ProductKey>EQtTJT***</ProductKey>
<DeviceName>a1IxS***</DeviceName>
</targetDevices>
<targetDevices>
<ProductKey>rUdc33Vr***</ProductKey>
<DeviceName>a1IxS***</DeviceName>
</targetDevices>
</TargetDevices>
<TargetType>DEVICE_LIST</TargetType>
</TargetConfig>
</Data>
<Success>true</Success>
</QueryJobResponse>
JSON
格式
{
"RequestId": "A6BEAB33-03E6-4CE0-A94F-9E24C5512BAD",
"Data": {
"Status": "CANCELLED",
"ScheduledTime": 1557062301656,
"Type": "SET_PROPERTY",
"TimeoutConfig": {
"InProgressTimeoutInMinutes": 5
},
"Description": "jobDescription",
"UtcCreate": "2020-12-13T04:09:51.000Z",
"JobFile": {
"FileUrl": "https://iotx-***.oss-cn-shanghai.aliyuncs.com/job***/7u***.sh?Expires=16***&OSSAccessKeyId=LTA***&Signature=TTTejn***",
"Sign": "1235",
"SignMethod": "SHA256"
},
"JobDocument": "{}",
"JobName": "test",
"UtcModified": "2020-12-13T04:10:00.000Z",
"JobId": "450407b***",
"TargetConfig": {
"TargetDevices": {
"targetDevices": [
{
"ProductKey": "nCwf***",
"DeviceName": "a1IxS***"
},
{
"ProductKey": "24VI***",
"DeviceName": "a1***"
},
{
"ProductKey": "6NDWQ***",
"DeviceName": "a1I***"
},
{
"ProductKey": "EQtTJT***",
"DeviceName": "a1IxS***"
},
{
"ProductKey": "rUdc33Vr***",
"DeviceName": "a1IxS***"
}
]
},
"TargetType": "DEVICE_LIST"
}
},
"Success": true
}