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

# List one directory of a release, by the release's id



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json get /api/v1/hub/releases/{release_id}/tree
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/hub/releases/{release_id}/tree:
    get:
      tags:
        - Hub
      summary: List one directory of a release, by the release's id
      operationId: hub_list_release_tree
      parameters:
        - name: release_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: The release id
            title: Release Id
          description: The release id
        - name: package_id
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: The package the release must be in
            title: Package Id
          description: The package the release must be in
        - name: path
          in: query
          required: false
          schema:
            type: string
            maxLength: 4096
            description: Directory to list, relative to the package root; empty is the root
            default: ''
            title: Path
          description: Directory to list, relative to the package root; empty is the root
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseFiles'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
      security:
        - HTTPBearer: []
components:
  schemas:
    ReleaseFiles:
      properties:
        kind:
          type: string
          enum:
            - directory
            - file
          title: Kind
        path:
          type: string
          title: Path
          description: Empty for the root
        package_id:
          type: string
          title: Package Id
        release_id:
          type: string
          title: Release Id
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        index_status:
          anyOf:
            - type: string
              enum:
                - processing
                - completed
                - failed
            - type: 'null'
          title: Index Status
          description: A root with no entries usually means indexing hasn't finished
        entries:
          items:
            $ref: '#/components/schemas/ReleaseFileEntry'
          type: array
          title: Entries
          description: Directories first, then files
        file:
          anyOf:
            - $ref: '#/components/schemas/ReleaseFileEntry'
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Time-limited link to a file's content
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - kind
        - path
        - package_id
        - release_id
        - version
        - index_status
      title: ReleaseFiles
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorEnvelope
    ReleaseFileEntry:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Pass to `GET /files/{file_id}`; null for a directory
        name:
          type: string
          title: Name
        path:
          type: string
          title: Path
        is_directory:
          type: boolean
          title: Is Directory
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
        has_content:
          type: boolean
          title: Has Content
          description: False if the file's content can't be linked to or viewed
          default: false
      type: object
      required:
        - name
        - path
        - is_directory
        - size
        - modified_at
        - content_hash
      title: ReleaseFileEntry
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: Stable, machine-readable error code
        message:
          type: string
          title: Message
        details:
          type: object
          title: Details
      type: object
      required:
        - code
        - message
      title: ErrorBody
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````