V2.5 Get Command Tasks¶
Get command tasks.
Request Format¶
GET https://{apigw-address}/connect-service//v2.5/commands?action=getTask
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID which the asset belongs to. How to get orgId>> |
taskId |
Query |
Mandatory |
String |
Command Task ID. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
code |
number |
Failed or succeeded to create an alert. 0: succeeded, -1: failed. |
msg |
String |
Returns |
requestId |
String |
A unique ID to identify a request. |
data |
Struct |
See TaskInfo Struct. |
TaskInfo Struct ¶
Name |
Data Type |
Description |
---|---|---|
orgId |
String |
Organization ID. |
taskId |
String |
Command Task ID. |
productKey |
String |
ProductKey |
deviceKey |
String |
DevicetKey |
jobId |
String |
Command Job ID. |
status |
String |
The device status ( |
commandInfo |
Struct |
See commandInfo Struct. |
taskResult |
Struct |
See taskResult Struct. |
createTimestamp |
Number |
Create the time stamp. |
updateTimestamp |
Number |
Update the time stamp. |
autoRetryCount |
Integer |
The count of automatic retry. |
manualRetryCount |
Integer |
The count of mannual retry. |
CommandInfo Struct ¶
Name |
Data Type |
Description |
---|---|---|
commandType |
String |
You can choose |
setMeasurepointInfo |
Struct |
The struct contains
|
serviceInvokeInfo |
Struct |
The struct contains
|
TaskResult Struct ¶
Name |
Data Type |
Description |
---|---|---|
code |
Integer |
Return code of a request.
+ |
desc |
String |
Command Task description. |
outputData |
Struct |
The output data. |
Samples¶
Request Sample¶
url: https://{apigw-address}/connect-service/v2.5/commands?action=getTask&orgId=yourOrgId&taskId=taskId
method: GET
Return Sample¶
{
"code": 0,
"msg": "OK",
"requestId": "d295525d-1c77-4475-952e-19c1b87b8eb7",
"data": {
"taskId": "taskId",
"orgId": "yourOrgId",
"assetId": "assetId",
"productKey": "productKey",
"deviceKey": "deviceKey",
"jobId": "jobId",
"status": "INIT",
"commandInfo": {
"commandType": "SERVICE_INVOKE",
"serviceInvokeInfo": {
"serviceId": "serviceId",
"inputData": {
"input": 22
}
},
"measurepointSetInfo": null
},
"taskResult": null,
"createTimestamp": 1718952422080,
"updateTimestamp": 1718952422080,
"autoRetryCount": 0,
"manualRetryCount": 0
}
}