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
Note: By default, projects use their own environments. To use global environments with a project, you need to configure the Environment Resolution Mode in Settings.

Global Environments

Global environments are available across all standalone requests (requests not opened from a project).

Creating an Environment

  1. Look at the bottom of the sidebar for the Environment section
  2. Click the dropdown (shows "No Environment" by default)
  3. Click "Manage Environments..." at the bottom
  4. Click "New Environment"
  5. Enter a name (e.g., "Development", "Staging", "Production")

Adding Variables

After creating at least one environment, you can add variables:

  1. In the Environment Manager, click "Add Variable"
  2. Enter the variable name (e.g., base_url, api_token)
  3. Set values for each environment

Variable names can only contain:

a-zA-Z0-9_

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

Development
base_url: localhost:3000
api_token: dev_token_123
Staging
base_url: staging.api.com
api_token: stg_token_456
Production
base_url: api.example.com
api_token: prod_token_789

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}}
Tip: If a variable is not found in the active environment, it remains as-is in the request (e.g., {{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.

ModeBehavior
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 OnlyVariables are resolved only from global environments. Project environments are ignored.

How to Configure

  1. Open Settings (gear icon in the sidebar or Cmd/Ctrl+,)
  2. Go to the Projects tab
  3. Select the project you want to configure
  4. Choose the desired Environment Resolution mode

When to Use Each Mode

Project Only:When the project has all the variables it needs and you want complete isolation from global settings.
Merge:When you want to share common variables (like auth tokens) globally but override specific ones (like base URLs) per project.
Global Only:When you manage all environments globally and don't want to duplicate them in each project.

Project Environments

Each project can have its own set of environments with additional features not available in global environments.

FeatureDescription
Base URLEach environment can have a base URL that maps to OpenAPI Servers
Enabled/DisabledIndividual variables can be toggled on/off without deleting them
Secret FlagMark sensitive values (like API keys) as secret for visual distinction
DescriptionAdd descriptions to environments for documentation
OpenAPI Integration: Project environments map directly to OpenAPI Server objects. When you export a project to OpenAPI, environments become server definitions.

Variable Resolution

When a request is sent, variables are resolved in a specific order based on the context:

For Standalone Requests

Global EnvironmentVariables replaced

For Project Requests (Merge Mode)

Global Environment+Project EnvironmentProject overrides Global
Remember: Variables are replaced at send time, not while editing. This means you can prepare requests with variables even if the environment isn't selected yet.