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

# List Workspaces

> Retrieve all workspaces owned by the authenticated user.



## OpenAPI

````yaml GET /api/v1/workspaces
openapi: 3.1.0
info:
  title: Rigbox Public API
  description: >-
    Gateway-owned public API for Rigbox. The gateway composes its local
    lifecycle API with service-owned exported specs.
  contact:
    name: Rigbox
    url: https://rigbox.dev
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.rigbox.dev
    description: Production gateway
security: []
tags:
  - name: Workspaces
  - name: CLI
  - name: Observability
  - name: Auth
  - name: API Keys
  - name: Access Control
  - name: Apps
  - name: App Catalog
  - name: Logs
  - name: AI
  - name: Tools
  - name: Snapshots
  - name: SSH Keys
  - name: Templates
  - name: Setup Scripts
  - name: Service Specs
  - name: Deploy
  - name: Community
  - name: User Settings
  - name: Roadmap
  - name: System
paths:
  /api/v1/workspaces:
    get:
      tags:
        - Workspaces
      summary: List all workspaces.
      description: List all workspaces on your account with their status and resources.
      operationId: list_vms
      parameters:
        - name: max_results
          in: query
          description: >-
            Maximum items to return. Clamped to `[1, MAX_LIMIT]`. Default 50.


            Deserialized leniently from a string: axum's `Query`
            (serde_urlencoded)

            cannot coerce a *flattened* numeric field, so a struct that

            `#[serde(flatten)]`s `PageParams` (e.g. `ListAppsQuery`) would
            otherwise

            fail with "invalid type: string, expected u32" on `?max_results=50`.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: cursor
          in: query
          description: |-
            Opaque cursor returned by a prior call's `next_cursor`. Omit on the
            first page.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Workspaces page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_Vm'
      security:
        - bearer: []
components:
  schemas:
    Page_Vm:
      type: object
      description: 'Paginated response envelope. `next_cursor: None` ⇒ last page.'
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - id
              - user_id
              - node_id
              - name
              - status
              - image
              - ram_mb
              - vcpu_count
              - disk_size_mb
              - created_at
              - updated_at
            properties:
              ai_mode:
                type:
                  - string
                  - 'null'
                description: >-
                  Per-workspace override for the AI mode (`managed` or `byok`).

                  `None` means inherit from `users.ai_mode` (the per-account
                  default).
              cloned_from:
                type:
                  - string
                  - 'null'
                description: >-
                  Bluegreen preview lineage. `None` = a normal workspace.
                  `Some(source_id)`

                  = this VM is a COW clone of `source_id`, booted as a hidden
                  preview;

                  promote repoints the prod subdomain's edge route to it. See

                  [`Vm::is_preview`].
              created_at:
                type: string
                format: date-time
              creation_attempts:
                type: integer
                format: int32
              creation_started_at:
                type:
                  - string
                  - 'null'
                format: date-time
              disk_size_mb:
                type: integer
                format: int32
                minimum: 0
              env_vars:
                type:
                  - object
                  - 'null'
                additionalProperties:
                  type: string
                propertyNames:
                  type: string
              failure_code:
                type:
                  - string
                  - 'null'
              failure_reason:
                type:
                  - string
                  - 'null'
              id:
                type: string
              image:
                type: string
              image_digest:
                type:
                  - string
                  - 'null'
                description: >-
                  Content-addressed image this workspace is pinned to. When set,
                  the

                  workspace boots from this registry image (staged as the rootfs
                  on first

                  boot) instead of the named base in `image`. `None` = the
                  named-base path.
              ip_address:
                type:
                  - string
                  - 'null'
              name:
                type: string
              node_id:
                type: string
              ram_mb:
                type: integer
                format: int32
                minimum: 0
              service_spec_ids:
                type:
                  - array
                  - 'null'
                items:
                  type: string
              setup_script_ids:
                type:
                  - array
                  - 'null'
                items:
                  type: string
              status:
                $ref: '#/components/schemas/VmStatus'
              template_id:
                type:
                  - string
                  - 'null'
              updated_at:
                type: string
                format: date-time
              user_id:
                type: string
              vcpu_count:
                type: integer
                format: int32
                minimum: 0
        next_cursor:
          type:
            - string
            - 'null'
    VmStatus:
      type: string
      enum:
        - provisioned
        - provisioning
        - starting
        - running
        - stopping
        - stopped
        - deleting
        - failed
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````