> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Workspaces

> Return the saved workspaces and workspace parents.



## OpenAPI

````yaml /openapi/agent-sdk.json get /api/workspaces
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/workspaces:
    get:
      tags:
        - Workspaces
      summary: List Workspaces
      description: Return the saved workspaces and workspace parents.
      operationId: list_workspaces_api_workspaces_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesListResponse'
          description: Successful Response
      security:
        - APIKeyHeader: []
components:
  schemas:
    WorkspacesListResponse:
      properties:
        workspaceParents:
          items:
            $ref: '#/components/schemas/WorkspaceParentItem'
          title: Workspaceparents
          type: array
        workspaces:
          items:
            $ref: '#/components/schemas/WorkspaceItem'
          title: Workspaces
          type: array
      title: WorkspacesListResponse
      type: object
    WorkspaceParentItem:
      properties:
        id:
          maxLength: 4096
          minLength: 1
          title: Id
          type: string
        name:
          maxLength: 256
          minLength: 1
          title: Name
          type: string
        path:
          maxLength: 4096
          minLength: 1
          title: Path
          type: string
      required:
        - id
        - name
        - path
      title: WorkspaceParentItem
      type: object
    WorkspaceItem:
      properties:
        id:
          maxLength: 4096
          minLength: 1
          title: Id
          type: string
        name:
          maxLength: 256
          minLength: 1
          title: Name
          type: string
        parentPath:
          anyOf:
            - maxLength: 4096
              type: string
            - type: 'null'
          title: Parentpath
        path:
          maxLength: 4096
          minLength: 1
          title: Path
          type: string
      required:
        - id
        - name
        - path
      title: WorkspaceItem
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.