In my role as Director of Operations at Corgibytes, one of my responsibilities is automating and optimizing our day-to-day tasks and workflow. As a result, one of the common patterns of my work is gathering, manipulating, and presenting data of various sorts. Thankfully, much of the data I’m gathering is accessible via API, which means I get to use one of my favorite technical tools: Postman.
What is Postman?
I was first introduced to Postman a number of years ago by a former colleague. At the time, I was working on converting an application from using a third party’s SDK to using its API. The API documentation was mediocre at best, and I was struggling with making any successful calls to the API beyond authentication. I reached out to my colleague for help, and he pointed me to Postman. When I installed the Chrome extension and made my first few calls to the API, I’m pretty sure I heard angels singing. At its core, Postman is a GUI-based platform designed to make API development and testing faster and easier. It’s extremely powerful and allows developers to easily consume API data within minutes.
One of my most recent tasks was designing a mechanism to track hourly allocation and utilization rates of the Corgibytes team. I started by creating a basic spreadsheet in Google Drive. Then, I needed data. After quickly poking through the API documentation for our time-tracking application, Harvest, I opened Postman and got started on some proof of concept testing.
With its intuitive interface, Postman makes getting started with a new API extremely easy. At its most basic, you can simply enter an API URL, specify the desired HTTP request method, and click the Send button to quickly and clearly see the output of the call:
For more complex API calls, an authorization protocol, header parameters, or nested body properties may need to be specified. Postman makes implementing these calls straightforward:
For my utilization spreadsheet, I was able to use Postman to quickly see exactly what data was available to me and in what format. I easily determined the API calls needed to gather the IDs of all team members, query their timesheets for the previous month’s hours, and manipulate the data into the format I needed.
In addition to being able to rapidly get started making test calls to an API, Postman has a number of other powerful features.
Saved History and Collections
Postman stores all API calls in a local history. Previously executed calls can be re-executed simply by selecting the call from history and clicking the Send button.
This feature is especially helpful if working with a poorly documented API and trial and error is the best option for making an initial successful call. Postman also allows you to save and name API calls and group them into collections for simplified future reuse.
Generated Code Snippets
Most often, test API calls made in Postman will eventually be embedded in code. With the click of a button, Postman can automatically generate a snippet of code, in the language of your choice, implementing a specific API call (with all necessary authentication and other parameters included). I’ve found this feature to be invaluable, especially when working in a new language or with complex request parameters.
Development and Deployment Support
While my current interaction with APIs is typically as a consumer, Postman also has a number of features designed to support those developers building APIs. Postman was designed to help in all phases of API development, including development, testing, and monitoring live deployments, through features including integration with Jenkins and automated documentation generation.
THANK YOU, POSTMAN!
At this point, I’ve lost count of the number of times I’ve gleefully shouted “THANK YOU, POSTMAN!” in my head after discovering another great use for my favorite API tool. It has saved me from the hours of frustrating head-scratching that so often accompanies starting work with a new API. I’m grateful to my colleague for introducing me to Postman all those years ago, and hope you’ll enjoy it as much as I do.
Have you used Postman? Do you have another API tool you prefer? Let us know below in the comments!