For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/usage-metering/get-estimated-cost-across-your-account.md. A documentation index is available at /llms.txt.
Language
Datadog site

계정 전체 예상 비용 확인

GEThttps://api.datadoghq.com/api/v2/usage/estimated_costhttps://api.us3.datadoghq.com/api/v2/usage/estimated_costhttps://api.us5.datadoghq.com/api/v2/usage/estimated_costhttps://api.datadoghq.eu/api/v2/usage/estimated_costhttps://api.ap1.datadoghq.com/api/v2/usage/estimated_costhttps://api.ap2.datadoghq.com/api/v2/usage/estimated_costhttps://api.uk1.datadoghq.com/api/v2/usage/estimated_costhttps://api.ddog-gov.com/api/v2/usage/estimated_costhttps://api.us2.ddog-gov.com/api/v2/usage/estimated_cost

개요

멀티 조직 계정 및 단일 루트 조직 계정의 예상 비용을 가져옵니다. 예상 비용 데이터는 당월 및 전월에 대해서만 제공되며 발생 시점으로부터 최대 72시간 지연됩니다. 이전의 과거 비용에 액세스하려면 /historical_cost 엔드포인트를 사용합니다.

이 엔드포인트는 상위 수준 조직에서만 액세스할 수 있습니다.

This endpoint requires all of the following permissions:

  • usage_read
  • billing_read

OAuth apps require the usage_read, billing_read authorization scope to access this endpoint.

인수

쿼리 문자열

이름
유형
설명
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.

cost_aggregation
enum

Controls how costs are aggregated when using start_date. The cumulative option returns month-to-date running totals.

Allowed enum values: cumulative
include_connected_accounts
boolean

Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false.

Default: false

응답

OK

Chargeback Summary response.

항목
유형
설명
data
[object]

Response containing Chargeback Summary.

코드 예시

계정 전체 예상 비용 확인
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/estimated_cost" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"