Everstack
API ReferenceSandboxGet Code Context

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

ParameterTypeRequiredDescription
sandbox_idstringYesSandbox ID or name
context_idstringYesID of the code context to retrieve

Responses

200 Success

PropertyTypeDescription
idstringUnique ID of the code context
languagestringProgramming language of the REPL context
sandbox_idstringID of the sandbox this context belongs to
created_atstringISO 8601 timestamp when the context was created

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

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"
    }
  ]
}