For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/usage-metering/get-hourly-usage-attribution.md. A documentation index is available at /llms.txt.
Language
Datadog site

시간당 사용량 속성 가져오기

GEThttps://api.datadoghq.com/api/v1/usage/hourly-attributionhttps://api.us3.datadoghq.com/api/v1/usage/hourly-attributionhttps://api.us5.datadoghq.com/api/v1/usage/hourly-attributionhttps://api.datadoghq.eu/api/v1/usage/hourly-attributionhttps://api.ap1.datadoghq.com/api/v1/usage/hourly-attributionhttps://api.ap2.datadoghq.com/api/v1/usage/hourly-attributionhttps://api.uk1.datadoghq.com/api/v1/usage/hourly-attributionhttps://api.ddog-gov.com/api/v1/usage/hourly-attributionhttps://api.us2.ddog-gov.com/api/v1/usage/hourly-attribution

개요

시간당 사용량 속성을 가져옵니다. 다중 리전 데이터는 2023년 3월 1일부터 사용할 수 있습니다.

이 API 엔드포인트는 페이지 지정을 지원합니다. 모든 레코드를 수신하도록 next_record_id 값이 응답에 설정되어 있는지 검사하세요. 해당 값이 설정되어 있다면 다른 요청을 수행하고 next_record_id를 파라미터로 전달하세요. 의사 코드 예시:

response := GetHourlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
  sleep(5 seconds)  # 속도 제한에 걸리지 않도록 방지
  response := GetHourlyUsageAttribution(start_month, next_record_id=cursor)
  cursor := response.metadata.pagination.next_record_id
END

This endpoint requires the usage_read permission.

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

인수

쿼리 문자열

이름
유형
설명
start_hr [required]
string

Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.

end_hr
string

Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour.

usage_type [required]
enum

Usage type to retrieve. Usage types are in the format <usage_type>_usage. Example: infra_host_usage To obtain the complete list of active usage types that can be used to replace <usage_type> in the field names, make a request to the Get usage attribution types API.

Allowed enum values: api_usage, apm_fargate_usage, apm_host_usage, apm_usm_usage, appsec_fargate_usage, appsec_usage, asm_serverless_traced_invocations_usage, asm_serverless_traced_invocations_percentage, bits_ai_investigations_usage, browser_usage
Show 79 moreci_code_coverage_committers_percentage, ci_code_coverage_committers_usage, ci_pipeline_indexed_spans_usage, ci_test_indexed_spans_usage, ci_visibility_itr_usage, cloud_siem_usage, code_security_host_usage, container_excl_agent_usage, container_usage, cspm_containers_usage, cspm_hosts_usage, custom_event_usage, custom_ingested_timeseries_usage, custom_timeseries_usage, cws_containers_usage, cws_fargate_task_usage, cws_hosts_usage, data_jobs_monitoring_usage, data_stream_monitoring_usage, dbm_hosts_usage, dbm_queries_usage, error_tracking_usage, error_tracking_percentage, estimated_indexed_spans_usage, estimated_ingested_spans_usage, fargate_usage, flex_logs_starter, flex_stored_logs, functions_usage, incident_management_monthly_active_users_usage, indexed_spans_usage, infra_host_usage, infra_host_basic_usage, ingested_logs_bytes_usage, ingested_spans_bytes_usage, invocations_usage, lambda_traced_invocations_usage, llm_observability_usage, llm_spans_usage, logs_indexed_15day_usage, logs_indexed_180day_usage, logs_indexed_1day_usage, logs_indexed_30day_usage, logs_indexed_360day_usage, logs_indexed_3day_usage, logs_indexed_45day_usage, logs_indexed_60day_usage, logs_indexed_7day_usage, logs_indexed_90day_usage, logs_indexed_custom_retention_usage, mobile_app_testing_usage, ndm_netflow_usage, npm_host_usage, network_device_wireless_usage, obs_pipeline_bytes_usage, obs_pipelines_vcpu_usage, online_archive_usage, product_analytics_session_usage, profiled_container_usage, profiled_fargate_usage, profiled_host_usage, published_app, rum_browser_mobile_sessions_usage, rum_ingested_usage, rum_investigate_usage, rum_replay_sessions_usage, rum_session_replay_add_on_usage, sca_fargate_usage, sds_scanned_bytes_usage, serverless_apps_usage, serverless_apps_apm_usage, siem_12mo_retention_usage, siem_6mo_retention_usage, siem_analyzed_logs_add_on_usage, siem_ingested_bytes_usage, snmp_usage, universal_service_monitoring_usage, vuln_management_hosts_usage, workflow_executions_usage
next_record_id
string

List following results with a next_record_id provided in the previous query.

tag_breakdown_keys
string

Comma separated list of tags 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.

include_descendants
boolean

Include child org usage in the response. Defaults to true.

Default: true

응답

OK

Response containing the hourly usage attribution by tag(s).

항목
유형
설명
metadata
object

The object containing document metadata.

usage
[object]

Get the hourly usage attribution by tag(s).

코드 예시

시간당 사용량 속성 가져오기
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export start_hr="CHANGE_ME"
export usage_type="CHANGE_ME"

# 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/v1/usage/hourly-attribution?start_hr=${start_hr}&usage_type=${usage_type}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"