Maintain your public APIs for the Postman API Network
If you prepared a team workspace for team collaboration, you can draft your next release there. Otherwise, you can update your changes in place in your public workspace.
To get started, open your team workspace and update your team collection. Your team collection is the fork of your public collection.
Update your public collections with a pull request
For these steps, you’ll use Postman version control to update your public collection. You can draft your changes in your team workspace. When you’re ready to share your changes with your API consumers, you can publish your changes to your public workspace by merging your pull request.
Create a pull request to merge to your public collection
To create a pull request to merge to your public collection, do the following:
- Open your team workspace and the collection you updated.
- Next to your collection, click
View more actions. Then, click Create pull request.
- Enter a title and description, and add reviewers.
- Click Create Pull Request.
To learn more, see Create a pull request to contribute to an element you forked.
Review, approve, and merge the pull request to your public collection
To review, approve, and merge the pull request to your public collection, do the following:
- Open your team workspace and the collection you updated.
- In the right sidebar, open the
Pull Requests tab.
- Click the pull request’s title.
- Review the pull request’s changes.
- If you want to add a comment, click
Comments. Then, add a comment and click Comment.
- If you approve the pull request, click
Approve.
- If the pull request is ready to merge, click Merge. Then, choose how you want to merge and click Merge.
Postman merges your changes to your public collection and makes them available to your API consumers.
To learn more, see Review pull requests in Postman.
Update your public collections with the Postman API
To automate updates, for example in your continuous integration and continuous delivery (CI/CD) pipeline, use the Postman API to copy your team collection to your public collection.
To update your public collection with the Postman API, do the following:
- Get your team collection with the
GET /collections/{collectionId}endpoint. - Remove any IDs from the collection JSON that’s returned, such as
_postman_id,id, anduid. - Send the collection JSON to your public collection with the
PUT /collections/{collectionId}endpoint.
Postman updates your public collection and makes your changes available to your API consumers.
To find a collection’s ID, open the collection and click Info in the right sidebar. Save your team and public collection IDs as variables so you can reuse them in your requests. Test this workflow in a separate collection in your team workspace before you add it to your pipeline.