Using environments
Define variables with different values depending on the environment.
If you want to test your API on different environments (production, staging...), Talend Cloud API Tester's environments will prove useful.
If your production environment is hosted on my-host.com and your staging environment is hosted on staging.my-host.com, and if you create a production and a staging environment containing a host variable with the corresponding URL as its value, you can:
- Define expressions in your requests that leverage the host variable, for example "https://${"host"}/api/my-resource".
- Switch the environment when needed to target the right host.
You can also define private and public variables and share them with other users. For example, you can create a token private variable and add an access token as its value. If you share the environment containing this variable, only the name of the variable is shared, the value is not saved to the cloud and not shared with other users.