Postman is a GUI tool for calling REST-based APIs. It is targeted at developers and testers, but it also works well for admins and system integrators. Postman supports Windows, macOS, and Linux and includes many features and add-ons that go above and beyond what we need for this tutorial. What we will focus on is the very simple interface for calling REST-based APIs such as the SPP API.
We will look at Postman Collections which provide an interface similar to the Swagger UI but with some additional advantages that improve the user experience. The biggest advantage is that Postman Collections can be customized to contain routine queries with prepared bodies saved for convenient use in the future.
We will also look at using Postman Scripts and the Postman Environments which make it easy to handle more challenging API interactions, such as initial authentication to the SPP API. Postman Scripts can contain dynamic parameters and pass data between requests. They make it possible to script together a multi-step API interaction such as creating an SPP user and setting the password, which took two steps in the previous Swagger UI tutorial.
START HERE: Hands-on Lab
In this lab you will perform the following:
- Download and install Postman
- Make a simple unauthenticated request
- Import directly from SPP OpenAPI file
- Import a starter collection for authentication
- Run a simple POST
- Build and run a saved collection