Skip to content

API Reference

Each function is used in a complete, runnable script in its guide: Postman, Insomnia, OpenAPI, and WSDL.

postmanToBruno

Converts a Postman collection to a Bruno collection.

postmanToBruno is async and returns a Promise. await the result, or the value you get back is a pending Promise rather than the collection.

const { collection, issues } = await postmanToBruno(postmanCollection, options);

Parameters

The Postman collection, parsed from its JSON export.

Keep pre-request and post-response scripts exactly as written in Postman instead of translating pm.* calls to Bruno's bru.* API. Translate scripts in worker threads. Speeds up large collections.

Returns

The Bruno collection.

Items that could not be converted cleanly. Each entry has a severity, the path of the item it concerns, and a message.

postmanToBrunoEnvironment

Converts a Postman environment to a Bruno environment.

const environment = postmanToBrunoEnvironment(postmanEnvironment);

Parameters

The Postman environment, parsed from its JSON export.

Returns

The Bruno environment.

insomniaToBruno

Converts an Insomnia collection to a Bruno collection.

const collection = insomniaToBruno(insomniaCollection);

Parameters

The Insomnia export, parsed from JSON.

Returns

The Bruno collection.

openApiToBruno

Converts an OpenAPI 3.x or Swagger 2.0 specification to a Bruno collection.

const collection = openApiToBruno(openApiSpec, options);

Parameters

The specification as a parsed object, or as a raw JSON or YAML string.

How requests are grouped into folders: "tags" groups by operation tag, "path" groups by URL path.

Returns

The Bruno collection.

wsdlToBruno

Converts a WSDL file to a Bruno collection of SOAP requests.

wsdlToBruno is async and returns a Promise. await the result, or the value you get back is a pending Promise rather than the collection.

const collection = await wsdlToBruno(wsdlContent);

Parameters

The WSDL file content.

Returns

The Bruno collection.