</>

Technology

Postman

Difficulty

Beginner

Interview Question

How to import and export Postman collections, and what are Postman workspaces?

Answer

Import/Export Postman Collections

Exporting a Collection

  1. āœ“Click on your Collection in the sidebar
  2. āœ“Click the ... (three dots) menu
  3. āœ“Select Export
  4. āœ“Choose Collection v2.1 (recommended) or v2.0
  5. āœ“Click Export and save the JSON file

The exported file (MyCollection.json) can be:

  • āœ“Committed to Git for version control
  • āœ“Shared via email/Slack
  • āœ“Used with Newman for CI/CD

Importing a Collection

Method 1: Drag and Drop Simply drag the .json file into the Postman window.

ā–øMethod 2: Import Button
  1. āœ“Click Import (top left)
  2. āœ“Choose: File, Folder, Link, Raw text, or Code
  3. āœ“Select your file → Click Import
ā–øMethod 3: Import from URL
CODE
Import → Link → https://raw.githubusercontent.com/org/repo/main/collection.json
ā–øMethod 4: Import from GitHub
  1. āœ“Import → Code Repository → Connect GitHub
  2. āœ“Select your repository and collection file

Import Environment

JSON
// staging-environment.json
{
  "name": "Staging",
  "values": [
    { "key": "base_url", "value": "https://api.staging.com", "enabled": true },
    { "key": "api_token", "value": "staging-token-xyz", "enabled": true }
  ]
}
ā–øImport via: Import → Files → Select environment.json
✦

Postman Workspaces

A Workspace is a collaborative environment where you organize and share collections, environments, and APIs with your team.

Types of Workspaces

TypeVisibilityUse Case
PersonalOnly youPersonal experiments
TeamAll team membersShared project APIs
PrivateInvited members onlyConfidential internal APIs
PublicEveryone on internetOpen-source API docs

Creating a Workspace

  1. āœ“Click Workspaces (top menu)
  2. āœ“Click Create Workspace
  3. āœ“Choose type: Personal / Team / Private / Public
  4. āœ“Add team members (for Team/Private)
  5. āœ“Move collections into the workspace

Benefits of Team Workspaces

  • āœ“Everyone sees the same collections without exporting/importing
  • āœ“Changes are synced in real-time
  • āœ“Share environments (staging, prod configs)
  • āœ“Activity feed — see who changed what and when
  • āœ“Role-based access — admin, editor, viewer

Workspace Best Practices

CODE
šŸ“ Team Workspace: "User Service API"
  ā”œā”€ā”€ šŸ“‚ Collections
  │   ā”œā”€ā”€ User API Tests
  │   ā”œā”€ā”€ Auth API Tests
  │   └── Regression Suite
  ā”œā”€ā”€ šŸŒ Environments
  │   ā”œā”€ā”€ Development
  │   ā”œā”€ā”€ Staging
  │   └── Production
  └── šŸ“‹ APIs
      └── User Service OpenAPI Spec

Follow AutomateQA

Related Topics