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

# Get a breakdown of your credit consumption for flat-rated products

> Returns a breakdown of your credit consumption for flat-rated products, grouped by calendar day (per UTC) and then by the type of consumption and relevant dimensions. This data refreshes every three hours to reflect recent credit usage.



## OpenAPI

````yaml /openapi/public-api-endpoint-reference.yaml get /v1/consumption
openapi: 3.1.0
info:
  title: Maia Public REST API
  version: '1.0'
servers:
  - description: EU1
    url: https://eu1.api.matillion.com/dpc
  - description: US1
    url: https://us1.api.matillion.com/dpc
security:
  - bearerAuth: []
tags:
  - description: Manage Schedules
    name: Schedules
  - description: Manage Connections
    name: Connections
  - description: Operations for managing Project Variables
    name: Project Variables
  - description: Manage Pipelines
    name: Pipelines
  - description: Review pipelines against quality rules
    name: Pipeline Quality Review
  - description: Execute tests within a project
    name: Test Execution
  - description: Manage your AI agent tasks
    name: AI Agent Tasks
  - description: SCIM endpoints for user/group permission management
    name: Directory Integration
  - description: Publish shared pipeline artifacts
    name: Shared Pipeline Artifacts
  - description: Manage Repositories
    name: Repositories
  - description: Report on Credit Consumption
    name: Consumption
  - description: Manage Artifacts
    name: Artifacts
  - description: Operations for data lineage and governance
    name: Data Lineage
  - description: Manage Streaming Pipelines
    name: Streaming Pipelines
  - description: Execute a pipeline
    name: Pipeline Execution
  - description: ''
    name: Environments
  - description: ''
    name: Projects
  - description: Manage Agents
    name: Agents
  - description: Operations for managing Environment-level Overrides of Project Variables
    name: Project Variable Environment Overrides
  - description: Query audit events
    name: Audit Events
  - description: Connector Profiles
    name: Connectors
paths:
  /v1/consumption:
    get:
      tags:
        - Consumption
      summary: Get a breakdown of your credit consumption for flat-rated products
      description: >-
        Returns a breakdown of your credit consumption for flat-rated products,
        grouped by calendar day (per UTC) and then by the type of consumption
        and relevant dimensions. This data refreshes every three hours to
        reflect recent credit usage.
      operationId: getConsumption
      parameters:
        - description: First calendar date to include in results (inclusive)
          example: '2024-11-01T00:00:00.000Z'
          in: query
          name: consumedFrom
          required: true
          schema:
            type: string
            format: date
        - description: Calendar date before which results should be included (exclusive)
          example: '2024-12-01T00:00:00.000Z'
          in: query
          name: consumedBefore
          required: true
          schema:
            type: string
            format: date
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Consumption'
          description: Successful
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Wrong request parameters used
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unexpected error occurred
components:
  schemas:
    Consumption:
      type: object
      properties:
        results:
          type: array
          description: >-
            An array of date periods, each containing the consumption for that
            period
          example:
            - consumedFrom: '2024-01-01T00:00:00.000Z'
              consumedBefore: '2024-01-02T00:00:00.000Z'
              consumption:
                - consumptionType: etl-compute
                  dimensions:
                    installationId: 1850bc49-c4a4-4f35-ab3c-827b849548b9
                  credits: 24
                - consumptionType: orchestration
                  dimensions:
                    pipelineName: projects/my-project/pipelines/daily-load.orch.yaml
                    projectId: d46a46c2-7ac4-41a8-b619-4ca34a7f003f
                    environment: default
                  credits: 16.2
                - consumptionType: transformation
                  dimensions:
                    pipelineName: projects/my-project/pipelines/enrich-customers.tran.yaml
                    projectId: d46a46c2-7ac4-41a8-b619-4ca34a7f003f
                    environment: default
                  credits: 9.6
                - consumptionType: streaming
                  dimensions:
                    pipelineName: projects/my-project/pipelines/cdc-stream
                    projectId: a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                  credits: 9.6
                - consumptionType: data-loader-batch
                  dimensions:
                    pipelineId: '1732786524'
                  credits: 50
                - consumptionType: data-loader-cdc
                  dimensions:
                    pipelineId: '1732786525'
                  credits: 60
                - consumptionType: dpc-users
                  dimensions:
                    userEmail: jane.doe@example.com
                  credits: 70
          items:
            $ref: '#/components/schemas/ConsumptionBreakdown'
    ProblemDetail:
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
        status:
          type: integer
          format: int32
        title:
          type: string
        type:
          type: string
          format: uri
        violations:
          type: array
          items:
            type: string
    ConsumptionBreakdown:
      type: object
      properties:
        consumedBefore:
          type: string
          format: date-time
          description: Calendar date before which results are included (UTC) (exclusive)
          example: '2024-01-02T00:00:00.000Z'
        consumedFrom:
          type: string
          format: date-time
          description: First calendar date included in results (UTC) (inclusive)
          example: '2024-01-01T00:00:00.000Z'
        consumption:
          type: array
          description: All consumption entries for the given date range
          example:
            - consumptionType: etl-compute
              dimensions:
                installationId: 1850bc49-c4a4-4f35-ab3c-827b849548b9
              credits: 24
            - consumptionType: orchestration
              dimensions:
                pipelineName: projects/my-project/pipelines/daily-load.orch.yaml
                projectId: d46a46c2-7ac4-41a8-b619-4ca34a7f003f
                environment: default
              credits: 16.2
            - consumptionType: transformation
              dimensions:
                pipelineName: projects/my-project/pipelines/enrich-customers.tran.yaml
                projectId: d46a46c2-7ac4-41a8-b619-4ca34a7f003f
                environment: default
              credits: 9.6
            - consumptionType: streaming
              dimensions:
                pipelineName: projects/my-project/pipelines/cdc-stream
                projectId: a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
              credits: 9.6
            - consumptionType: data-loader-batch
              dimensions:
                pipelineId: '1732786524'
              credits: 50
            - consumptionType: data-loader-cdc
              dimensions:
                pipelineId: '1732786525'
              credits: 60
            - consumptionType: dpc-users
              dimensions:
                userEmail: jane.doe@example.com
              credits: 70
          items:
            $ref: '#/components/schemas/ConsumptionEntry'
    ConsumptionEntry:
      type: object
      properties:
        consumptionType:
          type: string
          description: The type of credit consumption
          examples:
            - etl-compute
            - orchestration
            - transformation
            - streaming
            - data-loader-batch
            - data-loader-cdc
            - dpc-users
        credits:
          type: number
          format: double
          description: >-
            The number of credits consumed for this combination of type and
            dimensions
          example: 28.4
        dimensions:
          $ref: '#/components/schemas/ConsumptionDimensions'
          description: >-
            Dimensions used to group this consumption entry; these are
            characteristics of the pipeline, what it belongs to or where it ran
          example:
            pipelineName: projects/my-project/pipelines/daily-load.orch.yaml
            projectId: d46a46c2-7ac4-41a8-b619-4ca34a7f003f
            environment: default
    ConsumptionDimensions:
      type: object
      properties:
        environment:
          type: string
          description: >-
            For orchestration and transformation consumption, the name of the
            environment in which the pipeline ran
          example: default
        installationId:
          type: string
          description: For ETL consumption, the identifier of the installation
          example: 1850bc49-c4a4-4f35-ab3c-827b849548b9
        pipelineId:
          type: string
          description: For data loading consumption, the identifier of the pipeline
          example: '1732786522'
        pipelineName:
          type: string
          description: >-
            For orchestration, transformation and streaming consumption, the
            full path of the pipeline (e.g.
            projects/my-project/pipelines/daily-load.orch.yaml). Values
            exceeding 255 characters may be middle-truncated (e.g.
            projects/very/deep/.../my_pipeline.orch.yaml)
          example: projects/my-project/pipelines/my-data-pipeline
        projectId:
          type: string
          description: >-
            For orchestration, transformation and streaming consumption, the
            identifier of the containing project (returned alongside
            `pipelineName`)
          example: d46a46c2-7ac4-41a8-b619-4ca34a7f003f
        userEmail:
          type: string
          description: >-
            For monthly active DPC users consumption, the email address of the
            Matillion user
          example: example@gmail.com
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: a valid bearer token
      scheme: bearer
      type: http

````