> ## 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.

# Search Subdirs

> Search / List immediate subdirectories of `path`.

Used by the GUI's workspace picker. Symlinks and files are skipped. Hidden
entries (names starting with '.') are skipped unless ``include_hidden`` is
True. Returns absolute paths so the GUI can use a result directly as
``workspace.working_dir``.

Results are sorted case-insensitively by name and paginated. ``page_id`` is
the ``next_page_id`` returned by the previous page (the lowercase name of
the first item to include on the next page).



## OpenAPI

````yaml /openapi/agent-sdk.json get /api/file/search_subdirs
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/file/search_subdirs:
    get:
      tags:
        - Files
      summary: Search Subdirs
      description: >-
        Search / List immediate subdirectories of `path`.


        Used by the GUI's workspace picker. Symlinks and files are skipped.
        Hidden

        entries (names starting with '.') are skipped unless ``include_hidden``
        is

        True. Returns absolute paths so the GUI can use a result directly as

        ``workspace.working_dir``.


        Results are sorted case-insensitively by name and paginated. ``page_id``
        is

        the ``next_page_id`` returned by the previous page (the lowercase name
        of

        the first item to include on the next page).
      operationId: search_subdirs_api_file_search_subdirs_get
      parameters:
        - description: Absolute directory path to list subdirectories of
          in: query
          name: path
          required: true
          schema:
            description: Absolute directory path to list subdirectories of
            title: Path
            type: string
        - in: query
          name: page_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Optional next_page_id from the previously returned page
        - in: query
          name: limit
          required: false
          schema:
            default: 100
            exclusiveMinimum: 0
            maximum: 100
            title: The max number of results in the page
            type: integer
        - in: query
          name: include_hidden
          required: false
          schema:
            default: false
            title: Include hidden subdirectories (names starting with '.')
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubdirectoryPage'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    SubdirectoryPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SubdirectoryEntry'
          title: Items
          type: array
        next_page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Page Id
      required:
        - items
      title: SubdirectoryPage
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SubdirectoryEntry:
      properties:
        name:
          title: Name
          type: string
        path:
          title: Path
          type: string
      required:
        - name
        - path
      title: SubdirectoryEntry
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      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.