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

# Code Tree



## OpenAPI

````yaml /openapi.json get /api/workspaces/{id}/code/tree
openapi: 3.1.0
info:
  title: Konduktor
  version: 0.1.0
servers:
  - url: http://localhost:8080
    description: Local instance (default)
security: []
paths:
  /api/workspaces/{id}/code/tree:
    get:
      tags:
        - code
      summary: Code Tree
      operationId: code_tree_api_workspaces__id__code_tree_get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
        - name: path
          in: query
          required: false
          schema:
            type: string
            default: ''
            title: Path
            description: 'Relative path within the repo (default: root)'
        - name: depth
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 1
            title: Depth
            description: 'Directory depth (default: 1)'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TreeEntry'
                type: array
                title: Response Code Tree Api Workspaces  Id  Code Tree Get
        '400':
          description: Invalid path
        '404':
          description: Directory not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TreeEntry:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          enum:
            - file
            - directory
          title: Type
        path:
          type: string
          title: Path
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
      type: object
      required:
        - name
        - type
        - path
      title: TreeEntry
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````