V2.5 Search Command Tasks¶
Search command tasks details, execution progress and status.
Request Format¶
POST https://{apigw-address}/connect-service/v2.5/commands?action=searchTask
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>> |
Request Parameters (Body)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
expression | Optional | String | The query expression, which supports sql-like query.
|
pagination | Optional | Pagination Request Struct | See Pagination Request Struct>>
|
Response Parameters¶
Name | Data Type | Description |
---|---|---|
code | Int | Return code of a request.
+ 0 indicates success.
+ non-zero values indicates failure. |
msg | String | The explanation to the return code. Its value is OK if the request is successful. |
requestId | String | A unique ID to identify a request. |
data | Struct | See TaskInfo Struct. |
TaskInfo Struct¶
Name | Data Type | Description |
---|---|---|
taskId | String | The command task IDID. |
orgId | String | The organization ID. |
assetId | String | The asset ID of the device. |
productKey | String | The product key. |
deviceKey | String | The device key. |
jobId | String | Command Job ID. |
status | String | Command Job 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 SERVICE_INVOKE 、MEASUREPOINT_SET |
setMeasurepointInfo | Struct | The struct contains
|
serviceInvokeInfo | Struct | The struct contains
|
TaskResult Struct ¶
Name | Data Type | Description |
---|---|---|
code | String | Return code of a request.
+ 0 indicates success.
+ non-zero values indicates failure. |
desc | String | An explanation of the status code. A request is successful if it returns OK. |
outputData | Struct | The output data. |
Samples¶
Request Sample¶
url: https://{apigw-address}/connect-service/v2.5/commands?action=searchTask&orgId=yourOrgId
method: POST
requestBody:
{
"expression": "jobId in ('jobId')",
"pagination": {
"pageNo": 1,
"pageSize": 100
}
}
Return Sample¶
{
"code": 0,
"msg": "OK",
"requestId": "2280717f-ad1f-4329-9168-b8504aa537c7",
"data": [
{
"taskId": "taskId",
"orgId": "yourOrgId",
"assetId": "assetId",
"productKey": "productKey",
"deviceKey": "deviceKey",
"jobId": "jobId",
"status": "status",
"commandInfo": {
"commandType": "commandType",
"serviceInvokeInfo": {
"serviceId": "serviceId",
"inputData": {
"input": 22
}
},
"measurepointSetInfo": null
},
"taskResult": null,
"createTimestamp": 1718952422080,
"updateTimestamp": 1718952422080,
"autoRetryCount": 0,
"manualRetryCount": 0
}
],
"pagination": {
"sortedBy": null,
"pageNo": 1,
"pageSize": 100,
"totalSize": 1
}
}