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

> Groups persistent storage usage by volume and day for the requested time range.



## OpenAPI

````yaml /api-reference/openapi.personal.json get /v1/orgs/{slug}/billing/usage/storage
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}/billing/usage/storage:
    get:
      tags:
        - Billing
      summary: Get storage usage
      description: >-
        Groups persistent storage usage by volume and day for the requested time
        range.
      operationId: get_storage_breakdown
      parameters:
        - name: slug
          in: path
          description: Organization slug
          required: true
          schema:
            type: string
        - name: from
          in: query
          description: Window start (RFC 3339); defaults to month start
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: Window end (RFC 3339); defaults to now
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Per-volume / per-day storage usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorageBreakdown'
        '401':
          description: Unauthorized
      security:
        - bearer: []
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'

        intervals 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'
    StorageDailyUsage:
      type: object
      description: >-
        Durable-storage usage for one volume on one UTC day, computed on read
        from

        `storage_metering_intervals`. `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 intervals 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:
    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.

````