Session Lifecycle
Get details of a specific device session
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.
get/sessions/{sessionId}
Request
- Base URLhttps://api.us-west-1.saucelabs.com/rdc/v2
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
sessionIdstring required
The id of the device session
Response
OK
Example response
{
"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.