Skip to main content

Get Session Status

GET /v1/sessions/status/{session_id}

Check whether one of your sessions exists and whether its VM is alive. Returns exists, vm_assigned, vm_alive (true while the VM's status is active), vm_status, vm_id, uptime_seconds and expires_in_seconds (while the VM is alive) and created_at. An unknown session_id returns 200 with exists false.

Authentication​

Requires authentication via: OAuth2PasswordBearer.

Parameters​

NameInTypeRequiredDescriptionConstraints
session_idpathstringYes
X-API-Keyheaderstring | nullNonullable

Responses​

200​

Successful Response

application/json​

Resolved schema:

{
"properties": {
"session_id": {
"type": "string",
"title": "Session Id"
},
"exists": {
"type": "boolean",
"title": "Exists"
},
"vm_assigned": {
"type": "boolean",
"title": "Vm Assigned"
},
"vm_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Vm Status"
},
"vm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Vm Id"
},
"vm_alive": {
"type": "boolean",
"title": "Vm Alive",
"default": false
},
"uptime_seconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Uptime Seconds"
},
"expires_in_seconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Expires In Seconds"
},
"created_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Created At"
},
"env_status": {
"type": "string",
"title": "Env Status",
"default": "none"
},
"env_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Env Error"
}
},
"type": "object",
"required": [
"session_id",
"exists",
"vm_assigned"
],
"title": "SessionStatusResponse",
"description": "Response model for session status check."
}

Field details:

FieldTypeRequiredDescriptionConstraints
session_idstringYes
existsbooleanYes
vm_assignedbooleanYes
vm_statusstring | nullNonullable
vm_idstring | nullNonullable
vm_alivebooleanNodefault=false
uptime_secondsnumber | nullNonullable
expires_in_secondsnumber | nullNonullable
created_atstring | nullNoformat=date-time, nullable
env_statusstringNodefault="none"
env_errorstring | nullNonullable

400​

session_id is not a valid UUID.

No response body.

401​

No credentials, or the Bearer token / X-API-Key is invalid.

No response body.

403​

The account is disabled, or a guest token was used; or the session belongs to another account.

No response body.

422​

Validation Error

application/json​

Resolved schema:

{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo