---
title: "Get details of a specific device session"
method: GET
path: "/sessions/{sessionId}"
tags: ["Session Lifecycle"]
---

# Get details of a specific device session

`GET /sessions/{sessionId}`

## Request

- Base URL: `https://api.us-west-1.saucelabs.com/rdc/v2`
- URL: `https://api.us-west-1.saucelabs.com/rdc/v2/sessions/{sessionId}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/docs/sessions/:sessionId/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns full session metadata including device info (name, OS, version), session state (PENDING, ACTIVE, CLOSING, CLOSED),
WebSocket URLs for I/O and companion channels, and the live view URL. Use the session state to determine if the device is
ready for interaction. The response includes links to related resources like the device descriptor.

## Path parameters

- `sessionId` string, required

## Response `200`

OK

- Session
  - `id` string: Unique id of device session
  - `state` 'PENDING' | 'CREATING' | 'ACTIVE' | 'CLOSING' | 'CLOSED' | 'ERRORED'
  - `expiresAt` string, date-time: UTC timestamp when the active session expires and will be forcefully closed. Set via `sessionDuration` at creation. Mutually exclusive with `retainUntil`. Sessions longer than 6 hours may be closed before this time. When closed, transitions to terminal state and `retainUntil` is set.
  - `retainUntil` string, date-time: UTC timestamp until which closed/errored sessions are retained before deletion. Mutually exclusive with `expiresAt`. Typically 5 minutes after closure or error.
  - `device` object
    - `descriptor` string
    - `deviceName` string
    - `os` string
    - `osVersion` string
  - `appium` object
    - `url` string: The hosted appium server endpoint associated to this session
    - `version` string: The hosted appium server version
  - `links` object: Links to the resources of this session. The low-level device access links — `adbUrl`, `usbmuxdUrl` and `vusbUrl` — are only present on sessions running on a private device. Low-level device access is not supported on public devices, so on a public session the three fields are absent.
    - `ioWebsocketUrl` string: Websocket for the live device screen and device input. See the [Device Control Socket guide](https://docs.saucelabs.com/mobile-apps/real-device-access-api/real-device-access-api-device-control-socket/).
    - `eventsWebsocketUrl` string: Websocket for retrieving realtime logs, device events, and some statistics. See the [Companion Socket guide](https://docs.saucelabs.com/mobile-apps/real-device-access-api/real-device-access-api-mastering-companion-socket/).
    - `liveViewUrl` string: Live test view for the openapi session
    - `adbUrl` string, nullable: ADB forwarding URL for Android devices. Only set on a private device when the device OS is Android; absent otherwise.
    - `usbmuxdUrl` string, nullable: usbmuxd URL for iOS devices. Only set on a private device when the device OS is iOS; absent otherwise.
    - `vusbUrl` string, nullable: Deprecated: Use adbUrl for Android or usbmuxdUrl for iOS instead. Only set on a private device; absent on a public device.
    - `deviceDescriptorUrl` string: Link to the device descriptor with more details about the device
    - `self` string

## Other responses

- `404`: Not Found

---

[API](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference.md) - [All operations](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/revisions/f845a4b66e37?raw)
