API & testing
Environments and variables
Reuse URLs, parameters and values across requests.
Creating an environment
- Open Environments in the API section.
- Create an environment and add name/value pairs.
- Select it above the request editor.
- Use {{variable_name}} in URLs, headers, bodies and authentication settings.
base_url = http://127.0.0.1:59740/v1
order_id = 1064
GET {{base_url}}/orders/{{order_id}}Variable scopes
Variables can belong to collections, folders and environments. DataRay resolves available scopes when preparing a request. Collection runs can also use values from a data file.
Keep sensitive values in the designated secret fields. Review variable and secret inclusion settings when exporting.