Integrations: how Postman plays with some of your favorite tools
Is Postman one of your favorite tools? Chances are you probably have some other favorite tools too, right? Maybe you’re wondering how Postman works with some of these tools.
Since Postman’s earliest beginnings as a Chrome extension, the team’s goal has always been to integrate seamlessly with the developer’s workflow. The Postman team supports an open ecosystem, and if there’s a way to make you more productive, we’ll find a way.
So how can Postman work with your favorite tools?
Building blocks for Postman integrations
In Postman, there are 2 core building blocks for most home-grown integrations. If you want to roll your own solutions, let me introduce you to the Postman API and Newman.
Postman API
Did you know that Postman has an API? It’s how you can access all of your Postman data, like collections, environments, mocks, and monitors. With the Postman API, you can programmatically create and update all of your Postman data. Get your API key on the Integrations page.
Newman
You might already know Newman as a way to run collections locally from your command line. You can integrate Newman with your continuous integration servers and build systems. In this manner, you can run your full suite of Postman tests with every deployment to a new server environment. More about that in a bit.
Importing and exporting in the Postman app
Are you in the import/export business? Sometimes we work across different formats or tools, and we need to import and export our work. Developers working in the Postman app will import and export code or data formats as a way for sharing and communicating about their work.
Import code or data formats
In the top left corner of the Postman app, there’s an Import button to import all sorts of stuff into Postman.
If you’re working with a different data format, for example RAML or Swagger, you can import the files and then work with them in Postman.
If someone sends you a cURL command, you can paste it in as raw text and work with it in Postman.
And of course, you can import a Postman collection or environment too.
Export code or data formats
Sometimes you want to share what you’ve been working on in Postman with other team members, partners, or clients.
Once you’ve gotten your request working as you’d like it, you can click the Code link on the right side of the Postman app. Select your preferred programming language, and then copy and paste the working code into your application. This is also a good way to document unexpected behavior and share the request with others.
For API consumers who are browsing your API documentation automatically generated by Postman, they can similarly select their preferred programming language to copy and paste your code into their own applications.
From the Postman app, you can export your Postman collections and environments too. Export a JSON file of your Postman collection by clicking the ellipsis (…) next to the collection name, and selecting “Export”. Export a JSON file of your Postman environment by clicking the “Download environment” icon in the “Manage Environments” modal. And of course, you can do a data dump of your Postman data too, to import again later on.
Continuous Integration
Postman makes it easy to write tests, make sure your endpoints are working, set up the testing environment, and then eventually hook it all up to your build system. Many developers use Postman tests in their Continuous Integration or Continuous Delivery (CI/CD) pipeline.
Use the Postman API to grab the latest copy of your collection and environment. Along with our old friend Newman, you will set up your CI configuration to run a shell command upon kicking off your build. The command is a Newman script that runs your collection with the tests, returning a pass or fail exit code that’s logged in your CI system.
Follow these tutorials to see how to do it with Jenkins or Travis CI, or any other code deployment pipeline tool. Newman also allows you to configure a variety of reporters for human readable formats, such as outputting to a JSON or HTML file.
If you’re running on Docker, Postman has a Docker image for Newman. It’s a streamlined way to run Newman in a Docker container without needing to worrying about operating system dependencies or setting up an environment.
Built-in integrations
For Postman Pro and Enterprise users, there’s also 3rd party integrations available to share data or functionality with some of your favorite tools like GitHub, PagerDuty, and Slack. Check out the full list of integrations for Postman Pro and Enterprise users.
Not a Pro or Enterprise user? No problem. Roll your own integration with the Postman API.
Can we build an integration with Catchpoint to view metrics and services health directly from Catchpoint? Thanks!