Get Code Context
GET
/v1/sandbox/{sandbox_id}/code/contexts/{context_id}GET
/v1/sandbox/{'{sandbox_id}'}/code/contexts/{'{context_id}'}Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Description
Retrieves details about a specific persistent REPL code context by its ID. Use the context ID returned when the context was created or listed.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sandbox_id | string | Yes | Sandbox ID or name |
context_id | string | Yes | ID of the code context to retrieve |
Responses
200 Success
| Property | Type | Description |
|---|---|---|
id | string | Unique ID of the code context |
language | string | Programming language of the REPL context |
sandbox_id | string | ID of the sandbox this context belongs to |
created_at | string | ISO 8601 timestamp when the context was created |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X GET "https://{instance}.{region}.everstack.ai/v1/sandbox/{sandbox_id}/code/contexts/{context_id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"const sandboxId = "your-sandbox-id";
const contextId = "ctx_abc123";
const response = await fetch(
`https://{instance}.{region}.everstack.ai/v1/sandbox/${sandboxId}/code/contexts/${contextId}`,
{
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
}
);
const data = await response.json();import requests
sandbox_id = "your-sandbox-id"
context_id = "ctx_abc123"
response = requests.get(
f"https://{instance}.{region}.everstack.ai/v1/sandbox/{sandbox_id}/code/contexts/{context_id}",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = response.json()Response
{
"id": "string",
"language": "python",
"sandbox_id": "string",
"created_at": "string"
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
