Skip to main content

Dynamic Values

Dynamic variables are parameter values that are automatically generated according to predefined system rules during the running of the API, commonly used for variable references, test simulation data, encryption, etc.

Go to the example value of the request parameter, move the mouse over the input box to display the magic wand icon, and click to start setting dynamic variables.

Dynamic Value Types

Dynamic values support adding reading variables, mock data, fixed values and custom expressions 4 types.

Retrieve Variable

Support referencing environment variables and global variables that have been preset in the current environment, and can also insert a new custom variable.

Mock Data

If you want to randomly generate a random value according to rules in the request, you can choose Mock data, such as generating telephone, email and address.

Fixed Value

If you want the example value of the parameter to remain a constant, select Fixed value and input the fixed value in the input value.

If you do not want to expose the fixed value in plain text, you can click the "Add" option to specify an encryption processing function.

Custom Expression

If the variables provided by the system do not meet the requirements, you can also use custom expression rules to generate data, supporting the use of Faker.js, Nunjucks syntax. You can click to see Faker.js for reference.

You can also nest variables, fixed values and mock data that have been set using custom functions.