What is a Monitoring in Postman? Monitor is an important feature in Postman which enables your Collections, a set of API tests, to run automatically at defined intervals. It allows you to stay up to date with how your API is working .Postman API monitoring helps you identify problems with your API including poor performance, response errors, and outages. You can customize your collections with the tests you need to ensure that your APIs are working as expected.
Setting up monitors in Postman
With monitors, you can run tests using staging or even production builds to make sure that certain aspects of your API are working as expected.
To create a monitor in Postman,
1. Click on “Monitors” tab on left Hand side.
2. Click on add (+ ) button to create a new monitor.
The screen will have the following fields to be entered, in order to create a Monitor.
• Monitor Name
• Collection (We can create a new collection, or we can select an existing collection for monitoring).
• Environment
• Run this monitor
• Regions (Automatically selects the region)
Once appropriate options are selected, the Monitor is created.
1. Receiving email notifications
Whichever email address is specified we will be notified for any failures. Also you can specify after how many consecutive failure the emails shouldn’t be sent based on the below feature.
2. Retry if run fails
In case of any failures, we can use “Retry if run fails” option. If this option is specified and a run fails, Postman will immediately run it again before notifying you of the failure.
3. Request timeout
The request timeout option is used to determine how long Postman will wait for a request to return data before moving on to the next request, By default, it does not specify any timeout value. Postman does limit the total time that a monitor can run for to is 5 minutes.
4. Delay between requests
You can use the Delay between requests option to specify the time in milliseconds that you want to Postman wait after a request has finished before sending a new one. The maximum amount of time a monitor can run for is 5 minutes.
5. We have other options such as follow redirects and Disable SSL Validation (signed SSL certificate).
Adding tests to a monitor
Test Results
Console Log
Viewing Monitor results
We can filter the request by methods (GET, POST and all), type ( Manual , Scheduled ) and run results ( Successful, failure , error) .
Cleaning up the monitors 1. Go to the Monitors tab and select SWAPI Test Monitor. 2. Click on the View more actions menu beside the monitor and select the Delete option
3. Click Delete on the confirmation dialog.
Summary
Monitoring is an important strategy in the world of modern API development. It is
impossible to fully predict everything that will happen in the real-world usage of our
applications. Postman’s detailed monitoring dashboard gives you a straightforward, visual overview of your monitoring results so you can quickly and easily identify problems. You can also receive in-app and email notifications so you can always be on top of your APIs .And moreover Postman supports monitoring in 6 geographic regions around the world. Monitoring traffic in multiple locations helps you ensure your API remains resilient and globally available.