Postman Variable Scope

 

Postman's variable allow you to store and reuse values in your requests, responses, or scripts. However, the type of variables in Postman might confuse you since those variables conform to specific  hierarchy.

Scope is nothing but the accessibility of a variable. Using variables within specific scopes allows you to reuse values efficiently. All variables defined in the current iteration take precedence over the variables defined in the current environment, which overrides the ones defined in the global scope.

The priority of variable is defined as follows:
  1. Local Variable
  2. Data Variable
  3. Environment Variable
  4. Collection Variable
  5. Global Variable



Next Post Previous Post