0

I am using Datadog to monitor my kubernetes applicaitons. I would like to use the Datadog api to fetch all services under the section APM but I can't figure out which endpoints to use.

is that even possible?

I just expect to do an api request that returns me all services visible under APM -> services in the Datadog website.

2 Answers 2

0

You can use the GET method of the service definitions endpoint. Here are the docs. The docs include a number of examples, as well as other endpoints including retrieving an individual service by name.

curl -X GET "https://api.datadoghq.com/api/v2/services/definitions" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
Sign up to request clarification or add additional context in comments.

1 Comment

he asked how to list services under apm, not to list the created definitions of the services under apm, probably needs the list to create the definitions himself
0

I don't know why this isn't in their API docs (or at least I couldn't find it easily). Just be sure to pass filter[env]=YOUR_ENV as query param.

curl -X GET "https://api.datadoghq.com/api/v2/services?filter%5Benv%5D=production" \
     -H "Accept: application/json" \
     -H "DD-API-KEY: ${DD_API_KEY}" \
     -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.