Environment Variables
Environments let you store variables (like API URLs, tokens, or IDs) that can be reused across your requests. Instead of hardcoding values, use variables to easily switch between development, staging, and production configurations.
Environment Types
Tigrister has two separate environment systems:
Global Environments
- Available across all requests
- Managed from sidebar Environment section
- Simple key-value pairs
Project Environments
- Scoped to a specific project
- Managed from project's Environment panel
- Support enabled/disabled and secret flags
- Maps to OpenAPI Servers
Global Environments
Global environments are available across all standalone requests (requests not opened from a project).
Creating an Environment
- Look at the bottom of the sidebar for the Environment section
- Click the dropdown (shows "No Environment" by default)
- Click "Manage Environments..." at the bottom
- Click "New Environment"
- Enter a name (e.g., "Development", "Staging", "Production")
Adding Variables
After creating at least one environment, you can add variables:
- In the Environment Manager, click "Add Variable"
- Enter the variable name (e.g.,
base_url,api_token) - Set values for each environment
Variable names can only contain:
Switching Environments
Use the dropdown in the sidebar to quickly switch between environments. The active environment determines which values are used when you send a request.
Example Setup
Using Variables
Reference variables using double curly braces: {{variable_name}}
In URL
https://{{base_url}}/api/users/{{user_id}}In Headers
Authorization: Bearer {{api_token}}In Request Body
{
"user_id": "{{user_id}}",
"api_key": "{{api_key}}"
}In Authentication
Bearer tokens, Basic Auth credentials, and API keys all support variable substitution.
In Query Parameters
api_key: {{api_key}}{{undefined_var}}). This helps identify missing variables.Project Environment Settings
When working with requests from a project, you can configure how environment variables are resolved. This setting is found in Settings → Projects.
| Mode | Behavior |
|---|---|
| Project Only(Default) | Variables are resolved only from the project's own environments. Global environments are ignored. |
| Merge (Project > Global) | Project variables override global variables. If a variable exists in both, the project value is used. If only in global, the global value is used. |
| Global Only | Variables are resolved only from global environments. Project environments are ignored. |
How to Configure
- Open Settings (gear icon in the sidebar or Cmd/Ctrl+,)
- Go to the Projects tab
- Select the project you want to configure
- Choose the desired Environment Resolution mode
When to Use Each Mode
Project Environments
Each project can have its own set of environments with additional features not available in global environments.
| Feature | Description |
|---|---|
| Base URL | Each environment can have a base URL that maps to OpenAPI Servers |
| Enabled/Disabled | Individual variables can be toggled on/off without deleting them |
| Secret Flag | Mark sensitive values (like API keys) as secret for visual distinction |
| Description | Add descriptions to environments for documentation |
Variable Resolution
When a request is sent, variables are resolved in a specific order based on the context: