Skip to main content
GET
/
v1
/
sessions
/
{id}
Get Session
curl --request GET \
  --url https://api.bctrl.ai/v1/sessions/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "hostId": "<string>",
  "status": "<string>",
  "storageWorkspace": "<string>"
}
id
string
required
Session ID.

Examples

import { Bctrl } from '@bctrl/sdk';
const bctrl = new Bctrl({ apiKey: process.env.BCTRL_API_KEY! });

const info = await bctrl.sessions.get('sess_abc123');

Response

id
string
required
Session ID.
hostId
string
required
Host ID.
status
string
required
Session status.
storageWorkspace
string
Storage workspace name.
Response Example
{
  "id": "sess_abc123",
  "hostId": "host_1",
  "status": "active"
}

Errors

CodeDescription
404Session not found