Session Lifecycle

List device sessions

Retrieves a list of device sessions, including pending, active and recently closed sessions.

get/sessions

Request

Query parameters

state'PENDING' | 'CREATING' | 'ACTIVE' | 'CLOSING' | 'CLOSED' | 'ERRORED'
Example:CREATING

Filter out sessions returned based on state

deviceNamestring

Filter by device identifier (supports regex). Matches both descriptor and deviceName fields.

Response

OK

Example response

{
  "sessions": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "state": "CREATING",
      "expiresAt": "2025-06-06T10:00:00Z",
      "device": {
        "descriptor": "iPhone_13_real",
        "deviceName": "iPhone 13 real private",
        "os": "ANDROID",
        "osVersion": "15.0"
      },
      "appium": {
        "url": "https://api.us-west-1.saucelabs.com/rdc/v2/sessions/2fe09ae3-5d01-4712-bfc0-1d873d20e554/appium/wd/hub",
        "version": "stable"
      },
      "links": {
        "ioWebsocketUrl": "wss://api.us-west-1.saucelabs.com/rdc/v2/socket/alternativeIo/123e4567-e89b-12d3-a456-426614174000",
        "eventsWebsocketUrl": "wss://api.us-west-1.saucelabs.com/rdc/v2/socket/companion/123e4567-e89b-12d3-a456-426614174000",
        "liveViewUrl": "https://app.saucelabs.com/live/mobile/dataCenters/US/devices/Samsung_Galaxy_S8_real2/shared/123e4567-e89b-12d3-a456-426614174000",
        "adbUrl": "https://api.us-west-1.saucelabs.com/v1/rdc/vusb/forward",
        "usbmuxdUrl": "https://api.us-west-1.saucelabs.com/v1/rdc/vusb/usbmuxd",
        "vusbUrl": "https://api.us-west-1.saucelabs.com/v1/rdc/vusb/forward",
        "deviceDescriptorUrl": "https://api.us-west-1.saucelabs.com/rdc/v2/devices/iPhone_13_real",
        "self": "https://api.us-west-1.saucelabs.com/rdc/v2/sessions/123e4567-e89b-12d3-a456-426614174000"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.