Once you have created an enviroment, you can start adding your variables and use them while sending network requests from the API Client.
Adding variables
When adding a variables, you have to specify the following details:
-
Key: The name of the variable which you will be referencing when sending requests. Note, an environment cannot have keys with same name.
-
Type: The type of value the variable will store. It can be string, number, or boolean.
-
Initial value (synced): Initial values will be synced across the workspace. These values will be used by default if no user-defined Current value is set for the variable.
-
Current value (local): Current values are user-defined entries that are not synced across the workspace. These values will override the defined Initial values.
If current value is empty or left blank then initial value of the variable will be used.
Using variables in API Client
To use an environment variable in a request, reference it by name surrounded with double curly braces {{}}
{{base_url}}
You can view variables resolved value in a popup by hovering on the variables in input fields. See examples below: