Skip to main content
GET
https://api.buntime.sh
/
sessions
/
{sessionId}
curl https://api.buntime.sh/sessions/ses_abc123 \
  -H "Authorization: Bearer $BUNTIME_API_KEY"
{
  "sessionId": "ses_abc123def456",
  "createdAt": "2024-01-19T10:30:00Z",
  "expiresAt": "2024-01-20T10:30:00Z",
  "lastActive": "2024-01-19T11:00:00Z",
  "state": "active",
  "filesCount": 12,
  "activeProcesses": 1,
  "metadata": {
    "userId": "user_123"
  }
}

Request

sessionId
string
required
The session ID to retrieve information for
Authorization
string
required
Bearer token with your API key

Response

sessionId
string
Unique session identifier
createdAt
string
ISO 8601 timestamp when session was created
expiresAt
string
ISO 8601 timestamp when session will expire
lastActive
string
ISO 8601 timestamp of last activity
state
string
Session state: “active”, “idle”, or “deep-sleep”
filesCount
integer
Number of files in /workspace
activeProcesses
integer
Number of running processes
metadata
object
Custom metadata attached to session

Example

curl https://api.buntime.sh/sessions/ses_abc123 \
  -H "Authorization: Bearer $BUNTIME_API_KEY"
{
  "sessionId": "ses_abc123def456",
  "createdAt": "2024-01-19T10:30:00Z",
  "expiresAt": "2024-01-20T10:30:00Z",
  "lastActive": "2024-01-19T11:00:00Z",
  "state": "active",
  "filesCount": 12,
  "activeProcesses": 1,
  "metadata": {
    "userId": "user_123"
  }
}