> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textql.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Sandcastle Status

> Get the current status of a sandbox



## OpenAPI

````yaml GET /v2/sandcastles/{id}
openapi: 3.1.0
info:
  title: TextQL v2 API
  version: '2.0'
  description: >
    REST API for TextQL platform operations. All endpoints require Bearer token
    authentication.
servers:
  - url: https://app.textql.com
security:
  - bearerAuth: []
tags:
  - name: Chat
    description: Create and manage AI chat sessions
  - name: Connectors
    description: List available data connectors
  - name: Playbooks
    description: Create, configure, and run automated playbooks
  - name: Sandcastles
    description: Manage Python sandbox environments for code execution
  - name: Changes
    description: Review, approve, and deny Context Library changes
paths:
  /v2/sandcastles/{id}:
    get:
      tags:
        - Sandcastles
      summary: Get Sandcastle Status
      description: >-
        Get the current status of a sandbox, including memory usage and loaded
        dataframes.
      operationId: v2.getSandboxStatus
      parameters:
        - $ref: '#/components/parameters/SandboxId'
      responses:
        '200':
          description: Sandbox status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxStatus'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    SandboxId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Sandbox ID
  schemas:
    SandboxStatus:
      type: object
      properties:
        status:
          type: string
          description: >-
            Point-in-time liveness for this sandbox. `stale` and `unknown` are
            list-only states (see SandboxSummary); this endpoint reports only
            `running` or `stopped`.
          enum:
            - running
            - stopped
        memory_usage:
          type: string
          description: Human-readable memory usage (only when running)
        dataframes:
          type: array
          description: Loaded dataframes (only when running)
          items:
            $ref: '#/components/schemas/DataframeInfo'
    DataframeInfo:
      type: object
      properties:
        name:
          type: string
        num_rows:
          type: integer
          format: int32
        num_cols:
          type: integer
          format: int32
        memory_usage_bytes:
          type: integer
          format: int64
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code
              enum:
                - invalid_request
                - unauthenticated
                - permission_denied
                - not_found
                - conflict
                - rate_limit_exceeded
                - internal
                - timeout
                - cancelled
                - execution_failed
                - no_report
            message:
              type: string
              description: Human-readable error message
  responses:
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthenticated
              message: Authentication required
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: permission_denied
              message: Insufficient permissions
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Resource not found
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal
              message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or JWT token

````