All Products
Search
Document Center

Cloud Phone:DescribeTasks

Last Updated:Dec 18, 2025

Queries tasks created for a cloud phone instance. Many operations on cloud phones—such as creating, starting, or stopping them—are asynchronous. When you initiate an operation, the system returns a Task ID that you can use to track its progress and final result. You can call this API to retrieve a list of all tasks and their execution statuses.

Operation description

  • You can call the DescribeTasks operation to query the tasks created for one or more cloud phone instances.

  • The system currently supports various tasks, including starting, stopping, restarting, and resetting cloud phone instances; backing up and restoring data; installing apps; and executing remote commands.

  • You can use the Level field to specify the type of task. If Level is set to 1, it represents a batch task. If Level is set to 2, it represents an instance-level task.

Example

Assume you restart two cloud phone instances with the instance IDs acp-25nt4kk9whhok**** and acp-j2taq887orj8l****, and the returned request ID is B8ED2BA9-0C6A-5643-818F-B5D60A64****. If you want to check the operation outcomes of the two cloud phone instances, you can call the DescribeTasks operation. You need to set the InvokeId request parameter to B8ED2BA9-0C6A-5643-818F-B5D60A64****. If you only want to check the cloud phone instance with the ID acp-25nt4kk9whhok****, you must set the ParentTaskId request parameter to the ID of the batch task and the AndroidInstanceId request parameter to acp-25nt4kk9whhok**** when calling the DescribeTasks operation.

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 parameters

Parameter

Type

Required

Description

Example

InvokeId

string

No

The ID of the command execution. You can set the value to the last returned request ID.

B8ED2BA9-0C6A-5643-818F-B5D60A64****

ResourceIds

array

No

The IDs of the resources.

string

No

The ID of the resource. To check the status of a start, stop, restart, or reset task on a cloud phone instance, set the value to the ID of the cloud phone instance.

acp-25nt4kk9whhok****

TaskIds

array

No

The IDs of the tasks.

string

No

The ID of the task.

t-bp67acfmxazb4p****

ParentTaskId

string

No

The ID of the parent task.

t-iaej5dkbnmivx****

TaskType

string

No

The type of the task.

Valid values:

  • BackupFile :

  • StopInstance :

  • RebootInstance :

  • StartApp :

  • SendFile :

  • RunCommand :

  • RestartApp :

  • ResetInstance :

  • RecoverFile :

  • UninstallApp :

  • StopApp :

  • Screenshot :

  • InstallApp :

  • FetchFile :

  • UpdateGroupImage :

  • StartInstance :

StartInstance

TaskTypes

array

No

The types of the tasks.

string

No

The type of the task.

StartInstance

TaskStatus

string

No

The state of the task.

Valid values:

  • PartFinished :

  • Finished :

  • Failed :

  • Skipped :

  • Processing :

  • Waiting :

Processing

TaskStatuses

array

No

The status of the tasks.

string

No

The state of the task.

Finished

Level

integer

No

The level of the task. A value of 1 specifies a batch task. A value of 2 specifies an instance-level task.

1

InstanceId

string

No

The ID of the cloud phone instance.

acp-2zecay9ponatdc4m****

InstanceName

string

No

The name of the cloud phone instance.

defaultInstanceName

Param

string

No

The extension field.

param

MaxResults

integer

No

The maximum number of entries per page. Valid values: 1 to 100. Default value: 10.

10

NextToken

string

No

The pagination token that is used in the next request to retrieve a new page of results. If the parameter is left empty, the data is queried from the first entry.

FFbc8N4E1iOlcSxC+8boa0HHH2LKWbggYUinyrZWvtS1oTrMYCg1HuMLGuftj0****

Response elements

Element

Type

Description

Example

object

The response parameters.

NextToken

string

A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.

AAAAAV3MpHK1AP0pfERHZN5pu6kU+SQXzm0H9mu/FiSc****

Data

array<object>

The objects that are returned.

object

The object that is returned.

TaskId

string

The ID of the task.

t-bp67acfmxazb4p****

InvokeId

string

The ID of the command execution.

B8ED2BA9-0C6A-5643-818F-B5D60A64****

RegionId

string

The ID of the region.

cn-hangzhou

ResourceId

string

The ID of the resource.

acp-25nt4kk9whhok****

TaskType

string

The type of the task.

StartInstance

TaskStatus

string

The state of the task.

Processing

StartTime

string

The start time of the task.

2022-10-11T08:53:32Z

FinishTime

string

The end time of the task.

2022-10-11T08:53:32Z

Param

string

The parameters of the task.

param

Result

string

The execution result of the task.

{'Success': True}

ErrorCode

string

The error code.

SendFileFailed

ErrorMsg

string

The error message.

connect error.

Level

integer

The level of the task.

1

FailedChildCount

integer

The total number of failed subtasks.

2

SuccessChildCount

integer

The total number of successfully executed subtasks.

98

RunningChildCount

integer

The total number of the subtasks that are running.

0

TotalChildCount

integer

The total number of subtasks of the current batch task.

100

InstanceId

string

The ID of the cloud phone instance.

acp-uto81vfd8t8z****

InstanceName

string

The name of the cloud phone instance.

defaultInstanceName

InstanceStatus

string

The state of the cloud phone instance.

RUNNING

Operator

string

The operator.

test

ParentTaskId

string

The ID of the parent task.

t-41oan3tza16vs****

TotalCount

integer

The total number of entries returned.

10

RequestId

string

The ID of the request.

B8ED2BA9-0C6A-5643-818F-B5D60A64****

Examples

Success response

JSON format

{
  "NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6kU+SQXzm0H9mu/FiSc****",
  "Data": [
    {
      "TaskId": "t-bp67acfmxazb4p****",
      "InvokeId": "B8ED2BA9-0C6A-5643-818F-B5D60A64****",
      "RegionId": "cn-hangzhou",
      "ResourceId": "acp-25nt4kk9whhok****",
      "TaskType": "StartInstance",
      "TaskStatus": "Processing",
      "StartTime": "2022-10-11T08:53:32Z",
      "FinishTime": "2022-10-11T08:53:32Z",
      "Param": "param",
      "Result": "{'Success': True}",
      "ErrorCode": "SendFileFailed",
      "ErrorMsg": "connect error.",
      "Level": 1,
      "FailedChildCount": 2,
      "SuccessChildCount": 98,
      "RunningChildCount": 0,
      "TotalChildCount": 100,
      "InstanceId": "acp-uto81vfd8t8z****",
      "InstanceName": "defaultInstanceName",
      "InstanceStatus": "RUNNING",
      "Operator": "test",
      "ParentTaskId": "t-41oan3tza16vs****"
    }
  ],
  "TotalCount": 10,
  "RequestId": "B8ED2BA9-0C6A-5643-818F-B5D60A64****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.