Skip to main content

Importing Collections

The bru import command allows you to convert API specifications from other formats into Bruno collections. This is useful for:
  • Migrating from other API tools
  • Generating collections from OpenAPI/Swagger specs
  • Converting SOAP/WSDL services to Bruno format
  • Automating collection creation from API documentation

Supported Formats

Bruno CLI currently supports importing from:
  • OpenAPI - OpenAPI 3.x and Swagger 2.x specifications (JSON/YAML)
  • WSDL - SOAP Web Service Definition Language

OpenAPI Import

Basic Import

Import an OpenAPI specification from a local file:
Using short aliases:

Import from URL

Import directly from a remote URL:

Skip SSL Verification

For URLs with self-signed certificates:
Only use --insecure in development/testing. Never in production.

Collection Formats

Specify the output format:
Options:
  • opencollection (default) - Uses YAML format (.yml)
  • bru - Uses Bruno format (.bru)

Grouping Strategies

Control how requests are organized:
Grouping options:
string
default:"tags"
  • tags - Group by OpenAPI tags (default)
  • path - Group by URL path structure

Example: Tags Grouping

OpenAPI
Results in:

Example: Path Grouping

OpenAPI
Results in:

Export as JSON

Instead of creating a collection directory, export as a JSON file:
Using aliases:

WSDL Import

Basic WSDL Import

Import a SOAP service from WSDL:

Import WSDL from URL

Import Options Reference

string
required
Path to the source file or URL. Can be a local file path or HTTP(S) URL.Aliases: -s
string
Path to the output directory where the collection will be created.Aliases: -oConflicts with: --output-file
string
Path to export the collection as a JSON file instead of a directory.Aliases: -fConflicts with: --output
string
Name for the imported collection. If not specified, uses the name from the specification or filename.Aliases: -n
string
default:"opencollection"
Format of the imported collection.Options:
  • opencollection - YAML format
  • bru - Bruno format
boolean
default:false
Skip SSL certificate verification when fetching from URLs.
Use only in development/testing environments.
string
default:"tags"
How to organize imported requests (OpenAPI only).Aliases: -gOptions:
  • tags - Group by OpenAPI tags
  • path - Group by URL path structure

Complete Examples

Import Public API Spec

Import with Custom Format

Import and Export as JSON

Import WSDL Service

Output Structure

When importing to a directory (--output), Bruno creates:
When exporting to JSON (--output-file), you get a single JSON file containing the entire collection structure.

Automating Imports

You can automate collection generation in your CI/CD pipeline:
.github/workflows/generate-collection.yml

Post-Import Steps

  1. Review the collection - Check that all endpoints were imported correctly
  2. Add environments - Create environment files for different stages
  3. Add tests - Enhance requests with assertions and tests
  4. Configure auth - Set up authentication for your endpoints
  5. Run tests - Verify the collection works:

Troubleshooting

Invalid OpenAPI Spec

If import fails, validate your spec:

URL Fetch Errors

For SSL errors with trusted sources:

Empty Collection

If the imported collection is empty:
  • Verify the spec file is valid
  • Check that paths are defined in the OpenAPI spec
  • For WSDL, ensure the service definitions are present

Next Steps

Running Tests

Learn how to run your imported collection

CLI Options

Explore all CLI options and flags