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

# List directory contents



## OpenAPI

````yaml /api-reference/openapi.personal.json get /v1/orgs/{slug}/volumes/{id}/files
openapi: 3.1.0
info:
  title: Personal token API
  description: User-scoped API for account and organization management.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - bearer: []
paths:
  /v1/orgs/{slug}/volumes/{id}/files:
    get:
      tags:
        - Volumes
      summary: List directory contents
      operationId: list
      parameters:
        - name: slug
          in: path
          description: Organization slug
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Volume UUID
          required: true
          schema:
            type: string
            format: uuid
        - name: x-msb-file-path
          in: header
          description: URL-safe base64 encoded volume-relative UTF-8 path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List directory contents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeFileListResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Insufficient permissions
        '404':
          description: Volume or path not found
        '502':
          description: Volume filesystem unavailable
      security:
        - bearer: []
components:
  schemas:
    VolumeFileListResponse:
      type: object
      description: Immediate entries in a directory.
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/VolumeFileInfo'
    VolumeFileInfo:
      type: object
      description: Metadata for a file or directory within a volume.
      required:
        - path
        - kind
        - size
        - mode
        - uid
        - gid
        - readonly
      properties:
        accessed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        gid:
          type: integer
          format: int32
          minimum: 0
        kind:
          $ref: '#/components/schemas/VolumeFileKind'
        mode:
          type: integer
          format: int32
          description: Unix file mode bits.
          minimum: 0
        modified_at:
          type:
            - string
            - 'null'
          format: date-time
        path:
          type: string
          description: Volume-relative path.
        readonly:
          type: boolean
        size:
          type: integer
          format: int64
          description: Size in bytes.
          minimum: 0
        uid:
          type: integer
          format: int32
          minimum: 0
    VolumeFileKind:
      type: string
      description: Type of a volume entry.
      enum:
        - file
        - directory
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Personal access token (msb_pat_…) or session JWT - the credential an
        agent acts with on a user's behalf.

````