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
Atrahasis has four separate environment systems, each scoped to a different part of the app:
Global Environments
- Available to every standalone request (i.e., requests not opened from a project)
- Managed from the Environment section at the bottom of the sidebar
- Plain key-value pairs — no enabled, secret, or vault flags
Project Environments
- Scoped to a specific OpenAPI project
- Managed from the project's Environment panel
- Each environment carries a Base URL and optional description
- Variables support the enabled/disabled toggle
- Maps directly to OpenAPI Server objects on export
Flow Environments
- Scoped to a flow group (folder of related flows)
- Managed from the Environment panel inside the flow designer
- Variables support enabled/disabled toggles, Secret variables backed by the OS keychain, and Vault-backed sources — covered in the Flow Runner section
Load Test Environments
- Scoped to a load test spec folder
- Managed from the Environment panel inside the load test designer
- Same feature set as Flow Environments (enabled/disabled, Secret variables, Vault sources) — covered in the Load Testing section
Global Environments
Global environments are available to every standalone request — requests that live directly in the Box or in a new tab, not requests opened from a project, flow, or load test. For project-linked requests, see the Environment Resolution section below; flow and load test runs always resolve against their own environments.
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")
Managing Environments
In the Environment Manager, hover over an environment to see action buttons:
- Rename — Click the edit icon to change the environment name
- Delete — Click the delete icon to remove the environment (with confirmation)
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 (max 100 characters):
You can also edit existing variables by clicking the edit icon, or delete a variable from all environments by clicking the delete icon.
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:
For Standalone Requests
For Project Requests (Merge Mode)
For Flow Steps
For Load Test Specs
at.flow.set() / at.flow.get() for inter-step data passing are documented in the Flow Runner section.