Skip to Content
UsageVariables

Variables

Astraio supports environment variables for dynamic request configuration.

Variable Types

TypeDescription
EnvironmentSet per environment (dev, staging, prod)
GlobalAvailable across all environments
CollectionScoped to a specific collection

Creating Variables

  1. Open the Variables panel in the sidebar
  2. Click + New Variable
  3. Enter a name and value
  4. Select the scope (environment/global/collection)

Using Variables

Reference variables in requests using the {{variable}} syntax:

{{base_url}}/api/v1/users

Example

VariableValue
base_urlhttps://api.example.com
api_keyBearer abc123

Request URL:

{{base_url}}/users

Authorization Header:

{{api_key}}

Secret Variables

For sensitive data like API keys:

  1. Create a variable
  2. Toggle Secret to hide the value
  3. The value will be masked in the UI

Environments

Switch between environments to change all variables at once:

  1. Click the environment selector in the top bar
  2. Choose your environment (e.g., Development, Production)
  3. All variables update automatically
Last updated on