---
title: "List recent secure-exec runs for your account"
method: GET
path: "/api/v1/secure-exec/audit"
---

# List recent secure-exec runs for your account

`GET /api/v1/secure-exec/audit`

## Request

- Base URL: `https://aicommander.dev`
- URL: `https://aicommander.dev/api/v1/secure-exec/audit`
- Auth: HTTP bearer

Returns recent secure-exec audit rows across ALL of your service tokens, newest first. Records ONLY the command BASENAME, exit code, duration, caller IP, output byte count, and truncation flag — never the full arguments, standard input, or output (the 'no payload logging' invariant). Authenticated with your ACCOUNT API key (Bearer).

## Query parameters

- `limit` integer

## Response `200`

Recent secure-exec runs (no payload).

- object
  - `ok` true, required
  - `audit` object[], required
    - `command` string: argv[0] basename only.
    - `exit_code` integer, nullable
    - `duration_ms` integer, nullable
    - `caller_ip` string, nullable
    - `bytes_out` integer, nullable
    - `truncated` boolean
    - `created_at` string

## Other responses

- `400`: Missing/invalid fields. On the job endpoints this is also how the MACHINE reports a request it can never run (`reason: "invalid_request"` — an empty command, a relative `cwd`, a `gpu_index` that names no card): the request itself is at fault, so correct the field the message names rather than retrying it.
- `401`: A token was supplied but is not a valid API key/admin/OAuth token.

---

[API](https://skmtc.dev/aicommander/apis/ai-commander-remote-shell-and-long-running-jobs-api.md) · [All operations](https://skmtc.dev/aicommander/apis/ai-commander-remote-shell-and-long-running-jobs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aicommander/apis/ai-commander-remote-shell-and-long-running-jobs-api/revisions/a6bb89f779a1?raw)
