0
0
Postmantesting~5 mins

Importing and exporting collections in Postman

Choose your learning style9 modes available
Introduction

Importing and exporting collections helps you save and share your API tests easily. It keeps your work safe and lets others use your tests.

You want to back up your API tests before making big changes.
You need to share your API tests with a teammate or client.
You want to move your tests from one computer to another.
You want to use a collection someone else created.
You want to keep a version history of your API tests.
Syntax
Postman
Import Collection:
1. Click 'Import' button in Postman.
2. Choose file or paste raw text.
3. Click 'Import' to add collection.

Export Collection:
1. Select collection in Postman.
2. Click '...' (three dots) next to collection name.
3. Choose 'Export'.
4. Select export format (e.g., v2.1).
5. Save the file to your computer.

Collections are saved as JSON files.

Use the latest export format for best compatibility.

Examples
This adds the collection from the file to your Postman workspace.
Postman
Importing a collection from a file:
- Click 'Import'
- Select 'Upload Files'
- Choose 'my_api_tests.json'
- Click 'Import'
This saves your collection so you can share or back it up.
Postman
Exporting a collection:
- Click '...' next to collection
- Select 'Export'
- Choose 'Collection v2.1'
- Save as 'backup_tests.json'
Sample Program

This step-by-step shows how to import a collection file and then export it again to save or share.

Postman
1. Open Postman.
2. Click 'Import'.
3. Upload 'example_collection.json'.
4. Confirm collection appears in workspace.
5. Click '...' next to collection.
6. Select 'Export'.
7. Choose 'Collection v2.1'.
8. Save file as 'exported_collection.json'.
OutputSuccess
Important Notes

Always check the collection version when importing to avoid errors.

Exported collections can be edited as JSON if needed, but be careful not to break the format.

Use descriptive names for exported files to keep track easily.

Summary

Importing collections lets you add existing API tests to Postman.

Exporting collections saves your tests for sharing or backup.

Both actions use JSON files and are simple to do with Postman's buttons.