Advanced Features

Postman Collection Export

Export your mock APIs as Postman collections for testing, documentation, and team collaboration

What is Postman Export?

Export your entire Mock API Builder project as a Postman Collectionβ€”a JSON file containing all your endpoints, request examples, and documentation. Import this collection into Postman, Insomnia, or other API clients for easy testing.

Instant Testing

Test all endpoints in Postman without manually creating each request

Team Sharing

Share collections with teammates so everyone has the same API setup

Organized Structure

Endpoints are organized by resource with proper folder hierarchy

Pre-configured

Includes base URLs, headers, and example request bodies automatically

How to Export Your Project

Step-by-Step Export Process
1

Open Your Project

Navigate to the project you want to export from your dashboard

2

Go to Project Settings

Click the "Settings" tab in the project navigation

3

Find Export Section

Scroll to the "Export" section in settings

4

Click "Export to Postman"

Click the button to download the collection JSON file

5

Save the File

File is saved as project-name-postman-collection.json

Importing into Postman

Import Steps in Postman

1. Open Postman

Launch the Postman desktop app or web version

2. Click "Import"

Find the Import button in the top left corner of Postman

3. Select File or Drag & Drop

Either drag the JSON file into the import dialog, or click "Upload Files" to browse

project-name-postman-collection.json

4. Confirm Import

Review the collection details and click "Import"

5. Start Testing

Your collection appears in the sidebarβ€”click any request to test it

πŸ’‘ Quick Import Alternative

You can also import by clicking the Import button and pasting the direct URL to your exported collection if it's hosted online.

Collection Structure

What's Included in the Export

Folder Organization

Endpoints are grouped by resource type:

  • β€’ Users folder (GET all, GET by ID, POST, PUT, DELETE)
  • β€’ Products folder (all CRUD operations)
  • β€’ Posts folder (all CRUD operations)
  • β€’ And folders for each resource in your project

Base URL Configuration

The collection includes a pre-configured base URL variable:

{{baseUrl}} = https://api.mockbuilder.com/your-project

Request Examples

Each POST/PUT/PATCH request includes example request bodies with proper field types

Headers

Common headers are pre-configured:

  • β€’ Content-Type: application/json
  • β€’ Authorization: Bearer {{token}} (for protected endpoints)
Example Collection JSON Structure
json

Using Environment Variables

Setting Up Postman Environments

Use Postman environments to easily switch between mock and production APIs:

Development Environment

baseUrl = https://api.mockbuilder.com/your-project

Production Environment

baseUrl = https://api.yourcompany.com/v1

How to Create an Environment:

  1. 1. Click "Environments" in the left sidebar
  2. 2. Click "Create Environment"
  3. 3. Add baseUrl variable with your API URL
  4. 4. Save and select the environment from the top-right dropdown

Testing Your API

1. Test Individual Endpoints

Click any request in the collection to open it, then click "Send" to test

  • β€’ View response body, headers, and status code
  • β€’ Inspect response time and size
  • β€’ Save responses as examples
2. Run Collection Runner

Test all endpoints at once using the Collection Runner:

  1. 1. Right-click the collection
  2. 2. Select "Run collection"
  3. 3. Click "Run" to execute all requests
  4. 4. Review results and identify any failures
3. Add Tests and Assertions

Write tests in the "Tests" tab to validate responses:

javascript
4. Generate Documentation

Postman can automatically generate API documentation from your collection. Click "View in web" to create a shareable documentation page.

Using with Other API Clients

Insomnia

Insomnia also supports Postman collections:

  1. 1. Open Insomnia
  2. 2. Create β†’ Import from File
  3. 3. Select your JSON file
  4. 4. Choose "Postman Collection"
Thunder Client (VS Code)

Import directly in VS Code:

  1. 1. Install Thunder Client extension
  2. 2. Open Collections tab
  3. 3. Click Menu β†’ Import
  4. 4. Select your JSON file
Paw (macOS)

Import into Paw:

  1. 1. Open Paw
  2. 2. File β†’ Import
  3. 3. Choose Postman format
  4. 4. Select your JSON file
HTTPie Desktop

Import collections into HTTPie:

  1. 1. Open HTTPie
  2. 2. Collections β†’ Import
  3. 3. Select Postman format
  4. 4. Browse to JSON file

Best Practices

  • βœ“Re-export after changes to keep your Postman collection in sync with updates
  • βœ“Use environments to easily switch between mock and production APIs
  • βœ“Add tests to requests to validate API behavior automatically
  • βœ“Share collections with your team via Postman workspaces or version control
  • βœ“Document expected responses by saving example responses in Postman
  • βœ“Use collection variables for dynamic values like IDs or tokens
  • βœ“Run collections in CI/CD using Newman (Postman's command-line tool)