Skip to main content
Bruno provides a powerful visualization feature that allows you to display API response data in a more readable and interactive format using the bru.visualize function. This feature supports multiple providers and formats to help you analyze and present your API data effectively.
  1. type(string): The type of visualization to render (e.g., ‘table’, ‘html’).
  2. config(object): Depends on type:
    • table: name, provider (ag-grid, react-table), props.
    • html (raw HTML): name, content — unchanged from earlier releases.
    • html (Handlebars): name, template (Handlebars string), data (object passed into the template), optional options.
    Handlebars is compiled server-side; the Visualize tab receives rendered HTML plus rawData for Postman-style callbacks (see below).

Supported Visualization Types and Providers

Table Visualization (‘table’)

You can render tables using different providers like ag-grid and react-table.

Using ag-grid

Example: ag-grid
copy
This will render a table using the ag-grid provider with filters enabled on all columns.

Using react-table

Example: react-table
copy
The header property only accepts string values. Use strings like header: "Column Name".
This example renders a large table using the react-table provider, with custom headers and filter variants.

HTML visualization ('html')

You can render either raw HTML (existing behavior) or a Handlebars template with structured data.

Raw HTML (content)

Pass a full HTML string. This mode works in QuickJS safe mode and behaves as before. Example: html
copy
This example will render an HTML table with predefined data using the html type.

Handlebars template (template, data, options)

Use Handlebars when you want a small template plus JSON data instead of building HTML strings in script:
copy
Bruno compiles template with data on the server and opens the result in the Visualize tab. rawData is passed alongside rendered HTML.

bru.clearVisualizations()

Clears every visualization registered for the current request and resets the internal list (same idea as Postman’s pm.visualizer.clear()).
copy

Postman pm.visualizer mapping

When you import a Postman collection, script calls are translated automatically: Export from Bruno back to Postman performs the inverse mapping for the same patterns. Table visualizations (ag-grid, react-table) and raw content HTML are unchanged by this translation. Import/export translation is covered by the collection converters; see Postman migration and Converters overview.

Using API Response Data

One of the most powerful features of bru.visualize is the ability to transform API responses into visual tables. Here are practical examples of working with real API data: In Bruno, the parsed API response is stored in res.body

Example 1: Simple User List API

For an API that returns a list of users:
copy

Example 2: Nested API Response Data

For APIs returning nested objects, you can flatten the data before visualization:
copy

Example 3: Transforming Complex Data

For complex responses that need transformation before visualization:
copy

Example 4: Error Handling with API Data

Always include error handling when working with API responses:
copy
When working with API responses:
  • Always verify the response structure before accessing nested properties
  • Use optional chaining (?.) to safely access nested data
  • Transform data to match your visualization needs
  • Add meaningful column headers using the field property
  • Enable filters for better data exploration

Using API Response Data with HTML

You can dynamically generate HTML from API responses:
copy

Custom Dashboard with Statistics

Create rich dashboards with API data:
copy

Viewing Your Visualization

  1. Add the visualization code to your request’s script section
  2. Execute the request
  3. Your visualization will be displayed in the panel
Visualization Output

Parameters

Config properties