Import Command
The import command converts API collections from Postman or Bruno into native Rumour .toml request files. It reads the source collection format, maps every request to a Rumour TOML file, preserves folder structures as sub-directories, and optionally generates a workspace.env.toml from environment variable definitions.
Basic Usage
rumour import --format <FORMAT> --input <PATH> [OPTIONS]
Options
| Option | Short | Required | Description |
|---|---|---|---|
--format | -f | ✓ | Source format: postman, bruno, or openapi |
--input | -i | ✓ | Path or URL to the source collection/spec file or directory |
--env | -e | ✗ | Path to an environment file to import alongside the collection |
--output | -o | ✗ | Output directory (defaults to current directory .) |
[!IMPORTANT] Input format requirements:
- Postman —
--inputmust point to a single.jsonfile (Collection v2.1 export).- Bruno —
--inputmust point to an extracted directory of.brufiles.- OpenAPI —
--inputcan be a local file path (.json,.yaml,.yml) or a remote HTTP/HTTPS URL. ZIP files are not accepted.
Import from Postman
Postman collections are exported as a single .json file in Collection v2.1 format.
Step 1 — Export from Postman
- Open Postman and navigate to your collection.
- Click the
⋯(three-dot) menu beside your collection name. - Select Export → choose Collection v2.1.
- Save the file (e.g.,
my_api_collection.postman_collection.json).
Example Postman Collection Structure
For these examples, we use the following Postman collection at:
import_example/my_api_collection.postman_collection.json
The collection has:
- Two folders:
AuthandUsers - Three requests:
Login(POST),Get User(GET),Create User(POST) - Collection-level variables:
base_url,api_version - A test script on
Loginthat asserts status 200 and extracts atoken
Example 1 — Basic Import
rumour import --format postman \
--input my_api_collection.postman_collection.json \
--output ./postman_output
Output:
Importing postman from my_api_collection.postman_collection.json...
PASS Successfully imported 3 nodes from postman collection.
What was generated:
postman_output/
└── My_API_Collection/
├── Auth/
│ └── Login.toml
├── Users/
│ ├── Get_User.toml
│ └── Create_User.toml
└── workspace.env.toml
What this means:
- The collection name (
My API Collection) becomes the root folder (My_API_Collection/). Spaces and special characters are replaced with underscores. - Postman folders (
Auth,Users) become sub-directories. - Each request becomes a
.tomlfile named after the Postman request name. - Collection-level variables are written to
workspace.env.toml.
Generated Auth/Login.toml (from the Postman Login request):
[request]
method = "POST"
url = "{{base_url}}/post"
[headers]
Content-Type = "application/json"
[body]
type = "json"
raw = '{"email": "user@example.com", "password": "secret123"}'
[assert]
status = 200
[extract]
token = "token"
What this means:
[request]— the HTTP method and URL (with Postman{{variables}}preserved as Rumour{{variables}}).[headers]— all enabled request headers.[body]— raw JSON body, typed asjson.[assert]— auto-converted from the Postman test scriptpm.response.to.have.status(200).[extract]— auto-converted frompm.collectionVariables.set("token", jsonData.token)in the test script.
Generated Users/Get_User.toml:
[request]
method = "GET"
url = "{{base_url}}/get?user_id=42"
[headers]
Authorization = "Bearer {{token}}"
[params]
user_id = "42"
[assert]
status = 200
Generated workspace.env.toml (from collection-level variables):
[variables]
"base_url" = "https://httpbin.org"
"api_version" = "v1"
Example 2 — Import with an Environment File (--env)
Postman environment files (exported separately) are JSON files containing key-value variable pairs. Use --env to merge them into the generated workspace.env.toml.
rumour import --format postman \
--input my_api_collection.postman_collection.json \
--env development.postman_environment.json \
--output ./postman_with_env_output
Output:
Importing postman from my_api_collection.postman_collection.json...
PASS Successfully imported 3 nodes from postman collection.
Generated workspace.env.toml (collection variables + environment variables merged):
[variables]
"api_version" = "v1"
"token" = ""
"base_url" = "https://httpbin.org"
What this means:
- Variables from the Postman environment file are merged with the collection-level variables.
- If a key exists in both, the environment file value takes precedence.
- Only
enabled: truevariables from the environment file are imported.
Import from Bruno
Bruno stores each request as a .bru text file and uses directories for folder organization. The import command accepts a directory path (not a single file).
Step 1 — Export from Bruno
Bruno collections are already stored as .bru files on disk. Simply point Rumour at your Bruno collection's root directory.
Example Bruno Collection Structure
my_bruno_collection/
├── auth/
│ └── login.bru
├── users/
│ ├── get_user.bru
│ └── create_user.bru
└── development.env.bru
Example auth/login.bru:
post {
url: {{base_url}}/post
body: json
}
headers {
Content-Type: application/json
}
body:json {
{"email": "user@example.com", "password": "secret123"}
}
vars {
token: ""
}
Example 3 — Basic Bruno Import
rumour import --format bruno \
--input ./my_bruno_collection \
--output ./bruno_output
Output:
Importing bruno from ./my_bruno_collection...
PASS Successfully imported 4 nodes from bruno collection.
What was generated:
bruno_output/
└── my_bruno_collection/
├── auth/
│ └── login_bru.toml
├── users/
│ ├── create_user_bru.toml
│ └── get_user_bru.toml
└── development_env_bru.toml
What this means:
- The input directory name (
my_bruno_collection) becomes the root output folder. - Sub-directories mirror the Bruno folder structure.
- Each
.brufile becomes a.tomlfile (the.bruextension is replaced with_bru.toml). .env.brufiles are also converted — they appear as TOML files but you should rename the output toworkspace.env.tomlor use--envto handle them properly.
Generated auth/login_bru.toml:
[request]
method = "POST"
url = "{{base_url}}/post"
[headers]
Content-Type = "application/json"
[variables]
token = ""
[body]
type = "json"
raw = '{"email": "user@example.com", "password": "secret123"}'
Example 4 — Bruno Import with Environment File (--env)
Supply a Bruno .env.bru file to generate a workspace.env.toml:
rumour import --format bruno \
--input ./my_bruno_collection \
--env ./my_bruno_collection/development.env.bru \
--output ./bruno_with_env_output
Output:
Importing bruno from ./my_bruno_collection...
PASS Successfully imported 4 nodes from bruno collection.
Generated workspace.env.toml:
[variables]
"token" = ""
"base_url" = "https://httpbin.org"
Import from OpenAPI Specification (Swagger)
Rumour supports importing OpenAPI Specification (OAS 3.0/3.1) and Swagger 2.0 files. It converts operations (endpoints) into native Rumour .toml request files, groups them by tags or path structure, and auto-generates sample headers, params, and body payloads based on the OpenAPI schema definitions.
Support Details
- Formats: JSON or YAML OpenAPI specs.
- Inputs: Local file path (e.g.
./openapi.json) or remote HTTP/HTTPS URL (e.g.https://petstore.swagger.io/v2/swagger.json).
Example 5 — Import OpenAPI from a Local File
rumour import --format openapi \
--input ./petstore.json \
--output ./openapi_output
Example 6 — Import OpenAPI from a Remote URL
rumour import --format openapi \
--input https://petstore.swagger.io/v2/swagger.json \
--output ./openapi_output
Output:
Importing openapi from https://petstore.swagger.io/v2/swagger.json...
PASS Successfully imported 20 nodes from openapi collection.
What Gets Converted
Request Fields
| Postman / Bruno | Rumour TOML |
|---|---|
method | [request].method |
url | [request].url |
| Enabled headers | [headers] table |
| Query parameters | [params] table |
| Raw JSON body | [body] type = "json" |
| Form-data body | [body] type = "form" |
| URL-encoded body | [body] type = "urlencoded" |
| Collection / env variables | workspace.env.toml [variables] |
pm.response.to.have.status(N) | [assert] status = N |
pm.*.set("key", jsonData.path) | [extract] key = "path" |
What Is NOT Converted
| Feature | Status |
|---|---|
| Pre-request scripts | ✗ Not supported |
| Complex test assertions (regex, string matching) | ✗ Not supported — add [assert] manually |
| OAuth / complex auth flows | ✗ Needs manual header setup |
Postman dynamic variables ({{$timestamp}}) | ✗ Use Rumour's {{timestamp}} built-in instead |
| ZIP files as input (Postman or Bruno) | ✗ Not supported — must be extracted first |
Limitations
ZIP Files Are Not Supported as Input
Neither the Postman nor Bruno importer can read a .zip file directly. The --input flag always expects an already-extracted file or directory on disk.
This is verified behavior — if you pass a ZIP file as the Bruno input, Rumour will fail at the OS level when it tries to open it as a directory:
# ✗ Fails — ZIP is not a directory
rumour import --format bruno --input my_bruno_collection.zip --output ./output
Importing bruno from my_bruno_collection.zip...
FAIL Import failed: Failed to read directory: Not a directory (os error 20)
The fix — extract the ZIP first, then import:
# 1. Extract the Bruno collection ZIP
unzip my_bruno_collection.zip -d ./my_bruno_collection_extracted
# 2. Import from the extracted directory
rumour import --format bruno \
--input ./my_bruno_collection_extracted/my_bruno_collection/ \
--output ./rumour_output
The same applies to Postman: if your Postman backup is zipped, extract it first to get the .json collection file, then pass that file to --input.
# 1. Extract the Postman backup ZIP
unzip postman_backup.zip -d ./postman_extracted
# 2. Import the extracted JSON
rumour import --format postman \
--input ./postman_extracted/my_collection.postman_collection.json \
--output ./rumour_output
After Import
Once imported, verify and run your workflow:
# 1. Review the generated files
ls ./postman_output/My_API_Collection/
# 2. Update the workspace.env.toml with real values
vim ./postman_output/My_API_Collection/workspace.env.toml
# 3. Run the imported workflow
rumour run ./postman_output/My_API_Collection/