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

# List workspaces available to current user



## OpenAPI

````yaml /openapi/control-plane-public.json get /api/v1/workspaces
openapi: 3.1.0
info:
  title: AcornOps Control Plane API
  version: 0.0.1-experimental.1
  description: >-
    Control plane API for workspaces, targets, Kubernetes clusters, virtual
    machines, sessions, runs, auth, and internal execution wiring.
servers:
  - url: https://api.acornops.dev
security: []
tags:
  - name: health
    description: Health and readiness endpoints.
  - name: auth
    description: >-
      OIDC, password, browser session, and external integration account link
      endpoints.
  - name: workspaces
    description: Workspace, target, Kubernetes cluster, and VM management endpoints.
  - name: webhooks
    description: Best-effort webhook subscription and delivery history endpoints.
  - name: sessions
    description: Session and message endpoints.
  - name: runs
    description: Run query, cancel, and stream endpoints.
  - name: workflows
    description: >-
      Workspace workflow definitions, schedules, sessions, and approval inbox
      endpoints.
  - name: agents
    description: >-
      Workspace-scoped custom agent definitions, triggers, versions, tests, and
      activity.
  - name: admin
    description: Operator-only admin API protected exclusively by admin bearer tokens.
  - name: internal
    description: Internal execution endpoints for execution-engine.
paths:
  /api/v1/workspaces:
    get:
      tags:
        - workspaces
      summary: List workspaces available to current user
      parameters:
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - in: query
          name: cursor
          required: false
          schema:
            type: string
        - in: query
          name: q
          required: false
          schema:
            type: string
      responses:
        '200':
          description: >-
            Workspace page payload: { items, nextCursor? }. Workspace items
            include plan.{key,name} and
            quota.{members,kubernetesClusters,virtualMachines}.{used,limit};
            operational quota usage is redacted to 0 when
            permissions.read_workspace_data is false, and member usage requires
            permissions.read_members.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePage'
        '400':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing browser session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - userSession: []
components:
  schemas:
    WorkspacePage:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
        nextCursor:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
              description: Optional structured error details.
    Workspace:
      type: object
      required:
        - id
        - name
        - role
        - permissions
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        role:
          type: string
        permissions:
          type: object
          additionalProperties:
            type: boolean
        currentUserRoleTemplate:
          $ref: '#/components/schemas/WorkspaceRoleTemplate'
        memberCount:
          type: integer
        clusterCount:
          type: integer
        virtualMachineCount:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
    WorkspaceRoleTemplate:
      type: object
      required:
        - key
        - displayName
        - kind
        - capabilities
        - capabilityGroups
        - protected
        - sortOrder
      properties:
        key:
          type: string
        displayName:
          type: string
        description:
          type: string
        kind:
          type: string
          enum:
            - system
            - custom
        capabilities:
          type: array
          items:
            type: string
        capabilityGroups:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceRoleCapabilityGroup'
        protected:
          type: boolean
        sortOrder:
          type: integer
      additionalProperties: true
    WorkspaceRoleCapabilityGroup:
      type: object
      required:
        - key
        - capabilities
        - sortOrder
      properties:
        key:
          type: string
          enum:
            - workspace
            - members
            - targets
            - operations
            - settings
        capabilities:
          type: array
          items:
            type: string
        sortOrder:
          type: integer
      additionalProperties: true
  securitySchemes:
    userSession:
      type: apiKey
      in: cookie
      name: acornops_cp_session

````