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

# List Directories

> List all subdirectories under a parent directory



## OpenAPI

````yaml /api-reference/openapi.json post /directories/list
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /directories/list:
    post:
      tags:
        - Directories
      summary: List Directories
      description: List all subdirectories under a parent directory
      operationId: post_Directories_directories_list
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListDirectoriesRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DirectoryListResponse'
                type: array
                title: Response List Directories Directories List Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListDirectoriesRequest:
      properties:
        parent_id:
          type: string
          format: uuid
          title: Parent Id
      type: object
      required:
        - parent_id
      title: ListDirectoriesRequest
      description: API request schema for listing directories under a parent
    DirectoryListResponse:
      properties:
        is_symlink:
          type: boolean
          title: Is Symlink
          description: True when this item is a projected symlink
          default: false
        target_path:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Target Path
          description: Symlink target path components
        target_path_type:
          anyOf:
            - $ref: '#/components/schemas/SymlinkTargetPathType'
            - type: 'null'
          description: Symlink target path type
        target_resource_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Target Resource Id
          description: Resolved target resource ID
        target_resource_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Resource Name
          description: Resolved target resource name
        target_resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
          description: Resolved or hinted target resource type
        target_resolution_status:
          anyOf:
            - $ref: '#/components/schemas/SymlinkResolutionStatus'
            - type: 'null'
          description: Symlink resolution status
        id:
          type: string
          format: uuid
          title: Id
          description: Directory ID
        name:
          type: string
          title: Name
          description: Directory name
        color:
          type: string
          title: Color
          description: Hex color code for the directory icon
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: ID of the project this directory belongs to
        parent_id:
          type: string
          format: uuid
          title: Parent Id
          description: ID of the parent resource (directory or project)
        actions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Actions
          description: User's permission bitmap on this directory
        created_by_user_id:
          type: string
          format: uuid
          title: Created By User Id
          description: ID of the user that created the directory
        created:
          type: string
          format: date-time
          title: Created
          description: Creation timestamp
        updated:
          type: string
          format: date-time
          title: Updated
          description: Last update timestamp
        client_performed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Client Performed At
          description: >-
            Server-recorded timestamp of the latest user action on this
            directory, flattened from current_revision.client_performed_at. NULL
            when no revision exists. Used by the desktop renderer to compare
            against a per-pin coverage cursor.
      type: object
      required:
        - id
        - name
        - color
        - project_id
        - parent_id
        - created_by_user_id
        - created
        - updated
      title: DirectoryListResponse
      description: API response schema for listing directories.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SymlinkTargetPathType:
      type: string
      enum:
        - relative
        - internal_absolute
        - external_absolute
      title: SymlinkTargetPathType
    ResourceType:
      type: string
      enum:
        - workspace
        - project
        - directory
        - asset
        - symlink
        - collection
      title: ResourceType
      description: |-
        Types of resources in the system hierarchy.

        - Python enum value (``.value``) is the lowercase wire format, e.g.
          ``"workspace"``. This is what crosses the JSON boundary.
        - Python enum name (``.name``) is the uppercase identifier used as the
          PostgreSQL ENUM literal, e.g. ``'WORKSPACE'`` — SQLAlchemy uses
          ``.name`` by default for ``sa.Enum`` columns, so no DB migration is
          needed when this pattern is adopted.

        Raw SQL comparisons against the ``resources.type`` column must use
        ``.name`` (not ``.value``) to match the PG ENUM literal.
    SymlinkResolutionStatus:
      type: string
      enum:
        - resolved
        - dangling
        - permission_denied
        - external
      title: SymlinkResolutionStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````