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 (highest priority — override everything)
↑
Collection variables (baseline, overridden by active environment)
↑
Global variables (workspace-wide, lowest priority)
If a variable is not found in any scope, 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.