Getting Started
Quick StartSpecification
Basic Structure API Specification Keys Python Code Environment Variables Custom Variables Chaining Requests API Specification in Multiple Files RetryConfiguration
Command Line Interface - CLI Configuration File Hiding Sensitive Information Custom ReportEnvironment 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.