If you have API definitions, collections, or environments in a Git repository, you can import the data so you can work with it in Postman.
Postman supports importing from GitHub, Bitbucket, GitLab, and Azure DevOps repositories. You can import data from a local repository on your computer or from a remote repository hosted in the cloud.
You can also connect your API to a remote GitHub, Bitbucket, GitLab, or Azure DevOps repository. Once connected, you can sync your API definition and associated collections in Postman with the remote repository. Learn more about connecting your API to a Git repository.
You can import data from a local GitHub, Bitbucket, GitLab, or Azure DevOps repository on your computer.
In Postman, select Import in the sidebar.
On your computer, open your local repository and locate the files or folders you want to import. Drag and drop the files or folders into Postman.
Select options based on what you're importing:
If you're importing an API definition, you can choose to import the definition as a collection or as an API along with a collection.
If you're importing an API definition along with other files such as collections or environments, select the files you want to import into Postman. By default, API definitions are imported as collections. Select the Import (API specification) files checkbox to import the definition as an API along with a collection.
Select View Import Settings for more configuration options. These options will vary depending on your API specification.
Select Import.
An Import Complete message displays in the footer. In the message, select the link icon next to a collection, environment, or API to open the imported element.
You can import data from a remote GitHub, Bitbucket, GitLab, or Azure DevOps repository hosted in the cloud.
In Postman, select Import in the sidebar.
Select the type of repository you want to import from. Select Other Sources and then select GitHub, Bitbucket, GitLab, or Azure.
A browser tab opens asking you to sign in to your repository. Follow the onscreen instructions. When you're finished, close the browser tab and return to Postman.
Postman stores your authorized accounts so you can use them to connect to other repositories and services. Learn more about managing connected accounts for remote repositories.
In Postman, select the Organization or Workspace and the Repository you want to import from. (For GitLab, select the Group and Project.) Then select the Branch with the data you want to import.
Select Continue, then select options based on what you're importing:
If you're importing an API definition, you can choose to import the definition as a collection or as an API along with a collection.
If you're importing an API definition along with other files such as collections or environments, select the files you want to import into Postman. By default, API definitions are imported as collections. Select the Import (API specification) files checkbox to import the definition as an API along with a collection.
Select View Import Settings for more configuration options. These options will vary depending on your API specification.
Select Import.
An Import Complete message displays in the footer. In the message, select the link icon next to a collection, environment, or API to open the imported element.
Last modified: 2023/10/18
Additional resources
Videos
Blog posts