- Introduction
- Installing and updating
- Navigating Postman
- Sending your first request
- Managing your account
- Syncing your work
- Discovering templates
- Creating your first collection
- Creating a workspace
- Setting up your Postman app
- Importing and exporting data
- Troubleshooting app issues
- Building requests
- Authorizing requests
- Receiving responses
- Grouping requests in collections
- Using variables
- Managing environments
- Visualizing responses
- Specifying examples
- Using cookies
- Working with certificates
- Generating client code
- Troubleshooting requests
- Using the Collection Runner
- Scheduling runs with monitors
- Building request workflows
- Importing data files
- Working with your team
- Defining roles
- Requesting access
- Sharing your work
- Your Private API Network
- Commenting on collections
- Versioning APIs
- Using version control
- Using the API Builder
- Managing and sharing APIs
- Validating APIs
- Monitoring your APIs
- Setting up a monitor
- Viewing monitor results
- Monitoring APIs and websites
- Set up integrations to receive alerts
- Running Postman monitors using static IPs
- Troubleshooting monitors
- Monitoring FAQs
- Analyzing with reports
- Documenting your API
- Authoring your docs
- Publishing your docs
- Viewing documentation
- Using custom domains
- Publishing templates
- Publishing to the API Network
- Submission guidelines
- Managing your team
- Purchasing Postman
- Billing
- Configuring team settings
- Utilizing audit logs
- Onboarding checklist
- Migrating data between teams
- Intro to SSO
- Configuring SSO for a team
- Logging in to an SSO team
- Microsoft AD FS
- Custom SAML in Azure AD
- Custom SAML in Duo
- Custom SAML in GSuite
- Custom SAML in Okta
- Custom SAML in Onelogin
- Custom SAML in Ping Identity
- Migrating to the current version of Postman
Set up integrations to receive alerts
Webhooks (Coming soon)
Postman Monitors enable you to set up recurring runs of your Postman Collections at scheduled intervals. But sometimes, you may have a use case where you need to run a monitor at a particular time. That's where the monitoring webhooks come in. Monitoring webhooks are a way to trigger a collection at a specific time with your own custom payload which can then be accessed in the collection. In this way, your collections can run independently of any environment and can solely rely on the incoming data in the request.
So how do they work? Webhooks will POST data to a URL when certain events are triggered. That data will then be accessible inside your collection in the globals object. You can then parse that data and use it in any way possible. Essentially, webhooks are the same as monitors but without a schedule. So, you can debug your webhooks in the same way as you debug a monitor.
Currently, webhooks on a particular collection can only be created using the Postman API. In order to create a webhook, you can refer to the Postman API.
Accessing the request body in scripts
The request body of the webhook is available inside the globals.previousRequest
object. In order to use it, first parse the globals.previousRequest
object. The data sent to the webhook is available in the data
parameter inside the parsed object.
The following snippet shows the same:
var previousRequest = JSON.parse(globals.previousRequest),
webhookRequestData = previousRequest.data;
// webhookRequestData contains the data sent to your webhook.
console.log(JSON.stringify(webhookRequestData));
Note: only JSON data is currently supported as the request body in the webhook.
Sending output to another API
The data that is sent to the webhook can be used to trigger another API and define a logic based on the incoming data. For example, you could set up a monitoring webhook on your Github repository, so that based on the updates happening in your repository, you can trigger custom build pipelines and perform CI tests.