Skip to main content

required-request-server-url-variable-value

Overview

This rule belongs to the postman-validation ruleset and states that:

If a url defined in a Postman Collection request resource contains a variable using curly braces {{name}}, a corresponding value for the variable must be provided in either of the following: collection variables, enviroment variables or data variables. If you've used environment or data variables, their information must be exported from the Postman application in the form of external data/environment files and uploaded along with the Postman Collection in a ZIP file. The variable name used in the URL must match exactly with the pre-defined variable and the value provided this way must be non-empty. If a variable entry does not exist or the value is empty, a default value will be assumed for the variable automatically during import/transformations in APIMatic.

PropertyValue
EnabledYes
Maximum SeverityError
MessageServer base URL contains a variable with no value available.
CodePOSTMAN_V151
TypeValidation
Rule SystemSemantic
Broad CategoryAPI Servers
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagspostman api semantic validation variable url request server environment data

Suggested Fixes

  • A variable can be declared in a URL using curly braces e.g. {{name}} where name is the name of the variable.
  • If you've used variables in your request URLs, ensure that the value for the variable is available in one or more of the following: collection variables, environment or data variables.
  • Ensure that the variable name matches exactly with an entry in the collection/environment/data variables and has no typos. Names are compared in a case-sensitive manner.
  • If values are available in data or environment files, make sure all such relevant files are uploaded along with the Postman Collection in a ZIP file.

For More Information