Back up your Postman Collections to GitLab, an open-source Git repository manager, with the Postman to GitLab integration.
Setting up a GitLab integration requires you to get a GitLab Personal Access Token and configure how you would like to back up your collections.
With Postman v10, you can connect a GitLab repository to an API in the API Builder. Once connected, you can sync your API's definition and associated collections between Postman and GitLab. You can switch branches, pull changes from the repository, and push changes to the repository, all from within Postman. To learn more about syncing your API with GitLab, see API version control overview.
Sign in to GitLab.
If you don't already have a Personal Access Token from GitLab, generate a new one in your GitLab dashboard by selecting Add new token under Personal Access Tokens.
Copy the generated token to use when creating the integration in Postman.
On the Home page select Integrations.
Search and select GitLab.
You can select View or View All for a list of all the integrations created by your team.
You can use the GitLab integration for two tasks:
Select Add Integration to enter your GitLab token to start the integration.
Enter your GitLab Personal Access Token and select Authenticate and Proceed.
Choose an existing Postman Collection and your GitLab Project, and enter a filename for your backup.
In Advanced Options you can enter a custom directory name or leave Postman Collections
as the default. You can specify a branch for commit or the default branch of the repository will be used.
Select Add Integration to save your integration configuration.
Your collection is pushed to your GitLab project under the filename that you specified and saved as a single JSON file.
Postman often checks your collection for changes. If Postman identifies changes when it checks your collection, the changes automatically commit to your repository in JSON format. Your collections and code can exist in the same repository.
You can view your configured integrations on the Browse Integrations page. You can also view integrations that have been configured for a collection by opening the collection and selecting the information icon in the right sidebar. Learn more about viewing or editing integrations.
If your network is behind a firewall that requires allowlisting IP addresses, you will need to use a static IP address to enable collection backups to GitLab on custom domains.
Contact your IT team to allowlist the following static IP in your firewall to enable collection backups to GitLab:
3.212.102.200
Once you allowlist this IP address, calls for this integration will be able to connect to your network and allow the integration to work as expected.
Select Add Integration to enter your GitLab token to start the integration.
Enter your GitLab Personal Access Token, specify your GitLab custom/self-hosted domain, and select Proceed.
In the Backup your Postman Collections page, choose an existing Postman Collection and your GitLab Project, then enter a filename for your backup.
In Advanced Options you can enter a custom directory name or leave Postman Collections
as the default. You can specify a branch for commit or the default branch of the repository will be used. Make sure you have write access to the branch where you want to push your changes.
Note that the branch you want to back up your collection to must already exist.
Select Add Integration.
Your collection is pushed to your GitLab project under the directory that you specified and saved as a single JSON file.
Postman often checks your collection for changes. If Postman identifies changes to your collection, the changes automatically commit to your repository in JSON format. Your collections and code can exist in the same repository.
You can go to your GitLab domain and inspect your backed-up collections.
Last modified: 2021/11/15