# List sandboxes



## OpenAPI

````yaml ${THUNDER_API_BASE}/openapi.json get /sandboxes
openapi: 3.1.0
info:
  contact:
    email: support@thundercompute.one
    name: Thunder Compute API Support
    url: https://www.thundercompute.one/contact
  description: >-
    Retrieve current GPU availability using mode-less spec keys

    Recommended for new integrations. The /status and /v1/status endpoints
    retain their legacy configuration keys for compatibility.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Thunder Compute API
  version: '1.0'
servers:
  - description: Production server
    url: ${THUNDER_API_BASE}/v1
  - description: Production server
    url: ${THUNDER_API_BASE}
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /sandboxes:
    get:
      tags:
        - Sandboxes
      summary: List sandboxes
      parameters:
        - description: Page size (maximum 100)
          in: query
          name: limit
          schema:
            type: integer
        - description: active (default), all, or one of created, ready, finished, failed
          in: query
          name: status
          schema:
            type: string
        - description: Opaque continuation token
          in: query
          name: page_token
          schema:
            type: string
        - description: Workspace ID (defaults to main)
          in: query
          name: workspace_id
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.SandboxListResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Forbidden
      security:
        - ApiKeyAuth: []
components:
  schemas:
    thundertypes.SandboxListResponse:
      properties:
        next_page_token:
          type: string
        sandboxes:
          items:
            $ref: '#/components/schemas/thundertypes.SandboxGetResponse'
          type: array
          uniqueItems: false
      type: object
    thundertypes.ErrorResponse:
      properties:
        code:
          example: 400
          type: integer
        error:
          example: invalid_request
          type: string
        message:
          example: The request is malformed
          type: string
      type: object
    thundertypes.SandboxGetResponse:
      properties:
        created_at:
          type: string
        desired_network_policy_generation:
          description: >-
            DesiredNetworkPolicyGeneration identifies accepted desired
            configuration.
          type: integer
        expires_at:
          type: string
        failure:
          type: string
        failure_code:
          description: >-
            FailureCode and Failure explain a failed sandbox. Without them a
            caller

            sees only "failed" and cannot tell a capacity refusal from a broken

            control plane, which are acted on very differently.
          type: string
        gatedFeatures:
          type: object
        id:
          type: string
        image_id:
          type: string
        lifetime:
          $ref: '#/components/schemas/thundertypes.SandboxLifetime'
        logs:
          items:
            $ref: '#/components/schemas/thundertypes.SandboxLog'
          type: array
          uniqueItems: false
        name:
          type: string
        network_policy:
          $ref: '#/components/schemas/thundertypes.SandboxNetworkPolicy'
        network_policy_generation:
          description: NetworkPolicyGeneration is the last confirmed enforced generation.
          type: integer
        queued:
          description: >-
            Queued is true while a queue-admitted sandbox is waiting for
            placement.
          type: boolean
        ready_at:
          type: string
        spec:
          $ref: '#/components/schemas/thundertypes.SandboxResourceSpec'
        ssh:
          $ref: '#/components/schemas/thundertypes.SandboxSSHConnection'
        status:
          $ref: '#/components/schemas/thundertypes.SandboxStatus'
        stopped_at:
          type: string
        timing_sensitive:
          description: >-
            TimingSensitive reports a sandbox started with timing_sensitive:
            gVisor with its GPUs passed through rather than virtualized.
          type: boolean
        vm:
          description: >-
            VM is true when SSH lands directly in the sandbox's own environment,
            as

            root, rather than in a Thunder guest beside its container: a sandbox
            that

            boots a VM-root image as the whole VM, or a timing-sensitive
            (gVisor)

            one. Clients run commands there directly instead of through docker
            exec.
          type: boolean
        workspace_id:
          type: string
      required:
        - created_at
        - id
        - lifetime
        - name
        - network_policy
        - spec
        - status
      type: object
    thundertypes.SandboxLifetime:
      properties:
        enforce_ttl:
          type: boolean
        max_grace_seconds:
          type: integer
        max_ttl_seconds:
          type: integer
      type: object
    thundertypes.SandboxLog:
      properties:
        data:
          $ref: '#/components/schemas/thundertypes.SandboxLogData'
        event:
          $ref: '#/components/schemas/thundertypes.SandboxLogEvent'
        id:
          type: string
        sandbox_id:
          type: string
        timestamp:
          type: string
        workspace_id:
          type: string
      required:
        - event
        - id
        - sandbox_id
        - timestamp
      type: object
    thundertypes.SandboxNetworkPolicy:
      properties:
        cidr_allowlist:
          items:
            type: string
          type: array
          uniqueItems: false
        domain_allowlist:
          items:
            type: string
          type: array
          uniqueItems: false
        internet_access:
          $ref: '#/components/schemas/thundertypes.SandboxInternetAccess'
      required:
        - internet_access
      type: object
    thundertypes.SandboxResourceSpec:
      properties:
        cpu_count:
          type: integer
        gpu_count:
          type: integer
        gpu_type:
          $ref: '#/components/schemas/thundertypes.SandboxGPUType'
        memory_gib:
          type: integer
        storage_gib:
          type: integer
      required:
        - cpu_count
        - memory_gib
        - storage_gib
      type: object
    thundertypes.SandboxSSHConnection:
      properties:
        host:
          type: string
        port:
          type: integer
        user:
          type: string
      type: object
    thundertypes.SandboxStatus:
      enum:
        - created
        - ready
        - finished
        - failed
      type: string
      x-enum-varnames:
        - SandboxStatusCreated
        - SandboxStatusReady
        - SandboxStatusFinished
        - SandboxStatusFailed
    thundertypes.SandboxLogData:
      properties:
        message:
          type: string
        node_name:
          type: string
        phase:
          type: string
      type: object
    thundertypes.SandboxLogEvent:
      enum:
        - created
        - scheduled
        - started
        - ready
        - finished
        - failed
        - info
      type: string
      x-enum-varnames:
        - SandboxLogEventCreated
        - SandboxLogEventScheduled
        - SandboxLogEventStarted
        - SandboxLogEventReady
        - SandboxLogEventFinished
        - SandboxLogEventFailed
        - SandboxLogEventInfo
    thundertypes.SandboxInternetAccess:
      enum:
        - closed
        - open
        - restricted
      type: string
      x-enum-varnames:
        - SandboxInternetAccessClosed
        - SandboxInternetAccessOpen
        - SandboxInternetAccessRestricted
    thundertypes.SandboxGPUType:
      enum:
        - A6000
        - A100
        - A100XL
        - H100
      type: string
      x-enum-varnames:
        - SandboxGPUTypeA6000
        - SandboxGPUTypeA100
        - SandboxGPUTypeA100XL
        - SandboxGPUTypeH100
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Bearer token authentication. Provide your API token prefixed with
        "Bearer ", e.g. "Bearer your-api-token".
      in: header
      name: Authorization
      type: apiKey

````
