> ## 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 volume metrics



## OpenAPI

````yaml /api-reference/openapi.personal.json get /v1/orgs/{slug}/volumes/{id}/metrics
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}/metrics:
    get:
      tags:
        - Volumes
      summary: Get volume metrics
      operationId: get_metrics
      parameters:
        - name: slug
          in: path
          description: Organization slug
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Volume id
          required: true
          schema:
            type: string
            format: uuid
        - name: range_secs
          in: query
          description: Look-back window in seconds (default 3600 = 1h, max 604800 = 7d).
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
        - name: step_secs
          in: query
          description: Sample resolution in seconds (default 30, min 5).
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
      responses:
        '200':
          description: Volume performance metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeMetricsResponse'
        '400':
          description: Invalid time range or resolution
        '401':
          description: Unauthorized
        '403':
          description: Insufficient permissions
        '404':
          description: Volume not found
        '502':
          description: Metrics backend unavailable
      security:
        - bearer: []
components:
  schemas:
    VolumeMetricsResponse:
      type: object
      description: Per-volume JuiceFS performance metrics over a time range.
      required:
        - volume_id
        - range
        - metrics
      properties:
        metrics:
          type: object
          description: >-
            Metric key → aggregate series across every worker mounting the
            volume.

            An empty series means "no data in range".
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/MetricSeries'
          propertyNames:
            type: string
        range:
          $ref: '#/components/schemas/MetricsRange'
          description: The resolved query window.
        volume_id:
          type: string
          format: uuid
          description: The volume these metrics belong to.
    MetricSeries:
      type: object
      description: One labelled series for a metric.
      required:
        - labels
        - samples
      properties:
        labels:
          type: object
          description: >-
            Series labels (e.g. `sandbox_name`), minus internal Prometheus
            names.
          additionalProperties:
            type: string
          propertyNames:
            type: string
        samples:
          type: array
          items:
            type: array
            items:
              type: number
              format: double
          description: '`[epoch_millis, value]` pairs in ascending time order.'
    MetricsRange:
      type: object
      description: The resolved time window a metrics response covers.
      required:
        - start
        - end
        - step_secs
      properties:
        end:
          type: integer
          format: int64
          description: Window end, epoch milliseconds.
        start:
          type: integer
          format: int64
          description: Window start, epoch milliseconds.
        step_secs:
          type: integer
          format: int64
          description: Sample resolution in seconds.
          minimum: 0
  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.

````