Environment Variables

You can use environment variables in your API spec file with the syntax

${MY_ENV_VAR}

For example:

$ export BASE_URL="http://demo.scanapi.dev/api/"
endpoints:
  - name: scanapi-demo
    path: ${BASE_URL}
    requests:
      - name: health
        method: get
        path: /health/

ScanAPI would call the following http://demo.scanapi.dev/api/health/ then.

Heads up: the variable name must be in upper case.