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 OK if successful. Other returned values indicate failure.

requestId

String

A unique ID to identify a request.

data

Struct

See TaskInfo Struct.

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
    }
}