Environments
Environments provide named variable sets for Collections. Select an active environment, write requests with {{variable}}, and Requestarium resolves the variable when you send.
Typical environments are Local, Staging, and Production. Typical variables:
host=https://api.example.test
token=...
workspace_id=...
Environment model
Requestarium stores environments inside environment groups.
| Object | Purpose |
|---|---|
| Environment group | A logical group such as Payments or Billing. It can define the list of variable keys expected by its environments. |
| Environment | A named variable set inside a group, such as Local, Staging, or Production. |
| Variable key | The name used in templates, for example host or token. |
| Variable value | The value for one environment only. The same key can have different values in Local and Staging. |
Example:
| Group | Environment | host | token |
|---|---|---|---|
| Payments | Local | http://127.0.0.1:8080 | local token |
| Payments | Staging | https://payments-staging.example.com | staging token |
Selecting an environment
Use the environment selector in the Collections header to choose the active environment. The selection is saved locally for the current organization and workspace.
Choose No environment when a request should rely only on collection or folder variables, dynamic variables, or values created by scripts.
Creating environments
- Open the environment selector.
- Choose create environment.
- Enter an environment name.
- Select an existing group or enter a new group name.
- Add variable keys to the group if all environments in that group should share them.
- Set values for the selected environment in the Variables panel.
Use the group editor to rename a group or add many expected keys at once. Keys can be entered one per line or separated by commas.
Using variables
Variables work in URLs, headers, bodies, GraphQL variables, message payloads, and settings that support templating.
GET {{host}}/api/internal/tokens
Authorization: Bearer {{token}}
{
"accountId": "{{account_id}}",
"traceId": "{{$guid}}"
}
Postman-style dynamic variables such as {{$guid}}, {{$timestamp}}, and {{$randomUUID}} are built in.
The request Variables panel shows every variable the request uses, whether it is defined, a preview value, and where it comes from: inherited, environment, global, or built-in.
Resolution order
- Collection and folder variables provide inherited defaults.
- The selected environment overrides matching inherited keys.
- Pre-request scripts can update request data and runtime variables before sending.
- Post-response scripts can store values for later requests.
Troubleshooting
| Problem | What to check |
|---|---|
{{host}} is not replaced | Select the right environment or add host to it. |
| A request hits the wrong service | Check which environment is selected in the Collections header. |
| A secret was saved by mistake | Remove it from the environment and rotate the secret. |
| A script cannot see a variable | Use cm.variables.get(name) to read merged values, or check the Variables panel. |