For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/service-level-objectives/get-an-slos-history.md. A documentation index is available at /llms.txt.
Language
Datadog site

SLO 기록 가져오기

GEThttps://api.datadoghq.com/api/v1/slo/{slo_id}/historyhttps://api.us3.datadoghq.com/api/v1/slo/{slo_id}/historyhttps://api.us5.datadoghq.com/api/v1/slo/{slo_id}/historyhttps://api.datadoghq.eu/api/v1/slo/{slo_id}/historyhttps://api.ap1.datadoghq.com/api/v1/slo/{slo_id}/historyhttps://api.ap2.datadoghq.com/api/v1/slo/{slo_id}/historyhttps://api.uk1.datadoghq.com/api/v1/slo/{slo_id}/historyhttps://api.ddog-gov.com/api/v1/slo/{slo_id}/historyhttps://api.us2.ddog-gov.com/api/v1/slo/{slo_id}/history

개요

SLO 유형에 관계없이 특정 SLO의 기록을 가져옵니다.

상세 기록 데이터는 소스 데이터 유형에 따라 구조화됩니다. 예를 들어, 메트릭 소스를 사용하는 이벤트 SLO에는 메트릭 데이터가 포함되며, 모니터 SLO 유형에는 모니터 전환 기록이 포함됩니다.

참고: 이벤트 기반 SLO와 시간 기반 SLO에 대한 응답 형식은 서로 다릅니다. 두 가지 형식의 예가 모두 나와 있습니다.

This endpoint requires the slos_read permission.

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

인수

경로 파라미터

이름
유형
설명
slo_id [required]
string

The ID of the service level objective object.

쿼리 문자열

이름
유형
설명
from_ts [required]
integer

The from timestamp for the query window in epoch seconds.

to_ts [required]
integer

The to timestamp for the query window in epoch seconds.

target
number

The SLO target. If target is passed in, the response will include the remaining error budget and a timeframe value of custom.

apply_correction
boolean

Defaults to true. If any SLO corrections are applied and this parameter is set to false, then the corrections will not be applied and the SLI values will not be affected.

응답

OK

A service level objective history response.

항목
유형
설명
data
object

An array of service level objective objects.

errors
[object]

A list of errors while querying the history data for the service level objective.

코드 예시

SLO 기록 가져오기
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export slo_id="CHANGE_ME"
# Required query arguments
export from_ts="CHANGE_ME"
export to_ts="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/slo/${slo_id}/history?from_ts=${from_ts}&to_ts=${to_ts}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"