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

# List an invoice's daily usage breakdown

> Returns daily usage line items for an invoice. Each row is a distinct charge for a cluster on a given day, so a cluster may have several rows per day. Invoice-level adjustment rows are also included. Obtain invoice IDs from ListInvoices.

Can be used by the following roles assigned at the organization scope:
- BILLING_COORDINATOR
- CLUSTER_ADMIN




## OpenAPI

````yaml /openapi/cloud/latest.json get /api/v1/invoices/{invoice_id}/daily-usage
openapi: 3.0.0
info:
  contact:
    email: support@cockroachlabs.com
    name: Cockroach Labs Support
    url: https://support.cockroachlabs.com
  description: An API for managing CockroachDB Cloud resources
  title: CockroachDB Cloud API
  version: '2026-09-15'
servers:
  - url: https://cockroachlabs.cloud
security:
  - Bearer: []
tags:
  - name: SCIM
  - name: Organizations
  - name: Clusters
  - name: Cluster Disruption
  - name: SQL Users
  - name: Migration Assistant
  - name: Databases
  - name: Customer-managed Encryption Keys
  - name: Client CA Certificates
  - name: Log Export
  - name: Metric Export
  - name: Audit Logs
  - name: IP Allowlists
  - name: Egress Rules
  - name: Billing
  - name: Maintenance Windows
  - name: Blackout Windows
  - name: Role Management
  - name: Service Accounts
  - name: API Keys
  - name: Folders
  - name: Version Deferral
  - name: JWT Issuers
  - name: Private Endpoint Services
  - name: Physical Cluster Replication
  - name: Backup/Restore
  - name: Egress Private Endpoints
  - name: Runtime Scanning
  - name: Virtual Cluster Workspaces
externalDocs:
  description: Use the CockroachDB Cloud API
  url: https://www.cockroachlabs.com/docs/cockroachcloud/cloud-api.html
paths:
  /api/v1/invoices/{invoice_id}/daily-usage:
    get:
      tags:
        - Billing
      summary: List an invoice's daily usage breakdown
      description: >
        Returns daily usage line items for an invoice. Each row is a distinct
        charge for a cluster on a given day, so a cluster may have several rows
        per day. Invoice-level adjustment rows are also included. Obtain invoice
        IDs from ListInvoices.


        Can be used by the following roles assigned at the organization scope:

        - BILLING_COORDINATOR

        - CLUSTER_ADMIN
      operationId: CockroachCloud_ListInvoiceDailyUsage
      parameters:
        - name: invoice_id
          in: path
          description: >-
            invoice_id is the unique ID of the invoice (billing period) whose
            daily

            usage is returned.
          required: true
          schema:
            type: string
        - name: pagination.page
          in: query
          schema:
            type: string
        - name: pagination.limit
          in: query
          schema:
            format: int32
            type: integer
        - name: pagination.as_of_time
          in: query
          schema:
            type: string
            format: date-time
        - name: pagination.sort_order
          in: query
          description: |2-
             - ASC: Sort in ascending order. This is the default unless otherwise specified.
             - DESC: Sort in descending order.
          schema:
            type: string
            enum:
              - ASC
              - DESC
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInvoiceDailyUsageResponse'
        '400':
          description: Returned when a request field is invalid.
          content:
            application/json:
              schema: {}
        '401':
          description: Returned when the token bearer cannot be authenticated.
          content:
            application/json:
              schema: {}
        '403':
          description: >-
            Returned when the user does not have permission to access the
            resource.
          content:
            application/json:
              schema: {}
        '404':
          description: Returned when the resource does not exist.
          content:
            application/json:
              schema: {}
        '500':
          description: Server error
          content:
            application/json:
              schema: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --request GET \
              --url 'https://cockroachlabs.cloud/api/v1/invoices/{invoice_id}/daily-usage?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
components:
  schemas:
    ListInvoiceDailyUsageResponse:
      description: |-
        ListInvoiceDailyUsageResponse is the output of the ListInvoiceDailyUsage
        RPC. Invoice-level details (billing period, totals) are available from
        GetInvoice.
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/KeysetPaginationResponse'
        usage_items:
          description: >-
            usage_items contains the daily usage rows for this page. By default,
            usage

            rows are sorted by usage date and then by cluster, with adjustment
            rows on

            the final pages. In descending order, adjustment rows appear first,

            followed by usage rows from newest to oldest.
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDailyUsageItem'
      example:
        pagination:
          next_page: '2026-01-16'
        usage_items:
          - charge_category: USAGE
            cluster:
              cloud_provider: AWS
              id: b2c3d4e5-0000-0000-0000-000000000000
              name: prod-cluster
              plan_type: STANDARD
            line_item:
              description: Request Units
              locality: us-east-1
              quantity: 1000000
              quantity_unit: REQUEST_UNITS
              total:
                amount: 0.2
                currency: USD
              unit_category: COMPUTE
              unit_cost: 2.e-7
            usage_date: '2026-01-15T00:00:00Z'
      required:
        - usage_items
    Status:
      type: object
      properties:
        code:
          format: int32
          type: integer
        details:
          type: array
          items:
            $ref: '#/components/schemas/Any'
        message:
          type: string
    KeysetPaginationResponse:
      type: object
      properties:
        next_page:
          type: string
        previous_page:
          type: string
    InvoiceDailyUsageItem:
      description: >-
        InvoiceDailyUsageItem is a single row of an invoice's daily usage
        breakdown.
      type: object
      properties:
        charge_category:
          $ref: '#/components/schemas/ChargeCategory.Type'
        cluster:
          $ref: '#/components/schemas/DailyUsageCluster'
        line_item:
          $ref: '#/components/schemas/DailyUsageLineItem'
        usage_date:
          description: >-
            usage_date is the day the usage was incurred. Null for adjustment
            rows.
          type: string
          format: date-time
      example:
        charge_category: USAGE
        cluster:
          cloud_provider: AWS
          id: b2c3d4e5-0000-0000-0000-000000000000
          name: prod-cluster
          plan_type: STANDARD
        line_item:
          description: Request Units
          locality: us-east-1
          quantity: 1000000
          quantity_unit: REQUEST_UNITS
          total:
            amount: 0.2
            currency: USD
          unit_category: COMPUTE
          unit_cost: 2.e-7
        usage_date: '2026-01-15T00:00:00Z'
      required:
        - charge_category
        - line_item
    Any:
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a

        URL that describes the type of the serialized message.


        In its binary encoding, an `Any` is an ordinary message; but in other
        wire

        forms like JSON, it has a special encoding. The format of the type URL
        is

        described on the `type_url` field.


        Protobuf APIs provide utilities to interact with `Any` values:


        - A 'pack' operation accepts a message and constructs a generic `Any`
        wrapper
          around it.
        - An 'unpack' operation reads the content of an `Any` message, either
        into an
          existing message or a new one. Unpack operations must check the type of the
          value they unpack against the declared `type_url`.
        - An 'is' operation decides whether an `Any` contains a message of the
        given
          type, i.e. whether it can 'unpack' that type.

        The JSON format representation of an `Any` follows one of these cases:


        - For types without special-cased JSON encodings, the JSON format
          representation of the `Any` is the same as that of the message, with an
          additional `@type` field which contains the type URL.
        - For types with special-cased JSON encodings (typically called
        'well-known'
          types, listed in https://protobuf.dev/programming-guides/json/#any), the
          JSON format representation has a key `@type` which contains the type URL
          and a key `value` which contains the JSON-serialized value.

        The text format representation of an `Any` is like a message with one
        field

        whose name is the type URL in brackets. For example, an `Any` containing
        a

        `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2
        }`.
      type: object
      properties:
        '@type':
          description: >-
            Identifies the type of the serialized Protobuf message with a URI
            reference

            consisting of a prefix ending in a slash and the fully-qualified
            type name.


            Example: type.googleapis.com/google.protobuf.StringValue


            This string must contain at least one `/` character, and the content
            after

            the last `/` must be the fully-qualified name of the type in
            canonical

            form, without a leading dot. Do not write a scheme on these URI
            references

            so that clients do not attempt to contact them.


            The prefix is arbitrary and Protobuf implementations are expected to

            simply strip off everything up to and including the last `/` to
            identify

            the type. `type.googleapis.com/` is a common default prefix that
            some

            legacy implementations require. This prefix does not indicate the
            origin of

            the type, and URIs containing it are not expected to respond to any

            requests.


            All type URL strings must be legal URI references with the
            additional

            restriction (for the text format) that the content of the reference

            must consist only of alphanumeric characters, percent-encoded
            escapes, and

            characters in the following set (not including the outer backticks):

            `/-.~_!$&()*+,;=`. Despite our allowing percent encodings,
            implementations

            should not unescape them to prevent confusion with existing parsers.
            For

            example, `type.googleapis.com%2FFoo` should be rejected.


            In the original design of `Any`, the possibility of launching a type

            resolution service at these type URLs was considered but Protobuf
            never

            implemented one and considers contacting these URLs to be
            problematic and

            a potential security issue. Do not attempt to contact type URLs.
          type: string
      additionalProperties: {}
    ChargeCategory.Type:
      description: |2-
         - USAGE: USAGE is a metered charge attributed to a cluster on a specific day.
         - ADJUSTMENT: ADJUSTMENT is an invoice-level credit or charge (e.g. premium support)
        not tied to a cluster or a specific day.
      type: string
      enum:
        - USAGE
        - ADJUSTMENT
    DailyUsageCluster:
      description: >-
        DailyUsageCluster identifies the cluster a daily usage row is attributed
        to.

        Its fields report the cluster's current state rather than its state
        during

        the billing period. Use GetCluster for the cluster's full metadata.
      type: object
      properties:
        cloud_provider:
          $ref: '#/components/schemas/CloudProvider.Type'
        edition:
          $ref: '#/components/schemas/Edition.Type'
        id:
          description: id is the unique ID of the cluster.
          type: string
        name:
          description: >-
            name is the cluster's name. Retained so rows for deleted clusters
            stay

            human-readable.
          type: string
        plan_type:
          $ref: '#/components/schemas/Plan.Type'
      example:
        cloud_provider: AWS
        id: b2c3d4e5-0000-0000-0000-000000000000
        name: prod-cluster
        plan_type: STANDARD
      required:
        - id
        - name
        - cloud_provider
    DailyUsageLineItem:
      description: >-
        DailyUsageLineItem is the charge carried by a daily usage row, priced
        along

        the dimensions daily usage is billed on.
      type: object
      properties:
        description:
          description: >-
            description is the charge name, or the adjustment name on adjustment
            rows.
          type: string
        locality:
          description: >-
            locality is the region the charge was incurred in. Empty for
            adjustment rows

            and for charges not attributable to a specific region.
          type: string
        quantity:
          description: quantity is the number of units consumed. Zero for adjustment rows.
          type: number
          format: double
        quantity_unit:
          $ref: '#/components/schemas/QuantityUnit.Type'
        total:
          $ref: '#/components/schemas/CurrencyAmount'
        unit_category:
          $ref: '#/components/schemas/UnitCategory.Type'
        unit_cost:
          description: unit_cost is the cost per unit. Zero for adjustment rows.
          type: number
          format: double
      example:
        description: Request Units
        locality: us-east-1
        quantity: 1000000
        quantity_unit: REQUEST_UNITS
        total:
          amount: 0.2
          currency: USD
        unit_category: COMPUTE
        unit_cost: 2.e-7
      required:
        - description
        - quantity
        - unit_cost
        - total
    CloudProvider.Type:
      description: |2-
         - GCP: The Google Cloud Platform cloud provider.
         - AWS: The Amazon Web Services cloud provider.
         - AZURE: The Azure cloud provider.
      type: string
      enum:
        - GCP
        - AWS
        - AZURE
    Edition.Type:
      description: >-
        A Continuum edition, which determines the capabilities a cluster's
        license

        grants. Editions are available only to clusters in Cockroach Continuum

        organizations, and a request that sets an edition from a non-Continuum

        organization is rejected. Editions and plans are mutually exclusive, so
        a

        cluster reports one or the other, never both.

         - STANDARD: The Standard edition grants the Standard capability set. See
        [Editions and
        add-ons](https://www.cockroachlabs.com/docs/continuum/editions-and-add-ons)

        for the capabilities each edition includes.
         - MISSION_CRITICAL: The Mission Critical edition grants the Standard capability set plus the
        Mission Critical capabilities. See

        [Editions and
        add-ons](https://www.cockroachlabs.com/docs/continuum/editions-and-add-ons)

        for the capabilities each edition includes.
      type: string
      enum:
        - STANDARD
        - MISSION_CRITICAL
    Plan.Type:
      description: >2-
         - BASIC: The Basic plan includes essential operational features, is available in
        select regions, and offers on-demand capacity, making it ideal for small

        teams with unpredictable workloads.
         - STANDARD: The Standard plan includes standard enterprise security and monitoring
        features, is available in all supported regions, and offers provisioned

        pricing, making it the default choice for most CockroachDB production

        workloads.
         - ADVANCED: The Advanced plan is ideal for workloads with stringent isolation,
        compliance, and security requirements such as CMEK, PCI and
        HIPAA-readiness,

        and support for dedicated hardware. Customers are advised to have their

        account team and/or Cockroach Labs Support <support@cockroachlabs.com>

        involved when provisioning Advanced clusters.
      type: string
      enum:
        - BASIC
        - STANDARD
        - ADVANCED
    QuantityUnit.Type:
      type: string
      enum:
        - HOURS
        - REQUEST_UNITS
        - GIB
        - GIB_HOURS
        - VCPU_HOURS
    CurrencyAmount:
      type: object
      properties:
        amount:
          description: >-
            amount is the quantity of currency. Internally, currency amounts are
            tracked

            and stored using an arbitrary-precision decimal representation, but
            are serialized

            as 64-bit floating point numbers. There may be minor rounding
            discrepancies

            when parsed as a 32-bit float.
          type: number
          format: double
        currency:
          $ref: '#/components/schemas/Currency.Type'
    UnitCategory.Type:
      description: |2-
         - COMPUTE: COMPUTE is compute usage (e.g. provisioned vCPUs, request units).
         - STORAGE: STORAGE is primary data storage usage.
         - DATA_TRANSFER: DATA_TRANSFER is network data transfer usage.
         - BACKUP_STORAGE: BACKUP_STORAGE is backup storage usage.
         - CHANGEFEED: CHANGEFEED is changefeed (CDC) usage.
      type: string
      enum:
        - COMPUTE
        - STORAGE
        - DATA_TRANSFER
        - BACKUP_STORAGE
        - CHANGEFEED
    Currency.Type:
      description: |2-
         - COCKROACH_CREDITS: COCKROACH_CREDITS is the same credits currency as CRDB_CLOUD_CREDITS,
        reported under its current name. Organizations on Continuum receive this
        value; all others continue to receive CRDB_CLOUD_CREDITS.
      type: string
      enum:
        - USD
        - CRDB_CLOUD_CREDITS
        - COCKROACH_CREDITS
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````