provider Usage Metering GET /api/v2/usage/cost_by_org
@utdk/datadog /api/v2/usage/cost_by_org
Get cost across multi-org account
Get cost across multi-org account. Cost by org data for a given month becomes available no later than the 16th of the following month. **Note:** This endpoint has been deprecated. Please use the new endpoint [`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account) instead. This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
start_month query required
Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month.
string
end_month query
Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month.
string

Try it

Authentication
Configure credentials for Datadog API V2 Collection
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

getcostbyorg
GET/api/v2/usage/cost_by_org
Get cost across multi-org account. Cost by org data for a given month becomes available no later than the 16th of the following month. **Note:** This endpoint has been deprecated. Please use the new endpoint [`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account) instead. This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).

required

Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month.

Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import datadog from '@utdk/datadog';

await datadog.getcostbyorg()