Datadog API: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 35: Line 35:
==<tt>requirements.txt</tt>==
==<tt>requirements.txt</tt>==
<font size=-1>
<font size=-1>
  datadog_api_client [== x.y.z]
  datadog_api_client [== x.y.z] # How do I find the latest version?
</font>
</font>
==Dashboard==
==Dashboard==
{{External|https://docs.datadoghq.com/api/latest/dashboards/}}
{{External|https://docs.datadoghq.com/api/latest/dashboards/}}

Revision as of 22:31, 8 March 2022

External

Internal

Overview

Datadog resources can be provisioned via an API.

HTTP

Organization

Organization information

curl -s -X GET "https://api.datadoghq.com/api/v1/org" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DATADOG_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DATADOG_APP_KEY}"

Python

Environment

The following environment variables must be present: DD_API_KEY, DD_APP_KEY. Apparently DATADOG_API_KEY and DATADOG_APP_KEY are ignored.

DD_API_KEY='...'
DD_APP_KEY='...'

requirements.txt

datadog_api_client [== x.y.z] # How do I find the latest version?

Dashboard

https://docs.datadoghq.com/api/latest/dashboards/

Get All Dashboards

https://docs.datadoghq.com/api/latest/dashboards/#get-all-dashboards
Playground Example


Getting all dashboards:
Get one dashboard: https://docs.datadoghq.com/api/latest/dashboards/#get-a-dashboard

Generic

TO PROCESS:

https://github.com/ovidiuf/playground/tree/master/datadog/python-api/generic