> ## 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 per-volume storage usage



## OpenAPI

````yaml /api-reference/openapi.json get /v1/billing/usage/storage
openapi: 3.1.0
info:
  title: microsandbox cloud API
  description: >-
    REST API for microsandbox cloud: sandbox and volume lifecycle, organization
    context, quotas, usage, and audit events, authenticated with an organization
    API key.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - api_key: []
paths:
  /v1/billing/usage/storage:
    get:
      tags:
        - Usage
      summary: Get per-volume storage usage
      operationId: get_storage_breakdown
      responses:
        '200':
          description: Per-volume / per-day storage usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorageBreakdown'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_api_key
                  message: unauthorized
                  details: null
      security:
        - api_key: []
components:
  schemas:
    StorageBreakdown:
      type: object
      description: >-
        Per-volume durable-storage usage breakdown for an org over a window:

        per-(volume, day) rows plus a directory of the volumes they reference.
        The

        storage sibling of [`UsageBreakdown`](crate::UsageBreakdown). Deleted
        volumes'

        accruals persist, so `rows` may reference `volume_id`s absent from
        `volumes`;

        the client labels those as deleted.
      required:
        - rows
        - volumes
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/StorageDailyUsage'
        volumes:
          type: array
          items:
            $ref: '#/components/schemas/VolumeIdentity'
    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.
    StorageDailyUsage:
      type: object
      description: >-
        Durable-storage usage for one volume on one UTC day, computed on read
        from

        `storage_accruals`. `mib_seconds` is Σ(used_mib × overlap_seconds) over
        the

        day; display converts to GiB-hours or an average GiB. Sum over days for
        a

        volume's period total; sum over volumes for the daily series. The
        storage

        sibling of [`SandboxDailyUsage`](crate::SandboxDailyUsage).
      required:
        - volume_id
        - day
        - mib_seconds
      properties:
        day:
          type: string
          format: date-time
          description: UTC midnight of the day this usage falls in.
        mib_seconds:
          type: number
          format: double
          description: Σ(used_mib × overlap_seconds) for this volume on this day.
        volume_id:
          type: string
          format: uuid
    VolumeIdentity:
      type: object
      description: >-
        Minimal volume display info - the directory that turns the `volume_id`s
        in a

        [`StorageBreakdown`](crate::StorageBreakdown)'s rows into human labels.
        A

        deleted volume's accruals outlive its row, so a breakdown may reference
        ids

        absent from this directory; the client labels those as deleted.
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
          description: '`None` for the host volume (nameless).'
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: Organization API key (msb_…) - org-scoped programmatic access.

````