All Products
Search
Document Center

Cloud Phone:CancelAgentTask

Last Updated:Apr 17, 2026

Cancels running agent tasks on a mobile node.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

TaskIds

array

Yes

A list of task IDs.

string

Yes

The task ID.

t-bp67acfmxazb4p****

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

4B886792-2051-5DB4-8AE6-C8E45D3B4****

Code

string

The status code.

200

Message

string

The returned message.

Success.

Tasks

array<object>

A list of task objects.

object

A task object.

TaskId

string

The globally unique task ID.

t-imr0fufqd7cle****

InstanceId

string

The mobile node ID.

acp-ek65k51zoxia3x8xz

PreviousStatus

string

The task status before cancellation. Valid values include:

PENDING: The task is being created.

RUNNING: The task is running.

RUNNING

CurrentStatus

string

The task status after the cancellation request. Possible values include:

CANCELLING or CANCELED: The task is being or has been canceled.

COMPLETED: The task was already complete and could not be canceled.

COMPLETED

CancelAt

string

The task's cancellation time, in ISO 8601 format.

2026-04-13T17:42:19Z

FailedReason

string

The failure reason.

Task status [COMPLETED] does not support cancellation, only PENDING/RUNNING/CANCELLING tasks can be canceled.

Examples

Success response

JSON format

{
  "RequestId": "4B886792-2051-5DB4-8AE6-C8E45D3B4****",
  "Code": "200",
  "Message": "Success.",
  "Tasks": [
    {
      "TaskId": "t-imr0fufqd7cle****",
      "InstanceId": "acp-ek65k51zoxia3x8xz",
      "PreviousStatus": "RUNNING",
      "CurrentStatus": "COMPLETED",
      "CancelAt": "2026-04-13T17:42:19Z\n",
      "FailedReason": "Task status [COMPLETED] does not support cancellation, only PENDING/RUNNING/CANCELLING tasks can be canceled."
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.