Environment Variables → SubCollection Variables → Collection Variables → Global VariablesIn other words:
- Environment variables always take the highest priority and override any variable with the same name in other scopes.
- If no matching environment variable exists, Requestly checks for the variable in the collection scope.
- Global variables serve as a fallback when the variable is not found in the environment or collection scopes.
Example Scenario
Let’s say the variable{{base_url}} is defined in multiple places:
| Scope | Value |
|---|---|
| Global | https://global.api.com |
| Collection | https://collection.api.com |
| SubCollection | https://sub.api.com |
| Environment | https://env.api.com |
{{base_url}} will resolve to https://env.api.com because environment variables have the highest precedence.
