View Resource Usage Cost for An Account
get
/metering/api/v1/usagecost/{accountId}
Retrieve details of resource usage cost for all subscriptions in a given account.
Request
Path Parameters
-
accountId: string
Account name, starts with cacct.
Query Parameters
-
computeTypeEnabled: string
If Y, then usage cost is grouped by computeType, which is used to indicate the nature of cost incurred say Usage, Overage etc.
-
dataCenter: string
A filter for which Datacenter for which cost needs to be retrieved. This is used with OCI Classic services and not needed when grabbing data from OCI services. This is an optional parameter.
-
dcAggEnabled: string
If Y, then usage cost is grouped per datacenter
-
endTime: string
Specifies the end of the interval for which usage cost is being retrieved.
-
resourceName: string
Resource Name.
-
serviceEntitlementId: string
Service Entitlement Id
-
serviceName: string
Service Name
-
startTime: string
Specifies the start of the interval for which usage cost is being retrieved.
-
timeZone: string
Timezone specified for start and end time params. Default is UTC.
-
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 : items
Type:
Show Source
array
-
Array of:
object UsageCostRecord
Title:
UsageCostRecord
Nested Schema : UsageCostRecord
Type:
object
Title:
Show Source
UsageCostRecord
-
costs(optional):
array costs
-
currency(optional):
string
Currency.
-
dataCenterId(optional):
object dataCenterId
Datacenter Id
-
endTimeUtc(optional):
object endTimeUtc
End time of the interval for which cost is returned.
-
gsiProductId(optional):
string
GSI product id for the Sku.
-
lastComputationDate(optional):
object lastComputationDate
Time at which cost was synced from billing system.
-
quantity(optional):
number
Quantity.
-
resourceName(optional):
string
Resource Name.
-
serviceName(optional):
string
Service Name.
-
startTimeUtc(optional):
object startTimeUtc
Start time of the interval for which cost is returned.
-
subscriptionId(optional):
string
Purchase Entitlement Id.
-
subscriptionType(optional):
string
Trial or production.
-
tag(optional):
string
Tag applied on this usage.
Nested Schema : dataCenterId
Type:
object
Datacenter Id
Nested Schema : endTimeUtc
Type:
object
End time of the interval for which cost is returned.
Nested Schema : lastComputationDate
Type:
object
Time at which cost was synced from billing system.
Nested Schema : startTimeUtc
Type:
object
Start time of the interval for which cost is returned.
Nested Schema : UsageCost
Type:
object
Title:
Show Source
UsageCost
-
computedAmount(optional):
number
Cost computed for usage.
-
computedQuantity(optional):
number
Quantity used for computing cost.
-
overagesFlag(optional):
string
If Y, then the cost is an overage.
-
rateCardId(optional):
string
GSI rate card identifier.
-
unitPrice(optional):
number
Price per unit of resource.
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. See the Deprecated Notices (Endpoints) to see if there is a replacement endpoint.