Environment variables

Environment variables allow you to store and reuse values in your requests and scripts.

By storing a value in a variable:

  • You can reference it throughout your request section
  • You can change its value by updating it at a single place
  • You increase your ability to work efficiently and minimize the likelihood of errors

Accessing environment variable

If you have more than one environments, select the environment whose variables you want to access. You can access the variables in the request section by referencing the variable in the following format {{variable_name}}, in our case the variable will be {{baseUrl}} and the complete URL will be {{baseUrl}}/HB/04744806-c7e1-49d9-a270-fa5671d7c896.

In the screenshot above, you can see how environment variables are referenced and resolved across the request:

  • URL bar: {{baseUrl}} is used as the host prefix — PruTAN substitutes it with the value defined in the active environment (shown in the top-right selector) before sending the request.
  • Request body: {{email}} is used inside contactDetails — PruTAN replaces it with the resolved value from the active environment at send time.
  • Response: The request returned a 200 OK (visible in the status row), confirming the resolved URL reached the server successfully and the variables were substituted as expected.

This makes it easy to reuse the same request across different environments (for example, dev/stage/prod) by simply switching the active environment — no changes to the URL or body are required.

  • You can add your variables to Global environment, which can be accessed globally, ie. without creating any evironments for the Team.

For detailed setup, see Environments