Treasure Data has created Postman collections for developers who are interested in quickly exercising Treasure Data APIs. Current collections include:
To use these collections you will need to do the following:
- Download and install Postman on your local computer
- Obtain a valid TD API Key for your API endpoints
- Download an API-specific Postman collection file (
•••••••.postman_collection.json
) - Download the additional supporting files (if any)
- Configure the variables in the Postman collection
You can down load Postman here: https://www.postman.com/downloads/
The TD Postman collections will work on any operating system that Postman supports, and the TD Postman collections do not require you to be logged into Postman for the APIs to work.
You can find instructions on obtaining a TD API key here: https://docs.treasuredata.com/display/PD/Getting+Your+API+Keys
After you have your API key, and the corresponding console URL, configure the Postman variables {{ApiKeyAuth}}
and {{baseUrl}}
.
Publicly available TD API Postman collections can be accessed in the Treasure Data postman-collections github repository.
Generally, the collections are grouped by API. Browse to the API collection you want to work with and download the •••••••.postman_collection.json
file and any other supporting files to your local machine.
Configuring TD API Collections requires the following steps:
- Importing the collection file
- Configuring the
{{baseUrl}}
and{{ApiKeyAuth}}
variables with the appropriate values.
To configure Postman with a TD API collection:
- On your local machine, open the Postman application.
- In the Scratch Pad row, select Import.
- Select Upload Files.
- Select the
•••••••.postman_collection.json
file that you want to use and then select Open. - Select Import.
- Select the newly imported collection.
- In the local collection pane, select the Variables tab.
- In the Current Value column for the {{baseUrl}} variable enter the API endpoint you want to use.
- In the Current Value column for the {{ApiKeyAuth}} variable enter the TD API key that corresponds to your endpoint.
- Select Save.
From the navigation pane, you can now select the individual API you want to exercise. Refer to the TD API portal for instructions on how to exercise specific collections.