All integrations
Get an API key
Datadog
Metrics, logs, monitors, dashboards and incidents in Datadog.
Monitoring
How an agent reaches it
MCPREST APICLI
How you authenticate
API key
- Create an API key, and for most read endpoints an Application key as well.
- Datadog needs BOTH: DD-API-KEY and DD-APPLICATION-KEY. Store the application key separately and send it as a header.
Connection details
- Base URL
- https://api.datadoghq.com/api/v1
- Pagination
- cursor
Common endpoints
| validate the key | GET /validate |
| query metrics | GET /query?from={epoch}&to={epoch}&query=avg:system.cpu.user{*} |
| list monitors | GET /monitor |
| search logs | POST /../v2/logs/events/search |
Worth knowing
- Two headers are needed for most reads: DD-API-KEY and DD-APPLICATION-KEY. An API key alone 403s on queries.
- EU accounts use api.datadoghq.eu. Using the US host with an EU key 403s.
- v1 and v2 endpoints coexist with different shapes; check which the endpoint uses.