v1
latestOpenAPI 3.0.02026-07-142351,1971.3 MBGet monthly usage attribution
Get monthly usage attribution. Multi-region data is available starting March 1, 2023.
This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id is set in the response. If it is, make another request and pass next_record_id as a parameter. Pseudo code example:
response := GetMonthlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
Query parameters
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago.
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month.
Supported metrics for monthly usage attribution requests. Usage types are in the format <usage_type>_usage. To obtain the complete list of valid usage types, make a request to the Get usage attribution types API.
Comma-separated list of usage types to return, or * for all usage types. Usage types are in the format <usage_type>_usage and <usage_type>_percentage. Example: infra_host_usage,infra_host_percentage To obtain the complete list of usage attribution types that can be used to replace <usage_type> in the field names, make a request to the Get usage attribution types API.
The direction to sort by.
The direction to sort by: [desc, asc].
Supported metrics for monthly usage attribution requests. Usage types are in the format <usage_type>_usage. To obtain the complete list of valid usage types, make a request to the Get usage attribution types API.
The field to sort by. Sort fields are in the format <usage_type>_usage. Example: infra_host_usage To obtain the complete list of usage attribution types that can be used to replace <usage_type> in the field names, make a request to the Get usage attribution types API.
Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.
To see which tags are available, look for the value of tag_config_source in the API response.
List following results with a next_record_id provided in the previous query.
Include child org usage in the response. Defaults to true.
Response
OK