All Products
Search
Document Center

Cloud Phone:RunSyncCommand

Last Updated:Jun 10, 2026

Menjalankan perintah sinkron pada satu atau beberapa instans Cloud Phone dan mengembalikan hasil eksekusi.

Deskripsi operasi

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

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Sintaks permintaan

POST  HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceIds

array

No

Array ID instans Cloud Phone. Anda dapat menentukan hingga 50 instans dalam satu permintaan.

string

No

The Cloud Phone instance ID.

acp-5hh431emkt6u*****

CommandContent

string

No

Konten perintah yang akan dieksekusi.

ls

WaitTime

integer

No

Batas pengatur waktu eksekusi perintah, dalam milidetik. Rentang valid: 500 hingga 3000. Nilai default: 1000.

1000

ContentEncoding

string

No

Enkoding konten perintah. Jika Anda memberikan nilai yang bukan opsi valid, sistem akan menggunakan nilai default, PlainText.

Valid values:

  • Base64 :

    Konten dienkode Base64.

  • PlainText :

    Konten tidak dienkode dan ditransmisikan sebagai teks biasa. [Default].

PlainText

Elemen respons

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

Contoh

Respons sukses

JSONformat

{
  "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"
    }
  ]
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.