Skip to content

Postman Export

Rext HTTP can export your requests as Postman Collections v2.1, automatically translating @capture, @assert, @pre, and @group to their native Postman equivalents.

  1. Open a .rext file
  2. Place your cursor on a request
  3. Ctrl+Shift+P“Rext: Export Request”
  4. Select ”📦 Postman Collection”
  • Full file — Right-click a file → 📦 Export to Postman
  • Collection — Click the 📦 button on the collection header, or right-click → Export to Postman
  • Group — Click the 📦 button on the group header, or right-click → Export to Postman
  1. Execute a request
  2. In the results panel, click Export ▾
  3. Select 📦 Postman Collection

Ctrl+Shift+P“Rext: Export All to Postman Collection” — exports all .rext files in the workspace as a single collection.

@capture env.token = body.access_token
@capture global.apiKey = body.key
@capture collection.refreshToken = body.refresh_token

Becomes:

pm.environment.set("token", pm.response.json().access_token);
pm.globals.set("apiKey", pm.response.json().key);
pm.collectionVariables.set("refreshToken", pm.response.json().refresh_token);
@assert status == 200
@assert body.email exists
@assert body.items isArray
@assert body.name contains "John"

Becomes:

pm.test("status == 200", function () {
pm.response.to.have.status(200);
});
pm.test("body.email exists", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.email).to.exist;
});
@group Auth/Login

Creates nested folders Auth > Login in the Postman collection.

@pre abc123

Translates to a pm.sendRequest() in the Pre-request Script that executes the referenced request with its URL, method, headers, and body.

When exporting a request with @pre and the pre-request is not included in the export:

  1. Rext searches for the pre-request across the workspace
  2. Shows a dialog asking:
    • “Yes, include” — Adds the pre-request as an additional item in the Postman collection
    • “No, just pm.sendRequest()” — Keeps only the inline script

The exported file is a standard Postman Collection v2.1 JSON:

{
"info": {
"name": "My Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [...]
}

You can import it directly into Postman with File → Import.