V2.5 Cancel Command Tasks

Cancel command tasks.

Request Format

POST https://{apigw-address}/connect-service/v2.5/commands?action=cancelTask

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

jobId

Query

Mandatory

String

The command job ID of the command task.

Request Parameters (Body)

Name

Mandatory/Optional

Data Type

Description

taskIds

Optional

String

The command task ID (1~200).

Response Parameters

Name

Data Type

Description

successSize

Number

The number of sucessfully created devices.

totalSize

Number

The total number of devices to be created.

code

Number

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.

Samples

Request Sample

url: https://{apigw-address}/connect-service/v2.5/commands?action=cancelTask&jobId=jobId&orgId=yourOrgId
method: POST
requestBody:
{
    "taskIds": ["taskId"]
}

Return Sample

{
    "code": 0,
    "msg": "OK",
    "requestId": "requestId",
    "data": [
        {
            "code": 0,
            "msg": "OK",
            "data": "taskId"
        }
    ],
    "successSize": 1,
    "totalSize": 1
}