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
Parameters
enterpriseId
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.
Example: abc12340d4bf4e36b0423d209b286f24
accountGroupId
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.
Example: def456a237b94b9a9238ef024e204c9f
accountId
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.
Example: 987abcba31834216b8c726a7dd9eb8d6
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.
Example: 2019-06
Constraints:
- Pattern:
/^\\d{4}\\-(0?[1-9]|1[012])$/
billingUnitId
string
The ID of the billing unit by which to filter the reports.
limit
number
The maximum number of search results to be returned.
Example: 10
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.