모든 APM 서비스 종속성 가져오기
경고Note: This endpoint is in public beta. If you have any feedback,
contact Datadog support.
GET
https://api.datadoghq.com/api/v1/service_dependencieshttps://api.us3.datadoghq.com/api/v1/service_dependencieshttps://api.us5.datadoghq.com/api/v1/service_dependencieshttps://api.datadoghq.eu/api/v1/service_dependencieshttps://api.ap1.datadoghq.com/api/v1/service_dependencieshttps://api.ap2.datadoghq.com/api/v1/service_dependencieshttps://api.uk1.datadoghq.com/api/v1/service_dependencieshttps://api.ddog-gov.com/api/v1/service_dependencieshttps://api.us2.ddog-gov.com/api/v1/service_dependencies개요
APM에서 서비스 목록과 해당 종속성을 가져옵니다. 검색된 서비스는 환경 및 기본 태그(정의된 경우)별로 필터링됩니다.
인수
쿼리 문자열
이름
유형
설명
env [required]string
Specify what APM environment to query service dependencies by.
primary_tagstring
Specify what primary tag to query service dependencies by.
startinteger
Specify the start of the timeframe in epoch seconds to query for. (defaults to 1 hour before end parameter)
endinteger
Specify the end of the timeframe in epoch seconds to query for. (defaults to current time)
응답
OK
An object containing a list of APM services and their dependencies.
항목
유형
설명
<any-key>object
An object containing an APM service's dependencies.
calls [required][string]
A list of dependencies.
{
"servica_a": {
"calls": [
"service_b",
"service_c"
]
},
"service_b": {
"calls": [
"service_o"
]
},
"service_c": {
"calls": [
"service_o"
]
},
"service_o": {
"calls": []
}
}Bad Request
Error response object.
항목
유형
설명
errors [required][string]
Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Authentication Error
Error response object.
항목
유형
설명
errors [required][string]
Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Too many requests
Error response object.
항목
유형
설명
errors [required][string]
Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}코드 예시
모든 APM 서비스 종속성 가져오기
# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# 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?env=${env}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"