Billing data
Cloud visibility: Billing data (1.0.0)
Download OpenAPI specification:Download
API for interacting with cloud billing data.
Get key values
Returns a collection of values for a given key.
Authorizations:
query Parameters
required | Keys (string) or Tags (string) The dimension to return values for. The For any other dimension, a | ||||||||
groupBy | string (DimensionValues) Enum: "CloudProvider" "AccountId" "ServiceType" "RegionCode" "ResourceGroup" "InstanceType" "PurchaseOption" "CostCategory" Example: groupBy=CloudProvider The dimension by which the billing data should be grouped. | ||||||||
filter required | string Example: filter=(CostDate -ge 2022-03-31T22:00:00Z) -and (CostDate -le 2022-04-30T21:59:59Z) Filter the collection of billing records. The format of the query string parameter:
For more information on the available operators and which data types those operators work on, see Filter API call results. |
Responses
Response samples
- 200
- 400
- 500
{- "items": [
- {
- "bucketName": "aws",
- "name": "API Management"
}
]
}
Get aggregated billing records
Returns a collection of billing records grouped by a given method.
Authorizations:
query Parameters
required | Grouping (string) or Tags (string) The primary grouping level is a way to divide data into buckets, and it cannot be the same as
| ||||||||||||||||||||||||||||||||||||||||||||||||
Grouping (string) or Tags (string) The secondary grouping level is a way to divide data even further within buckets, and it cannot be the same as
| |||||||||||||||||||||||||||||||||||||||||||||||||
secondaryGroupByMaxValues | integer >= 1 Example: secondaryGroupByMaxValues=5 The number of top secondary group buckets to return. For example, if you specify 5, the API will return 5 unique values. Other values will be aggregated to a bucket with the name "aggregatedCostsKey". This requires that there be a value for | ||||||||||||||||||||||||||||||||||||||||||||||||
filter | string Example: filter=(CostDate -ge 2022-03-31T22:00:00Z) -and (CostDate -le 2022-04-30T21:59:59Z) Filter the collection of grouped billing records. Format of the query string parameter:
To filter by To filter by
For more information on the available operators and which data types those operators work on, see Filter API call results. | ||||||||||||||||||||||||||||||||||||||||||||||||
page_number | integer >= 1 Default: 1 The page number. | ||||||||||||||||||||||||||||||||||||||||||||||||
page_size | integer >= 1 Default: 100 The maximum number of items in the response. |
Responses
Response samples
- 200
- 400
- 500
{- "currency": "USD",
- "groupedBy": [
- "CostDate",
- "CloudProvider"
], - "items": [
- {
- "bucketedBy": "2019-08-24T14:15:22Z",
- "costs": [
- {
- "bucketName": "aws",
- "cost": "502.2291864833"
}
]
}
], - "pagination": {
- "page_number": 1,
- "page_size": 25
}, - "topItems": [
- {
- "bucketName": "aws"
}
]
}