Environments are named collections of key-value variables scoped to a project workspace. They let you maintain separate configuration for development, staging, and production without duplicating requests. A single URL template likeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JonathanHerSa/xolo-api-hub/llms.txt
Use this file to discover all available pages before exploring further.
{{baseUrl}}/orders/{{orderId}} resolves to a completely different endpoint depending on which environment is active — switch environments in the toolbar and every {{variable}} reference across all requests, headers, and bodies updates instantly.
Creating an Environment
Open the Environments screen
From within an active project, tap the layers icon in the workspace app bar, or navigate directly to the Environments screen from the side menu.
Open the sidebar
Tap the hamburger menu icon (☰) in the Environments screen app bar to slide out the environment list sidebar.
Tap New Environment
Tap + New Environment at the bottom of the sidebar. An alert dialog prompts for a name.
When you create a new root-level project (collection), Xolo automatically generates Development, Staging, and Production environments — each pre-seeded with a
baseUrl variable — so you can start testing right away without manual setup.Adding Variables
Select an environment in the sidebar to view its variables in the main panel. Tap + Add Variable to open the variable editor dialog. Each variable has two fields:| Field | Description |
|---|---|
key | The variable name used inside {{...}} tokens |
value | The resolved string substituted at send time |
upsertVariable(key, value, environmentId, workspaceId) on XoloRepository. The call is an upsert, so editing an existing variable by the same key updates it in place rather than creating a duplicate.
deleteVariable(id) and remove it immediately.
Switching Environments
Tap the active environment badge (the coloured chip showing the current environment name) in the composer toolbar. A popup menu lists all environments defined for the active workspace; tap one to switch. Switching environments callssetActiveEnvironment(envId, workspaceId). Because all URL bars, header tables, and body editors consume the resolvedVariablesProvider stream, every {{variable}} in the UI resolves to the new values without any manual refresh.
You can also activate an environment directly from the Environments screen by selecting it in the sidebar and tapping the Activate button in the main panel header.
Global Variables
Variables stored without anenvironmentId are globals — they are available in all environments within the same workspace. In the Environments screen, select Globals (the public/globe icon item) at the top of the sidebar to view and manage workspace-scoped global variables.
Global variables use the same upsertVariable call with environmentId: null:
Variable Resolution Order
When Xolo resolves{{variables}} for a request, globals are loaded first and then environment-specific variables are merged on top. This means environment variables always win over globals with the same key:
VariableParser.parse(input, variables), which performs the token substitution using a single regex pass over the input string.
Dynamic Built-in Variables
VariableParser resolves a set of built-in dynamic variables at send time. These do not need to be defined in any environment — just reference them directly in a URL, header, or body:
| Variable | Resolved value |
|---|---|
{{$timestamp}} | Current time as Unix milliseconds |
{{$guid}} | A random UUID v4 |
{{$randomInt}} | A random integer between 0 and 999 |
{{$isoDate}} | Current date in YYYY-MM-DD format |
{{$isoDateTime}} | Current date-time in ISO 8601 format |
{{$randomEmail}} | A random email address (user12345@xolo.test) |
{{$randomString:N}} | A random alphanumeric string of length N (default 8) |
{{$randomIntRange:min:max}} | A random integer between min and max inclusive |