View Resource Usage for an Account
get
/metering/api/v1/usage/{accountId}
Retrieve details of resource usage of all service entitlements in a given account.
Request
Path Parameters
-
accountId: string
Account name, starts with cacct.
Query Parameters
-
componentId: string
Components are usage attributes passed by services. Not applicable to aggregated usage.
-
dataCenter: string
Datacenter.
-
dcAggEnabled: string
Y if output needs to be grouped per datacenter.
-
endTime: string
Specifies the endpoint of the interval for which usage is being returned in given timezone.
-
endTimeUtc: string
Specifies the endpoint of the interval for which usage is being returned in UTC.
-
quantity: number
Used for filtering usage by quantity.
-
reservationId: integer
Used for filtering usage based on reservationId.
-
resourceName: string
Resource Name
-
serviceEntitlementId: string
Service Entitlement Id
-
serviceName: string
Service Name
-
startTime: string
Specifies the start time of the interval for which usage is returned in supplied timezone.
-
startTimeUtc: string
-
timeZone: string
Timezone.
-
tzd: string
Timezone descriptor.
-
units: string
Units.
-
usageSource: string
To be used to filter raw usage by usageSource, which is non null if some service is reportin usage on behalf of another service.
-
usageType: string
UsageType can be TOTAL, HOURLY or DAILY. Defaults to TOTAL.
Response
Supported Media Types
- application/vnd.com.oracle.oraclecloud.metering.usage+json
200 Response
Success
Nested Schema : UsageRecord
Type:
object
Title:
Show Source
UsageRecord
-
canonicalLink(optional):
string
-
componentId(optional):
string
-
componentType(optional):
string
-
dataCenter(optional):
string
-
endTimeUtc(optional):
object endTimeUtc
-
entityId(optional):
string
-
entityType(optional):
string
Title:
EntityType
Allowed Values:[ "SERVICE_INSTANCE", "SERVICE_ENTITLEMENT" ]
-
reservationId(optional):
string
-
serviceName(optional):
string
-
startTimeUtc(optional):
object startTimeUtc
-
usage(optional):
array usage
Nested Schema : endTimeUtc
Type:
object
Nested Schema : startTimeUtc
Type:
object
Default Response
Unexpected error.
Examples
These APIs are deprecated. See Cost Analysis Overview, Using the API for more information on how to track and optimize your Oracle Cloud Infrastructure spending.