Streamline your API release process with the Postman CLI
Releasing a new API version is a complex endeavor that demands seamless coordination across various systems, teams, and workflows. Postman has long provided a trusted, user-friendly interface to help developer teams publish their API versions. But as these teams have scaled their API initiatives in Postman, manual publishing has become less feasible. That’s why we’re excited to introduce an easy solution: automated version publishing with the Postman CLI.
With our latest release, you can now automate the entire API release process using the Postman CLI, seamlessly integrating it into your build pipelines. To do so, simply include the following Postman CLI command in your build pipelines:
postman api publish <apiId> --name v1\ --release-notes "# Some release notes information"\ --collections <collectionId1> <collectionId2>\ --api-definition <apiDefinitionId>
We’ve also gone a step further to ensure the Postman CLI works flawlessly with Git-linked APIs, too. For these APIs, all you need to do is specify the path to the collections and schema within the repository. Here’s an example command:
postman api publish <apiId> --name v1\ --release-notes "# Some release notes information"\ --collections <collectionPath1> <collectionPath2>\ --api-definition <schemaDirectoryPath>
With the Postman CLI, you have the same level of control as you would from the Postman UI. Specify the collections and API definition you wish to publish, assign a meaningful name to the version, and include comprehensive release notes using markdown formatting. The power lies in your hands!
What do you think about this topic? Tell us in a comment below.