Get estimated cost across your account
GET {{baseUrl}}/api/v2/usage/estimated_cost?view=<string>&start_month=<dateTime>&end_month=<dateTime>&start_date=<dateTime>&end_date=<dateTime>
Get estimated cost across multi-org and single root-org accounts.
Estimated cost data is only available for the current month and previous month
and is delayed by up to 72 hours from when it was incurred.
To access historical costs prior to this, use the /historical_cost
endpoint.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
view | string | String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are summary and sub-org . Defaults to summary . | |
start_month | string | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an end_month to view month-over-month cost. | |
end_month | string | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. | |
start_date | string | Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past). Provide an end_date to view day-over-day cumulative cost. | |
end_date | string | Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost ending this day. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"data":[{"attributes":{"charges":[{"charge_type":"\u003cstring\u003e","cost":"\u003cdouble\u003e","product_name":"\u003cstring\u003e"},{"charge_type":"\u003cstring\u003e","cost":"\u003cdouble\u003e","product_name":"\u003cstring\u003e"}],"date":"\u003cdateTime\u003e","org_name":"\u003cstring\u003e","public_id":"\u003cstring\u003e","region":"\u003cstring\u003e","total_cost":"\u003cdouble\u003e"},"id":"\u003cstring\u003e","type":"cost_by_org"},{"attributes":{"charges":[{"charge_type":"\u003cstring\u003e","cost":"\u003cdouble\u003e","product_name":"\u003cstring\u003e"},{"charge_type":"\u003cstring\u003e","cost":"\u003cdouble\u003e","product_name":"\u003cstring\u003e"}],"date":"\u003cdateTime\u003e","org_name":"\u003cstring\u003e","public_id":"\u003cstring\u003e","region":"\u003cstring\u003e","total_cost":"\u003cdouble\u003e"},"id":"\u003cstring\u003e","type":"cost_by_org"}]}