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
| Type | Scope | Where to manage |
|---|---|---|
| Environment variables | One environment within a collection | Environments tab |
| Collection variables | All environments in a collection | Collection Overview tab |
| Global variables | All collections and workspaces | Globals panel (⊞ icon) |
| Built-in variables | Everywhere, auto-generated | Used 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.