Skip to main content

Real Device API Endpoints

The Real Device Cloud (RDC) API allows you to manage real devices and jobs in your data center. Use the RDC API methods to:

  • Look up device types and availability
  • View current device activity
  • Manage real device jobs by stopping, deleting, or updating job details
  • Assign a private device to a team
  • Update private device settings

Refer to Getting Started for Authentication and Server information.

Real Devices

Get Devices

GET /v1/rdc/devices

Get the set of real devices located at the data center, as well as the operating system/browser combinations and identifying information for each device.

Parameters

This method takes no parameters.
Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/devices' | json_pp

Responses

200Success. Device info returned.
404Not found.
Sample Response
[
{
"abiType": "armeabi-v7a",
"apiLevel": 23,
"cpuCores": 4,
"cpuFrequency": 2300,
"defaultOrientation": "PORTRAIT",
"dpi": 440,
"hasOnScreenButtons": true,
"id": "HTC_One_M8_real",
"internalOrientation": "PORTRAIT",
"internalStorageSize": 16384,
"isArm": true,
"isKeyGuardDisabled": false,
"isPrivate": false,
"isRooted": false,
"isTablet": false,
"manufacturer": [
"HTC"
],
"modelNumber": "HTC One_M8",
"name": "HTC One (M8)",
"os": "ANDROID",
"osVersion": "6.0",
"pixelsPerPoint": 1,
"ramSize": 2048,
"resolutionHeight": 1920,
"resolutionWidth": 1080,
"screenSize": 5.0,
"sdCardSize": 2048,
"supportsAppiumWebAppTesting": true,
"supportsGlobalProxy": false,
"supportsMinicapSocketConnection": false,
"supportsMockLocations": true,
"cpuType": "ARM",
"deviceFamily": "ANY",
"dpiName": "xxhdpi",
"isAlternativeIoEnabled": true,
"supportsManualWebTesting": true,
"supportsMultiTouch": true,
"supportsXcuiTest": false
},
{...more devices},
]

Get a Specific Device

GET /v1/rdc/devices/{device_id}

Get information about the device specified in the request.

Parameters

device_id

| PATH | REQUIRED | STRING |

The unique identifier of a device in the Sauce Labs data center. You can look up device IDs using the Get Devices endpoint.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/devices/iPad_Pro_11_14_2018_real' | json_pp

Responses

200Success. Device info returned.
404Not found.
Sample Response
{
"abiType": "arm64",
"apiLevel": 0,
"cpuCores": 6,
"cpuFrequency": 2600,
"defaultOrientation": "LANDSCAPE",
"dpi": 265,
"hasOnScreenButtons": true,
"id": "iPad_Pro_11_14_2018_real",
"internalOrientation": "LANDSCAPE",
"internalStorageSize": 65536,
"isArm": true,
"isKeyGuardDisabled": false,
"isPrivate": false,
"isRooted": false,
"isTablet": true,
"manufacturer": [
"Apple"
],
"modelNumber": "iPad8,1",
"name": "iPad Pro 11 2018",
"os": "IOS",
"osVersion": "14.4.1",
"pixelsPerPoint": 2,
"ramSize": 4096,
"resolutionHeight": 2388,
"resolutionWidth": 1668,
"screenSize": 11.0,
"sdCardSize": 0,
"supportsAppiumWebAppTesting": true,
"supportsGlobalProxy": false,
"supportsMinicapSocketConnection": true,
"supportsMockLocations": true,
"cpuType": "ARM",
"deviceFamily": "IPAD",
"dpiName": "hdpi",
"isAlternativeIoEnabled": true,
"supportsManualWebTesting": true,
"supportsMultiTouch": true,
"supportsXcuiTest": true
}

Get Available Devices

GET /v1/rdc/devices/available

Returns a list of Device IDs for all devices in the data center that are currently free for testing.
Deprecated Endpoint

This endpoint is deprecated. Please transition to the status endpoint for continued service.

Parameters

This method takes no parameters.
Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/devices/available' | json_pp

Responses

200Success. Device info returned.
404Not found.
Sample Response
[
"Google_Pixel_3a_XL_real",
"Samsung_Galaxy_A5_real",
"Google_Pixel_4_real_us",
"iPhone_8_14_4_real_us",
"iPhone_6_10_3_real",
"Huawei_P10_real",
"Samsung_Galaxy_Fold_5G_real_us",
"iPhone_11_14_4_real_us",
"iPhone_12_Pro_Max_real_us",
"iPad_Pro_12_9_2018_real",
"Samsung_Galaxy_M20_real_us",
"Samsung_Galaxy_S10_real",
"Samsung_Galaxy_Tab_S4_real_us",
"OnePlus_8_real_us",
"iPad_Mini_2_12_real_us",
"iPad_mini_2019_real",
"Samsung_note_5_real_us",
"iPad_Pro_11_2020_14_real_us",
"ZTE_Axon_7_real2_us",
"Essential_PH_1_real",
"Huawei_P20_Pro_real_us",
"Samsung_Galaxy_Tab_S_105_real_us",
"iPod_Touch_6_10_real_us",
"Samsung_Galaxy_Tab_S3_real",
"Amazon_Kindle_Fire_HD_7_real_us",
"OnePlus_5T_real",
"Sony_Xperia_10_real_us",
"OnePlus_6_real",
...
]

Get Devices Status

GET /v1/rdc/devices/status

Returns a list of devices in the data center along with their current states. Each device is represented by a descriptor, indicating its model, and includes information on availability, usage status, and whether it is designated as a private device.
note

The inUseBy field is exposed only for private devices isPrivateDevice: true. Users can view information about who is currently using the device only if they have the required permissions. Lack of permissions will result in the inUseBy field being omitted from the response for private devices.

List of Available States:

StateDescription
AVAILABLEDevice is available and ready to be allocated
IN_USEDevice is currently in use
CLEANINGDevice is being cleaned (only available for private devices)
MAINTENANCEDevice is in maintenance (only available for private devices)
REBOOTINGDevice is rebooting (only available for private devices)
OFFLINEDevice is offline (only available for private devices)

Parameters

This method takes no parameters.
Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/devices/status' | json_pp

Responses

200Success. Device info returned.
404Not found.
Sample Response
{
"devices": [
{
"descriptor": "iPhone_12_mini_16_real_private",
"state": "IN_USE",
"inUseBy": [
{
"username": "user-name"
}
],
"isPrivateDevice": true
},
{
"descriptor": "iPhone_12_16_real",
"state": "CLEANING",
"inUseBy": [],
"isPrivateDevice": true
},
{
"descriptor": "Google_Pixel_7_Pro_14_real",
"state": "MAINTENANCE",
"inUseBy": [],
"isPrivateDevice": true
},
{
"descriptor": "Samsung_Galaxy_S10_real",
"state": "REBOOTING",
"inUseBy": [],
"isPrivateDevice": true
},
{
"descriptor": "iPhone_XS_13_real",
"state": "OFFLINE",
"inUseBy": [],
"isPrivateDevice": true
},
{
"descriptor": "iPhone_8_Plus_13_4_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Google_Pixel_4_10_real",
"state": "IN_USE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_S21_5G_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_A7_2018_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPad_Pro_11_2021_17_real",
"state": "IN_USE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Google_Pixel_5_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_A9s_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPhone_SE_15_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPhone_13_mini_17_real_2",
"state": "IN_USE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Google_Pixel_4_XL_13_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_S23_14_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_Tab_S8_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_A8_2018_real",
"state": "IN_USE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPad_10_2_14_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPad_mini_2_12_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPad_10_2_2020_16_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Samsung_Galaxy_S21_5G_13_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "Huawei_Mate_30_Pro_real",
"state": "IN_USE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPad_Pro_10_5_2017_15_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
{
"descriptor": "iPad_Pro_11_2022_16_real",
"state": "AVAILABLE",
"inUseBy": [],
"isPrivateDevice": false
},
...
]
}

Jobs

Get Real Device Jobs

GET /v1/rdc/jobs

Get a list of jobs that are actively running on real devices in the data center.

Parameters

limit

| QUERY | OPTIONAL | INTEGER |

The maximum number of jobs to return.

offset

| QUERY | OPTIONAL | INTEGER |

Limit results to those following this index number. Defaults to 1.

type

| QUERY | OPTIONAL | STRING |

Filter results to show manual tests only with LIVE.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs?limit=5' | json_pp

Responses

200Success. Device info returned.
404Not found.
Sample Response
{
"entities": [
{
"assigned_tunnel_id": null,
"device_type": "real_device",
"owner_sauce": "walkerlj",
"consolidated_status": "failed",
"end_time": 1618283190151,
"id": "fdb5600685fc4779b394c552293b37da",
"name": "lockedOutLoginFlow",
"os": "Android",
"os_version": "10",
"device_name": "Samsung Galaxy A30",
"start_time": 1618283139160,
"status": "failed",
"creation_time": 1618283139160,
"automation_backend": "APPIUM",
"automated": true
},
{...4 more}
],
"metaData": {
"offset": 1,
"limit": 5,
"searchTerm": null,
"sortDirection": "DESCENDING",
"moreAvailable": true
}
}

Get a Specific Real Device Job

GET /v1/rdc/jobs/{job_id}

Get information about a specific job running on a real device at the data center.

Parameters

job_id

| PATH | REQUIRED | STRING |

The unique identifier of a job running on a real device in the data center. You can look up job IDs using the Get Real Device Jobs endpoint.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs/293d84fb2f634ff29a750c3f8eaee592' | json_pp

Responses

200Success. Device info returned.
404Not found.
Sample Response
{
"appium_session_id" : null,
"application_summary" : {
"appStorageId" : "861d0f58-ff75-450b-b063-344e7216cc5b",
"filename" : "my-demo-app-android.apk",
"groupId" : 944918,
"minOsVersion" : null,
"minSdkLevel" : 19,
"name" : "My Demo App",
"packageName" : "com.saucelabs.mydemoapp.android",
"shortVersion" : null,
"targetOsVersion" : null,
"targetSdkLevel" : 31,
"version" : "1.0.12",
"versionCode" : "14"
},
"assigned_tunnel_id" : null,
"automation_backend" : null,
"base_config" : {},
"build" : null,
"client" : null,
"collects_automator_log" : true,
"consolidated_status" : "complete",
"crash_log_url" : "https://api.eu-central-1.saucelabs.com/v1/rdc/jobs/51873a114a6141239c933042e948aa54/crash.json",
"creation_time" : 1678124750664,
"device_descriptor" : {
"abiType" : "arm64-v8a",
"apiLevel" : 29,
"cpuCores" : 8,
"cpuFrequency" : 1950,
"cpuType" : "ARM",
"defaultOrientation" : "PORTRAIT",
"deviceFamily" : "ANY",
"dpi" : 550,
"dpiName" : "xxhdpi",
"hasOnScreenButtons" : true,
"id" : "Samsung_Galaxy_S10_ws",
"internalOrientation" : "PORTRAIT",
"internalStorageSize" : 131072,
"isAlternativeIoEnabled" : true,
"isArm" : true,
"isKeyGuardDisabled" : false,
"isPrivate" : true,
"isRooted" : false,
"isTablet" : false,
"manufacturer" : [
"Samsung"
],
"modelNumber" : "SM-G973F",
"name" : "Samsung Galaxy S10",
"os" : "ANDROID",
"osVersion" : "10",
"pixelsPerPoint" : 1,
"ramSize" : 8192,
"resolutionHeight" : 3040,
"resolutionWidth" : 1440,
"screenSize" : 6.1,
"sdCardSize" : 0,
"supportsAppiumWebAppTesting" : true,
"supportsGlobalProxy" : false,
"supportsManualWebTesting" : true,
"supportsMinicapSocketConnection" : false,
"supportsMockLocations" : true,
"supportsMultiTouch" : true,
"supportsXcuiTest" : false
},
"device_log_url" : "https://api.eu-central-1.saucelabs.com/v1/rdc/jobs/51873a114a6141239c933042e948aa54/deviceLogs",
"device_name" : "Samsung Galaxy S10",
"device_session_id" : null,
"device_type" : "real_device",
"end_time" : 1678124809717,
"error" : null,
"framework_log_url" : null,
"id" : "51873a114a6141239c933042e948aa54",
"junit_log_url" : null,
"manual" : true,
"modification_time" : 1678124809717,
"name" : "My Demo App (Version: 1.0.12; Build: 14)",
"network_log_url" : "https://api.eu-central-1.saucelabs.com/v1/rdc/jobs/51873a114a6141239c933042e948aa54/network.har",
"os" : "Android",
"os_version" : "10",
"owner_sauce" : "wim.selles",
"passed" : null,
"proxied" : false,
"record_screenshots" : true,
"record_video" : true,
"remote_app_file_url" : null,
"requests_url" : null,
"screenshots" : [],
"start_time" : 1678124764713,
"status" : "complete",
"tags" : [],
"test_cases_url" : null,
"test_report_type" : "LIVE",
"testfairy_log_url" : "https://api.eu-central-1.saucelabs.com/v1/rdc/jobs/51873a114a6141239c933042e948aa54/insights.json",
"crash_log_url": "https://api.us-west-1.saucelabs.com/v1/rdc/jobs/c6dd70531df5454290e110514dc7ca8b/crash.json",
"used_cached_device" : null,
"video_url" : "https://api.eu-central-1.saucelabs.com/v1/rdc/jobs/51873a114a6141239c933042e948aa54/video.mp4"
}

Download a Specific Real Device Job's Device Logs File

GET /v1/rdc/jobs/{job_id}/deviceLogs

Download the device logs file for a specific job after it finished running on a real device at the data center.

Parameters

job_id

| PATH | REQUIRED | STRING |

The unique identifier of a job running on a real device in the data center. You can look up job IDs using the Get Real Device Jobs endpoint.

download

| QUERY | OPTIONAL | BOOLEAN |

Whether to force the download of the compressed version of the file. Defaults to (false).

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs/293d84fb2f634ff29a750c3f8eaee592/deviceLogs'

Responses

200Success. File is returned and downloaded.
404Not found.

Stop a Job

PUT /v1/rdc/jobs/{job_id}/stop

Stops a running job described by the job_id.
note

This API can be used to stop actively running Appium, Espresso and XCUITest jobs.

Parameters

job_id

| PATH | REQUIRED | STRING |

The unique identifier of a job running on a real device in the data center. You can look up job IDs using the Get Real Device Jobs endpoint.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PUT 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs/293d84fb2f634ff29a750c3f8eaee592/stop' | json_pp

Responses

200Job successfully stopped.
404Not found.
400Session identified as 'JOB_TYPE' test. It can’t be stopped because it’s not part of the allowed test types: APPIUM
400Cannot stop test in the setup phase. Test needs to be in progress before it can be stopped
400The test cannot be stopped because the test execution has already finished. Only tests in progress can be stopped
400Session Id is not available yet. Test needs to be in progress before it can be stopped
400Only in progress appium session can be stopped
500Session could not be closed, try again
500Failed to stop a session, Please try again

Update a Job

PUT /v1/rdc/jobs/{job_id}

Edit job attributes based on parameters passed in the request, including setting the status and name of the job. Any parameter for which a new value is provided in the request will replace the existing value. For example, if you provide a set of tags, they will not be added to the current tags; they will replace them, so make sure you pass the entire set you wish to assign.

Parameters

job_id

| PATH | REQUIRED | STRING |

The Sauce Labs identifier of the job to be updated. You can look up job IDs using the Get Jobs endpoint.

name

| BODY | OPTIONAL | STRING |

A new name for the job.

build

| BODY | OPTIONAL | STRING |

Assign the job to a build. You can specify an existing build name or create a new one.

passed

| BODY | OPTIONAL | BOOLEAN |

Asserts whether the job passed (true) or not (false).

tags

| BODY | OPTIONAL | ARRAY |

The set of distinguishing tags to apply to the job.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PUT 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs/a2f60bf3ea5f43fa90126f82c0ba2cf6' \
--header 'Content-Type: application/json'
--data-raw '{
"name": "New Test Name",
"tags": [
"e2e",
"release_team",
"other_tag"
],
"build": "build-2023-02-15T10:44:10Z"
}'

Responses

200Success.
400Bad Request.
404Not found.
Sample Response
{
"application_summary": {
"appStorageId": "b5e4fde9-a45b-485d-9bc6-92204f97adf3",
"groupId": 827303,
"filename": "iosHttpRequest.ipa",
"name": "httpRequest",
"packageName": "com.saucelabs.httpRequest",
"version": "1",
"versionCode": null,
"shortVersion": "1.0",
"minSdkLevel": null,
"targetSdkLevel": null,
"minOsVersion": "11.4",
"targetOsVersion": "15.5"
},
"assigned_tunnel_id": null,
"device_type": "real_device",
"owner_sauce": "sauce-rdc-us-staging-tests",
"automation_backend": "xcuitest",
"base_config": {},
"build": "a5daf4aff92a43ed9b8b1ff9ba7afa4e",
"collects_automator_log": true,
"consolidated_status": "passed",
"creation_time": 1676034279072,
"device_descriptor": {
"abiType": "arm64",
"apiLevel": 0,
"cpuCores": 2,
"cpuFrequency": 3200,
"defaultOrientation": "PORTRAIT",
"dpi": 460,
"hasOnScreenButtons": true,
"id": "iPhone_13_real_us",
"internalOrientation": "PORTRAIT",
"internalStorageSize": 13312,
"isArm": true,
"isKeyGuardDisabled": false,
"isPrivate": false,
"isRooted": false,
"isTablet": false,
"manufacturer": [
"Apple"
],
"modelNumber": "iPhone14,5",
"name": "iPhone 13",
"os": "IOS",
"osVersion": "15.4",
"pixelsPerPoint": 3,
"ramSize": 4096,
"resolutionHeight": 2532,
"resolutionWidth": 1170,
"screenSize": 6.1,
"sdCardSize": 0,
"supportsAppiumWebAppTesting": true,
"supportsGlobalProxy": false,
"supportsMinicapSocketConnection": true,
"supportsMockLocations": true,
"cpuType": "ARM",
"deviceFamily": "IPHONE",
"dpiName": "xxhdpi",
"isAlternativeIoEnabled": true,
"supportsManualWebTesting": true,
"supportsMultiTouch": true,
"supportsXcuiTest": true
},
"end_time": 1676034310292,
"error": null,
"id": "a5daf4aff92a43ed9b8b1ff9ba7afa4e",
"framework_log_url": "https://api.staging.saucelabs.net/v1/rdc/jobs/a5daf4aff92a43ed9b8b1ff9ba7afa4e/xcuitestLogs",
"device_log_url": "https://api.staging.saucelabs.net/v1/rdc/jobs/a5daf4aff92a43ed9b8b1ff9ba7afa4e/deviceLogs",
"requests_url": null,
"test_cases_url": "https://api.staging.saucelabs.net/v1/rdc/jobs/a5daf4aff92a43ed9b8b1ff9ba7afa4e/testCases",
"junit_log_url": "https://api.staging.saucelabs.net/v1/rdc/jobs/a5daf4aff92a43ed9b8b1ff9ba7afa4e/junit.xml",
"manual": false,
"modification_time": 1676034310292,
"name": "New Test Name",
"os": "iOS",
"os_version": "15.4",
"device_name": "iPhone 13",
"passed": true,
"proxied": false,
"record_screenshots": true,
"screenshots": [],
"record_video": true,
"start_time": 1676034300063,
"status": "passed",
"tags": [
"e2e",
"xcuitest",
"team"
],
"video_url": "https://api.staging.saucelabs.net/v1/rdc/jobs/a5daf4aff92a43ed9b8b1ff9ba7afa4e/video.mp4",
"remote_app_file_url": null,
"appium_session_id": null,
"device_session_id": null,
"client": "saucectl/0.117.1",
"network_log_url": null,
"testfairy_log_url": null,
"crash_log_url": null,
"test_report_type": "XCUITEST"
}

Delete a Job

DELETE /v1/rdc/jobs/{job_id}

Delete a job and all of its assets from the Sauce Labs test history.

Parameters

job_id

| PATH | REQUIRED | STRING |

The unique identifier of a job running on a real device in the data center. You can look up job IDs using the Get Real Device Jobs endpoint.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request DELETE 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs/a2f60bf3ea5f43fa90126f82c0ba2cf6' | json_pp

Responses

200Job successfully deleted.
404Not found.
No payload is returned with the successful deletion.

Private Real Device Management

Learn more about how to manage your private devices.

Get Private Devices

GET /v1/rdc/device-management/devices

Get a list of private devices with their device information and settings.

Parameters

This method takes no parameters.
Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/device-management/devices' | json_pp

Responses

200Success. List of private devices is returned.
Sample Response
[
{
"id": "iPhone_12_17_sl",
"name": "iPhone 12",
"os": {
"name": "iOS",
"version": "17.6"
},
"screenSize": 6.1,
"resolutionWidth": 1170,
"resolutionHeight": 2532,
"state": "AVAILABLE",
"team": null,
"appWhitelist": [
"com.google.chrome.ios"
],
"accountWhitelist": [],
"systemAppAllowlist": [],
"applePaySupportEnabled": false,
"skipCleaningFolders": []
},
{...more devices},
]

Assign Device to a Team

PUT /v1/rdc/device-management/devices/{device_id}/team

Assign a private device to a specific team.

Parameters

device_id

| PATH | REQUIRED | STRING |

The unique identifier of a device in the Sauce Labs data center. You can look up device IDs using the Get Devices endpoint. (Example: iPhone_12_17_sl)

id

| BODY | REQUIRED | STRING |

The unique identifier of a team in the Sauce Labs organization.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PUT 'https://api.us-west-1.saucelabs.com/v1/rdc/device-management/devices/iPad_Pro_11_14_2018_real/team' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "8f0444d7762548bd81ae46722a14e1c6"
}'

Responses

200Device successfully assigned.
404Device not found.
422Team not found.
No payload is returned with the successful assignment.

Remove Device Assignment from Team

DELETE /v1/rdc/device-management/devices/{device_id}/team

Remove the private device assignment from a team.

Parameters

device_id

| PATH | REQUIRED | STRING |

The unique identifier of a device in the Sauce Labs data center. You can look up device IDs using the Get Devices endpoint. (Example: iPhone_12_17_sl)

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request DELETE 'https://api.us-west-1.saucelabs.com/v1/rdc/device-management/devices/iPad_Pro_11_14_2018_real/team' | json_pp

Responses

200Device successfully removed from team.
404Device not found.
No payload is returned with the successful removal.

Update Device Settings

PUT /v1/rdc/device-management/devices/{device_id}/settings

Update device settings to allow apps, system apps, and accounts to persist between sessions. Check out the available device settings for more information on each setting.

Parameters

device_id

| PATH | REQUIRED | STRING |

The unique identifier of a device in the Sauce Labs data center. You can look up device IDs using the Get Devices endpoint. (Example: iPhone_12_17_sl)

appWhitelist

| BODY | REQUIRED | ARRAY |

Persist installed apps and app data between sessions.

accountWhitelist

| BODY | REQUIRED | ARRAY |

Preserve store and payment account sign-ins for Google accounts and Apple IDs between sessions for each account email.

systemAppAllowlist

| BODY | REQUIRED | ARRAY |

Access iOS preinstalled applications.

applePaySupportEnabled

| BODY | REQUIRED | BOOLEAN |

Enable to test Apple Pay. Please contact your CSM/SE or Sauce Labs Support for additional configuration.

skipCleaningFolders

| BODY | REQUIRED | ARRAY |

Retain specific file paths or folders on your private Android devices between sessions.

Sample Request
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request PUT 'https://api.us-west-1.saucelabs.com/v1/rdc/device-management/devices/iPhone_12_17_sl/settings' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "iPhone_12_17_sl",
"appWhitelist": ["com.google.chrome.ios"],
"accountWhitelist": ["qa-tester@saucelabs.com"],
"systemAppAllowlist": ["com.apple.calculator"],
"applePaySupportEnabled": false,
"skipCleaningFolders": []
}'

Responses

200Device settings successfully updated.
404Device not found.
Sample Response
[
{
"id": "iPhone_12_17_sl",
"name": "iPhone 12",
"os": {
"name": "iOS",
"version": "17.6"
},
"screenSize": 6.1,
"resolutionWidth": 1170,
"resolutionHeight": 2532,
"state": "AVAILABLE",
"team": null,
"appWhitelist": [
"com.google.chrome.ios"
],
"accountWhitelist": [
"qa-tester@saucelabs.com"
],
"systemAppAllowlist": [
"com.apple.calculator"
],
"applePaySupportEnabled": false,
"skipCleaningFolders": []
},
{...more devices},
]