Skip to main content

Explore Baton's API with Postman

Dave Blake avatar
Written by Dave Blake
Updated over 2 weeks ago

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.

  1. Navigate to the Variables tab and update the baseUrl to reflect your Baton Subdomain

  2. 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.

  1. Choose API Key from the Type dropdown

  2. In the Key field, enter Authorization

  3. In the Value field, enter Api-Key ##{{apiKey}}

  4. 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.

Did this answer your question?