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

# List machine storage usage breakdown



## OpenAPI

````yaml /dcs-openapi.json get /v1/usage/machines/storage
openapi: 3.1.0
info:
  description: Controlplane API for Dedalus Cloud Services (DCS).
  title: Dedalus Cloud Services API
  version: v1
servers:
  - description: Official DCS API
    url: https://dcs.dedaluslabs.ai
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/usage/machines/storage:
    get:
      tags:
        - Usage
        - Machine Lifecycle
      summary: List machine storage usage breakdown
      operationId: listMachineStorageUsage
      parameters:
        - description: Usage period start (YYYY-MM-DD). Defaults to first of current month.
          explode: false
          in: query
          name: period_start
          schema:
            description: >-
              Usage period start (YYYY-MM-DD). Defaults to first of current
              month.
            type: string
        - description: >-
            Last UTC usage date to include (YYYY-MM-DD). Defaults to current
            time.
          explode: false
          in: query
          name: period_end
          schema:
            description: >-
              Last UTC usage date to include (YYYY-MM-DD). Defaults to current
              time.
            type: string
        - description: Optional machine ID filter.
          explode: false
          in: query
          name: machine_id
          schema:
            description: Optional machine ID filter.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MachineStorageUsageBody'
          description: OK
        '400':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Invalid request
        '401':
          content:
            application/json:
              examples:
                invalid_key:
                  value:
                    error_code: AUTH_INVALID
                    message: invalid Dedalus API key
                    retryable: false
                missing_key:
                  value:
                    error_code: AUTH_REQUIRED
                    message: missing Dedalus API key
                    retryable: false
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Authentication required
        '403':
          content:
            application/json:
              examples:
                org_mismatch:
                  value:
                    error_code: AUTH_ORG_MISMATCH
                    message: org scope does not match API key ownership
                    retryable: false
                scope_forbidden:
                  value:
                    error_code: AUTH_SCOPE_FORBIDDEN
                    message: internal service authorization is required
                    retryable: false
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Internal server error
        '502':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties:
                      type: string
                    type: object
                  error_code:
                    type: string
                  message:
                    type: string
                  retry_after_ms:
                    format: int64
                    type: integer
                  retryable:
                    type: boolean
                required:
                  - error_code
                  - message
                  - retryable
                type: object
          description: Billing ledger unavailable
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
components:
  schemas:
    MachineStorageUsageBody:
      additionalProperties: false
      properties:
        period_end:
          description: Exclusive usage period end.
          format: date-time
          type: string
        period_start:
          description: Inclusive usage period start.
          format: date-time
          type: string
        rows:
          description: Machine-level storage usage breakdown rows.
          items:
            $ref: '#/components/schemas/MachineStorageUsageRowBody'
          type:
            - array
            - 'null'
      required:
        - period_start
        - period_end
        - rows
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    MachineStorageUsageRowBody:
      additionalProperties: false
      properties:
        bucket_end:
          description: Exclusive usage bucket end.
          format: date-time
          type: string
        bucket_start:
          description: Inclusive usage bucket start.
          format: date-time
          type: string
        latest_stripe_emitted_at:
          description: >-
            Latest Stripe emission timestamp for the linked org bucket, when
            emitted.
          format: date-time
          type: string
        logical_storage_bytes:
          description: Machine logical bytes observed for storage allocation.
          format: int64
          type: integer
        machine_id:
          description: Machine identifier.
          type: string
        org_metering_bucket_id:
          description: Org storage bucket ID this row contributes to.
          type: string
        storage_mib_seconds:
          description: Allocated logical MiB-seconds for this machine.
          format: int64
          type: integer
        stripe_storage_identifier:
          description: Stripe storage meter event identifier linked to that org bucket.
          type: string
      required:
        - machine_id
        - bucket_start
        - bucket_end
        - logical_storage_bytes
        - storage_mib_seconds
        - org_metering_bucket_id
        - stripe_storage_identifier
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Dedalus API key. Alternative to Bearer token.
      in: header
      name: x-api-key
      type: apiKey
    BearerAuth:
      bearerFormat: Dedalus API key
      description: 'Dedalus API key in Authorization: Bearer <key>.'
      scheme: bearer
      type: http

````