Skip to main content
GET
/
v1
/
sessions
/
{id}
/
capabilities
Get Capabilities
curl --request GET \
  --url https://api.bctrl.ai/v1/sessions/{id}/capabilities \
  --header 'Authorization: Bearer <token>'
{
  "sessionId": "<string>",
  "runtime": {
    "status": "<string>",
    "hostId": {},
    "browserRunning": true,
    "currentDriver": {},
    "driverConnected": true,
    "defaultContextId": {},
    "defaultPageId": {}
  },
  "host": {
    "id": {},
    "status": "<string>",
    "platform": "<string>",
    "hostname": "<string>",
    "capabilities": {}
  },
  "automation": {
    "canonicalRoute": "<string>",
    "metaCalls": [
      "<string>"
    ],
    "escapeHatches": [
      "<string>"
    ]
  },
  "events": {
    "supportedEventTypes": [
      "<string>"
    ],
    "waitSupported": true,
    "streamSupported": true
  },
  "aliases": {
    "count": 123,
    "values": [
      {}
    ]
  },
  "subscriptions": {
    "count": 123
  }
}
id
string
required
Session ID.

Examples

const response = await fetch(
  `https://api.bctrl.ai/v1/sessions/${sessionId}/capabilities`,
  { headers: { Authorization: `Bearer ${apiKey}` } }
);
const caps = await response.json();
console.log(caps.runtime.currentDriver);
console.log(caps.events.supportedEventTypes);

Response

sessionId
string
required
Session ID.
runtime
object
required
Current runtime state.
host
object
required
Host information.
automation
object
required
Automation endpoint info.
events
object
required
Event support info.
aliases
object
required
Registered aliases (named references to pages/contexts).
subscriptions
object
required
Active event subscriptions.
Response Example
{
  "sessionId": "sess_abc123",
  "runtime": {
    "status": "active",
    "hostId": "host_1",
    "browserRunning": true,
    "currentDriver": "playwright",
    "driverConnected": true,
    "defaultContextId": "ctx_1",
    "defaultPageId": "page_1"
  },
  "host": {
    "id": "host_1",
    "status": "online",
    "platform": "linux",
    "hostname": "browser-node-1",
    "capabilities": {}
  },
  "automation": {
    "canonicalRoute": "/v1/sessions/:id/automation",
    "metaCalls": [
      "listContexts",
      "listPages"
    ],
    "escapeHatches": [
      "cdp"
    ]
  },
  "events": {
    "supportedEventTypes": [
      "console",
      "page.navigated",
      "page.load",
      "page.request",
      "page.response"
    ],
    "waitSupported": true,
    "streamSupported": true
  },
  "aliases": {
    "count": 0,
    "values": []
  },
  "subscriptions": {
    "count": 0
  }
}