Introduction

This document provides you with specific API descriptions, syntax, parameter descriptions, and examples, etc. You can call the API to manage the resources of the cloud phone service.

Update the record

Update Log (Chronological Order)


2024-12-30

  • Updated Modify SIM interface

2024-12-26

  • Added Request stsToken based on padCode interface

2024-12-20

  • Updated One Click New Machine interface (supports incoming country code)
  • Added Backup Restore callbacks

2024-12-18

  • New Callback Configuration interface

2024-12-05

  • Added Modify Contacts interface

2024-11-22

  • Added Instance Backup and Instance Data Restore interfaces
  • Added One Click New Machine interface

2024-11-13

  • New Modify Instance Android Attributes interface

2024-10-23

  • New Enable/Disable Instance ADB interface

2024-09-27

  • New Modify Instance Time Zone interface
  • New Modify Instance Language interface
  • New Modify Instance SIM Card Information interface
  • New Set Instance Latitude and Longitude interface
  • New Query Instance Agent Information interface
  • New Instance Setting Agent interface

2024-09-23

  • New Set Instance Bandwidth interface

2024-08-09

  • New Instance IP Binding interface
  • New Apply for RTC Shared Room Token interface

2024-07-23

  • New Add Application Blacklist List interface
  • New Setup Instance Blacklist interface

2024-07-22

  • New Physical Machine Reboot interface
  • New Batch Get Example Models interface

2024-07-18

  • New Batch Request RTC Token interface

2024-07-08

  • Updated Instance Operation Task Details interface

2024-07-04

  • Updated Application Installation interface
  • Updated Application Launch interface
  • Updated Application Start/Stop interface
  • Updated Application Stop interface
  • Updated Application Restart interface
  • Updated Application Uninstallation interface
  • Updated Instance Reset interface
  • Updated Example File Upload interface
  • Updated Query Instance Application List interface

2024-07-01

  • Updated File Upload interface
  • Updated Instance Restart interface
  • Updated Instance Details interface
  • Updated Modify Instance Properties interface
  • Updated Asynchronous Execution of ADB Commands interface

2024-06-21

  • Updated Mirror Upload interface
  • Updated Mirror Upgrade interface

2024-04-30

  • Documentation Release

Calling instructions

Pre-conditions

Obtain the Access Key ID and Secret Access Key (AK/SK) of the account for API request authentication. Please contact your technical contact to obtain the

Public request parameters

The interface must include the following four parameters in Headers for authentication each time it is requested, otherwise the interface will not be able to request properly.

| Parameter Name | Type | Example Values | Parameter Description | | --- | --- | --- | --- | --- | | x-date | string | 20240301T093700Z | Timestamp of the sent request, using UTC time, accurate to seconds | | x-host | string | openapi.armcloud.net | Interface Access Domain | | authorization | string | HMAC-SHA256 Credential={AccessKey}/{ShortDate}/armcloud-paas/request, SignedHeaders=content-type;host;x- content-sha256;x-date, Signature={Signature} | Signature included in sent request | | Content-Type | string | application/json | MIME type of the resource |

Authorization signature mechanism

For each HTTPS protocol request, the identity of the access requestor is verified based on the signature information in the access. This is achieved by cryptographic verification of the AccessKey ID and AccessKey Secret (AK/SK) corresponding to the user account.

Calling SDK signatures

Attention For specific calling methods, please refer to ** Interface List ** Code Example

In the SDK provides a signature function or method, the developer only needs to provide the access key and other information in the request, the SDK will automatically calculate the request signature and add the signature result to the request. This method simplifies the signing process and reduces the development difficulty, especially for developers who are not familiar with the signature algorithm.

Download SDKopen in new window

java call example

Manual Signature

Note

Signatures require a series of processing of the request parameters, including steps such as sorting, splicing, and encryption. This approach provides greater flexibility and customisability and is suitable for situations where the developer has a deep understanding of the signature algorithm. However, manual signing requires developers to write additional code to implement the signing process, which may increase the difficulty of development and the possibility of errors, so we still recommend that you use the SDK to call the API and try to avoid writing your own signing code. If you need to understand the principle and specific process of signature calculation, you can refer to the following documents.

The manual signature mechanism requires the requestor to calculate the hash value of the request parameters, encrypt them and send them to the server together with the API request, the server will use the same mechanism to calculate the signature of the received request and compare it with the signature passed by the requestor, if the signature fails to pass the verification, the request will be rejected.

Obtain the Access Key ID and Secret Access Key (AK/SK) of the account for API request authentication. Please contact your technical contact to obtain the

Constructing canonical request strings (CanonicalRequest)
 String canonicalStringBuilder=
 	 "host: "+*${host}*+"\n "+
 	 "x-date: "+*${xDate}*+"\n "+
 	 "content-type: "+*${contentType}*+"\n "+
 	 "signedHeaders: "+*${signedHeaders}*+"\n "+
 	 "x-content-sha256: "+*${xContentSha256}*;
FieldsInterpretation
hostRequest service domain. Fixed to: openapi.armcloud.net
x-dateSpecifies the request UTC time, i.e., the value of X-Date in the public parameters of the request header, using the ISO 8601-compliant format: YYYYYMMDD'T'HHMMSS'Z', e.g., `20201103T104027Z'
content-typemedia-type of the request or response body (application/json)
signedHeadersParticipate in the signature of the Header, and CanonicalHeaders contains the Header is a one-to-one correspondence, the purpose is to specify which Header to participate in the signature calculation, so as to ignore the request was added by the proxy additional Header, which host, x-date if there is a Header then Mandatory participation
Pseudo-code is as follows:
SignedHeaders=Lowercase(HeaderName0)+';'+Lowercase(HeaderName1)+"; "+... +Lowercase(HeaderNameN)
Example:
SignedHeaders=content-type;host;x-content-sha256;x-date
x-content-sha256hashSHA256(body)
Constructing the string to be signed (StringToSign)

The signature string mainly contains metadata information about the request as well as the normalised request, and consists of the signature algorithm, the request date, the trust shape and the normalised request hash concatenation.

Construct the string to be signed with the following pseudo-code:

StringToSign=
	Algorithm+'\n'+
	xDate+'\n'+
	CredentialScope+'\n'+
	hashSHA256(canonicalStringBuilder.getByte())
FieldsInterpretation
AlgorithmRefers to the algorithm for signing, currently only the HMAC-SHA256 signature algorithm is supported.
x-dateSpecifies the request UTC time, i.e., the value of X-Date in the public parameters of the request header, using the ISO 8601-compliant format: YYYYYMMDD'T'HHMMSS'Z', e.g., `20201103T104027Z'
CredentialScoperefers to the trust state in the format: ${YYYYMMDD}/${service}/request, where ${YYYYMMDD} takes the date in X-Date, ${service} is fixed to armcloud-paas, and request is a fixed value.
Refer to "Calculating CredentialScope" below
CanonicalRequestmeans the result of constructing a canonical request string.
Calculating CredentialScope
String credentialScope = shortXDate+"/"+service+"/request";
	shortXDate: short request time (x-date intercepts the first 8 digits Example: 20201103)
	service: service name (fixed armcloud-paas)
	"/request": fixed value
Signingkey example

Derived signature key generated by a sequence of HMAC hash operations

byte[]Signingkey=hmacSHA256(hmacSHA256(hmacSHA256(hmacSHA256(sk.getBytes(),shortXDate),service), "request");
FieldsInterpretation
skclient key
shortXDateshortRequestDate
ServiceService name is fixed to armcloud-paas
Signature example
signature=HexEncode(hmacSHA256(Signingkey,StringToSign))

Data encryption and decryption example

Java AES GCM Decryption

import javax.crypto.
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.MessageDigest.
import java.security.NoSuchAlgorithmException.
import java.security.SecureRandom;
import java.util.Base64;

public class AESUtils {
    private static final String AES = "AES";
    private static final String AES_CIPHER_ALGORITHM = "AES/GCM/NoPadding";
    private static final int GCM_TAG_LENGTH = 16;
    private static final int GCM_IV_LENGTH = 12;

    /**
     * :: Generates a SecretKeySpec from a given string key
     */
    private static SecretKeySpec getKeyFromPassword(String password) throws NoSuchAlgorithmException {
        MessageDigest sha = MessageDigest.getInstance("SHA-256");
        byte[] key = sha.digest(password.getBytes());
        return new SecretKeySpec(key, AES);
    }

    /**
     * :: Generates a new Initialisation Vector (IV)
     */
    public static byte[] generateIv() {
        byte[] iv = new byte[GCM_IV_LENGTH];
        new SecureRandom().nextBytes(iv);
        return iv;
    }

    /**
     * :: Encrypts a plain text using AES algorithm and returns both the cipher text and IV
     */
    public static String encrypt(String input, String key) {
        try {
            SecretKeySpec secretKeySpec = getKeyFromPassword(key);
            byte[] iv = generateIv();
            Cipher cipher = Cipher.getInstance(AES_CIPHER_ALGORITHM);
            GCMParameterSpec gcmParameterSpec = new GCMParameterSpec(GCM_TAG_LENGTH * 8, iv);
            cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, gcmParameterSpec);
            byte[] cipherText = cipher.doFinal(input.getBytes());

            // Encode IV and cipher text to Base64 and concatenate them with a separator
            String ivString = Base64.getEncoder().encodeToString(iv);
            String cipherTextString = Base64.getEncoder().encodeToString(cipherText);
            return ivString + ":" + cipherTextString;
        } catch (Exception e) {
            log.error("encrypt error >>>input:{} key:{}", input, key, e);
            return null;
        }

    }

    /**
     * :: Decrypts an encrypted text using AES algorithm
     */
    public static String decrypt(String encryptedData, String key) {
        try {
            SecretKeySpec secretKeySpec = getKeyFromPassword(key);

            // Split the encrypted data into IV and cipher text
            String[] parts = encryptedData.split(":");
            String ivString = parts[0];
            String cipherTextString = parts[1];

            byte[] iv = Base64.getDecoder().decode(ivString);
            byte[] cipherText = Base64.getDecoder().decode(cipherTextString);

            Cipher cipher = Cipher.getInstance(AES_CIPHER_ALGORITHM);
            GCMParameterSpec gcmParameterSpec = new GCMParameterSpec(GCM_TAG_LENGTH * 8, iv);
            cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, gcmParameterSpec);
            byte[] plainText = cipher.doFinal(cipherText);
            return new String(plainText);
        } catch (Exception e) {
            log.error("decrypt error >>>encryptedData:{} key:{}", encryptedData, key, e);
            return null;
        }

    }

    /**
     * Encodes the input byte array to a Base64 string
     */
    public static String encodeToString(byte[] input) {
        return Base64.getEncoder().encodeToString(input);
    }

    // Encodes the input string to a Base64 string
    public static String encodeToString(String input) {
        return Base64.getEncoder().encodeToString(input.getBytes());
    }

    /**
     * :: Decodes the input Base64 string to a byte array
     */
    public static byte[] decodeToBytes(String input) {
        return Base64.getDecoder().decode(input);
    }

    /**
     * :: Decodes the input Base64 string to a regular string
     */
    public static String decodeToString(String input) {
        byte[] decodedBytes = Base64.getDecoder().decode(input);
        return new String(decodedBytes);
    }

    /**
     * :: Encodes the input byte array to a Base64 byte array
     */
    public static byte[] encodeToBytes(byte[] input) {
        return Base64.getEncoder().encode(input);
    }

    /**
     * :: Decodes the input Base64 byte array to a byte array
     */
    public static byte[] decodeToBytes(byte[] input) {
        return Base64.getDecoder().decode(input);
    }

    public static void main(String[] args) throws Exception {
        String key = "AC22030010001"; // any string as key
        // Decrypt the cipher text
        String decryptedText = decrypt("iMzQUI7SwzSD0kGJ:4FZ1fn1Jdd5Z4j2ehn/F3VSUVWBwLFQZH/HOCjLAI95r", key);
        System.out.println("Decrypted text: " + decryptedText);
    }
}

Interface overview

Instance management

interfaceinterface nameinterface description
/pad/restartInstance RestartPerforms a restart operation on a specified instance to resolve unresponsive, stuck, etc. problems
/pad/resetInstance ResetPerform a reset operation on the specified instance
/pad/padPropertiesQueryInstancePropertiesQuery property information for the specified instance
/pad/updatePadPropertiesModify Instance PropertiesModify property information for the specified instance
/pad/padDetailsInstanceDetailsQuery the details of the specified instance
/room/dissolveRoomStopPushFlowStop the specified instance of push flow
/room/batchApplyTokenBatch Apply RTC TokenApply RTC Token for multiple instances
/device/powerResetPhysical Machine RebootPerform a reboot operation on the specified physical machine
/pad/updateTimeZoneModifyInstanceTimeZoneModify the time zone for the specified instance
/pad/updateLanguageModifyInstanceLanguageModifySystemLanguage for a given instance
/pad/updateSIMModify Instance SIM InformationModify SIM Information for a specified instance
/pad/gpsInjectInfoSet instance latitude and longitudeModify the current latitude and longitude for the given instance
/network/proxy/setInstance Set ProxySet Proxy Information for Specified Instance
/network/proxy/infoQuery Instance Proxy InformationQuery the specified instance proxy information
/pad/updatePadAndroidPropModify Instance Android AttributesModify Instance Android Attributes

Instance manipulation

interfaceinterface nameinterface description
/pad/asyncCmdExecute ADB commands asynchronouslyExecute adb commands (asynchronous tasks) in one or more cloud phone instances
/pad/syncCmdSynchronise ADB commandsSynchronise adb commands across one or more cloud phone instances
/pad/screenshotLocal ScreenshotPerform a screenshot in the instance with the phone and save it locally in the cloud machine
/pad/generatePreviewGenerate PreviewTake a screenshot of the current cloud phone screen and get the address to download the screenshot file
/file/cacheFile UploadUploading files to the File Management Centre (asynchronous task)
/file/listFile ListQuery uploaded file list information
/pad/v2/uploadFileInstance File UploadPush file(s) from File Management Centre to one or more Cloud Phone instances (asynchronous task)
/pad/upgradeImageUpgrade ImageUpgrade Instance Image (asynchronous task)
/pad/modelInfoBatch Fetch Instance Model InfoBatch Fetch the model info of the corresponding instance based on the instance number
/appBlack/setUpBlackListadd app black list listadd app black list based on instance specifications
/pad/triggeringBlacklistSetInstanceBlacklistSetInstanceBlacklist by Instance Specification
/pad/setSpeedSetInstanceBandwidthSetInstanceBandwidth in bulk based on instance number
/pad/adbEnable/Disable Instance ADBEnable or disable ADB for an instance based on the instance ID

Resource management

interfaceinterface nameinterface description
/pad/infosInstance List InformationQuery all ordered instances list information
/group/infosInstance Grouping ListQuery All Instance Grouping Lists

Application management

interfaceinterface nameinterface description
/app/cacheApplication UploadUpload application installation files to the Application Management Centre (asynchronous task)
/app/listapp-listQuery the list of uploaded apps
/app/detailApplication DetailsQueries the details of the specified application and application version information
/pad/listAppQuery Instance App ListQuery App Installation on the specified instance
/pad/installAppApp InstallationDeploys the specified app installation to the specified cloud instance (asynchronous task)
/pad/uninstallAppApp UninstallUninstall the specified app from the cloud instance (asynchronous task)
/pad/startAppApp LaunchLaunch the specified app in one or more cloud instances (asynchronous task)
/pad/stopAppApp StopShut down the specified app in one or more cloud instances (asynchronous task)
/pad/restartAppApplication RestartRestart the specified application in one or more cloud instances (asynchronous task)

Mirror management

interfaceinterface nameinterface description
/image/uploadImageCreating a Mirror Upload TaskCreating a Mirror Upload Task (asynchronous task)

Task management

interfaceinterface nameinterface description
/task/fileTaskDetailfileTaskDetailQuery the details of the execution result of the specified file task
/task/padTaskDetailInstanceOperationTaskDetailQuery the execution result details of the specified instance operation task
/task/listTask ListQuery list information of tasks related to instances, applications, etc
/task/executeScriptInfoGet Instance Execute Script ResultsGet Instance Execute Script Results by Execute Script Task ID
/task/cacheFileResultGet File Upload Task ResultsGet the file upload results of an instance by its file upload task ID
/task/screenshotInfoGet instance screenshot resultsGet instance screenshot results by screenshot task ID
/task/appOperateInfoappOperateExecutionResultsGet the results of an instance's appOperate by appOperateTask ID
/task/padExecuteTaskInfoInstanceRestartResetExecuteResultsGet InstanceRestartResetExecuteResults by task ID
/task/imageUploadResultImage Upload Task Result QueryImage Upload Task Result Query by Task ID

SDK Token

interfaceinterface nameinterface description
/token/stsTokenissue sdk temporary tokenissue sdk temporary token for authentication of users accessing the cloud phone service

List of OpenAPI interfaces

Instance management

Instance restart

Performs a reboot operation on a specified instance to solve problems such as unresponsive and stuck systems.

Interface address

/openapi/open/pad/restart

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC21020010001StringYesInstance Number
groupIdsInteger[]no
├─1IntegerNoInstance Group ID

Response parameters

parameter nameexample valueparameter typeparameter description
code200IntegerStatus Code
msgsuccessStringresponse message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTask ID
├─padCodeAC21020010001StringInstance Number
├─vmStatus1IntegerInstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC22030022693"
	],
	"groupIds": [1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data":[
				{
				"taskId": 1,
				"padCode": "AC21020010001".
				"vmStatus": 1
				}
			]
}

Error code

Error CodeError DescriptionRecommendations
10001Reboot FailedContact Administrator
110004Failed to execute reboot commandReboot again later
110028Instance does not existPlease check if the instance exists.

Code example

// java call example
public class SDKExample {
    private final ArmCloudApiService armCloudApiService;

    public SDKExample() {
        ArmCloudConfig armCloudConfig = new ArmCloudConfig();
        armCloudConfig.setOpenUrl("https://openapi.armcloud.net");
        armCloudConfig.setService("armcloud-paas");
        armCloudConfig.setHost("openapi.armcloud.net");
        armCloudConfig.setAk("your access_key_id");
        armCloudConfig.setSk("your secret_access_key");
        armCloudApiService = new ArmCloudApiServiceImpl(armCloudConfig, new DefaultHttpExecutor());
    }

    @Test
    public void test() throws Exception {
        RestartRequest requestParam = new RestartRequest();
        List<String> padCodes = new ArrayList<>();
        padCodes.add("AC22010041147");
        requestParam.setPadCodes(padCodes);
        Result<PadTaskResponse> result = armCloudApiService.execute(ArmCloudApiEnum.PAD_RESTART, requestParam, new TypeReference<Result <PadTaskResponse>>() {});
    }
}

Instance reset

Performs a reset operation on the specified instance to clean up applications and files

Interface address

/openapi/open/pad/reset

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesString[]Yes
├─AC21020010001StringYesInstance number
groupIdsInteger[]no
├── 1IntegerNoInstance Group ID

Response parameters

| parameter name | example value | parameter type | parameter description| |--- | --- | --- | --- | --- | |code | 200 | Integer | Status code | |msg | success | String | response message | |ts | 1756021167163 | Long | timestamp | |data | |Object[] | | |├─taskId | 1 | Integer | Task ID| | ├─padCode | AC21020010001 | String | Instance number | | ├─vmStatus | 1 | Integer | Instance online status (0: offline; 1: online) |

Example request

{
	"padCodes": [
		"AC21020010001"
	],
	"groupIds": [1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717559681604.
	"data": [
		{
			"taskId": 88,
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 89.
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
10002Reset FailedContact Administrator
110005Failed to execute reset commandreset again later

Code example

// java call example
 ResetRequest requestParam = new ResetRequest();
List<String> padCodes = new ArrayList<>();
padCodes.add("AC22010041147");
requestParam.setPadCodes(padCodes);
Result<PadTaskResponse> result = armCloudApiService.execute(ArmCloudApiEnum.PAD_RESET, requestParam, new TypeReference<Result& lt;PadTaskResponse>>() {});

Query instance attributes

Queries the attribute information of the specified instance, including system attribute information and setting information.

Interface address

/openapi/open/pad/padProperties

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodeAC21020010001StringYesInstance number

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─padCodeAC21020010001StringInstance Number
├─modemPropertiesListObject[]Modem Properties List
├─├─propertiesNameIMEIStringProperty Name
├─├─propertiesValue412327621057784StringProperty Value
├─systemPropertiesListObject[]System Properties List
├─├─propertiesNamero.build.idStringProperty Name
├─├─propertiesValueQQ3A.200805.001StringProperty Value
├─settingPropertiesListObject[]Setting Properties List
├─├─propertiesNamero.build.tagsStringProperty Name
├─├─propertiesValuerelease-keysStringProperty Value
├─oaidPropertiesListObject[]OAID Properties List
├─├─propertiesNameoaidStringProperty Name
├─├─propertiesValue001StringProperty Value

Example request

{
	"padCode": "AC21020010001"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"padCode": "AC21020010001".
		"modemPropertiesList": [
			{
				"propertiesName": "IMEI",
				"propertiesValue": "412327621057784"
			}
		],
		"systemPropertiesList": [
			{
				"propertiesName": "ro.build.id",
				"propertiesValue": "QQ3A.200805.001"
			}
		],
		"settingPropertiesList": [
			{
				"propertiesName": "ro.build.tags",
				"propertiesValue": "release-keys"
			}
		],
		"oaidPropertiesList": [
			{
				"propertiesName": "oaid",
				"propertiesValue": "001"
			}
		]
	}
}

Error code

Error CodeError DescriptionAction Suggestion
110028Instance does not existPlease check if the instance is correct

Code example

// java call example
PadPropertiesRequest requestParam = new PadPropertiesRequest();
requestParam.setPadCode("AC22010041147");
Result<PadPropertiesResponse> result = armCloudApiService.execute(ArmCloudApiEnum.PAD_GET_PROPERTIES, requestParam,new TypeReference<Result<PadPropertiesResponse>>() {});

Modify instance attributes

Modifies attribute information for the specified instance, including system attributes and settings.

Interface address

/openapi/open/pad/updatePadProperties

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequiredParameter Description
padCodesString[]Yes
├─AC21020010001StringYesInstance Number
modemPersistPropertiesListObject[]NoModem Persistent Properties List
├─ propertiesNameIMEIStringNoProperty Name
├─ propertiesValue412327621057784StringNoProperty Value
modemPropertiesListObject[]NoModem Non-Persistent Properties List
├─ propertiesNameIMEIStringNoProperty Name
├─ propertiesValue412327621057784StringNoProperty Value
systemPersistPropertiesListObject[]NoSystem Persistent Properties List
├─ propertiesNamero.build.idStringNoProperty Name
├─ propertiesValueQQ3A.200805.001StringNoProperty Value
systemPropertiesListObject[]NoSystem Non-Persistent Properties List
├─ propertiesNamero.build.idStringNoProperty Name
├─ propertiesValueQQ3A.200805.001StringNoProperty Value
settingPropertiesListObject[]NoSetting Properties List
├─ propertiesNamero.build.tagsStringNoProperty Name
├─ propertiesValuerelease-keysStringNoProperty Value
oaidPropertiesListObject[]NoOAID Properties List
├─ propertiesNameoaidStringNoProperty Name
├─ propertiesValue001StringNoProperty Value

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject[]
├─ taskId1IntegerTask ID
├─ padCodeAC21020010001StringInstance Number
├─ vmStatus1IntegerInstance Online Status (0: Offline; 1: Online)

Example request

{
	"padCodes": [
		"AC21020010001"
	],
	"modemPersistPropertiesList": [
			{
				"propertiesName": "IMEI",
				"propertiesValue": "412327621057784"
			}
		],
	"modemPropertiesList": [
			{
				"propertiesName": "IMEI",
				"propertiesValue": "412327621057784"
			}
		],
		"systemPersistPropertiesList": [
			{
				"propertiesName": "ro.build.id",
				"propertiesValue": "QQ3A.200805.001"
			}
		],
		"systemPropertiesList": [
			{
				"propertiesName": "ro.build.id",
				"propertiesValue": "QQ3A.200805.001"
			}
		],
		"settingPropertiesList": [
			{
				"propertiesName": "ro.build.tags",
				"propertiesValue": "release-keys"
			}
		],
		"oaidPropertiesList": [
			{
				"propertiesName": "oaid",
				"propertiesValue": "001"
			}
		]
}

Example of response

{
	"code": 200,
	"msg": "success",
	"ts": 1717570916196,
	"data": [
		{
			"taskId": 36,
			"padCode": "AC22030010001",
			"vmStatus": 1
		}
	]
}

Error code

Error CodeError DescriptionAction Suggestion
110011Failed to execute modify attribute commandPlease try again later
110028Instance does not existPlease check if the instance is correct
110027There is a duplicate item in the instance number setPlease check if there are duplicate instances

Code example

// java call example
UpdatePadPropertiesRequest requestParam = new UpdatePadPropertiesRequest();
List<String> padCodes = new ArrayList<>();
padCodes.add("AC22010041147");
requestParam.setPadCodes(padCodes);

List<PadPropertiesSub> subs = new ArrayList<>();
PadPropertiesSub sub = new PadPropertiesSub();
sub.setPropertiesName("oaid");
sub.setPropertiesValue("123456789");
subs.add(sub);
requestParam.setSystemPropertiesList(subs);
Result<List<GeneratePadResponse>> result = armCloudApiService.execute(ArmCloudApiEnum.PAD_UPDATE_PROPERTIES, requestParam, new TypeReference<Result<List<GeneratePadResponse>>() {});

Instance details

Queries the attribute information of the specified instance, including system attribute information and setting information.

Interface address

/openapi/open/pad/padDetails

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequiredParameter Description
page1IntegerNoPage Number
rows10IntegerNoRecords per Page
padCodesString[]No
├─AC21020010391StringNoInstance Number
padIpsString[]NO
├─192.168.1.1StringNOInstance IP
vmStatus1StringNoInstance Online Status: 0 - Offline, 1 - Online
controlStatus1StringNoControl Status (Streaming Status): 1 - Uncontrolled, 2 - Controlled
faultStatus14StringNoInstance Running Status: 14 - Exception, Other - Normal
deviceStatus0StringNoPhysical Machine Online Status: 0 - Offline, 1 - Online
groupId2IntegerNoGroup ID
idcCodeHNCS-C-01StringNoData Center Code

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─ page1IntegerCurrent Page
├─ rows10IntegerNumber per Page
├─ size1IntegerCurrent Page Count
├─ total1IntegerTotal Record Count
├─ totalPage1IntegerTotal Page Count
├─ pageDataobject[]List
├─ ├─ padCodeVP21020010391StringInstance Number
├─ ├─ imageIdandroid:v10StringImage ID
├─ ├─ deviceLevelq2-6StringInstance Specification (q2-6 Six Core, q2-4 Four Core)
├─ ├─ padStatus12IntegerInstance Status (10 - Running, 11 - Restarting, 12 - Resetting, 13 - Upgrading, 14 - Exception, 15 - Not Ready, 16 - Upgrading)
├─ ├─ deviceStatus1IntegerPhysical Machine Status (0 - Offline, 1 - Online)
├─ ├─ online1IntegerInstance Online Status (0 - Offline, 1 - Online)
├─ ├─ streamStatus0IntegerInstance Streaming Status (0 - Idle, 1 - Streaming)
├─ ├─ dataSize234493726720LongTotal Storage Capacity (Bytes)
├─ ├─ dataSizeUsed179189956608LongUsed Storage Capacity (Bytes)
├─ ├─ dcInfoObjectData Center Information
├─ ├─ ├─ dcCodedc01StringData Center Code
├─ ├─ ├─ dcName长沙-01StringData Center Name
├─ ├─ ├─ area长沙StringArea
├─ ├─ ├─ ossEndpointhttps://xxx.armcloud.netStringOSS Public Interface Address
├─ ├─ ├─ ossEndpointInternalhttps://xxx.armcloud.netStringOSS Internal Interface Address
├─ ├─ ├─ ossFileEndpointhttps://xxx.armcloud.netStringAccess File Address
├─ ├─ ├─ ossScreenshotEndpointhttps://xxx.armcloud.netStringAccess Screenshot Address

Example request

{
	"page": 1,
	"rows": 10,
	"padCodes": ["AC21020010391"],
	"padIps":["192.168.1.1"],
	"vmStatus": "1",
	"controlStatus": "1",
	"faultStatus": "14",
	"deviceStatus": "0"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"page": 1,
		"rows": 10,
		"size": 1,
		"total": 1.
		"totalPage": 1,
		"pageData": [
			"padCode": "AC21020010391".
			"imageId": "andorid:v10",
			"deviceLevel": "q2-6",
			"dcInfo": {
				"dcCode": "dc01".
				"dcName": "Changsha-01".
				"area": "Changsha".
				"ossEndpoint": "https://xxx.armcloud.net",
				"ossEndpointInternal": "https://xxx.armcloud.net",
				"ossFileEndpoint": "https://xxx.armcloud.net",
				"ossScreenshotEndpoint": "https://xxx.armcloud.net",
			},
			"padStatus": 12.
			"deviceStatus": 1,
			"online": 1.
			"streamStatus": 0,
			"dataSize": 234493726720.
			"dataSizeUsed": 179189956608
		]
	}
}

Code example

// java call example
PadDetailsRequest requestParam = new PadDetailsRequest();
List<String> padCodes = new ArrayList<>();
padCodes.add("AC22010041147");
requestParam.setPadCodes(padCodes);
Result<Page<PadDetailsResponse>> result = armCloudApiService.execute(ArmCloudApiEnum.PAD_DETAILS, requestParam,new TypeReference<Result<Page<PadDetailsResponse>>() {});

Stop Push Flow

Stop the specified instance from pushing the stream and disconnect the instance.

Interface address

/rtc/open/room/dissolveRoom

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC11010000031StringYesInstance number
├─AC22020020700StringYesInstance number

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject[]
├─successListObject[]Success Collection
├─├─padCodeAC11010000031StringInstance Number
├─failListObject[]Failure Collection
├─├─padCodeAC22020020700StringInstance Number
├─├─errorCode120005IntegerError Code
├─├─errorMsgInstance does not existStringReason for Failure

Example request

{
    "padCodes": ["AC11010000031", "AC22020020700"]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
     "data": {
	 	  "successList": [
              {
                  "padCode": "AC11010000031"
              }
          ],
          "failList": [
		  	 {
                  "padCode": "AC22020020700".
				  "errorCode": 120005.
				  "errorMsg": "Instance does not exist"
              }
		  ]
     }
}

Error code

Error CodeError DescriptionRecommendations
120005Instance does not existPlease check if the instance number is correct.
120004Abort Push Error, Command Service ExceptionTry Again Later

Bulk Request for RTC Connection Token

Batch request RTC Token connection information for multiple instances under the current account, and the connection information is returned in groups based on Pad.

No RTC Toekn message is returned when the Pad is unable to connect, the msg field shows the reason for the inability to connect.

Currently, this interface only supports the production of ArmcloudRTC tokens, if there is an exception message such as This interface does not support this feature at the moment, please contact the relevant personnel to reconfigure the push flow information.

The generated token does not support refreshing to extend the validity period for the time being. When it expires, you need to apply for a new token.

Encrypted data needs to be decrypted using AES GCM mode with padCode key.

Interface address

/rtc/open/room/batchApplyToken

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequiredParameter Description
userId202StringYesCustom user ID defined by the business party. This field is used to generate room information. A user must be in the same room as the GameServer. The caller needs to ensure user-level uniqueness; using the same userId to generate different Tokens for connecting to the same GameServer will cause the previously established connection to disconnect.
expire3600IntegerNoToken validity period (unit: seconds. Default is 86400).
padsObject[]YesList of instances
├─padCodeAC11010000031StringYesInstance Number
├─videoStreamObjectNoStreaming configuration
├─├─resolution07StringNoResolution
├─├─frameRate30StringNoFrame Rate
├─├─bitrate2000StringNoBitrate

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject[]
├─roomToken001j7Tb2jAyAzR6UtLv3cgclCFhw6Q==StringToken
├─roomCodeAC22030010181202StringRoom Number
├─appIdj7Tb2GcE9rN5oF6xP3A4qwerStringApplication ID
├─padCodeAC22030010181StringInstance ID
├─signalServerLnBbVX44uyoN1kXp:P8H01PaGZDHEFDStringSignaling Address (requires decryption using AES GCM mode)
├─stunspL25iYgaRNmdCYR/:SUJBz4S6HE88GzVNStringSTUN Address (requires decryption using AES GCM mode)
├─turnsdo2k7Z6OiVP1br29:rR4d6Vyk9eStringTURN Address (requires decryption using AES GCM mode)
├─msgconnect pad failStringError Message

Example request

{
	"userId": "202".
	"expire": 3600.
	"pads": [
		{
			"padCode": "AC22010010842".
			"videoStream ": {
				"resolution": "1",
				"frameRate": "30",
				"bitrate": "2000"
			}
		},
		{
			"padCode": "AC22030010181".
			"videoStream ": {
				"resolution": "1",
				"frameRate": "30",
				"bitrate": "2000"
			}
		}
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1721305008916.
	"data": [
		{
			"roomToken": null,
			"roomCode": "AC22010010842202".
			"appId": "j7Tb2GcE9rN5oF6xP3A4qwer", "label".
			"streamType": 2,
			"videoCodec": "",
			"reportSdkLog": false,
			"padCode": "AC22010010842".
			"msg": "connect pad fail",
			"signalServer": null,
			"stuns": null,
			"turns": null
		},
		{
			"roomToken": " 001j7Tb2GcE9rN5oF6xP3A4qwerNwDyCHIRtQrGxZABAAC1ZuzKkAEAABAAQUMyMjAzMDAxMDE4MTIwMgMAMjAyAQAEALVm7MqQAQAAIABpLvj5zX3dnyN/ 8UvRsLJnHWA4zR6UtLv3cgclCFhw6Q==",
			"roomCode": "AC22030010181202".
			"appId": "j7Tb2GcE9rN5oF6xP3A4qwer", "label".
			"streamType": 2,
			"videoCodec": "",
			"reportSdkLog": false,
			"padCode": "AC22030010181".
			"msg": null,
			"signalServer": "LnBbVX44uyoN1kXp:P8H01PaGZDHEFDsnU6nRCbOFzvL2smbG9HxKh+XP5WHC", "label".
			"stuns": "pL25iYgaRNmdCYR/:SUJBz4S6HE88GzVN8rANlfL9925iaHW+ilJAaWldPpoBKqwoEq0Ggon0HhDc4a6v0pg=",
			"turns": "do2k7Z6OiVP1br29:rR4d6Vyk9efIFX6qPPMyKs7OhmxFA7xBr65P8NA/Rxb31Js6VOaO3Zrtd3h9uM/". mNYUy5mJOQ4j8TJ8DjfBFaEHVNOAcF5tzgbg8iksGhNONfv8hHw=="
		}
	]
}

Error code

Error CodesError DescriptionsOperating Suggestions
120005Instance does not existPlease check if the instance number is correct
120007This interface does not support this feature at the momentContact the relevant personnel to change the push flow configuration

Physical machine reboot

Power down and restart the physical machine.

Interface address

/openapi/open/device/powerReset

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequiredParameter Description
deviceIpsString[]Yes
├─172.31.4.124StringYesPhysical Device IP
type2String[]YesRestart Type: 2 - Power Cycle Restart

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject[]
├─ taskId1IntegerTask ID
├─ deviceIp172.31.4.124StringPhysical Device IP
├─ errorMsg""StringReason for failure
├─ deviceOutCodeAC22030010000StringCloud Machine ID

Example request

{
	"deviceIps": [
		"172.31.4.124"
	],
	"type":2
}

Example of response

{
    "code": 200.
    "msg": "success",
    "ts": 1713773577581.
    "data": [
        {
            "taskId": 1,
            "deviceIp": "172.31.4.124",
            "errorMsg": null,
            "deviceOutCode": "AC22030010000"
        }
    ]
}

Error code

Error CodeError DescriptionRecommendations
110030Failed to execute power restart command, parameter request is not compliantParameter request is not compliant
110032Physical IP does not existPlease check if the physical device IP is correct.
110033Failed to execute the power failure restart commandContact the appropriate person.

Binding of public IPs

Example Binding Specified Public IP

Interface address

/openapi/open/network/bindIp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequiredParameter Description
publicIP116.162.203.188StringYesPublic IP to be bound
padIP10.255.1.53StringYesInstance IP

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject

Example request

{
    "publicIP": "116.162.203.188",
    "padIP": "10.255.1.53"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570337023.
	"data": {}
}

Unbundling of public IPs

Example unbinding information bound via the Bind Public IP interface

Interface address

/openapi/open/network/unbindIp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
publicIP116.162.203.188StringYesPublic IP to be bound
padIP10.255.1.53StringYesInstance IP

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject

Example request

{
    "publicIP": "116.162.203.188",
    "padIP": "10.255.1.53"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570337023.
	"data": {}
}

Request for RTC shared room token

Used to implement multiple instances in a room, the instances receive the room broadcast message for processing and implementation of obtaining the public flow

Room number generation rule: timer + userId + paas userId e.g. terimer = pc, userId = 123, paas userId = qwer

Room number: pc123qwer

Interface address

/rtc/open/room/share/applyToken

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
userId202StringYesBusiness user ID of the caller
terminalpcStringYesTerminal
expire3600IntegerNoToken validity period in seconds. Default is 1 hour
pushPublicStreamtrueBooleanNoWhether to push public stream (default is false)
padsArrayYesList of instances to join the shared room
├─padCodeAC22010010842StringYesInstance ID
├─├─videoStreamObjectNoStreaming configuration
├─├─├─videoStream1StringNo
├─├─├─frameRate30StringNo
├─├─├─bitrate2000StringNo

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─roomToken00165b749e52467a4016f050b8cQQBjDJKuTAbStringRoom Token
├─roomCodeandroid_12345StringRoom Number
├─appId65b749e52467a4016f050b8cStringApplication ID

Example request

{
	"userId": "202".
	"terminal": "pc".
	"expire": 3600.
	"pushPublicStream": true,
	"pads": [
		{
			"padCode": "AC22010010842".
			"videoStream": {
				"resolution": "1",
				"frameRate": "30",
				"bitrate": "2000"
			}
		},
		{
			"padCode": "AC22030010181".
			"videoStream": {
				"resolution": "1",
				"frameRate": "30",
				"bitrate": "2000"
			}
		}
	]
}

Example of response

{
	"code": 200.
	"msg": null,
	"data": {
		"roomToken": " 00165b749e52467a4016f050b8cQQBjDJKuTAbnZVwU52UOAENSTTExMDEwMDAwMDExAwAxMjMFAAAAAAAAXBTnZQEAXBTnZQIAXBTnZQMAXBTnZQQQAAAAAACAADCbuyT9crLX9MNUCWyFhsFXwb4nuFPxfgE7MqHjv4yQ =".
		"roomCode": "android_12345",
		"appId": "65b749e52467a4016f050b8c"
	}
}

Modify instance time zone

Interface address

/openapi/open/pad/updateTimeZone

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
timeZoneAsia/ShanghaiStringYesUTC Standard Time
padCodesArrayYesList of Instances

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─taskId24LongTask ID
├─padCodeAC22030010001StringRoom Number
├─vmStatusInstance StatusIntegerInstance Online Status (0: Offline; 1: Online)

Example request

{
	"padCodes": [
		"AC32010140003"
	],
	"timeZone": "Asia/Shanghai"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570663080.
	"data": [
		{
			"taskId": 24,
			"padCode": "AC32010140003",
			"vmStatus": 1
		}
	]
}

Modify instance language

Interface address

/openapi/open/pad/updateLanguage

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
languagezhStringYesLanguage
countryCNStringNoCountry
padCodesArrayYesList of Instances

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─taskId24LongTask ID
├─padCodeAC22030010001StringRoom Number
├─vmStatusInstance StatusIntegerInstance Online Status (0: Offline; 1: Online)

Example request

{
	"padCodes": [
		"AC32010140026"
	],
	"language": "zh",
	"country": ""
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570663080.
	"data": [
		{
			"taskId": 24,
			"padCode": "AC32010140026",
			"vmStatus": 1
		}
	]
}

Modification of instance SIM card information

Interface address

/openapi/open/pad/updateSIM

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
imei868034031518269StringNoIMEI Number
imeisv00StringNoIMEI Version Number
meidA0000082C65F6CStringNoMobile Equipment Identifier (MEID)
operatorLongnameCHINA MOBILEStringNoFull Name of the Operator
operatorShortnameCMSSStringNoShort Name of the Operator
operatorNumeric455555StringNoNetwork Operator ID (MCCMNC)
spnChinaStringNoSIM Card Operator Name
iccid89860002191807255576StringNoSIM Card Number
imsi460074008004488StringNoPrefix for SIM Card Operator Number: MCC (3 digits) + MNC (2 or 3 digits)
phonenum18574771704StringNoPhone Number
mcc502StringNoNetwork country
mnc146StringNoMobile device network code
padCodesArrayYesList of Instances

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─taskId24LongTask ID
├─padCodeAC22030010001StringRoom Number
├─vmStatusInstance StatusIntegerInstance Online Status (0: Offline; 1: Online)

Example request

{
  "padCodes": ["AC32010230011"],
          "imei": "868034031518269",
          "imeisv": "00",
          "meid": "A0000082C65F6C",
          "operatorLongname": "CHINA MOBILE",
          "operatorShortnam": "CMSS",
          "operatorNumeric": "455555",
          "spn": "China",
          "iccid": "89860002191807255576",
          "imsi": "460074008004488",
          "phonenum": "861234566",
          "netCountry": "US",
          "simCountry": "US",
          "type": "9",
          "mcc": "502",
          "mnc": "146",
          "tac": "871420",
          "cellid": "870091003",
          "narfcn": "99240",
          "physicalcellid": "6C"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570663080.
	"data": [
		{
			"taskId": 24,
			"padCode": "AC32010140033",
			"vmStatus": 1
		}
	]
}

Set instance latitude and longitude

Interface address

/openapi/open/pad/gpsInjectInfo

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
longitude116.397455FloatYesLatitude
latitude39.909187FloatYesLongitude
padCodesArrayYesList of Instances

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamp
dataObject
├─taskId24LongTask ID
├─padCodeAC22030010001StringRoom Number
├─vmStatusInstance StatusIntegerInstance Online Status (0: Offline; 1: Online)

Example request

{
	"padCodes": [
		"AC32010030001"
	],
	"longitude": 116.397455.
	"latitude": 39.909187
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570663080.
	"data": [
		{
			"taskId": 24,
			"padCode": "AC32010030001",
			"vmStatus": 1
		}
	]
}

Query instance agent information

Interface address

/openapi/open/network/proxy/info

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesArrayYesList of instances

Response parameters

Parameter NameSample ValueParameter TypeParameter Description
code200Integerstatus code
msgsuccessStringresponse message
ts1756021167163Longtimestamp
dataObject
├─taskId24LongTask ID
├─padCodeAC22030010001StringRoom Number
├─vmStatusInstance StatusIntegerInstance Online Status (0: offline; 1: online)

Example request

{
  "padCodes": [
    "AC32010140012"
  ]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1726742932284.
	"data": [
		{
			"taskId": 3612,
			"padCode": "AC32010140012",
			"vmStatus": 1
		}
	]
}

Modify Instance Android Attributes

props field description: this field is a key-value definition.

Interface address

/openapi/open/pad/updatePadAndroidProp

Request method

POST

Request data type

application/json

Request Body Parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodeAC32010210001Stringnoinstance id
restartfalseBooleanNoAutomatically restart when setup is complete (default false)
props{}ObjectYesSystem Properties
├─ro.product.vendor.nameOP52D1L1StringYesProperty Settings

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObjectString
├─taskId24LongTask id
├─padCodeAC32010210001Stringinstance id

Example request

{
"padCode": "AC32010210001",
"props": {
"ro.product.vendor.name": "OP52D1L1"
}, "restart": false
"restart": false
}

Response Example

{
   "code": 200,
   "msg": "success",
   "ts": 1730192434383,
   "data": {
      "taskId": 11, 
      "padCode": "AC32010210001"
   }
}

One Click New Machine

Note: One Click New Machine will erase all system data. Please use with caution!

One click new machine function, will be the current instance of data all clear, and reset Android properties!

  • Virtual machine directly set Android properties, and then clear all the data.
  • Cloud machine directly clear all the data (equivalent to reset)

**Interface address **

/openapi/open/pad/replacePad

Request Method > POST

POST

Request data type > application/json

application/json

**Request Body Parameters

Parameter Name | Example Value | Parameter Type | Required or Not | Parameter Description

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCode[]ArrYeslist of instance ids
countryCodeSGStringnocountry code(Country code (look specifically at: https://chahuo.com/country-code-lookup.html))

Response Parameters

Parameter nameExample valueParameter typeParameter description
code200IntegerStatus code
msgsuccessStringResponse message
ts1721739857317LongTimestamps
dataObject
├─taskId12818LongTaskId
├─padCodeAC22030010124StringInstance Number
├─vmStatus2IntgerInstance Status
{ "padCodes": [
  "AC32010030001"
]
}

Example of response

{
  "code": 200,
  "msg": "success",
  "ts": 1732270378320,
  "data": {
    "taskId": 8405,
    "padCode": "AC32010030001",
    "vmStatus": 2
  }
}

Modify Contacts

One of the fileUniqueId and info fields is required.

**Interface address **

/openapi/open/pad/updateContacts

Request Method > POST

POST

Request data type > application/json

application/json

**Request Body Parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodes[]ArrpadCodes
fileUniqueIdcfca25a2c62b00e065b417491b0cf07ffcStringNofileUniqueId
info{}ObjectNoinfo
├─firstNametomStringNofirstName
├─phone13111111111StringNophone
├─emailtom@gmail.comStringNoemail

Response Parameters

Parameter nameExample valueParameter typeParameter description
code200IntegerStatus code
msgsuccessStringResponse message
ts1721739857317LongTimestamps
dataObject
├─taskId12818LongTaskId
├─padCodeAC22030010124StringInstance Number
{
  "fileUniqueId": "cfca25a2c62b00e065b417491b0cf07ffc",
  "info": {
    "firstName": "tom",
    "phone": "13111111111",
    "email": "tom@gmail.com"
  },
  "padCodes": [
    "AC32010180326"
  ]
}

** Example of response **

{
  "code": 200,
  "msg": "success",
  "ts": 1730192434383,
  "data": {
    "taskId": 11,
    "padCode": "AC32010210001",
    "vmStatus": 0
  }
}

Instance of setting up a proxy

Interface address

/openapi/open/network/proxy/set

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
account2222Stringnoaccount
password2222Stringnopassword
ip47.76.241.5Stringnoip
port2222Integernoport
enabletrueBooleanyesenable
padCodesArrayYesList of instances
proxyTypevpnStringnoSupport parameters:proxy、vpn
proxyNamesocks5StringnoSupport parameters:socks5、http-relay

Response parameters

Parameter NameSample ValueParameter TypeParameter Description
code200Integerstatus code
msgsuccessStringresponse message
ts1756021167163Longtimestamp
dataObject
├─taskId24LongTask ID
├─padCodeAC22030010001StringRoom Number
├─vmStatusInstance StatusIntegerInstance Online Status (0: offline; 1: online)

Example request

{
  "padCodes": [
    "AC32010140023"
  ],
  "account": "2222",
  "password": "2222",
  "ip": "47.76.241.5",
  "port": 2222.
  "enable": true
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570663080.
	"data": [
		{
			"taskId": 24,
			"padCode": "AC32010140023",
			"vmStatus": 1
		}
	]
}

Server Configuration

Query the list of types supported by the server

interface address

/openapi/open/config/selectList

request method

GET

Request data type

parameterless

response parameter

parameter nameexample valueParameter typeParameter Description
code200Integer
msgsuccessString
ts1713773577581Long
dataObject
├─callbackName"File Upload Tasks"StringCallback Type Name
├─callbackType"4"StringCallback Type
├─id14LongID of the callback type (subsequent new modifications need to pass in this parameter)

Example of a request

Response Example

{
    "code": 200,
        "data": [
        {
            "callbackName": "interface address test",
            "callbackType": "4",
            "id": 14
        },
        {
            "callbackName": "interface address local",
            "callbackType": "5",
            "id": 15
        },
        {
            "callbackName": "interface address",
            "callbackType": "6",
            "id": 16
        }
    ],
        "msg": "success",
        "ts": 1734500966127
}

Query the current user-configured callback address

interface address

/openapi/open/config/selectCallback

request method

GET

Request data type

parameterless

response parameter

parameter nameexample valueParameter typeParameter Description
code200Integer
msgsuccessString
ts1713773577581Long
datahttp://www.baidu.comStringConfigured Corresponding Address

Example of a request

Response Example

{"code":200,"data":"http://www.baidu.com","msg":"success","ts":1734501602763}

Add callback address configuration

interface address

/openapi/open/config/insertCallback

request method

POST

Request data type

application/json

Request Query Parameters

parameter nameexample valueParameter typeRequired or notParameter Description
callbackIdList[1,2,3]Integer[]beA collection of callback type IDs (obtained from the type list interface of the query server support configuration)
├─callbackUrl192.168.1.1/testStringbeReceive task callback configuration URL

response parameter

parameter nameexample valueParameter typeParameter Description
code200Integer
msgsuccessString
ts1713773577581Long
data2StringConfigure the number of successful types

Example of a request

{"callbackIdList":[21,14],"callbackUrl":"localhost:8080/callback"}

Sample response

{"code":200,"data":2,"msg":"success","ts":1734502541732}

Modify the callback address configuration

interface address

/openapi/open/config/updateCallback

request method

POST

Request data type

application/json

Request Query Parameters

parameter nameexample valueParameter typeRequired or notParameter Description
callbackIdList[1,2,3]Integer[]beA collection of callback type IDs (obtained from the type list interface of the query server support configuration)
├─callbackUrl192.168.1.1/testStringbeReceive task callback configuration URL

response parameter

parameter nameexample valueParameter typeParameter Description
code200Integer
msgsuccessString
ts1713773577581Long
data2String

Example of a request

{"callbackIdList":[21,14],"callbackUrl":"localhost:8080/callback"}

Response Example

{"code":200,"data":2,"msg":"success","ts":1734502541732}

Delete the current user-configured callback address

interface address

/openapi/open/config/deleteCallback

request method

POST

Request data type

parameterless

response parameter

parameter nameexample valueParameter typeParameter Description
code200Integer
msgsuccessString
ts1713773577581Long
data4Long

Example of a request

Response Example

{"code":200,"data":22,"msg":"success","ts":1734503029282}

Instance manipulation

Asynchronous execution of ADB commands

Execute commands asynchronously in one or more cloud phone instances

Interface address

/openapi/open/pad/asyncCmd

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or Not RequiredParameter Description
padCodesString[]yes
├─AC22020020793StringYesInstance Number
scriptContentcd /root;lsStringYesADB commands, multiple commands separated by semicolons

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22020020793StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
    "padCodes": [
        "AC22020020793"
    ],
    "scriptContent": "cd /root;ls"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570297639.
	"data": [
		{
			"taskId": 14,
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 15,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110003Failed to execute ADB commandContact administrator
110012Command execution timeoutPlease try again later.

Synchronised execution of ADB commands

Synchronise command execution across one or more cloud phone instances

If no response is received for more than 5 seconds, a timeout exception is returned.

Interface address

/openapi/open/pad/syncCmd

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodeAC22020020793StringYesInstance ID
scriptContentcd /root;lsStringYesADB commands, multiple commands separated by semicolon

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22020020793StringInstance Number
├─taskStatus3IntegerTask Status (-1: total failure; -2: partial failure; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: complete)
├─taskResultSuccessStringTask Result

Example request

{
    "padCode": "VP21020010231".
    "scriptContent": "cd /root/nbin;ls"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data":[
				{
				"taskId": 1,
				"padCode": "AC22020020793".
				"taskStatus":3,
				"taskResult": "Success"
				}
			]
}

Error code

Error CodeError DescriptionRecommendations
110003Failed to execute ADB commandPlease try again later.
110012Command execution timeoutPlease try again later.

local screenshot

Instance screenshot.

Interface URL

openapi/open/pad/screenshot

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC21020010231StringYesInstance number
rotation0IntegerYesScreenshot Screen Horizontal and Vertical Screen Rotation: 0: the direction of the screenshot is not processed, the default; 1: when the screenshot screen is rotated to vertical: a: the screenshot of the mobile phone's vertical screen is not processed. b: the screenshot of the mobile phone's horizontal screen, the screenshot is rotated 90 degrees clockwise.
broadcastfalseBooleanNoWhether or not the event is broadcast (default false)

Response parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
code200IntegerYesStatus Code
msgsuccessStringYesResponse Message
ts1756021167163LongYesTimestamps
dataObject[]
├─taskId1IntegerNoTaskId
├─padCodeAC21020010231StringNoInstance Number
├─vmStatus1IntegerYesinstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC21020010231"
	],
	"rotation": 0,
	"broadcast": false
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570337023.
	"data": [
		{
			"taskId": 16,
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 17,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110001Screenshot FailedPlease try again.
110004Failed to execute reboot commandReboot again later
110028Instance does not existPlease check if the instance exists.

Generation of preview image

The specified instance gets the preview image.

Interface address

/openapi/open/pad/generatePreview

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC11010000031StringYesInstance Number
rotation0IntegerYesScreenshot Screen Horizontal and Vertical Screen Rotation: 0: the direction of the screenshot is not processed, the default; 1: when the screenshot screen is rotated to vertical: a: the screenshot of the mobile phone's vertical screen is not processed. b: the screenshot of the mobile phone's horizontal screen, the screenshot is rotated 90 degrees clockwise.
broadcastfalseBooleanNoWhether the event is broadcast (default false)

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─padCodeAC11010000031StringInstance Number
├─accessUrlhttp://xxx.armcloud.pngStringaccess address

Example request

{
    "padCodes": [
        "AC11010000031"
    ],
    "rotation": 0,
    "broadcast": false
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": [
		{
			"padCode": "AC11010000031".
			"accessUrl": "http://xxx.armcloud.png"
		}
	]
}

File Upload

Performing file upload operations

Interface address

/file-center/open/file/cache

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
fileUrlhttp://xxx.armcloud.apkStringYesFile download address
fileNametest.apkStringYesFile name
fileMd532e1f345f209a7dc1cc704913ea436d3StringYesExpected MD5 of the file, used for download file verification (max length: 32)

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject[]
├─taskId1IntegerTask ID
├─fileUniqueId6865b417b7257d782afd5ac8bee4d311StringUnique identifier for the file

Example request


{
    "fileUrl": "http://down.s.qq.com/download/11120898722/apk/10043132_com.tencent.fiftyone.yc.apk",
	"fileName": "Peachland Depths With Family Game Official Version.apk",
	"fileSha256": "c52585e13a67e13128d9963b2f20f69678a86ee8b5551ca593327d329719a5"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1713773577581.
	"data": {
		"taskId":1,
		"fileUniqueId": "6865b417b7257d782afd5ac8bee4d311"
	}
}

List of documents

Query the list of uploaded files

Interface address

/file-center/open/file/list

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
page1IntegerYesStarting page, default is 1
rows10IntegerYesNumber of records to query, default is 10

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject
├─page1IntegerCurrent page
├─rows10IntegerNumber of records per page
├─size2IntegerNumber of records on the current page
├─total2IntegerTotal number of records
├─totalPage1IntegerTotal number of pages
├─pageDataObject[]List of records
├─├─fileUniqueIdc417cdf30cd13437a60a494f2fcee616StringUnique identifier for the file
├─├─fileName15b18072b01049dfa30da046aaf5b213.apkStringFile name
├─├─fileMd549f526ec07f261ef6c22081fd61fb6b2836b84214ab6f4620e89d2f2d454253StringFile content value
├─├─fileSize165936779IntegerFile size (in bytes)
├─├─originUrlhttps://xxx.armcloud.apkStringOriginal file address
├─├─createTime1713884498000LongCreation time

Example request


{
    "page": 1,
	"rows": 10
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"page": 1,
		"rows": 10,
		"size": 2,
		"total": 2,
		"totalPage": 1,
		"pageData": [
			{
				"fileUniqueId": "c417cdf30cd13437a60a494f2fcee616",
				"fileName": "15b18072b01049dfa30da046aaf5b213.apk",
				"fileMd5": "49f526ec07f261ef6c22081fd61fb6b2836b84214ab6f4620e89d2f2d454253",
				"fileSize": 165936779.
				"originUrl": "https://xxx.armcloud.apk",
				"createTime": 1713884498000
			},
			{
				"uniqueId": "417996c783c70b946675b55a138b1bff",
				"name": "10043132_com.tencent.fiftyone.yc.apk",
				"sha256": "86f3dc7bf26219f56f3cdb51d787af3c165533ad1c70856a27c5d2a3a6b7647f",
				"size": 1091941761.
				"originUrl": "https://xxx.armcloud.apk",
				"createTime": 1713879614000
			}
		]
	}
}

Instance file upload

Push files from the File Management Centre to one or more cloud phone instances (asynchronous task)

Interface address

/openapi/open/pad/v2/uploadFile

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22030023061StringYesInstance Number
autoInstall1IntegerNoWhether autoinstall is required 1 required, 0 not required. 0 is not required. Leave this field blank to indicate that it is not required. Only for apk-type files.
fileUniqueId1e5d3bf00576ee8f3d094908c0456722StringYesFile id unique identifier.
customizeFilePath/Documents/StringNoCustomise the path. Not mandatory, must start with /.

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─padCodeAC22010020062StringInstance Number
├─taskId1IntegerTaskId
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC22030023061"
	],
	"autoInstall": 1,
	"fileUniqueId": "1e5d3bf00576ee8f3d094908c0456722",
	"customizeFilePath": "/Documents/"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717571059834.
	"data": [
		{
			"taskId": 39.
			"padCode": "AC22030010001",
			"vmStatus": 1
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
140006Incorrect file storage pathCustom paths must begin with /.
140005File not availableFile path is empty
110006Download FailedFile Path Cannot Be Downloaded

upgraded mirror

Batch Instance Image Upgrade

Interface address

/openapi/open/pad/upgradeImage

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22030010182StringYesInstance Number
imageIdmg-24061124017StringYesImageId
wipeDatafalseBooleanYeswhether to wipe the instance data (data partition), true clears, false does not clear

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─padCodeAC22030010182StringInstance Number
├─taskId1IntegerTaskId
├─errorMsg""StringError Message

Example request

{
    "padCodes": [
        "AC22030010182"
    ],
    "wipeData": false,
    "imageId": "mg-24061124017"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1718594881432.
	"data": [
		{
			"taskId": 63.
			"padCode": "AC22030010182".
			"errorMsg": null
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110041Mirror does not existMirror id passed incorrectly
110037Failed to execute upgrade image commandInstance state is wrong, contact administrator
110038Failed to execute upgrade image commandIncorrect instance status, contact administrator

Batch access to instance model information

Get the model information of the corresponding instance in bulk based on the instance number.

Interface address

/openapi/open/pad/modelInfo

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22030010182StringYesInstance Number

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─padCodeAC22030010182StringInstance Number
├─imei524803173613682StringIMEI
├─serialno01NM5ON34M4OStringSerial Number
├─wifimac04:3a:6c:e5:e9:8d:62:d6:4aStringWi-Fi's mac address
├─androididaa6bcedf1426546cStringAndroid instance unique identifier
├─modelMi 10 ProStringModels
├─BrandXiaomiStringBrands
├─manufacturerXiaomiStringManufacturer
├─isRoot1StringWhether or not it is ROOT privilege
├─width720IntegerThe width of the cloud phone Maximum 1080
├─height1280IntegerHeight of cloud phone Maximum 1920
├─memoryLimit1024IntegerMemory Limit

Example request

{
    "padCodes": [
        "AC22030010182"
    ]
}

Example of response

{
  "code": 200.
  "msg": "success",
  "ts": 1756021167163.
  "data": [
    {
      "padCode": "AC22030010182".
      "imei": "524803173613682",
      "serialno": "01NM5ON34M4O",
      "wifimac": "04:3a:6c:e5:e9:8d:62:d6:4a",
      "androidid": "aa6bcedf1426546c",
      "model": "Mi 10 Pro".
      "brand": "Xiaomi",
      "manufacturer": "Xiaomi",
      "isRoot": "1",
      "width": 720,
      "height": 1280.
      "memoryLimit": 1024
    }
  ]
}

Add application blacklist list

Add application blacklists based on instance specifications.

Interface address

/openapi/open/appBlack/setUpBlackList

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padGradeq2-1StringYesInstance Specification
blackAppsObject[]YesBlackListList
├─appPkgcn.v8box.appStringYesApp Package Name
├─appNamex8 SandboxStringYesApplication Name

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1721647657112LongTimestamps
data""String

Example request

{
	"padGrade": "q2-1".
	"blackApps": [
		{
			"appPkg": "cn.v8box.app",
			"appName": "x8 Sandbox"
		}
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1721647657112.
	"data": null
}

Set instance blacklist

Set up instance blacklists based on instance specifications.

Interface address

/openapi/open/pad/triggeringBlacklist

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padGradeq2-1StringYesInstance Specification
padCodesString[]No
├─AC22030010124StringNoInstance No.

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1721739857317LongTimestamps
dataObject[]
├─taskId12818IntegerTaskId
├─padCodeAC22030010124StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"padGrade": "q2-4".
	"padCodes": [
		"AC22030010124"
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1721739857317.
	"data": [
		{
			"taskId": 12818,
			"padCode": "AC22030010124".
			"vmStatus": 1
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110051No application blacklist configuration exists for this specificationneed to add specification application blacklist list
110028Instance doesn't existPassed parameter incorrectly
110052Failed to execute Set Application Blacklist commandPlease try again.

Set instance bandwidth

Set the instance bandwidth according to the instance number.

Interface address

/openapi/open/pad/setSpeed

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22030010124StringYesInstance Number
upBandwidth10.00floatyesupBandwidth Mbps (0: no restriction; -1: restriction of internet access)
downBandwidth10.00floatyesdownBandwidth Mbps (0: no restriction; -1: restriction of Internet access)

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1721739857317LongTimestamps
dataObject[]
├─taskId679IntegerTaskId
├─padCodeAC32010140011StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC32010140011"
	],
	"upBandwidth": 10.00,
	"downBandwidth": 10.00
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1721640654237.
	"data": [
		{
			"taskId": 679.
			"padCode": "AC32010140011",
			"vmStatus": 1
		}
	]
}

Enable/Disable ADB

Enable or disable ADB for an instance based on its instance ID.

API Endpoint

/openapi/open/pad/adb

Request Method

POST

Request Content Type

application/json

Request Body Parameters

ParameterExampleTypeRequiredDescription
padCodesAC22030010124StringYesInstance ID
enabletruebooleanYestrue - enable, false - disable

Response Parameters

ParameterExampleTypeDescription
code200IntegerStatus code
msgsuccessStringResponse message
ts1721739857317LongTimestamp
dataObject[]
├─padCodeAC32010140011StringInstance ID
├─commandadb connect ip:portStringADB connection info
├─expireTime2024-10-24 10:42:00StringConnection expiration
├─enabletruebooleanADB status

Request Example

{
  "padCode": "AC22030010001",
  "enable": true
}

Response Example

{
  "code": 200,
  "msg": "success",
  "ts": 1729651701083,
  "data": {
    "padCode": "AC32010161274",
    "command": "adb connect ip:port",
    "expireTime": "2024-10-24 10:42:00",
    "enable": true
  }
}

Information on the list of instances

Paging to get instance list information based on query criteria.

Interface address

/openapi/open/pad/infos

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
page1IntegerYesPage number
rows10IntegerYesNumber of records
padCodesString[]No
├─AC22010020062StringYesInstance number
groupIdsInteger[]No
├─1IntegerNoInstance group ID

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200Integer
msgsuccessString
ts1713773577581Long
dataObject
├─page1IntegerCurrent page
├─rows10IntegerNumber of records per page
├─size1IntegerNumber of records on the current page
├─total1IntegerTotal number of records
├─totalPage1IntegerTotal number of pages
├─pageDataObject[]List of records
├─├─padCodeVP21020010391StringInstance number
├─├─padGradeq1-2StringInstance opening (q1-6 for six openings, q1-2 for two openings)
├─├─padStatus10StringInstance status (10-running, 11-restarting, 12-resetting, 13-upgrading, 14-abnormal, 15-not ready)
├─├─groupId0IntegerGroup ID
├─├─idcCoded3c1f580c41525e514330a85dfdecda8StringData center code
├─├─deviceIp192.168.0.0StringCloud machine IP
├─├─padIp192.168.0.0StringInstance IP
├─├─appsString[]List of installed applications
├─├─├─armcloud001StringInstalled application

Example request

{
	"page": 1,
	"rows": 10,
	"padCodes": [
		"AC21020010391"
	],
	"groupIds":[1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"page": 1,
		"rows": 1,
		"size": 1,
		"total": 1.
		"totalPage": 1,
		"pageData": [
			{
				{
				"padCode": "AC21020010391".
				"padGrade": "q2-4".
				"padStatus": 10,
				"groupId": 0,
				"idcCode": "8e61ad284bc105b877611e6fef7bdd17",
				"deviceIp": "172.31.2.34",
				"padIp": "10.255.1.19",
				"apps": [
					"armcloud001"
				]
			}
		]
	}
}

List of Example Groupings

Get a list of all instances grouped by the user (including: group ID, group name, number of instances under the group). Interface address

/openapi/open/group/infos

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodeAC21020010391StringNoInstance No.
groupIdsInteger[]No
├──1IntegerNoGrouping ID

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─groupId1IntegerGroupId
├─groupNameGroup1StringGroup Name
├─padCount1IntegerNumber of instances under the grouping

Example request

{
	"padCode": "AC21020010391".
	"groupIds": [1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": [
			{
				"groupId": 1,
				"groupName": "Grouping One",
				"padCount": 1
			}
	]
}

Get information on specified public network bindings

Query the IP address information of the specified public IP binding Interface address

/openapi/open/network/getIP

Mode of request

GET

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
publicIP116.162.203.188StringYespublic IP

Response parameters

Parameter NameSample ValueParameter TypeParameter Description
code200Integerstatus code
msgsuccessStringresponse message
ts1756021167163Longtimestamp
dataObject[]
├─ipAddresses["10.255.14.29/32"]String[]Bound IP Addresses

Example request

/openapi/open/network/getIP?publicIP=116.162.203.188

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570337023.
	"data": {
		"ipAddresses": [
			"10.255.14.29/32"
		]
	}
}

Application management

Application upload

Upload application installation files to the Application Management Centre of the specified business (asynchronous task).

Interface address

/file-center/open/app/cache

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
parsetrueBooleanYesWhether to cache and parse (parse and cache). If parsed, package information is not required.
appsObject[]YesList of applications
├─ appId1243IntegerNoCustom application ID
├─ urlhttps://xxx.armcloud.apkStringYesSource file download address
├─ appNamekuaishouStringNoApplication name
├─ pkgNamecom.smile.gifmakerStringNoPackage name
├─ signMd50F938C4F0995A83C9BF31F0C64322589StringNoApplication signature MD5
├─ versionNo36000IntegerNoVersion number
├─ versionName12.3.20.36000StringNoVersion name
├─ descriptionkuaiStringNoDescription
├─ md5sume673a204b8f18a0f6482da9998StringNoUnique identifier for the application

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject[]
├─ taskId12IntegerTask ID
├─ appId1243IntegerApplication ID

Example request

{
	"parse": true,
	"apps": [
		{ 
			"appId": 1243.
			"appName": "kuaishou",
			"url": "https://xxx.armcloud.apk",
			"pkgName": "com.smile.gifmaker",
			"signMd5": "0F938C4F0995A83C9BF31F0C64322589",
			"versionNo": 36000.
			"versionName": "12.3.20.36000",
			"description": "kuai".
			"md5sum": "e673a204b8f18a0f6482da9998"
		}
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": [
			{
				"taskId": 12,
				"appId": 1243
			}
	]
}

Error code

Error CodeError DescriptionRecommendations
100001No accessNo server room ordered

Application List

The list of application information can be queried according to the application ID.

Interface address

/file-center/open/app/list

Mode of request

POST

Request data type

application/json

Request for Query parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
page1IntegerYesStarting page, default is 1
rows10IntegerYesNumber of records to query, default is 10
appIdsInteger[]NoApplication IDs

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
pageDataObject
├─ page1IntegerCurrent page
├─ rows10IntegerNumber of items displayed per page
├─ size10IntegerNumber of items in the current page
├─ total2IntegerTotal number of items
├─ totalPage1IntegerTotal number of pages
├─ pageDataObject[]
├─ ├─ originUrldownloadUrl_tr0biStringOriginal download URL
├─ ├─ appIddwadawdfIntegerCustom application ID
├─ ├─ descriptiondescription_1cq3mStringDescription
├─ ├─ packageNamepackageName_e6lw8StringPackage name
├─ ├─ appNameappName_o4mhnStringApplication name
├─ ├─ versionNameversionName_s4o2iStringVersion name
├─ ├─ versionNo1IntegerVersion number
├─ ├─ signMd50F938C4F0995A83C9BF31F0C64322589StringMD5 checksum
├─ ├─ availabletrueBooleanIndicates if the current file is available
├─ ├─ createTime1709895492000IntegerCreation time

Example request


{
    "rows": 10,
    "page": 1,
    "appIds": [
        1, 2
    ]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"page": 1,
		"rows": 10,
		"size": 10,
		"total": 30.
		"totalPage": 3,
		"pageData": [
			{
				"originUrl": "downloadUrl_tr0bi",
				"appId": 1,
				"description": "description_1cq3m".
				"packageName": "packageName_e6lw8",
				"appName": "appName_o4mhn".
				"versionName": "versionName_s4o2i".
				"versionNo": 1.
				"signMd5": "0F938C4F0995A83C9BF31F0C64322589",
				"available": true,
				"createTime": 1709895492000
			},
			{
				"originUrl": "downloadUrl_xh9ig",
				"appId": 2,
				"description": "description_9j663".
				"packageName": "packageName_o7t9j",
				"appName": "appName_szxpe",
				"versionName": "versionName_hwio7",
				"versionNo": 1.
				"signMd5": "0F938C4F0995A83C9BF31F0C64322587",
				"available": true,
				"createTime": 1710479133000
			}
		]
	}
}

Application details

Querying Application Installations on a Specified Instance

Interface address

/file-center/open/app/detail

Mode of request

POST

Request data type

application/json

Request for Query parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
appId1IntegerYesappid

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject
├─appId1Integerapplication id
├─originUrlhttp://www.xx.com/test.apkStringOriginal file download address
├─descriptiontestStringCustom Description
├─packageNamexxx.xxx.comStringPackage Name
├─appNametestStringApplication Name
├─versionName1.0.1StringVersion Name
├─versionNo124511IntegerversionNo
├─signMd50F938C4F0995A83C9BF31F0C64322589Stringsignature md5
├─createTime1711595044000IntegerFile Creation Time

Example request

{
	"appId":1
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"appId": 1,
		"originUrl": "http://www.xx.com/test.apk",
		"customizeFileId": "customiseId_v5o26",
		"description": "test",
		"packageName": "xxx.xxx.com",
		"appName": "test",
		"versionName": "1.0.1",
		"versionNo": 124511.
		"signMd5": "0F938C4F0995A83C9BF31F0C64322589",
		"createTime": 1711595044000
	}
}

Query Instance application list

Querying the list of uploaded files

Interface address

/openapi/open/pad/listApp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]No
├─AC22010020062StringYesInstance Number

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22010020062StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
    "padCodes": [
        "AC22010020062"
    ]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570838398.
	"data": [
		{
			"taskId": 31,
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 32,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
100010Processing FailedPlease reinstall.

Application Installation

Installs a single or multiple apps simultaneously for a single or multiple instances. this interface operates asynchronously.

Interface address

/openapi/open/pad/installApp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
appsObject[]YesApps List
├─appId124IntegerYesappId
├─appNameHulu ManStringYesApp Name
├─pkgNamecom.huluxia.gametoolsStringYesApplication Package Name
├─PadCodesString[]Yes
├───AC22010020062StringYesInstance No.

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22010020062StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"apps":[
		{
			"appId":124,
			"appName": "hulu".
			"pkgName": "com.huluxia.gametools",
			"padCodes":["AC22010020062"]
		}
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570991004.
	"data": [
		{
			"taskId": 37.
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 38.
			"padCode": "AC22030010002".
			"vmStatus": 1
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
140005File unavailableCheck if file exists

Application uninstallation

For single or multiple instances to uninstall single or multiple apps at the same time. this interface operates asynchronously.

Interface address

/openapi/open/pad/uninstallApp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
appsObject[]YesApplication list
├─ appId124IntegerYesApplication ID
├─ appName葫芦侠 (HuluXia)StringYesApplication name
├─ pkgNamecom.huluxia.gametoolsStringYesApplication package name
├─ padCodesString[]Yes
├─ ├─AC22010020062StringYesInstance number

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject[]
├─ taskId2IntegerTask ID
├─ padCodeAC22010020062StringInstance number
├─ vmStatus1IntegerInstance online status (0: offline; 1: online)

Example request

{
	"apps":[
		{
			"appId":124,
			"appName": "demo",
			"pkgName": "com.demo",
			"padCodes":["AC22010020062"]
		}
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570615524.
	"data": [
		{
			"taskId": 22,
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 23,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110007Failed to uninstall applicationTry again later

Application Launch

Performs application startup operations on the instance based on the instance number and application package name.

Interface address

/openapi/open/pad/startApp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValuesParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22010020062StringYesInstance Number
pkgNamexxx.test.comStringYespackage name

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22020020793StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC22030022693"
	],
	"pkgName": xxx.test.com
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570663080.
	"data": [
		{
			"taskId": 24,
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 25,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110008Failed to launch applicationReboot the cloud and then launch the application again

Application Stop

Performs an application stop operation on an instance based on the instance number and application package name.

Interface address

/openapi/open/pad/stopApp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22010020062StringYesInstance Number
pkgNamexxx.test.comStringYesPackage Name

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22010020062StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC22010020062"
	],
	"pkgName": xxx.test.com
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570700415.
	"data": [
		{
			"taskId": 26.
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 27,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110010Failed to stop the applicationRestarting the cloud shutdown application

Application restart

Performs an application restart operation on an instance based on the instance number and application package name.

Interface address

/openapi/open/pad/restartApp

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
padCodesString[]yes
├─AC22010020062StringYesInstance Number
pkgNamexxx.test.comStringYesPackage Name

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22010020062StringInstance Number
├─vmStatus1Integerinstance online status (0: offline; 1: online)

Example request

{
	"padCodes": [
		"AC22030022693"
	],
	"pkgName": xxx.test.com
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1717570855874.
	"data": [
		{
			"taskId": 33.
			"padCode": "AC22030010001",
			"vmStatus": 1
		},
		{
			"taskId": 34,
			"padCode": "AC22030010002".
			"vmStatus": 0
		}
	]
}

Error code

Error CodeError DescriptionRecommendations
110009Failed to restart the applicationRestart the cloud machine and then start the application again

Mirror management

Create mirror upload task

Create a mirror upload task. (Asynchronous task)

Interface address

/openapi/open/image/uploadImage

Mode of request

POST

Request data type

application/json

Request for Query parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
imageFilesObject[]Yes
├─ imageFileUrlhttps://xxxx.xx.xx/image/armcloud_v13.2.1-alpha05.tarStringYesFile download address
├─ imageTagv13.2.1-alpha05StringYesImage Tag
serverTypeCruise10StringYesSOC type (currently supports: Cruise10)
romVersionandroid10StringYesAOSP version (currently supports: android10, android13)

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1717643679112LongTimestamp
dataObject
├─ imageTaskIdsObject[]Task list
├─ ├─14IntegerTask ID
├─ errorListObject[]Failed upload image task information
├─ ├─ imageTagv13.2.1-alpha05StringImage Tag
├─ ├─ errorMessageDo not submit images repeatedlyStringError reason

Example request

{
    "imageFiles": [
        {
            "imageFileUrl": "https://app.armcloud.net/image/armcloud_10.2.1-alpha45.tar",
            "imageTag": "v13.2.1-alpha05"
        }
    ],
    "serverType": "Cruise10".
    "romVersion": "android10.0"
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1718868267973.
	"data": {
		"imageTaskIds": [
			14
		],
		"errorList": [
			{
				"imageTag": "v13.2.1-alpha05",
				"errorMessage": "Do not submit images repeatedly"
			}
		]
	}
}

Error code

Error CodeError DescriptionRecommendations
500Incorrect request parameterPlease output the passed parameter normally.
110040Account does not existIs account incorrect
110039Task add failedPlease try again

Task management

Documentation Mission Details

Queries detailed information about the execution results of the specified file task.

Interface address

/task-center/open/task/fileTaskDetail

Mode of request

POST

Request data type

application/json

Request for Query parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
taskIdsInteger[]Yes
├─ taskId1IntegerYesTask ID

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject[]Task list details
├─ taskId1IntegerSubtask ID
├─ appId134LongApplication ID
├─ fileUniqueIde2c07491309858c5cade4bfc44c03724StringUnique file identifier
├─ fileNamexx.apkStringFile name
├─ taskStatus2IntegerTask status (-1: failed; -2: partially failed; -3: canceled; -4: timeout; 1: pending; 2: in progress; 3: completed)
├─ endTime1713429401000LongSubtask end timestamp

Example request

{
	"taskIds":[
		1,2
	]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1716283460673.
	"data": [
		{
			"taskId": 1,
			"appId": 134.
			"fileUniqueId": "e2c07491309858c5cade4bfc44c03724",
			"fileName": "xx.apk",
			"taskStatus": 2,
			"endTime": 1713429401000
		},
		{
			"taskId": 2,
			"appId": 135,
			"fileUniqueId": "e2c07491309858c5cade4bfc43c03725",
			"fileName": "xx.apk",
			"taskStatus": 2,
			"endTime": 1713429401001
		}
	]
}

i

Details of instance operation tasks

Queries detailed information about the execution results of the specified instance operation task.

Interface address

/task-center/open/task/padTaskDetail

Mode of request

POST

Request data type

application/json

Request for Query parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
taskIdsInteger[]yes
├─taskId1IntegerYesTaskId

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject []Subtask List Details
├─ taskId1IntegerSubtaskId
├─ padCodeVP22020020793StringInstance Identifier
├─ taskStatus2String TODO Type Usage ErrorTaskStatus (-1: total failure; -2: partial failure; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: completed)
├─ endTime1713429401000LongSubtask End Timestamps
├─ taskContent""StringtaskContent
├─ taskResult""StringTask Result
├─ errorMsg""StringError Message

Example request

{
	"taskIds":[1,2]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1716283460673.
	"data": [
		{
			"taskId": 1,
			"padCode": "AC22030022441".
			"taskStatus": 2,
			"endTime": 1713429401000.
			"taskContent": null,
			"taskResult": null
		},
		{
			"taskId": 2,
			"padCode": "AC22030022442".
			"taskStatus": 2,
			"endTime": 1713429401001.
			"taskContent": null,
			"taskResult": null
		}
	]
}

List of mandates

Queries list information about instances, applications, and other related tasks.

Interface address

/task-center/open/task/list

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
type1002IntegerYesTask type (1000: instance restart; 1001: instance reset; 1002: pad execute command; 1003: download application; 1004: application uninstall; 1005: application stop; 1006: application restart; 1007: application start; 1008: local screenshot; 1009: download file; 1010: modify instance properties; 1011: query installed applications; 1012: upgrade image; 1013: application installation; 1014: application cleanup; 2000: upload file; 2001: delete file)
page1IntegerYesStarting page, default is 1
rows10IntegerYesQuery quantity, default is 10

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject
├─ page1IntegerCurrent page
├─ rows10IntegerNumber of items per page
├─ size10IntegerNumber of items in current page
├─ total30IntegerTotal quantity
├─ totalPage3IntegerTotal pages
├─ pageDataObject[]
├─ ├─ taskBatchId9d4b45447172732670c10808d630e454StringBatch number
├─ ├─ taskBatchStatus2IntegerTask status (-1: all failed; -2: partially failed; -3: canceled; -4: timeout; 1: pending; 2: in progress; 3: completed)
├─ ├─ type1002IntegerTask type (same description as above)
├─ ├─ createTimestamp1713429395000LongTask creation timestamp
├─ ├─ subTasksObject[]
├─ ├─ ├─ taskId1IntegerSubtask ID
├─ ├─ ├─ padCodeAC22030022441StringInstance number
├─ ├─ ├─ fileUniqueIde2c07491309858c5cade4bfc44c03724StringUnique file identifier
├─ ├─ ├─ taskStatus2IntegerTask status (same description as above)
├─ ├─ ├─ endTime1713429401000LongSubtask end timestamp

Example request

{
    "page": 1,
	"rows": 10,
	"type":1000
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data": {
		"page": 1,
		"rows": 10,
		"size": 10,
		"total": 310.
		"totalPage": 31.
		"pageData": [
			{
				"taskBatchId": "9d4b45447172732670c10808d630e454",
				"taskBatchStatus": 2,
				"type": 1002,
				"createTimestamp": 1713429395000,
				"subTasks": [
					{
						"taskId": 1,
						"padCode": "AC22030022441".
						"fileUniqueId": "e2c07491309858c5cade4bfc44c03724",
						"taskStatus": 2,
						"endTime": 1713429401000
					}
				]
			}
		]
	}
}

Get the result of the instance execution script

Get the result of the instance's script execution by executing the script task ID.

Interface address

/task-center/open/task/executeScriptInfo

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeRequired or NotParameter Description
taskIdsInteger []yes
├── 1IntegerNoTask ID

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─taskId1IntegerTaskId
├─padCodeAC22020020793StringInstance Number
├─taskStatus3IntegerTask Status (-1: total failure; -2: partial failure; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: complete)
├─endTime1756021166163LongTask Execution End Time
├─taskContentSuccessStringTask Content
├─taskResultSuccessStringTask Result

Example request

{
	"taskIds": [1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1756021167163.
	"data":[
				{
				"taskId": 1,
				"padCode": "AC22020020793".
				"taskStatus":3,
				"taskResult": "Success",
				"endTime": "1756021166163",
				"taskContent": "Success"
				}
			]
}

Get file upload task results

Get the file upload result of the instance by the file upload task ID.

Interface address

/task-center/open/task/cacheFileResult

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
taskIdsInteger[]Yes
├─1IntegerYesTask ID

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
dataObject[]
├─ fileListObject[]
├─ ├─ taskId1IntegerTask ID
├─ ├─ taskStatus3IntegerTask status (-1: all failed; -2: partially failed; -3: canceled; -4: timeout; 1: pending; 2: in progress; 3: completed)
├─ ├─ fileNamexxx.apkStringFile name
├─ ├─ fileUniqueId6865b417b7257d782afd5ac8bee4d311StringUnique file identifier
├─ ├─ appId""IntegerApplication ID
├─ ├─ endTime1756021166163LongTask execution end timestamp

Example request


{
	"taskIds": [1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts": 1713773577581.
	"data": {
		"fileList":[
			"taskId":1,
			"taskStatus":3,
			"fileName": "xxx.apk",
			"fileUniqueId": "6865b417b7257d782afd5ac8bee4d311",
			"appId": null,
			"endTime": 1756021166163
		]
	}
}

Get instance screenshot results

Get the screenshot result of the instance by screenshot task ID.

Interface URL

/task-center/open/task/screenshotInfo

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
taskIdsInteger[]Yes
├─1IntegerNoTask ID

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
data-Object[]Task list details
├─ taskId1IntegerTask ID
├─ taskStatus3IntegerTask status (-1: all failed; -2: partially failed; -3: canceled; -4: timeout; 1: pending; 2: in progress; 3: completed)
├─ padCodeAC22020020793StringInstance number
├─ taskContentSuccessStringTask content
├─ taskResultSuccessStringTask result
├─ endTime1756121167163StringTask execution end time

Example request

{
	"taskIds": [1]
}

Example of response

{
	"code": 200.
	"msg": "success",
	"ts":1713773577581.
	"data":[
				{
				"taskId": 1,
				"taskStatus": 3,
				"padCode": "AC22020020793".
				"taskContent": "Success",
				"taskResult": "Success",
				"endTime": 1756121167163
				}
			]
}

Application start/stop implementation results

Get the results of an instance's application start/stop by its application start/stop task ID

Interface address

/task-center/open/task/appOperateInfo

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter Name | Example Value | Parameter Type | Required or Not | Parameter Description --- | --- | --- | --- | --- | --- taskIds | | Integer [] | yes | ├── 1 | Integer | Yes | Task ID

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus Code
msgsuccessStringResponse Message
ts1756021167163LongTimestamps
dataObject[]
├─ taskId1IntegerTaskId
├─ padCodeAC22020020793StringExample Number
├─ taskStatus3IntegerTaskStatus (-1: total failure; -2: partial failure; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: complete)
├─ endTime1756021166163LongTask execution end time
├─ taskContentSuccessStringTaskContent
├─ taskResultSuccessStringTask Result

Example request

{
    "taskIds": [1]
}

Example of response

{
    "code": 200.
    "msg": "success",
        "ts":1713773577581.
    "data":[
        {
            "taskId": 1,
            "taskStatus": 3,
            "padCode": "AC22020020793".
            "taskContent": "Success",
            "taskResult": "Success",
            "endTime": 1756121167163
        }
    ]
}

Instance restart reset execution results

Get the instance restart reset execution result by task ID.

Interface address

/task-center/open/task/padExecuteTaskInfo

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
taskIdsInteger[]Yes
├─1IntegerYesTask ID

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
data-Object[]
├─ taskId1IntegerTask ID
├─ padCodeAC21020010001StringInstance number
├─ taskStatus3IntegerTask status (-1: all failed; -2: partially failed; -3: canceled; -4: timeout; 1: pending; 2: in progress; 3: completed)
├─ endTime1756021167163LongTask execution end time
├─ taskContent""StringTask content
├─ taskResultSuccessStringTask result

Example request

{
    "taskIds": [1]
}

Example of response

{
    "code": 200.
    "msg": "success",
        "ts": 1756021167163
    "data":[
        {
            "taskId": 1,
            "padCode": "AC22030022911".
            "taskStatus": 3,
            "endTime": 1756021166163.
            "taskContent": null,
            "taskResult": "Success"
        }
    ]
}

Mirror upload task result query

Get mirror upload task results by task ID.

Interface address

/task-center/open/task/imageUploadResult

Mode of request

POST

Request data type

application/json

Request Body parameters

Parameter NameExample ValueParameter TypeIs RequiredParameter Description
taskIdsInteger[]Yes
├─36IntegerYesTask ID

Response Parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1718262521168LongTimestamp
data-Object[]
├─ taskId36IntegerTask ID
├─ taskStatus2IntegerTask status (-1: creation failed; 1: in progress; 2: creation successful)
├─ errorMsg""StringError message

Example request

{
    "taskIds": [1]
}

Example of response

{
    "code": 200.
    "msg": "success",
        "ts": 1718262521168.
    "data": [
        {
            "taskId": 36,
            "taskStatus": 2,
            "errorMsg": ""
        }
    ]
}

SDK Token Issuance

Issue a temporary STS Token for authentication of the user accessing the cloud phone service.

Get SDK temporary token

Interface address

/openapi/open/token/stsToken

Mode of request

GET

Request data type

application/json

Request example

package com.xiaosuan.api.utils;

import com.alibaba.fastjson.TypeReference;
import com.xiaosuan.armcloud.sdk.configure.ArmCloudConfig;
import com.xiaosuan.armcloud.sdk.constant.ArmCloudApiEnum;
import com.xiaosuan.armcloud.sdk.http.DefaultHttpExecutor;
import com.xiaosuan.armcloud.sdk.model.Result;
import com.xiaosuan.armcloud.sdk.service.ArmCloudApiService;
import com.xiaosuan.armcloud.sdk.service.impl.ArmCloudApiServiceImpl;

import java.util.HashMap;

public class test {
    /**
     * 获取sts_token
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {

        ArmCloudConfig armCloudConfig = new ArmCloudConfig();
        armCloudConfig.setOpenUrl("https://xxx");
        armCloudConfig.setService("armcloud-paas");
        armCloudConfig.setHost("xxx");
        armCloudConfig.setAk("xxxxxx");
        armCloudConfig.setSk("xxxxxx");
        ArmCloudApiService armcloudApiService = new ArmCloudApiServiceImpl(armCloudConfig, new DefaultHttpExecutor());
        Result<Object> result = armcloudApiService.execute(ArmCloudApiEnum.STS_TOKEN,new HashMap<>(), new TypeReference<Result<Object>>() {});
        System.out.println(result);

    }
}

Response parameters

Parameter NameExample ValueParameter TypeParameter Description
code200IntegerStatus code
msgsuccessStringResponse message
ts1756021167163LongTimestamp
data-Object
├─ token18df5803-48ce-4b53-9457-6a15feb1dacaStringSDK communication token

Example of response

{
    "code": 200.
    "msg": "success",
        "ts":1713773577581.
    "data": {
        "token": "18df5803-48ce-4b53-9457-6a15feb1daca"
    }
}

Error code

Error CodeError DescriptionRecommendations
100004Invalid keyRefer to the interface description to check the request parameters and passed values

SDK Token Issuance(Based on padCode)

Issue a temporary STS Token to be used to authenticate the user accessing the cloud phone service (the token can only be used for the requested padCode).

Get SDK temporary token (based on padCode)

interface address

/openapi/open/token/stsTokenByPadCode

request method

POST

Request data type

application/json

Request Body Parameters

parameter nameexample valueParameter typeRequired or notParameter Description
padCodeAC32010230001StringyesInstance code

Example of a request

{"padCode":"AC32010230001"}


Example of a request

parameter nameexample valueParameter typeParameter Description
code200Integerstatus code
msgsuccessStringresponse message
ts1756021167163Longtimestamp
dataObject
├─token18df5803-48ce-4b53-9457-6a15feb1dacaStringsdk通信token

Response Example

{"code":200,"msg":"success","ts":1735209109185,"data":{"token":"8c443217-6950-4e69-92ba-0e21a2b9a71d,MoreLogin"}}

Configuration instructions

The customer needs to configure the callback address in the customer's open platform, and if the address is successfully configured, receiving callback information will be enabled by default.

Asynchronous execution of ADB command callbacks

Scenarios of use

Client calls to asynchronously execute ADB commands are notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1taskid
padCodeStringAC22030022001Instance Identifier
taskStatusInteger3taskStatus (-1: total failure; -2: partial failure; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: complete)
endTimeLong1756021166163Task execution end time
taskResultStringSuccesstaskResult
taskContentStringTaskContent
cmdStringcd /root;lsExecuted Commands
cmdResultString/wsExecuted Command Returns

Instance file upload callbacks

Scenarios of use

Clients calling the instance file upload api are notified via this callback interface.

FieldTypeExampleDescription
taskIdInteger1Task ID
resultBooleantrueExecution result: true for success, false for failure
errorCodeStringError code
padCodeStringAC22030022001Instance number
fileIdStringcf08f7b685ab3a7b6a793b30de1b33ae34File ID

Application installation callbacks

Scenarios of use

The client invokes application installation and the installation of the application is notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
appsObject[]Application Information
├─ appIdInteger10001Application ID
├─ appNameStringdemoappName
├─ pkgNameStringcom.xxx.demopackage name
├─ padCodeStringAC22030022001Instance number
├─ resultbooleantrueIdentifier of the installation result. true: success, false: failure

Application uninstallation callbacks

Scenarios of use

The client invokes application uninstallation and the application uninstallation is notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
appsObjectApplication Information
├─ appIdInteger10001Application ID
├─ appNameStringdemoappName
├─ pkgNameStringcom.xxx.demopackage name
├─ padCodeStringAC22030022001Instance number
resultbooleantrueIdentifier of the result of the installation. true: success, false: failure

Application startup callbacks

Scenarios of use

The client invokes application startup and the application startup is notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
taskStatusInteger3taskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: executing; 3: complete)
padCodeStringAC22030022001Instance Identification
pkgNameStringxxx.test.comPackage Name

Application stop callbacks

Scenarios of use

The client calls application stop and the application stop is notified to the client via this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
taskStatusInteger3taskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: executing; 3: complete)
padCodeStringAC22030022001Instance Identifier
pkgNameStringxxx.test.comPackage Name

Application restart callbacks

Scenarios of use

The client invokes application restart and the application restart is notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
taskStatusInteger3taskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: executing; 3: complete)
padCodeString212254Instance Identifier
pkgNameStringxxx.test.comPackage Name

Query instance application list callbacks

Scenarios of use

The client calls the instance installed application list and the instance installed application list is notified to the client via this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
taskStatusInteger1taskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: executing; 3: complete)
padCodeStringAC22030022001pod identifier
appsObject[]
├─appNameStringtestappName
├─pkgNameStringtext.xx.compackage name

File upload callbacks

Scenarios of use

The client calls to upload a file, and the uploaded file is notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskIdInteger1Task ID
taskStatusInteger3taskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: executing; 3: complete)
originFileUrlStringwww.xxx.com/xxx.apkoriginalFileDownloadAddress
fileUniqueIdStringtest001fileid

Instance state task callbacks

Scenarios of use

The client calls instance restart/instance reset and the status of the instance restart/instance reset task is notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
taskBusinessTypeInteger1taskBusinessType (1000: instance restart; 1001: instance reset)
taskIdInteger2TaskId
taskStatusInteger3taskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: executing; 3: complete)
padCodeString212254Instance number
taskResultStringSuccesstaskResult
taskContentStringTaskContent
endTimeLong177777224endTime

Instance state callbacks

Scenarios of use

Instance state changes are notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
padStatusInteger1Instance Status: 10-Running 11-Restarting 12-Resetting 13-Upgrading 14-Exception 15-Not Ready
padCodeString212254Instance Identifier

Cloud machine status callbacks

Scenarios of use

Changes in the state of the cloud machine are notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
deviceStatusInteger1PhysicalMachineStatus 0-offline; 1-online
deviceCodeString212254Cloud Machine ID

Instance upgrade mirror callbacks

Scenarios of use

Instance upgrades mirroring task state changes are notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
padCodeString212254instance number
taskBusinessTypeInteger1taskBusinessType(1012 Upgrade Mirror)
taskStatusInteger3TaskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: complete)
taskIdInteger1Task ID
taskContentStringtaskContent
endTimeLong1756021166163endTime
taskResultStringSuccesstaskResult

Application blacklisting task callbacks

Scenarios of use

The instance sets up that application blacklisted task status changes are notified to the client through this callback interface.

FieldsTypesExamplesDescriptions
padCodeString212254instance number
taskIdInteger1Task ID
taskStatusInteger3TaskStatus (-1: all failed; -3: cancelled; -4: timeout; 1: pending; 2: execution in progress; 3: complete)