Skip to main content

Overview

LiteClient supports dynamic variable substitution using the {{variableName}} syntax. Variables can be used throughout your requests to create reusable, environment-specific configurations.

Variable Syntax

Variables are enclosed in double curly braces:
{{baseUrl}}/api/users
{{apiKey}}
{{environmentVariable}}

Where Variables Work

Variables can be used in:
  • URLs: {{baseUrl}}/api/users/{{userId}}
  • Headers: Both keys and values
  • Request body: All body modes (JSON, form-data, etc.)
  • Authentication credentials: API keys, OAuth parameters

Variable Types

LiteClient uses EnvironmentVariable objects with the following properties:
  • id - Unique identifier
  • name - Variable name (used in {{name}} syntax)
  • initialValue - The variable’s value
  • type - Either default or secret
  • enabled - Boolean flag to enable/disable the variable
Only enabled variables are resolved during request execution.

Variable Resolution Order

When a request is executed, LiteClient resolves variables using a layered precedence system. The narrowest scope wins:
1

Global Variables

Global variables are always available regardless of the selected environment. They provide base values accessible across all requests.
2

Collection Variables

Collection-scoped variables override global variables. These are specific to requests within a collection.
3

Environment Variables

Environment variables have the highest precedence and override both global and collection variables. Use these for environment-specific configurations (development, staging, production).

Resolution Example

If you have:
  • Global variable: baseUrl = https://api.example.com
  • Collection variable: baseUrl = https://api.dev.example.com
  • Environment variable: baseUrl = https://api.staging.example.com
The request will use https://api.staging.example.com (environment scope wins).

Autocomplete

LiteClient provides an autocomplete dropdown when typing variables:
  1. Type {{ to trigger autocomplete
  2. Start typing the variable name
  3. Use arrow keys to navigate available variables
  4. Press Enter to select
The autocomplete shows all available variables from global, collection, and environment scopes.

Creating Variables

Global Variables

Global variables are always available:
1

Open Environment Tab

Switch to the Env tab in the LiteClient sidebar
2

Access Globals

Select the Globals section
3

Add Variable

Click Add Variable and enter name and value

Environment Variables

Create environment-specific variables:
1

Create Environment

In the Env tab, click New Environment
2

Name Environment

Enter a name (e.g., “Development”, “Production”)
3

Add Variables

Click Add Variable and configure your environment-specific values
4

Select Environment

Choose the environment from the dropdown in any request panel

Best Practices

Use Descriptive Names

Name variables clearly: apiBaseUrl instead of url, authToken instead of token

Secret Variables

Mark sensitive data (API keys, tokens) as secret type

Global for Shared Values

Use global variables for values shared across all environments

Environment for Configs

Use environments to manage different configurations (dev, staging, prod)

Troubleshooting

If variables are not being substituted, check:
  1. An environment is selected in the sidebar
  2. The variable exists in the active environment, collection, or globals
  3. The variable name matches exactly (case-sensitive)
  4. The variable is enabled