Importing and exporting data

Postman can import and export Postman data, including collections, environments, data dumps, and globals. Postman can also import non-Postman data in the form of API schemas to help you consolidate your API development workflow.

Contents

Importing data into Postman

You can import collections or your API specifications directly into Postman.

To import your data into Postman, select Import in upper left:

Import UI

You can import your data from files, folders, links, raw text, or code repositories.

Importing Postman data

You can import Postman data you previously exported, including collections, environments, data dumps, and globals.

  1. Select Import in the left navigation menu.
  2. Select your file or folder, input your link, paste your raw text, or import from GitHub. Postman will automatically recognize Postman data, confirming the name, format, and what the file will import as. Import collection and environment
  3. Select the files you want to import.
  4. Select Import to bring your data into Postman.

Converting Postman collections from v1 to v2

Postman no longer supports the collection v1 format and will return an error if you attempt to import a collection in this format.

You can convert your collection's format from v1 to v2 to import it into Postman:

  1. In the terminal of your choice, enter the following command to install the Postman Collection Transformer.

    sudo npm install -g postman-collection-transformer
  2. Convert an individual Postman collection from v1 to v2 by entering the command below.

    postman-collection-transformer convert -i <path to input Postman collection file> -o <path where the output Postman file will be downloaded> -j 1.0.0 -p 2.0.0 -P

The resulting collection will be downloaded to your target file path in v2 format.

You can retrieve a list of convert options by running the command with the -h flag:

postman-collection-transformer convert -h

See the Postman Collection Transformer for more information on the collection conversion.

Importing API specifications

Postman directly supports importing the following formats:

There are also tools on GitHub to convert the following into a Postman collection for import:

To import your API specifications into Postman:

  1. Select Import in the left navigation menu.
  2. Select a file or folder, input a link to the API, or paste your raw text. Confirm the name, format, and what you would like your data to import as.
  3. Select Import to bring your data into Postman.

You can configure your Import Settings, which will differ depending on your API specification.

You can import several API specification files at once. Select the workspace you'd like to import the APIs into, choose whether you want to generate collections from the APIs, configure the details, and select Import.

When importing into a team workspace, you can also choose to add the APIs to the Private API Network.

Import several APIs

Importing via GitHub repositories

You must be signed in to a Postman account to use this feature.

You can import data in bulk from a GitHub repository.

  1. Select Import > Code repository > GitHub.

  2. Confirm your GitHub account and Authorize postmanlabs to access your repositories.

  3. In Postman, select your GitHub organization, repository, and branch, then select Continue.

  4. Confirm the files you would like to import into Postman. You can also select Generate collection from imported APIs and select what you would like to link this collection as. Select Show advanced settings to control how Postman should generate collections based on your file types, then select Import.

    Confirm import from github

You will receive a confirmation once the import has completed. You can now view your newly imported files and generated collections in Postman.

Importing via Bitbucket repositories

You must be signed in to a Postman account to use this feature.

You can import data in bulk from a Bitbucket repository.

  1. Select Import > Code repository > Bitbucket.

  2. Confirm your Bitbucket account and Authorize Postman to access your repositories.

  3. In Postman, select your Bitbucket workspace, repository, and branch, then select Continue.

  4. A preview of the files that will be imported to your workspace is displayed. Select Import to confirm and complete the import.

You will receive a confirmation once the import has completed. You can now view your newly imported files and generated collections in Postman.

Exporting Postman data

You can export your Postman data, including collections, environments, data dumps, and globals, as JSON files. These files can be imported back into any Postman instance, or utilized by Newman, Postman's command-line collection runner.

Exporting collections

  1. Select Three dots icon next to the collection, then select Export.

    Export collection
  2. Select the format you'd like your collection to export as.

    Learn more about Postman's collection formats.

  3. Select Export to download your newly generated JSON file.

Exporting environments

You can also export your environments from Postman.

  1. Select the Environments tab from the left navigation menu.
  2. Select an environment to export.
  3. In the top right corner, select Three dots icon.
  4. Select Export to download your newly generated JSON file.

Exporting data dumps

You can export a data dump of all of your collections, environments, globals, and header presets in Postman.

  1. Select the gear icon in the upper-right corner to open Settings.

    Export data dump

  2. Select the Data tab, then Export Data to start your request for the data dump.

  3. Select Export Data to confirm the data types you need to export.

  4. Select Request Data Export to submit the request.

    Export data dump

When the export is ready, you will receive an email with link to download a zipped file with the data dump.

Next steps

You can collaborate on collections by sharing and commenting to discuss your API projects with team members. Learn more about Postman's API workflow.

Last modified: 2021/12/20