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

# Get version file tree

> Get the complete file tree with contents for a specific version.



## OpenAPI

````yaml openapi.yaml get /v1/shelves/{id}/versions/{version}/tree
openapi: 3.1.0
info:
  description: >-
    Convert documents into structured Markdown filesystems that AI agents can
    hydrate and use in sandbox runtimes.
  title: Shelv API
  version: 1.0.0
servers:
  - url: https://api.shelv.dev
security:
  - bearerApiKey: []
paths:
  /v1/shelves/{id}/versions/{version}/tree:
    get:
      tags:
        - Shelves
      summary: Get version file tree
      description: Get the complete file tree with contents for a specific version.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/ShelfPublicIdParam'
        - in: path
          name: version
          required: true
          schema:
            description: Version number
            exclusiveMinimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShelfVersionTreeResponse'
          description: File tree with contents
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Shelf or version not found
      security:
        - bearerApiKey: []
components:
  schemas:
    ShelfPublicIdParam:
      pattern: ^shf_[0-9a-f]{24}$
      type: string
    ShelfVersionTreeResponse:
      properties:
        fileCount:
          type: number
        files:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        shelfPublicId:
          pattern: ^shf_[0-9a-f]{24}$
          type: string
        versionNumber:
          type: number
      required:
        - shelfPublicId
        - name
        - versionNumber
        - fileCount
        - files
      type: object
    ErrorResponse:
      properties:
        code:
          type: string
        details: {}
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearerApiKey:
      bearerFormat: APIKey
      scheme: bearer
      type: http

````