Xolo lets you migrate an existing Postman workflow without starting from scratch. When you import a Postman Collection v2.1 JSON file, Xolo reconstructs the entire folder hierarchy, recreates every saved request with its method, URL, headers, query parameters, and body, and automatically converts a supported subset of Postman test scripts into native Xolo assertion rules — so your validation logic travels with the collection.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JonathanHerSa/xolo-api-hub/llms.txt
Use this file to discover all available pages before exploring further.
Supported Format
Xolo reads Postman Collection v2 JSON (exported from Postman as “Collection v2.1”). The root JSON object must contain:info.name— used as the collection name in Xolo (falls back to"Imported Postman Collection"if absent)item— the top-level array of requests and folders
ImportManager.detectFormat() method identifies a Postman file automatically by checking for info._postman_id or a top-level item key, so you can also leave the format picker on Auto-detect.
Import Steps
Export from Postman
In Postman, open the collection, click the ⋯ menu, choose Export, and select Collection v2.1 (recommended). Save the
.json file to your device.Open the Import dialog in Xolo
Tap the sidebar menu → Import → Collection. The
ImportCollectionDialog opens with source tabs for URL and File, and a format dropdown defaulting to Auto-detect.Select the JSON file
Switch the source toggle to File and tap Select file. The system file picker opens filtered to
.json files. Choose the Postman export you saved in step 1.Choose a destination
Leave the destination blank to import into the root workspace, or pass
targetCollectionId to nest the collection inside an existing parent. The dialog forwards this value directly to PostmanService.importFromJson().What Gets Imported
PostmanService._parseItems() walks the item array recursively. Each element is treated as either a folder (has a nested item array) or a request (has a request object):
| Field | Postman source | Notes |
|---|---|---|
| Collection name | info.name | Top-level root collection |
| Folder name | item[].name with item[].item | Nested sub-collections |
| Request name | item[].name | |
| Method | request.method | Upper-cased; defaults to GET |
| URL | request.url.raw or reconstructed from host+path | |
| Query parameters | request.url.query[] | Imported as active key-value pairs |
| Headers | request.header[] | Imported as active key-value pairs |
| Body (raw) | request.body.mode == "raw" | Imported verbatim |
| Body (urlencoded) | request.body.mode == "urlencoded" | Converted to pretty-printed JSON map |
| Description | item[].description | Stored on collection folders |
Assertion Mapping
PostmanAssertionMapper.fromPostmanEvents() scans every event block where listen == "test" and converts the script lines it recognises into AssertionRuleEntity values stored in the request’s assertionsJson column.
| Postman test script | Xolo assertion rule |
|---|---|
pm.response.to.have.status(200) | statusCode equals 200 |
pm.expect(json.token).to.exist | jsonPathExists $.token |
Other pm.* tests | Skipped (unmapped) |
pm.expect(json.<field>).to.exist and pm.expect(<obj>.<field>).to.exist regex variants. Mapped rules are encoded as JSON and saved to the request automatically during import.
PostmanService.importFromJson() Reference
| Parameter | Type | Description |
|---|---|---|
json | Map<String, dynamic> | The full parsed Postman collection object |
parentId | int? | Parent collection ID. Pass null to create at the workspace root |
db | AppDatabase | The active Drift database instance |
targetCollectionId | int? (named, optional) | Skip root creation and import items directly into this collection |
targetCollectionId is provided, the info.name from the Postman file is ignored for the root-level collection — all items are imported as children of the specified collection.
cURL Import
For one-off requests, Xolo also supports importing a singlecurl command without creating a new collection.
Open the cURL dialog
Tap Import → cURL from the top toolbar (or within any open request tab). The
ImportCurlDialog opens with a monospace text area.Paste the curl command
Paste a complete
curl command. The command must start with curl; otherwise the parser returns null and displays a validation error.-d) but no explicit -X flag, CurlParser automatically infers POST as the method.
Postman environment variables (e.g.
{{base_url}}, {{token}}) are not imported — Postman environment JSON files are a separate export artifact and are not part of the collection file. After import, recreate your variables in Xolo’s Environments screen and reference them with the same {{variable}} syntax.