Sauce Labs · Schema

Session

A real device session on Sauce Labs representing an active remote device allocation for testing.

TestingCross-Browser TestingMobile TestingReal DevicesAutomationCI/CDQuality Assurance

Properties

Name Type Description
id string Unique identifier for the session.
state string Lifecycle state of the session.
expiresAt string ISO 8601 datetime when the session will automatically expire.
retainUntil stringnull ISO 8601 datetime until which the session results are retained.
device object The device allocated to this session.
appium objectnull Appium session metadata when the session uses the Appium protocol.
links object HATEOAS links for available actions on this session.
View JSON Schema on GitHub

JSON Schema

sauce-labs-session-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.github.io/sauce-labs/json-schema/sauce-labs-session-schema.json",
  "title": "Session",
  "description": "A real device session on Sauce Labs representing an active remote device allocation for testing.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the session.",
      "example": "3e832ce3-9cca-4d08-9f01-4b88f56fd350"
    },
    "state": {
      "type": "string",
      "enum": ["CREATED", "BOOTING", "RUNNING", "CLOSING", "CLOSED", "TIMED_OUT", "ERROR"],
      "description": "Lifecycle state of the session."
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 datetime when the session will automatically expire.",
      "example": "2024-06-01T12:30:00Z"
    },
    "retainUntil": {
      "type": ["string", "null"],
      "format": "date-time",
      "description": "ISO 8601 datetime until which the session results are retained."
    },
    "device": {
      "$ref": "sauce-labs-device-schema.json",
      "description": "The device allocated to this session."
    },
    "appium": {
      "type": ["object", "null"],
      "description": "Appium session metadata when the session uses the Appium protocol.",
      "properties": {
        "sessionId": {
          "type": "string",
          "description": "Appium session ID."
        },
        "serverUrl": {
          "type": "string",
          "format": "uri",
          "description": "Appium server URL for this session."
        }
      }
    },
    "links": {
      "type": "object",
      "description": "HATEOAS links for available actions on this session.",
      "additionalProperties": {
        "type": "string",
        "format": "uri"
      },
      "example": {
        "self": "https://api.us-west-1.saucelabs.com/rdc/v2/sessions/3e832ce3-9cca-4d08-9f01-4b88f56fd350",
        "close": "https://api.us-west-1.saucelabs.com/rdc/v2/sessions/3e832ce3-9cca-4d08-9f01-4b88f56fd350"
      }
    }
  },
  "required": ["id", "state", "expiresAt", "device"],
  "additionalProperties": false,
  "examples": [
    {
      "id": "3e832ce3-9cca-4d08-9f01-4b88f56fd350",
      "state": "RUNNING",
      "expiresAt": "2024-06-01T12:30:00Z",
      "retainUntil": null,
      "device": {
        "descriptor": {
          "name": "iPhone 14",
          "os": "IOS",
          "osVersion": "16.4",
          "formFactor": "PHONE",
          "manufacturer": "Apple"
        },
        "isPrivateDevice": false,
        "state": "IN_USE",
        "inUseBy": "john.doe"
      },
      "appium": {
        "sessionId": "abc123def456",
        "serverUrl": "https://ondemand.us-west-1.saucelabs.com/wd/hub"
      },
      "links": {
        "self": "https://api.us-west-1.saucelabs.com/rdc/v2/sessions/3e832ce3-9cca-4d08-9f01-4b88f56fd350"
      }
    }
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sauce-labs-session"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.