For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/metrics/query-timeseries-points.md. A documentation index is available at /llms.txt.
Language
Datadog site

시계열 포인트 쿼리하기

GEThttps://api.datadoghq.com/api/v1/queryhttps://api.us3.datadoghq.com/api/v1/queryhttps://api.us5.datadoghq.com/api/v1/queryhttps://api.datadoghq.eu/api/v1/queryhttps://api.ap1.datadoghq.com/api/v1/queryhttps://api.ap2.datadoghq.com/api/v1/queryhttps://api.uk1.datadoghq.com/api/v1/queryhttps://api.ddog-gov.com/api/v1/queryhttps://api.us2.ddog-gov.com/api/v1/query

개요

시계열 포인트를 쿼리합니다.

This endpoint requires the timeseries_query permission.

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

인수

쿼리 문자열

이름
유형
설명
from [required]
integer

Start of the queried time period, seconds since the Unix epoch.

to [required]
integer

End of the queried time period, seconds since the Unix epoch.

query [required]
string

Query string.

응답

OK

Response Object that includes your query and the list of metrics retrieved.

항목
유형
설명
error
string

Message indicating the errors if status is not ok.

from_date
int64

Start of requested time window, milliseconds since Unix epoch.

group_by
[string]

List of tag keys on which to group.

message
string

Message indicating success if status is ok.

query
string

Query string

res_type
string

Type of response.

resp_version
int64

Version of the response format.

series
[object]

List of timeseries queried.

status
string

Status of the query.

times
[any]

Legacy field, always returned as an empty list. Timestamps are returned in the pointlist of each entry of series.

to_date
int64

End of requested time window, milliseconds since Unix epoch.

values
[any]

Legacy field, always returned as an empty list. Timeseries values are returned in the pointlist of each entry of series.

코드 예시

시계열 포인트 쿼리하기
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export from="CHANGE_ME"
export to="CHANGE_ME"
export query="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/query?from=${from}&to=${to}&query=${query}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"