Service Dependencies
Security Monitoring is now available Security Monitoring is now available

Service Dependencies

APM Service Map API. For more information, visit the services map documentation.

Get all service dependencies

Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.

get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/service_dependencies

Overview

Get a list of services and their dependencies. The services retrieved are filtered by environment and a primary tag, if one is defined.

Arguments

Query Strings

Name

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

OK

An object containing a list of services and their dependencies.

Expand All

Field

Type

Description

<any-key>

object

An object containing a 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.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Required query arguments
export env="prod"
# Curl command curl -X get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/service_dependencies?env=${env} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Get one service's dependencies

Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.

get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/service_dependencies/{service}

Overview

Get a specific service’s immediate upstream and downstream services. The services retrieved are filtered by environment and a primary tag, if one is defined.

Arguments

Path Parameters

Name

Type

Description

service [required]

string

The name of the service go get dependencies for.

Query Strings

Name

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

OK

An object with information on service that call, and are called by a service.

Expand All

Field

Type

Description

called_by

[string]

List of service names that call the given service.

calls

[string]

List of service names called by the given service.

name

string

Name of the service being searched for.

{
  "called_by": [
    "service-a",
    "service-b"
  ],
  "calls": [
    "service-d",
    "service-e"
  ],
  "name": "service-c"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# Curl command curl -X get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/service_dependencies/${service}?env=${env} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"