The Datadog API allows you to get data in and out of Datadog. It uses resource-oriented URLs and status codes to indicate the success or failure of requests, then returns JSON from all requests.
This article explains how to use Postman to perform API calls to Datadog by showing the actions available within the Datadog API, and by providing a high-level introduction to using Postman to
After the prerequisites are met:
Download the Datadog Postman collection (pre-configured API call templates). In Postman, a collection is a folder of organized API calls for easy editing, saving, and re-use.
Import the Datadog Postman Collection:
You now have a Datadog collection with many different API examples.
Note: The API calls do not work at this point. See below to set your Datadog-Postman Environment.
After the Postman collection is imported, a full list of available Datadog API calls is structured by folder in the left pane of Postman.
In the folders, the API calls have variables entered for
This allows you to set up Postman environments and save your Datadog site, API, and application keys for authentication. If you have multiple Datadog organizations, set up multiple Postman environments to make API calls to different organizations without modifying the API calls in the Datadog Postman collection.
Follow these steps to set up your environment:
Click the Manage Environments gear icon in the upper right corner of Postman.
Click Add and enter an Environment Name.
In the table, add the variables
datadog_application_key. In the Current Value column, enter your actual Datadog API and application keys.
Add the variable
datadog_site. In the Current Value column enter
com if you are on Datadog US site or
eu if you are on Datadog EU site.
Optional: If you have multiple Datadog organizations, repeat steps 1-4 for each organization.
After setup is complete, you are ready to begin making API calls. In the Postman -> Datadog folder, there are subfolders for each type of API category listed in the Datadog API Reference. Expand the subfolders to see the HTTP methods and API call names.
Note: Don’t forget to set your defined Environment in the upper right corner of Postman interface:
When you click on an API call in the collection, it loads in the
Builder pane on the right. On this pane you can send the API call and see the returned status, response time, and API response code.
When you click on the Endpoint name a description of the endpoint and all required/optional parameters is displayed to help you build your requests:
The Params tab shows all parameters and values that are currently on the API call. Here, you are able to add parameters and values. View the available arguments in the corresponding section of the Datadog API documentation.
This tab is an alternative to viewing the
param1:value1¶m2:value2 structure of the API call.
<PLACEHOLDER>. They should be replaced before running a query.