단일 APM 서비스의 종속성 가져오기
https://api.datadoghq.com/api/v1/service_dependencies/{service}https://api.us3.datadoghq.com/api/v1/service_dependencies/{service}https://api.us5.datadoghq.com/api/v1/service_dependencies/{service}https://api.datadoghq.eu/api/v1/service_dependencies/{service}https://api.ap1.datadoghq.com/api/v1/service_dependencies/{service}https://api.ap2.datadoghq.com/api/v1/service_dependencies/{service}https://api.uk1.datadoghq.com/api/v1/service_dependencies/{service}https://api.ddog-gov.com/api/v1/service_dependencies/{service}https://api.us2.ddog-gov.com/api/v1/service_dependencies/{service}개요
특정 서비스의 즉각적인 업스트림 및 다운스트림 서비스를 가져옵니다. 검색된 서비스는 환경 및 기본 태그(정의된 경우)별로 필터링됩니다.
인수
경로 파라미터
service [required]The name of the service go get dependencies for.
쿼리 문자열
env [required]Specify what APM environment to query service dependencies by.
primary_tagSpecify what primary tag to query service dependencies by.
startSpecify the start of the timeframe in epoch seconds to query for. (defaults to 1 hour before end parameter)
endSpecify the end of the timeframe in epoch seconds to query for. (defaults to current time)
응답
OK
An object with information on APM services that call, and are called by a given service.
called_byList of service names that call the given service.
callsList of service names called by the given service.
nameName of the APM service being searched for.
{
"called_by": [
"service-a",
"service-b"
],
"calls": [
"service-d",
"service-e"
],
"name": "service-c"
}Bad Request
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Authentication Error
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Too many requests
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}코드 예시
# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# 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/service_dependencies/${service}?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"