Overview
Postman is an excellent tool for exploring APIs from an easy-to-use desktop app.
Postman collections are a group of saved requests. Requests within a collection can be run with a common, inherited configuration that can be useful in accelerating the exploration of the Baton API.
Download Postman here: https://www.postman.com/downloads/
Variable Substitution
Postman uses a handlebar-style variable syntax. We make use of Postman Environment Templates to store different variables for each environment.
Create a New Collection from Baton’s Swagger file
Step 1: In postman, click the [Import]
button.
Step 2: Paste the url (https://app.hellobaton.com/api/swagger.json ) of Baton’s swagger file into the box. Postman will automatically fetch and create a collection.
Step 3: On the next screen, you can choose how to import. Make your selection and click [Import]
Step 4: Click into the Baton Api collection and start configuration.
-
Navigate to the Variables tab and update the
baseUrl
to reflect your Baton Subdomain -
Then add a new Variable called
apiKey
. Fill the Initial and Current Value with the API key created in Baton. Be sure to save these changes.
Step 5: Navigate to the Authorization tab.
-
Choose API Key from the Type dropdown
-
In the Key field, enter
Authorization
-
In the Value field, enter
Api-Key {{apiKey}}
-
From the Add to field, pick Header
Now that your collection is configured, you can navigate to any request in the collection to explore! We recommend unchecking the page
and page_size
query params to start your exploration.
Comments
0 comments
Please sign in to leave a comment.