Dépendances de service

API Service Map de l’APM. Pour en savoir plus, consultez la page relative à la Service Map.

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

GET https://api.ap1.datadoghq.com/api/v1/service_dependencieshttps://api.datadoghq.eu/api/v1/service_dependencieshttps://api.ddog-gov.com/api/v1/service_dependencieshttps://api.datadoghq.com/api/v1/service_dependencieshttps://api.us3.datadoghq.com/api/v1/service_dependencieshttps://api.us5.datadoghq.com/api/v1/service_dependencies

Présentation

Récupérez la liste des services APM et de leurs dépendances. Les services renvoyés sont filtrés en fonction de leur environnement et d’un tag primaire, si un tel tag est défini.

Arguments

Chaînes de requête

Nom

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)

Réponse

OK

An object containing a list of APM services and their dependencies.

Expand All

Champ

Type

Description

<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.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Exemple de code

                  # Required query arguments
export env="prod"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/service_dependencies?env=${env}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

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

GET https://api.ap1.datadoghq.com/api/v1/service_dependencies/{service}https://api.datadoghq.eu/api/v1/service_dependencies/{service}https://api.ddog-gov.com/api/v1/service_dependencies/{service}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}

Présentation

Récupérez les services situés directement en amont et en aval d’un service spécifique. Les services récupérés sont filtrés en fonction de leur environnement et d’un tag primaire, si un tel tag est défini.

Arguments

Paramètres du chemin

Nom

Type

Description

service [required]

string

The name of the service go get dependencies for.

Chaînes de requête

Nom

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)

Réponse

OK

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

Expand All

Champ

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 APM 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

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Exemple de code

                  # Path parameters
export service="service-c"
# Required query arguments
export env="prod"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/service_dependencies/${service}?env=${env}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

PREVIEWING: esther/docs-9478-fix-split-after-example