> ## 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 shelf file tree

> Get the complete file tree with contents for a shelf. Only available when the shelf is in ready or review status.



## OpenAPI

````yaml openapi.yaml get /v1/shelves/{id}/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}/tree:
    get:
      tags:
        - Shelves
      summary: Get shelf file tree
      description: >-
        Get the complete file tree with contents for a shelf. Only available
        when the shelf is in ready or review status.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/ShelfPublicIdParam'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShelfTreeResponse'
          description: File tree with contents
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Shelf not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Shelf is not ready
      security:
        - bearerApiKey: []
components:
  schemas:
    ShelfPublicIdParam:
      pattern: ^shf_[0-9a-f]{24}$
      type: string
    ShelfTreeResponse:
      properties:
        fileCount:
          type: number
        files:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        shelfPublicId:
          pattern: ^shf_[0-9a-f]{24}$
          type: string
      required:
        - shelfPublicId
        - name
        - 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

````