Skip to main content

Variable & Argument Prioritization

Multiple variables and arguments can conflict with each other, and it is important to understand how API Parrot prioritizes these variables and arguments and how to customize this behavior.

Variable with multiple sources

If the same refrence value is found in multiple exchanges, or in multiple places in the same exchange, API Parrot will prioritize the variable based on where it was first found. The first place the variable was found will be the source of the variable. However this can be overwritten by enabling a custom source to the variable in question. This can be done in the variable properties pane.

Variables vs Child Variables

Let's say the API Parrot algorithm detects a variable with the refrence value ["foo", "bar"], this means that there exists a response with this value and a later request with the exact same value. Since the parser regognizes this as a JSON array, it will in both of these cases also match the individual values in the array. This means that the parser will also detect the variables foo and bar.

In cases like these, the parent variable will always take precedence over the child variables. This is to avoid having an unnecessary amount of variables in the collection or function.

If you would like to use the child variables instead of the parent variable, you can disable the parent variable, and the child variables will take its place.

Variables vs Inputs

If a variable and an input have the same refrence value, the input will take precedence over the variable. This is because the input is a user-defined value, and the user should have the ability to override any automaticly detected variables.