All Products
Search
Document Center

Cloud Phone:RunSyncCommand

Last Updated:Mar 23, 2026

Runs a synchronous command on one or more Cloud Phone instances and returns the execution result.

Operation description

The RunSyncCommand operation is designed for commands that return a result quickly, typically within milliseconds. For longer-running commands that may take several seconds, we recommend using the asynchronous RunCommand 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 syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

InstanceIds

array

No

An array of Cloud Phone instance IDs. You can specify up to 50 instances in a single request.

string

No

The Cloud Phone instance ID.

acp-5hh431emkt6u*****

CommandContent

string

No

The content of the command to execute.

ls

WaitTime

integer

No

The timeout for command execution, in milliseconds. Valid range: 500 to 3000. Default: 1000.

1000

ContentEncoding

string

No

The encoding of the command content. If you provide a value that is not a valid option, the system uses the default value, PlainText.

Valid values:

  • Base64 :

    The content is Base64-encoded.

  • PlainText :

    The content is not encoded and is transmitted as plaintext. [Default]

PlainText

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

5C5CEF0A-D6E1-58D3-8750-67DB4F82****

TotalCount

string

The total number of entries.

31

Data

array<object>

An array of objects, where each object contains the execution result for a single instance.

object

The execution result for a single instance.

InvocationId

string

The invocation ID.

t-15775dc8****

StartTime

string

The time when command execution began.

2022-10-11T08:53:32Z

FinishTime

string

The time when command execution finished.

2022-08-11 17:45:03

Output

string

The command output.

success

InstanceId

string

The ID of the instance on which the command was executed.

acp-uto81vfd8t8z****

InvocationStatus

string

The command execution status.

RUNNING

Examples

Success response

JSON format

{
  "RequestId": "5C5CEF0A-D6E1-58D3-8750-67DB4F82****",
  "TotalCount": "31",
  "Data": [
    {
      "InvocationId": "t-15775dc8****",
      "StartTime": "2022-10-11T08:53:32Z",
      "FinishTime": "2022-08-11 17:45:03",
      "Output": "success",
      "InstanceId": "acp-uto81vfd8t8z****",
      "InvocationStatus": "RUNNING"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.