Postman Flows: Introduction to a new powerful tool
Connecting APIs together
We have more and more APIs published by more and more companies. The values of APIs is to connect them together, to allow to build powerful solutions, a bit like assembling legos. To connect APIs together, we need to use tools like programming language or low code platforms, each of them requiring some learning curve or access to developers. See in this article how Ethan Ho, Business Analyst Intern based in San Diego, breaks down the functionality and structure of Postman Flows.
APIs are often available as Postman collection, making it easy to test them. Ability to interconnect postman collection, in a visual way and with a SaaS runtime could facilitate the life of citizen developers or business users. Let's explore what Postman Flows offer!
What is Postman Flow
With the advent of Flows, you have a different approach to chaining Requests, acting together, without touching code. Helping some people who are not familiar with the code can still access and use Postman with the need to create a chain of Requests (For example, QA, QC, or Tester.)
Postman Flow is still in beta and functions will change regularly, we should only use Flows for reference and let's not use them officially to reduce the risk of system crashes. Using Flows helps developers and customers to test APIs better and save more time than using Collection. Unlike Collection, Flows allow users to run multiple separate flows at the same time, or being able to connect multiple collections into one flow. They create an open space for collections to interact with each other and build an internal ecosystem within the user.
Where to find Postman Flow
To open the Flows interface and use it, follow these steps:
1. In the Postman homepage, select Workspace.
2. Select or create a new Workspace where you will use Flows.
3. Select Flows on the left horizontal menu.
4. Select Create Flow to create and open the canvas window to create Flows.
5. Canvas interface for creating Flows.
Structure of Flows
Flows in Postman operate as a series of blocks that are joined together in a relationship.
Currently Postman is supporting a number of blocks with different roles and tasks, some of them specifically as follows:
Send Request: This block adds a request created in the Collection Request, which means that you must create the Request in the Collection to import it into Flows.
Terminal: block that supports displaying information.
Create Durables: block supports creating variables and using those variables to share data between Requests.
HTML Parse: block supports parsing JSON output without writing a single line of code.
Delay: This block can be used to add delay between requests. The delay time is specified in milliseconds.
Condition: create condition for accept/reject output.
All blocks have the following 4 common nodes:
1. Opens the Details window, where you can view more detailed information of the block, its input and output parameters, and configuration.
2. Opens a selection menu, from which you can choose to see more information about the block, can copy or delete.
3. Tells you the block is active but does not carry data. It will turn off when you choose to use button #4 to chain with a new block.
4. Support you can chain with a new block without getting data from the chained block.
Using Flows with Kyriba
Here's how to apply Postman Flows to a API. You have an API for foreign currencies and you want to import them into Kyriba's API. You want to create an action sequence that includes:
- Get foreign currency information from a Request. We first get the token and make the token as durable. Then a request will get currency Data.
- Get a unit that you want to import into Kyriba's API. This step will be done in the collection. In flow, a series of request will be made.
- Finally, check the status of your imports when they're done.
As you can see, with the ability of Flows, we don't need a single line of code to create a chain of handling Requests and Responses to test and use. All the above is just an example of the power of Flows with Kyriba API, you can fully customize and take advantage of the power of this new feature when they become official.
Flows has been released for beta and early adaptation only, you can see it changes overtime with new functions provided/disappeared frequently. It has the potential to become the preferred tool for citizen developers or business users to connect APIs together and provide a runtime for that, with a simple visual user interface. Let's see how this tool will evolve!