Global Environment
In Reqable, a global environment variable is a special type of environment variable whose value is available throughout the Reqable application. Global environment variables are often used to store data values that need to be shared across multiple requests or environments.
Using global environment variables helps users share data across different requests, collections, or environments without having to define the same values repeatedly. This increases productivity and ensures data consistency and accuracy.
To use global environment variables in Reqable, you first need to define these variables. By default, Reqable has created a global environment for everyone. You can click the Global environment in the Environment panel to define and edit global environment variables. Once variables are defined, they can be used in any request, script, or elsewhere without having to repeatedly enter values.
When using global environment variables in a request, just use double angle brackets (such as <<variable_name>>) where you need to reference the variable. Reqable will automatically replace these references with the variable value when sending the request.
Global environment variables have a lower priority than other environment variables. If a variable with the same name exists in other environments, the variable specified in the other environment will be used first.
Global variables are divided into two types, one is Custom Variable, and the other is Built-in Variable。
Custom Variable
Custom variables are defined by users. You can click the Global item in the environment panel to add, modify, delete and activate theme.
Variable name can only contain letter, number and underscore _, and must start with letter or an underscore _.
If you do not want the variable value to be displayed in plain text, you can click the eye icon (which automatically appears when the mouse is hovering at the end of the input box) to hide it.
Built-in Variable
In Reqable, in addition to user custom variables, there are also some built-in variables, which start with a dollar symbol ($). There are currently a total of the following built-in variables.
$dateCurrent date and time (yyyy-MM-dd) in the local time zone.$datetimeCurrent date and time (yyyy-MM-dd HH:mm:ss) in the local time zone.$guidA v4 style guid.$randomBooleanA random boolean value (true/false).$randomColorA random color name.$randomCurrencyCodeA random 3-letter currency code (ISO-4217).$randomCurrencyNameA random currency name.$randomEmailA random email address.$randomHttpUrlA random HTTP URL.$randomHttpsUrlA random HTTP URL.$randomImageUrlA random image URL.$randomInt1A random integer between 0 and 10.$randomInt2A random integer between 0 and 100.$randomInt3A random integer between 0 and 1000.$randomInt4A random integer between 0 and 10000.$randomIPv4A random IPv4 address.$randomIPv6A random IPv6 address.$randomJustTimeA random time (HH:mm).$randomLetterLowerA random lower case letter.$randomLetterUpperA random upper case letter.$randomLatitudeA random latitude coordinate.$randomLongitudeA random longitude coordinate.$randomMACAddressA random MAC address.$randomMonthA random month.$randomPasswordA random 12-character password.$randomPhoneNumberCNA random 11-digit chinese mainland phone number.$randomPhoneNumberUSA random 10-digit us phone number.$randomUsernameA random username.$randomWeekdayA random weekday.$timestampThe current timestamp in milliseconds.$timestampInSecondsThe current timestamp in seconds.$timestampISOThe current ISO timestamp at zero UTC.
These built-in variables can dynamically generate data in requests, and users can directly reference these built-in variables in Reqable without prior definition or setting.