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

# List a directory in a session's sandbox

> Stats a path under `/workspace` (symlinks resolved; a link that leads outside `/workspace` is a 400) and, for a directory, lists its entries (name and type, at most 1000). Allowed while the session is `ready`.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sessions/{session_id}/files
openapi: 3.1.0
info:
  title: Veri API
  description: >-
    REST API for the Veri RL post-training platform. All requests require a
    Bearer API key (`vk_` prefix).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.veri.studio
    description: Production
security: []
tags:
  - name: Training jobs
    description: Create, monitor, and manage training jobs.
  - name: Datasets
    description: Upload and connect training datasets.
  - name: Deployments
    description: Serve trained models and run inference.
  - name: Volumes
    description: Persistent file storage mounted into jobs.
  - name: Models
    description: Custom model registry deployments serve from.
  - name: Regions
    description: Discover available launch regions.
  - name: GPU
    description: Live GPU availability by provider and region.
  - name: Code artifacts
    description: Upload custom training script bundles.
  - name: Billing
    description: Credit balance and transaction history.
  - name: API keys
    description: Create and revoke API keys.
  - name: Account
    description: The authenticated caller's identity.
  - name: Settings
    description: Account-level integrations (Weights & Biases).
  - name: Metrics
    description: Prometheus metrics export for your own observability stack.
  - name: Evaluators
    description: 'Evaluators: versioned scoring rules (LLM judge, code, human).'
  - name: Experiments
    description: >-
      Experiments: offline runs of a pinned dataset snapshot through a target,
      scored by pinned evaluators.
  - name: Annotation queues
    description: >-
      Human review: queue traces, threads and experiment items, reserve one at a
      time, score them and feed corrections back into datasets.
  - name: Monitors
    description: >-
      Monitors: evaluators scoring a sampled share of a deployment's live
      traffic.
  - name: Observability
    description: Agent conversations, agents and their traffic.
  - name: Public runs
    description: Unauthenticated reads of runs their owners published to Explore.
paths:
  /v1/sessions/{session_id}/files:
    get:
      tags:
        - Sessions
      summary: List a directory in a session's sandbox
      description: >-
        Stats a path under `/workspace` (symlinks resolved; a link that leads
        outside `/workspace` is a 400) and, for a directory, lists its entries
        (name and type, at most 1000). Allowed while the session is `ready`.
      operationId: list_files
      parameters:
        - name: session_id
          in: path
          description: Session ID
          required: true
          schema:
            type: string
        - name: path
          in: query
          description: |-
            Absolute path under /workspace (listing default: /workspace). Other
            query parameters (`list=1`) are accepted and ignored: a directory is
            always listed.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The path and, for a directory, its entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionFileListing'
        '400':
          description: Path outside /workspace, or session ops disabled
        '404':
          description: Session not found in this workspace, or no such path
        '409':
          description: The session is not ready
      security:
        - bearerAuth: []
components:
  schemas:
    SessionFileListing:
      allOf:
        - $ref: '#/components/schemas/FileListing'
        - type: object
          required:
            - object
          properties:
            object:
              type: string
    FileListing:
      type: object
      description: |-
        O11: what a path in /workspace is (`GET /v1/sessions/{id}/files`):
        symlinks resolved; a directory carries its immediate entries.
      required:
        - path
        - type
      properties:
        path:
          type: string
          description: The resolved path (symlinks followed; always under /workspace).
        type:
          type: string
          description: '`file` | `directory` | `symlink` | ...'
        size:
          type:
            - integer
            - 'null'
          format: int64
          description: Bytes, for a file.
        entries:
          type: array
          items:
            $ref: '#/components/schemas/FileEntry'
          description: A directory's entries, sorted by name (at most 1000).
        truncated:
          type: boolean
          description: 'More than 1000 entries: the rest were left out.'
    FileEntry:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
        type:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.