> ## 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.

# Get file details



## OpenAPI

````yaml /api-reference/openapi.json get /v1/volumes/{id}/files/stat
openapi: 3.1.0
info:
  title: microsandbox cloud API
  description: >-
    REST API for microsandbox cloud operations authenticated with an
    organization API key.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - api_key: []
paths:
  /v1/volumes/{id}/files/stat:
    get:
      tags:
        - Volumes
      summary: Get file details
      operationId: stat
      parameters:
        - 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: Get file details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeFileStatResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: invalid request
                  details: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_api_key
                  message: unauthorized
                  details: null
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Volume or path not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: sandbox_not_found
                  message: resource not found
                  details: null
        '502':
          description: Volume filesystem unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: orchestrator_unreachable
                  message: orchestrator unreachable
                  details: null
      security:
        - api_key: []
components:
  schemas:
    VolumeFileStatResponse:
      type: object
      description: Metadata for the requested path.
      required:
        - metadata
      properties:
        metadata:
          $ref: '#/components/schemas/VolumeFileInfo'
    ErrorResponse:
      type: object
      description: Error envelope returned by every non-2xx response.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code, e.g. `invalid_api_key`.
            message:
              type: string
              description: Human-readable description of the error.
            details:
              type:
                - object
                - 'null'
              description: Optional structured context for the error.
    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:
    api_key:
      type: http
      scheme: bearer
      description: Organization API key (msb_…) - org-scoped programmatic access.

````