---
url: /modes/executions.md
---
# Jobs, Executions & Output

CLI v2 separates *what you asked Satori to do* from *what actually ran*:

* A **job** is the unit of work you create: a `run`, a `scan`, a `monitor`, a `local` execution or an execution triggered by the GitHub Application. A job has a status (`QUEUED`, `RUNNING`, `FINISHED`, `CANCELED`) and can produce one or many executions.
* An **execution** is a single run of a playbook inside a container. Every execution has its own ID, status, output (the stdout/stderr of each command and the asserts applied to them) and a **report** (pass/fail). A run with `--count 3` produces three executions, a scan produces one execution per commit, a monitor produces one execution per tick.

`satori-v2 report ID` and `satori-v2 execution get ID` refer to the same object: the report *is* the result of an execution.

| Command | Description |
| --- | --- |
| `satori-v2` / `satori-v2 jobs` | List your jobs |
| `satori-v2 job JOB-ID` | Show a job and its last 5 executions |
| `satori-v2 execution ...` | Get, list, delete, stop or download executions |
| `satori-v2 output EXECUTION-ID` | Show the output of an execution |
| `satori-v2 report EXECUTION-ID stop` | Stop a running report (execution) |
| `satori-v2 stop ...` | Stop runs |
| `satori-v2 search ...` | Filter executions and act on the whole result set |

## Jobs

Running `satori-v2` without arguments shows the dashboard: your latest jobs. `satori-v2 jobs` is the same list with explicit options:

```sh
satori-v2
satori-v2 jobs
satori-v2 jobs --public
satori-v2 jobs --json --page 2 -q 50
```

| Flag | Description |
| --- | --- |
| `--public` | Show only public jobs |
| `--json` | Print the list as JSON |
| `--page N` | Page number (default 1) |
| `-q, --quantity N` | Results per page (default 10, alias `-l/--limit`) |

To inspect one job, pass its ID. The command prints the job details followed by its last five executions:

```sh
satori-v2 job 4f9Kq2LmZ8xRt1VbN7cYd
```

## Executions

The `execution` command group works directly on execution IDs.

| Command | Description |
| --- | --- |
| `execution get ID` | Show the execution and its report |
| `execution list [--job-type TYPE] [--job-id ID] [--page N] [-q N]` | List executions as JSON, optionally restricted to a job type or a job |
| `execution delete ID` | Delete an execution |
| `execution stop ID` | Cancel a running execution |
| `execution output ID [--test NAME] [--format json\|md]` | Show the output of the execution, optionally for specific tests only |
| `execution files ID` | Download the files generated by the execution |

```sh
satori-v2 execution list --job-type SCAN --job-id 4f9Kq2LmZ8xRt1VbN7cYd -q 20
satori-v2 execution get V1StGXR8Z5jdHi6BmyT2k
satori-v2 execution output V1StGXR8Z5jdHi6BmyT2k --test tests.positive --format md
satori-v2 execution files V1StGXR8Z5jdHi6BmyT2k
satori-v2 execution stop V1StGXR8Z5jdHi6BmyT2k
```

The same actions are available through `satori-v2 report ID [output|files|stop|visibility|delete|issues]`, which additionally lets you change the visibility and list the issues of the execution. See [Results](../getting-started/execution-data.md).

## Output

`satori-v2 output` is a shortcut for `execution output` that also supports streaming the raw encoded results:

```sh
satori-v2 output EXECUTION-ID
satori-v2 output EXECUTION-ID --test tests.negative --format json
satori-v2 output EXECUTION-ID --raw > output.msgpack
```

| Flag | Description |
| --- | --- |
| `--test NAME` | Only show the output of the given test path (repeatable) |
| `--format {json\|md}` | Render the output as JSON or Markdown |
| `--raw` | Pipe the encoded (msgpack) results as received from the API to stdout |

## Stop

To stop a single running report (execution), use `report ID stop`:

```sh
satori-v2 report V1StGXR8Z5jdHi6BmyT2k stop
```

`satori-v2 execution stop ID` does the same. Stopping is asynchronous: the report moves to `CANCELED` once its container is torn down, so check it with `satori-v2 report ID`.

You can stop and delete your own reports on any plan. Stopping or deleting a report of another member of the organization needs a PRO or ENTERPRISE plan, and a report of another account cannot be changed even when it is public.

To stop whole jobs instead of a single report:

| Command | Description |
| --- | --- |
| `stop run RUN-ID` | Cancel a run job |
| `stop all` | Cancel every run of yours that is still `QUEUED` or `RUNNING` (checks the last 100 runs) |

```sh
satori-v2 stop run 4f9Kq2LmZ8xRt1VbN7cYd
satori-v2 stop all
```

To stop everything matching a filter use `satori-v2 search ... --stop` (below). Monitors and scans have their own `stop` subcommands (`satori-v2 monitor ID stop`, `satori-v2 scan ID stop`).

## Search

`satori-v2 search` lists executions matching a set of filters. `satori-v2 reports search` is the same command; `reports download`, `reports stop` and `reports delete` are equivalent to the `--download`, `--stop` and `--delete` actions described below.

### Filters

| Filter | Description |
| --- | --- |
| `--job-type {RUN\|SCAN\|MONITOR\|GITHUB\|LOCAL}` | Type of job that produced the execution |
| `--job-id ID` | Executions of a single job |
| `--id-gt ID` | Executions created after execution ID |
| `--id-lt ID` | Executions created before execution ID |
| `--global` | Include public executions from other accounts |
| `--status {FINISHED\|CANCELED\|RUNNING\|QUEUED}` | Execution status (repeatable) |
| `--visibility {PUBLIC\|PRIVATE\|UNLISTED}` | Report visibility |
| `--from DATETIME` | Created after this ISO datetime (`2026-01-31`, `2026-01-31T10:00:00`) |
| `--to DATETIME` | Created before this ISO datetime |
| `--report-status {PASS\|FAIL}` | Report result |
| `--severity {0-5}` | Output severity (`0` Blocker … `5` Info) |
| `--playbook URI` | Playbook used |
| `--q TEXT` | Free text search |
| `-t, --tag TAG` | Tag (repeatable) |
| `--page N`, `-q, --quantity N` | Pagination of the listing |
| `--notify slack://…`, `email://…`, `discord://CHANNEL`, or `telegram://CHAT_ID` | Send this page of results to Slack, email, Discord, or Telegram (repeatable). A bare `slack`, `email`, `discord`, `telegram` or `default` uses your saved defaults. Not a job rule — immediate notify of the listing. See [Search notify](../notifications.md#search-notify) |

```sh
satori-v2 search --job-type MONITOR --report-status FAIL --from 2026-01-01
satori-v2 search --playbook satori://code/trufflehog.yml --severity 4
satori-v2 search --id-gt Kp7Wq3Zr9Tm2Xv5Bn8Lc4 --id-lt V1StGXR8Z5jdHi6BmyT2k
satori-v2 search --tag env=prod --status FINISHED --status CANCELED
satori-v2 search --playbook satori://code/python/pyspector.yml \
  --notify slack://T00000000:C00000000 \
  --notify email://security@example.com \
  --notify discord://123456789012345678 \
  --notify telegram://-15050500050
```

### Actions

At most one of the following actions can be given. Without an action, `search` prints the matching executions. With an action, **every** execution matching the filters is affected (not only the current page), so check the listing first.

| Action | Description | Status constraint |
| --- | --- | --- |
| `--download PATH` | Download the output of each execution as `PATH/output-ID.txt` | Only `FINISHED` executions. `--status FINISHED` is implied; any other `--status` is rejected |
| `--reports PATH` | Download the report of each execution as `PATH/report-ID.json` | None |
| `--stop` | Cancel the matching executions | Only `RUNNING` executions. `--status RUNNING` is implied; any other `--status` is rejected |
| `--delete` | Delete the matching executions | Only `CANCELED` and `FINISHED` executions. Both statuses are implied when `--status` is omitted; any other combination is rejected. Asks for confirmation before deleting |

```sh
satori-v2 search --job-id 4f9Kq2LmZ8xRt1VbN7cYd --download ./outputs
satori-v2 search --job-type SCAN --report-status FAIL --reports ./reports
satori-v2 search --job-type RUN --stop
satori-v2 search --playbook satori://code/semgrep.yml --to 2025-12-31 --delete
```

## Scripting

CLI v2 is designed to be piped into other tools:

* **stdout / stderr split**: data (listings, reports, outputs, JSON) is written to **stdout**; the version banner, progress spinners, prompts and error messages are written to **stderr**. `satori-v2 jobs --json | jq '.items[].id'` works without any filtering.
* **`--json`** is available on the root command and on most list/detail commands; `--format json|md` selects the rendering of outputs and reports.
* **Exit codes**: `0` on success, `1` when the API returns an error (the response body is printed to stderr as JSON), the request times out or cannot connect (`ERROR: request to Satori timed out` or `failed to connect`), or the CLI raises a Satori error, `2` on usage errors (unknown option, missing argument). There is no exit code that reflects a failed report yet; read the report with `--json` if you need to fail a pipeline on findings.

`satori-v2 report ID --json` prints the execution object: `status`, `visibility` and `repository` (the `owner/repo` of the execution or of its job, `null` when it has none) at the top level, and a `report` object holding `total_fails` (the number of failed asserts) plus the `detail` of each test. To fail a pipeline when a report has any failure:

```sh
fails=$(satori-v2 report V1StGXR8Z5jdHi6BmyT2k --json | jq -r '.report.total_fails')
[ "$fails" -eq 0 ] || exit 1
```
