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

# List files in artifact version

> List files and directories in an artifact version.



## OpenAPI

````yaml /openapi.json post /api/svc/v1/artifact-versions/files
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: example-company.truefoundry.cloud
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: LLM Gateway Budgets
  - name: Logs
  - name: MCP Registry
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
  - name: Provider Accounts
paths:
  /api/svc/v1/artifact-versions/files:
    post:
      tags:
        - Artifacts
      summary: List files in artifact version
      description: List files and directories in an artifact version.
      operationId: ArtifactVersion.listFilesForArtifactVersion
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListFilesRequest'
      responses:
        '200':
          description: List of files and directories with pagination information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFilesResponse'
      security:
        - jwt: []
components:
  schemas:
    ListFilesRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the artifact version to list files for.
        path:
          type: string
          description: Path within the artifact version to list files under.
          nullable: true
        limit:
          type: number
          description: Maximum number of files to return.
          nullable: true
        pageToken:
          type: string
          nullable: true
          description: Token to retrieve the next page of results
      required:
        - id
      title: ListFilesRequest
      x-fern-type-name: ListFilesRequest
    ListFilesResponse:
      type: object
      properties:
        data:
          description: List of files and directories in the artifact version.
          type: array
          items:
            $ref: '#/components/schemas/FileInfo'
        pagination:
          description: Pagination information for the response.
          allOf:
            - $ref: '#/components/schemas/TokenPagination'
      required:
        - data
        - pagination
      title: ListFilesResponse
      x-fern-type-name: ListFilesResponse
    FileInfo:
      type: object
      properties:
        path:
          type: string
          description: >-
            Path of the file or directory relative to the artifact version
            storage root.
        is_dir:
          type: boolean
          description: Whether the entry is a directory.
        file_size:
          type: number
          description: Size of the file in bytes.
          nullable: true
        signed_url:
          type: string
          description: Signed URL used to download the file.
          nullable: true
        last_modified:
          format: date-time
          type: string
          description: Timestamp when the file was last modified.
          nullable: true
      required:
        - path
        - is_dir
      title: FileInfo
      x-fern-type-name: FileInfo
    TokenPagination:
      type: object
      properties:
        limit:
          type: integer
          description: Number of items per page
          example: 10
          nullable: true
        nextPageToken:
          type: string
          description: Base64 encoded token for the next page
          nullable: true
        previousPageToken:
          type: string
          description: Base64 encoded token for the previous page
          nullable: true
      title: TokenPagination
      x-fern-type-name: TokenPagination
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````