Skip to main content

Environments & Variables

Rostyman has a powerful variable system that lets you use dynamic values across all your requests.

How it works

Variables use the {{variableName}} syntax and are substituted before a request is sent. They work in:

  • URL
  • Query parameter keys and values
  • Header keys and values
  • Request body (raw)
  • Auth fields (token, username, password, API key, etc.)

Variable Types

TypeScopeWhere to manage
Environment variablesOne environment within a collectionEnvironments tab
Collection variablesAll environments in a collectionCollection Overview tab
Global variablesAll collections and workspacesGlobals panel (⊞ icon)
Built-in variablesEverywhere, auto-generatedUsed directly in requests

Resolution Order

When a variable appears in a request, Rostyman resolves it in this priority order (highest wins):

Environment variables  (active environment for the collection — highest priority)

Collection variables (shared across all environments in a collection)

Global variables / Vault (workspace-wide)

Built-in variables ({{$randomUUID}}, {{$timestamp}}, etc. — lowest-priority fallback)

User-defined variables are checked first; the built-in {{$...}} dynamic variables are only the fallback when no user variable of that name exists. That means a built-in can be overridden — if you define your own variable named, say, $timestamp, your value wins over the generated one.

If a variable with the same name exists in multiple scopes, the higher-priority scope wins.

If a variable is not found in any scope (and is not a built-in), it is left as-is: {{unresolved}}.

Environments are Collection-Scoped

Each collection has its own set of environments (e.g., Local, Dev, Staging, Prod). Environments from one collection are not visible in another collection's requests.

This matches how real teams work — each API project has its own set of environments.

Variable Autocomplete

When typing {{ in any input field that supports variables, a dropdown appears showing all available variables with their current values and source (environment vs collection variable). Use arrow keys to navigate and Enter or Tab to insert.