Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/dev/api/real-device-access-websockets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ hide_table_of_contents: true
import Head from '@docusaurus/Head';
import RealDeviceAccessApiReference from '../../../src/components/realDeviceAccessApiReference.jsx';

# Real Device Access API WebSockets <span className="sauceGreen" style={{fontSize: "0.9rem", verticalAlign: "middle", whiteSpace: "nowrap", fontFamily: "var(--ifm-font-family-base)"}}>Enterprise Plans only</span>

{/* Tags <body> with a class so the full-width API-reference styling in
custom.css applies only to these embedded Scalar pages. */}

Expand Down
2 changes: 2 additions & 0 deletions docs/dev/api/real-device-access.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ hide_table_of_contents: true
import Head from '@docusaurus/Head';
import RealDeviceAccessApiReference from '../../../src/components/realDeviceAccessApiReference.jsx';

# Real Device Access API <span className="sauceGreen" style={{fontSize: "0.9rem", verticalAlign: "middle", whiteSpace: "nowrap", fontFamily: "var(--ifm-font-family-base)"}}>Enterprise Plans only</span>

{/* Tags <body> with a class so the full-width API-reference styling in
custom.css applies only to these embedded Scalar pages. */}

Expand Down
10 changes: 5 additions & 5 deletions docs/mobile-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,32 @@ Accelerate and scale your testing and broaden coverage by running automated test

## Real Device Access API

<p><span className="sauceGreen">Open Beta</span></p>
<p><span className="sauceGreen">Enterprise Plans only</span></p>

Directly access Sauce Labs private devices via HTTP and WebSockets. Reserve a device once and interact with it using standard protocols to build custom automation, debugging, or observability tools without relying on specific frameworks.

<div className="box-wrapper" markdown="1">
<div className="box box1 card">
<div className="container">
<a href="/mobile-apps/real-device-access-api/introduction"><h3>Introduction</h3></a>
<a href="/mobile-apps/real-device-access-api/real-device-access-api-introduction"><h3>Introduction</h3></a>
<p>Discover how the Access API removes framework dependencies and enables custom testing workflows on private devices.</p>
</div>
</div>
<div className="box box2 card">
<div className="container">
<a href="/mobile-apps/real-device-access-api/integration-guide"><h3>Integration Guide</h3></a>
<a href="/mobile-apps/real-device-access-api/real-device-access-api-integration-guide"><h3>Integration Guide</h3></a>
<p>A step-by-step guide to authentication, session creation, device filtering, and lifecycle management.</p>
</div>
</div>
<div className="box box3 card">
<div className="container">
<a href="/mobile-apps/real-device-access-api/local-appium"><h3>Local Appium Connection</h3></a>
<a href="/mobile-apps/real-device-access-api/real-device-access-api-local-appium"><h3>Local Appium Connection</h3></a>
<p>Bridge your local Appium server to remote Sauce Labs devices using the <code>vusbUrl</code> or HTTP forwarding.</p>
</div>
</div>
<div className="box box4 card">
<div className="container">
<a href="/mobile-apps/real-device-access-api/sauce-hosted-appium"><h3>Hosted Appium</h3></a>
<a href="/mobile-apps/real-device-access-api/real-device-access-api-sauce-hosted-appium"><h3>Hosted Appium</h3></a>
<p>Run faster test suites by keeping a hosted Appium server active across multiple tests on a single device session.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Connect ADB, Xcode, and libimobiledevice to Sauce Labs Remote Devices
sidebar_label: Connect ADB, Xcode, and libimobiledevice
---

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

Testing on real devices shouldn't mean maintaining a device lab. But until now, using low-level tools like ADB or Xcode Instruments on cloud devices required a proprietary client and a complex setup.

The Real Device Access API changes that. Reserve a device with a single API call, then connect your existing tools — `adb`, Xcode, Instruments, `idevicesyslog`, any libimobiledevice utility — as if the device were on your desk. All you need is a local reverse proxy and your Sauce Labs credentials. No proprietary software. No Java runtime. Just your tools, talking to our devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ sidebar_label: Device Control Socket
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

Connect to the Device Control Socket to receive a real-time stream of the device screen and send touch, keyboard, and navigation commands back to the device.

## Prerequisites
Expand Down
21 changes: 16 additions & 5 deletions docs/mobile-apps/real-device-access-api/integration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ title: Real Device Access API Integration Guide
sidebar_label: Integration Guide
---

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

The Sauce Labs Real Device Access API v2 allows you to programmatically interact with real mobile devices in the Sauce Labs cloud. Use it for functional testing, debugging, and observability. This guide introduces the core concepts: checking device availability, creating and managing sessions, and streaming live logs. By following these steps, you can start testing in just a few minutes.

## Five-Minute Onboarding Checklist

:::note[&#8203;]
The Real Device Access API requires an Enterprise plan and is not available on self-serve plans. To upgrade, [request a demo](https://saucelabs.com/request-demo).
:::

Use this checklist to quickly set up your environment and run your first test using the Real Device Access API. These steps cover the minimum required configuration to begin interacting with real devices through the API:
1. **Choose your data center** (US West, EU Central, or US East) and export `BASE_URL`.
1. **Choose your data center** (Asia South, EU Central, US East, or US West) and export `BASE_URL`.
2. **Grab your credentials** from Sauce Labs User Settings and export `SAUCE_USERNAME`/`SAUCE_ACCESS_KEY`.
3. **Verify access** by listing devices with `curl -u $AUTH "$BASE_URL/devices/status"`.
4. **Create a session** with `POST /sessions` and wait for the `ACTIVE` state.
Expand All @@ -17,10 +24,14 @@ Use this checklist to quickly set up your environment and run your first test us
Each step is expanded in the sections below with copy‑and‑paste snippets.

## Base URLs
Sauce Labs has three Real Device Cloud in the following regions:
* US West: https://api.us-west-1.saucelabs.com/rdc/v2/
* EU Central: https://api.eu-central-1.saucelabs.com/rdc/v2/
* US East: https://api.us-east-4.saucelabs.com/rdc/v2/
Sauce Labs has Real Device Cloud data centers in the following regions:

| Region | Base URL |
| --- | --- |
| Asia South | `https://api.asia-south-2.saucelabs.com/rdc/v2/` |
| EU Central | `https://api.eu-central-1.saucelabs.com/rdc/v2/` |
| US East | `https://api.us-east-4.saucelabs.com/rdc/v2/` |
| US West | `https://api.us-west-1.saucelabs.com/rdc/v2/` |

```shell
export BASE_URL="https://api.us-west-1.saucelabs.com/rdc/v2"
Expand Down
6 changes: 5 additions & 1 deletion docs/mobile-apps/real-device-access-api/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ title: Real Device Access API Guide
sidebar_label: Introduction
---

:::caution Enterprise Plans only
The Access API is available on Enterprise plans only. It is not included in self-serve plans. To enable it for your organization, contact your Customer Success Manager or [request a demo](https://saucelabs.com/request-demo) to upgrade to an Enterprise plan.
:::

The **Real Device Access API** provides you with direct access to Sauce Labs’ real device cloud, both the public devices shared across all customers and the private devices reserved for your organization. Instead of wiring every workflow through test-frameworks, you reserve a device once, interact with it over HTTP/WebSockets, and decide how to drive automation, debugging, or observability.

Historically, accessing real devices meant depending on a specific framework like Appium, XCTest, XCUITest, or Espresso. The Access API removes that dependency by exposing our infrastructure through standard protocols so you can build your own testing, validation, or monitoring solutions—without running a physical lab.
Expand All @@ -30,7 +34,7 @@ operations differ. See [Public and Private Devices](public-and-private-devices.m

## What You'll Need

- A Sauce Labs account ([log in](https://accounts.saucelabs.com/am/XUI/#login/)) entitled to the Access API on public devices, private devices, or both.
- A Sauce Labs Enterprise account ([log in](https://accounts.saucelabs.com/am/XUI/#login/)) entitled to the Access API on public devices, private devices, or both.
- Your Sauce Labs [username and access key](https://app.saucelabs.com/user-settings) for Basic Auth.
- Familiarity with REST/WebSocket clients (`curl`, Postman, Bruno, or an HTTP library).

Expand Down
4 changes: 3 additions & 1 deletion docs/mobile-apps/real-device-access-api/local-appium.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ sidebar_label: Local Appium
---

# Introduction
<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

Although we encourage using [our hosted Appium solution](/mobile-apps/automated-testing/appium/), certain scenarios benefit from running Appium locally—for example, custom plugins, in-depth debugging, or networking requirements. This guide shows how to connect a local Appium server to Sauce Labs Android and iOS devices through the Real Device Access API.

:::caution Private devices only
Expand All @@ -16,7 +18,7 @@ supports.
:::

## Prerequisites
- Real Device Access API enabled for your account (see the [Integration Guide](integration-guide.md)).
- Real Device Access API enabled for your Enterprise account (see the [Integration Guide](integration-guide.md)).
- `curl` and `jq` installed locally.
- The [`access-api-connect`](https://github.com/saucelabs/access-api-connect) binary on your `PATH` — pre-built for macOS, Linux, and Windows on the project's [Releases page](https://github.com/saucelabs/access-api-connect/releases).
- Android workflows: `adb`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Real-Time Insights Mastering the Companion Socket
sidebar_label: Mastering the Companion Socket
---

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

Connect to the Companion Socket to receive real-time device logs, Appium logs, and network traffic from an active session. This allows you
to debug issues live or trigger events in your infrastructure based on device state.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ title: Public and Private Devices on the Real Device Access API
sidebar_label: Public and Private Devices
---

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

A [Real Device Access API](introduction.md) session runs either on a **public device** from the shared Sauce Labs cloud or on one of your organization's **private devices**. The API surface is the same for both: the same endpoints, the same session lifecycle, the same test results.

The differences come from what a public device is: shared infrastructure that is cleaned and handed to the next customer after your session. Anything that could change the device beyond a session, or that would give one customer low-level access to shared hardware, is reserved for private devices.

## Entitlements and Concurrency

Public and private devices are entitled separately and counted separately. Each entitlement sets how many devices of that class your organization can hold in Access API sessions at the same time. Running out on one class does not affect the other.
The Real Device Access API is available on Enterprise plans only. Public and private devices are entitled separately and counted separately. Each entitlement sets how many devices of that class your organization can hold in Access API sessions at the same time. Running out on one class does not affect the other.

Organizations without a paid Access API entitlement for a device class fall back to the free tier, which allows one device of that class at a time. Contact your Customer Success Manager or the Sauce Labs Support Team to enable or raise an entitlement.
Enterprise organizations without a paid Access API entitlement for a device class fall back to the free tier, which allows one device of that class at a time. Self-serve plans do not include the Access API; to upgrade, [request a demo](https://saucelabs.com/request-demo). Contact your Customer Success Manager or the Sauce Labs Support Team to enable or raise an entitlement.

A device counts against your concurrency from the moment a device is allocated for that session, until the session is closed or expires. When no concurrency is left for the device class the session would run on, `POST /sessions` returns a `409`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_label: Sauce Labs Hosted Appium

# Faster, Smarter Appium Testing with Real Device Access API Sessions

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

For testers, time is a critical resource. This guide shows how to pair the Sauce Labs Access API with Sauce-hosted Appium so you can reserve a device once, reuse the Appium server, and finish your suites faster while keeping full control over the device lifecycle.

### Quick Start Overview
Expand Down
2 changes: 2 additions & 0 deletions docs/mobile-apps/real-device-access-api/test-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Test Results and Artifacts for the Real Device Access API
sidebar_label: Test Results and Artifacts
---

<p><small><span className="sauceGreen">Enterprise Plans only</span></small></p>

Sessions on the [Real Device Access API](introduction.md) can report **tests**: real Sauce Labs test results, with video, logs, and network traffic attached, that show up on the **Test Results** page under **Access API** in the Sauce Labs menu.

This guide explains how that works and why it matters, then walks through how to record one.
Expand Down
Loading