Skip to main content

Managed Variables

Managed Variables let you define reusable variable values centrally, so queries with Query Variables can run without re-entering the same inputs each time.

This is useful when you frequently run the same queries across one or more connections and want consistent values.

note

Managed Variables can also be used in API Explorer (for example in URL path/query params/headers/body placeholders). See API Explorer Variables for usage details.

How to Launch

  1. Open the Query module.
  2. In the Query toolbar, click More Actions (...).
  3. Click Manage Variables.

Overview

The Manage Variables dialog lets you maintain a list of reusable variables. Here is the dialog that is shown when click on the Manage Variables action.

Here are the various actions in the dialog.

  • Active: Toggle a variable on/off without deleting it. Variable is not used when it is inactive.
  • Name: Variable name without :. For example, accountId.
  • Value: Default value used for that variable.
  • Connection Overrides: Optional connection-specific value overrides.

While saving managed variables, Brobench enforces the following:

  • Variable name is required when any value is provided.
  • Variable name cannot start with $.
  • Variable names must be unique (case-insensitive).
  • Connection override with a value must also have a selected connection.

Connection Overrides

Connection Overrides lets you use different values for the same variable based on the active connection.

For each variable row:

  1. Click + in the Connection Overrides column.
  2. Select a connection.
  3. Enter the override value for that connection.
  4. Repeat to add multiple connection-specific overrides.

Example:

  • Variable accountId default Value: 001AAA...
  • Override for prod@company.com: 001PROD...
  • Override for uat@company.com: 001UAT...

When query runs in prod@company.com, Brobench uses 001PROD....
When query runs in uat@company.com, it uses 001UAT....
For any other connection, it falls back to default 001AAA....

How Values are Resolved

When a query executes, Brobench resolves managed variables in this order:

  1. Use matching Connection Override value if present for the current connection.
  2. Otherwise, use the variable's default Value.

If a variable is inactive or has no usable value, it is ignored.

Notes

  • Managed Variables are intended for reuse with query variables such as :accountId.
  • Standard query vars like :$userId are built-in and are managed separately. See Query Variables.