Query monthly bills and usage line items

View generated monthly bills or query aggregated usage line items for a posting period with existing usage. These are separate queries: line items do not require a generated monthly bill.

Prerequisites

Prepare a valid personal access token for the user who owns the billing account. Follow Query accounts and billing settings to obtain the target account ID. For service URLs and authentication, see Service URLs and authentication.

Call sequence

  1. To view generated bills, list monthly bills. The list is empty when no bills exist.

  2. To analyze usage for a posting period, first list rated usage records and select a posting period with existing usage for the target account.

  3. Use that account ID and posting period to list monthly bill usage line items, choosing the grouping dimension as needed.

API operations

Task

API operation

When to use or what to verify

View generated bills

List monthly bills

Query existing monthly bills for the account.

Analyze usage for a posting period

List monthly bill usage line items

Query aggregated line items for a posting period with existing usage.

Confirm the result

Check the posting period in List monthly bill usage line items, then inspect usage and charges by group. An empty monthly bill list does not mean that the account has no rated usage.

Limitations and notes

Do not substitute the current month for the record’s actual posting period, or treat the presence of line items as proof that a monthly bill has been generated. The bill list and line items support different filters; follow their respective action pages.

Last updated on