---
title: 모든 APM 서비스 종속성 가져오기
description: APM에서 서비스 목록과 해당 종속성을 가져옵니다. 검색된 서비스는 환경 및 기본 태그(정의된 경우)별로 필터링됩니다.
breadcrumbs: 문서 > API > 모든 APM 서비스 종속성 가져오기
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# 모든 APM 서비스 종속성 가져오기

## v1 (latest)

{% alert level="warning" %}
**Note: This endpoint is in public beta. If you have any feedback,
contact [Datadog support](https://docs.datadoghq.com/help.md).**
{% /alert %}

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/service_dependencies     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/service_dependencies |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/service_dependencies |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/service_dependencies      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/service_dependencies |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/service_dependencies |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v1/service_dependencies |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/service_dependencies      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v1/service_dependencies  |

### Overview

APM에서 서비스 목록과 해당 종속성을 가져옵니다. 검색된 서비스는 환경 및
기본 태그(정의된 경우)별로 필터링됩니다.

### Arguments

#### Query Strings

| Field            | Type    | Description                                                                                                 |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| env [*required*] | string  | Specify what APM environment to query service dependencies by.                                              |
| primary_tag      | string  | Specify what primary tag to query service dependencies by.                                                  |
| start            | integer | Specify the start of the timeframe in epoch seconds to query for. (defaults to 1 hour before end parameter) |
| end              | integer | Specify the end of the timeframe in epoch seconds to query for. (defaults to current time)                  |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
An object containing a list of APM services and their dependencies.

| Parent field         | Field              | Type     | Description                                         |
| -------------------- | ------------------ | -------- | --------------------------------------------------- |
| additionalProperties | <any-key>          | object   | An object containing an APM service's dependencies. |
| <any-key>            | calls [*required*] | [string] | A list of dependencies.                             |
{% /tab %}

{% tab label="Example" %}
```json
{
  "servica_a": {
    "calls": [
      "service_b",
      "service_c"
    ]
  },
  "service_b": {
    "calls": [
      "service_o"
    ]
  },
  "service_c": {
    "calls": [
      "service_o"
    ]
  },
  "service_o": {
    "calls": []
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
Error response object.

| Field               | Type     | Description                          |
| ------------------- | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Authentication Error

{% tabs %}
{% tab label="Model" %}
Error response object.

| Field               | Type     | Description                          |
| ------------------- | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
Error response object.

| Field               | Type     | Description                          |
| ------------------- | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Required query arguments
export env="prod"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, 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}"
```
{% /tab %}
{% /tabs %}
