Get usage reports for enterprise entities
GET /v1/resource-usage-reports
Usage reports for entities in the IBM Cloud enterprise. These entities can be the enterprise, an account group, or an account.
Authorization
To call this method, you must be assigned one or more IAM access roles that include the following action.
The actions that are required correspond with the entities that you're retrieving the usage report for.
enterprise.enterprise.retrieveenterprise.enterprise.retrieve-usage-reportenterprise.account-group.retrieve-usage-reportenterprise.account-group.retrieveenterprise.account.retrieve-usage-reportenterprise.account.retrievebilling.billing-unit.read
Auditing
Calling this method generates the following auditing event.
billing.enterprise-usage-report.read
Request
Path Parameters
Query Parameters
enterprise_id
string
The ID of the enterprise for which the reports are queried. This parameter cannot be used with the `account_id` or `account_group_id` query parameters.
account_group_id
string
The ID of the account group for which the reports are queried. This parameter cannot be used with the `account_id` or `enterprise_id` query parameters.
account_id
string
The ID of the account for which the reports are queried. This parameter cannot be used with the `account_group_id` or `enterprise_id` query parameters.
children
boolean
Returns the reports for the immediate child entities under the current account group or enterprise. This parameter cannot be used with the `account_id` query parameter.
month
string
The billing month for which the usage report is requested. The format is in yyyy-mm. Defaults to the month in which the report is queried.
billing_unit_id
string
The ID of the billing unit by which to filter the reports.
limit
integer
The maximum number of search results to be returned.
offset
string
An opaque value representing the offset of the first item to be returned by a search query. If not specified, then the first page of results is returned. To retrieve the next page of search results, use the 'offset' query parameter value within the 'next.href' URL found within a prior search query response.
Response
200 - Usage Reports
limit
integer
The maximum number of reports in the response.
first
object
An object that contains a link to a page of search results.
next
object
An object that contains a link to a page of search results.
reports
array
The list of usage reports.
401 - Unauthenticated
errors
array
Errors that were encountered when serving the request.
403 - Unauthorized
errors
array
Errors that were encountered when serving the request.
500 - Unexpected errors
errors
array
Errors that were encountered when serving the request.