Appcloud
Device API / Operation directory

All operations

Browse callable device operations. Expand an entry for its authenticated request.

34 of 34 operations

Devices

List phonesGET /api/v1/devices
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
List phones by groupGET /api/v1/devices?group=QA
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices?group=QA" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Get phone detailsGET /api/v1/devices/{id}
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Rename or organize a phonePATCH /api/v1/devices/{id}
Terminal
curl -X PATCH "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"QA phone","groupName":"QA"}'
List device groupsGET /api/v1/groups
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/groups" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Check command statusGET /api/v1/devices/{id}/tasks/{taskId}
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/tasks/$TASK_ID" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"

Apps

List installed appsGET /api/v1/devices/{id}/info/apps
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/info/apps" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Get foreground appGET /api/v1/devices/{id}/info/foreground
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/info/foreground" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
List available WebView versionsGET /api/v1/devices/{id}/info/webview
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/info/webview" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Start an installed appPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"startApp","value":"com.android.chrome"}'
Stop an installed appPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"stopApp","value":"com.android.chrome"}'
Restart an installed appPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"restartApp","value":"com.android.chrome"}'
Remove an installed packagePOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"uninstallApp","value":"com.example.app"}'
Keep an Android service runningPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"setKeepAliveApp","value":"com.example.app/com.example.app.SyncService"}'

Device settings

Read model and screen dimensionsGET /api/v1/devices/{id}/info/model
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/info/model" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Read Android build propertiesGET /api/v1/devices/{id}/info/properties
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/info/properties" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
List compatible Android imagesGET /api/v1/devices/{id}/info/images
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/info/images" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Download screen previewGET /api/v1/devices/{id}/screen
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/screen" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  --output phone-screen.img
Set the Android languagePOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"updateLanguage","value":"en-US"}'
Set the time zonePOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"updateTimeZone","value":"America/New_York"}'
Reboot the phonePOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"restart"}'
Erase the device and restore its factory settingsPOST /api/v1/devices/{id}/actions

This command erases all data on the selected phone.

Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"reset","value":"ERASE"}'
End the streaming sessionPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"disconnect"}'
Close apps and return to the home screenPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"clearApps"}'

Uploads and files

Stage a filePOST /api/v1/files
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/files" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  -H "X-File-Name: sample.txt" \
  --data-binary @sample.txt
List staged filesGET /api/v1/files
Terminal
curl -X GET "$APPCLOUD_BASE/api/v1/files" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Delete a staged fileDELETE /api/v1/files/{fileId}
Terminal
curl -X DELETE "$APPCLOUD_BASE/api/v1/files/$FILE_ID" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY"
Copy a staged file to the phonePOST /api/v1/devices/{id}/actions

Replace FILE_ID with the ID returned when you staged the file.

Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"uploadFile","value":"FILE_ID"}'
Install a staged APKPOST /api/v1/devices/{id}/actions

Replace FILE_ID with the ID returned when you staged the file.

Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"installApp","value":"FILE_ID","packageName":"com.example.app"}'

Android controls

Type into the focused fieldPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"inputText","value":"Hello from Appcloud"}'
Tap at screen coordinatesPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"tap","value":"120 240"}'
Swipe between two points over a duration in millisecondsPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"swipe","value":"100 500 100 100 350"}'
Hold a point for a duration in millisecondsPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"longPress","value":"120 240 800"}'
Press an Android navigation or volume keyPOST /api/v1/devices/{id}/actions
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" \
  -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"adbKey","value":"home"}'