/api/v1, so you can keep scenarios as code and run benchmarks from a pipeline. This page walks through the usual flow; every endpoint, field, and response is in the API Reference under Scenarios and Benchmarks.
Authenticate with an API key as a bearer token - see API Overview.
1. Create a scenario
Send the whole scenario document, plusorg_id. Hosts and agents are referenced by name; an unknown name is a 400, a duplicate title a 409. A new scenario is a draft unless you say otherwise.
id (scn_...).
To find host and agent names, use GET /api/v1/hosts?org_id=$ORG and GET /api/v1/agents?org_id=$ORG.
2. Test setup and restore
POST /api/v1/scenarios/{id}/run without an agent runs only the phases you ask for, on every host of the scenario. Nothing is sent to an agent and nothing is graded.
Run setup then restore twice in a row before trusting a scenario - see Before you trust a scenario.
3. Poll a run
steps grows as the run progresses: each record carries the host, the command (secrets redacted), the exit code, the output, and an error when the step failed. A phase run has no verdict: passing stays null, and the step records are what tell you whether your commands did what you meant.
Poll every few seconds until status is completed, failed, or cancelled.
4. Run it graded
Add"with_agent": true to hand the ticket to the agent and grade the run. It always runs both phases, on every host.
run_id as above. Once the run completes, passing holds the verdict, evaluation_status is passed or failed, and job_id points to the job the ticket created. gateway, main_engine, secondary_engine, and gateway_engine are optional and work as in the run dialog.
5. Run a benchmark
report_ids are in the order of scenario_ids. Poll each one at /api/v1/scenarios/{scenario_id}/runs/{report_id}. Up to 50 scenarios per benchmark; add "sequential": true to run them one at a time.
There is no scheduling: to run a benchmark nightly, call this endpoint from your scheduler or CI.
6. Stop a run
reason is cancelling, never_started, or already_ending. A stopped run still runs its restore.
Update and delete
POST /api/v1/scenarios/{id}replaces the whole document - there is no partial update.GETthe scenario, change the JSON, and send it back; the server-owned fields theGETreturns are accepted and ignored.DELETE /api/v1/scenarios/{id}removes the scenario. Its past runs stay in the results.
Keep scenarios as code
Scenarios are plain JSON, so you can keep a folder of them in a repository and sync it to an organization:GET /api/v1/scenarios?org_id=$ORGto list what exists, by title.- For each file,
POST /api/v1/scenarios/{id}if a scenario with that title exists, otherwisePOST /api/v1/scenarios. - Never delete from the sync: retire scenarios by setting them
disabled.
id.
What the API does not cover yet
- Per-rule results. The run response gives the verdict and the step records, not each validation check. Read those on the run’s page in Command Center.
- Compliance and remediation are shown in Command Center, not in the run response.
- Benchmarks as a whole. You can launch a benchmark, but not list, read, stop, or delete one: poll and stop its runs individually, and delete it from Command Center.

