Datadog API: Difference between revisions
Jump to navigation
Jump to search
(→Python) |
|||
Line 25: | Line 25: | ||
* https://datadogpy.readthedocs.io/en/latest/ | * https://datadogpy.readthedocs.io/en/latest/ | ||
* https://docs.datadoghq.com/api/latest/using-the-api/ | * https://docs.datadoghq.com/api/latest/using-the-api/ | ||
==Environment== | |||
The following environment variables must be present: <code>DD_API_KEY</code>, <code>DD_APP_KEY</code>. Apparently <code>DATADOG_API_KEY</code> and <code>DATADOG_APP_KEY</code> are ignored. | |||
<syntaxhighlight lang='bash'> | |||
DD_API_KEY='...' | |||
DD_APP_KEY='...' | |||
</syntaxhighlight> | |||
==<tt>requirements.txt</tt>== | ==<tt>requirements.txt</tt>== |
Revision as of 22:30, 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
- https://github.com/DataDog/datadogpy
- https://docs.datadoghq.com/api/latest/?code-lang=python
- https://datadogpy.readthedocs.io/en/latest/
- https://docs.datadoghq.com/api/latest/using-the-api/
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]
Dashboard
Get All Dashboards
Getting all dashboards:
Get one dashboard: https://docs.datadoghq.com/api/latest/dashboards/#get-a-dashboard
Generic
TO PROCESS: