Integrate Postman with GitLab

GitLab Self-Managed integrations are available with Postman Enterprise plans with the API Builder add-on.

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.

For information about Postman's GitLab CI/CD integration, see Integrate Postman with GitLab CI/CD.

Generate a GitLab personal access token

Before using Postman's GitLab integrations, you'll need to create a GitLab personal access token:

  1. Sign in to GitLab.
  2. If you don't have a GitLab personal access token, create a new one in your GitLab dashboard.
  3. Copy the token to use when you create the GitLab integration in Postman.

Sync your API with GitLab

You can connect a GitLab repository to an API in the API Builder. Once connected, you can sync your API 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.

Back up your Postman Collections to GitLab

  1. Select Integrations on the Home page. Select Browse All Integrations, then select GitLab.

  2. Select Add Integration for Backup a collection.

  3. Enter your GitLab personal access token and select Authenticate and Proceed.

  4. In the Configure interface, enter a nickname for the integration and select the workspace in which the collection you want to back up exists.

  5. Select a Postman Collection, your GitLab project, and enter a filename for your backup.

  6. In Enter Directory (optional), enter a custom directory name or leave "Postman Collections" as the default.

  7. In Enter Branch (optional), specify a branch for commit. If you don't, the default branch of the repository will be used.

    GitLab integration configuration
  8. 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 Info icon Info in the right sidebar. Learn more about viewing or editing integrations.

Back up your Postman Collections to GitLab on a custom domain

If your network is behind a firewall that requires allowlisting IP addresses, you'll 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:

  * US East - `3.212.102.200`

After you allowlist this IP address, calls for this integration can connect to your network and enable the integration to work as expected.

To set up the integration, do the following:

  1. Select Integrations on the Home page. Select Browse All Integrations, then select GitLab.

  2. Select Add Integration for Backup a collection (custom domain).

  3. Enter your GitLab personal access token, specify your GitLab custom/self-hosted domain, then select Authenticate and Proceed.

  4. In the Configure interface, select an existing Postman Collection and your GitLab Project, then enter a filename for your backup.

  5. In Enter Directory (optional), enter a custom directory name or leave "Postman Collections" as the default.

  6. In Enter Branch (optional), specify a branch for commit. If you don't, the default branch of the repository will be used.

    The branch you want to back up your collection to must already exist.

  7. 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: 2025/02/07