API Stash Docs Open app →

The CLI & running in CI

Run your requests, flows, and collections from a terminal or any CI pipeline with the apistash command-line tool — the same definitions you build in the browser.

apistash run

The apistash run command executes a request, a flow, or a whole collection — together with an environment — from the command line. It runs every step and evaluates every assertion along the way.

The commands below are illustrative. Use your own flow, collection, and environment identifiers; exact flags may vary.
# run a single flow against an environment
apistash run <flow-id> --env <env-id>

# run an entire collection
apistash run --collection <collection-id> --env <env-id>

# write a report to a file
apistash run <flow-id> --env <env-id> --report junit --out results.xml

Reports

A run emits a JUnit or HTML report summarizing every step and assertion, so results show up natively in CI dashboards and as readable artifacts.

Fits any CI

The CLI returns a non-zero exit code on assertion failure, so it slots into any pipeline without extra glue — a failed assertion fails the build.

# GitHub Actions step
- name: API tests
  run: apistash run <flow-id> --env <env-id> --report junit --out results.xml

For APIs that aren't reachable from your CI runner's network, pair the CLI with the local agent.