Get historical cost across your account
GET {{baseUrl}}/api/v2/usage/historical_cost?view=esse&start_month=1961-11-25T12:45:52.211Z&end_month=1961-11-25T12:45:52.211Z
Get historical cost across multi-org and single root-org accounts. Cost data for a given month becomes available no later than the 16th of the following month.
This endpoint is only accessible for parent-level organizations.
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 | (Required) Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. | |
end_month | string | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"data":[{"attributes":{"charges":[{"charge_type":"on_demand","cost":21906538.464961395,"product_name":"infra_host"},{"charge_type":"on_demand","cost":-72103800.74157622,"product_name":"infra_host"}],"date":"1967-12-20T11:02:49.167Z","org_name":"eu proident et","public_id":"E","region":"nisi","total_cost":44534827.38441998},"id":"irure eiusmod mollit sint","type":"cost_by_org"},{"attributes":{"charges":[{"charge_type":"on_demand","cost":-26063585.672534868,"product_name":"infra_host"},{"charge_type":"on_demand","cost":96818355.46160546,"product_name":"infra_host"}],"date":"1981-09-04T15:24:34.311Z","org_name":"Ut mollit voluptate","public_id":"irure cillum dolore","region":"voluptate in dolore","total_cost":58914708.60228062},"id":"aliquip ad","type":"cost_by_org"}]}