For more information about API Checks in general, see our API Check article.
Save Step
A Save Step stores some data to be reused later in the check. To save data, supply the source and the name of the custom variable to save to. The source can be selected from the presets, including response headers, or by providing a custom value.
Some additional use cases are appending bits of information to easily reuse in other steps and saving the results from one request to be reused after another request is made.
It is important to remember that request variables are only available after a request is made. If you try to save a value from a request but haven’t made a request yet, then an empty string will be saved.
Example
In the example below, we save an API key in the first step. The key is then reused in subsequent steps. This allows us to do some setup at the beginning of the check, and if the key ever changes we only have to change in one place per check.
If you need to reuse a variable across steps, you should use a Global Variable instead.
Failures
A Save Step never fails.