> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/audit.md).

# audit

Query the account's change-tracking log — who changed which resource, when, and from where.

**REST API**: [Audit Logs](https://developer.celigo.com/api/api-reference/monitoring/audit-logs)

```
celigo audit <subcommand> [flags]
```

## Subcommands

| Command    | Purpose                                                           |
| ---------- | ----------------------------------------------------------------- |
| `list`     | List audit log entries.                                           |
| `download` | Get a signed URL to download audit entries as CSV (max 20k rows). |

## `celigo audit list`

List audit log entries, optionally filtered by resource, user, source, action, and time window.

`list` chooses one of three endpoints from the filters you pass:

| Filters                                                                                  | Endpoint and scope                                                                                              |
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| No resource filter                                                                       | Account-wide.                                                                                                   |
| One `--resource-type` plus `--resource-id`                                               | Per-resource, including descendants. Listing a flow also surfaces changes to its exports, imports, and scripts. |
| Several values on `--resource-type`, `--source`, or `--action`, or any `--resource` pair | Multi-select query. Each filter OR-matches its own values, and filters are combined.                            |

| Flag                         | Type                | Default | Meaning                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------- | ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--resource-type <types...>` | string (repeatable) | —       | Resource types: `flows`, `connections`, `exports`, `imports`, `scripts`, and so on. Since celigo-cli 2026.10.1 the singular (`flow`) and the kebab-case group name (`lookup-caches`) work too, and `on-premise-agents` and `workspace-users` map to the API's `agent` and `ashare`. Several values OR-match and switch to the multi-select query.                                                   |
| `--resource-id <id>`         | string              | —       | One specific resource. Paired with a single `--resource-type`, descendants are included. Since celigo-cli 2026.10.1 it requires `--resource-type`. With it, `users`, `environments`, and `notifications` are resource types too: each record's own history.                                                                                                                                         |
| `--resource <pairs...>`      | string (repeatable) | —       | Scope to specific resources as `<type>:<id>` pairs, for example `connection:5f83a9b2c7d3e8f1a2b3c4d5`. Use this to audit resources of different types in one query.                                                                                                                                                                                                                                 |
| `--user-id <id>`             | string              | —       | Filter by the user who made the change. Supported on the single-value query only, so it cannot be combined with multi-select filters.                                                                                                                                                                                                                                                               |
| `--source <sources...>`      | string (repeatable) | —       | One or more of `ui`, `api`, `system`, `connector`, `script`, `stack`, `sso`, `cli`, `mcp`, `ora`.                                                                                                                                                                                                                                                                                                   |
| `--action <actions...>`      | string (repeatable) | —       | One or more actions, for example `create`, `update`, `delete`.                                                                                                                                                                                                                                                                                                                                      |
| `--field-path <path>`        | string              | —       | Restrict entries' `fieldChanges` to changes on one dot-path field (e.g. `http.auth.token.token`). Account-wide single-value query only; an unknown path simply matches nothing. Added in celigo-cli 2026.8.7.                                                                                                                                                                                       |
| `--time-gte <iso>`           | ISO 8601            | —       | Return entries at or after this timestamp.                                                                                                                                                                                                                                                                                                                                                          |
| `--time-lte <iso>`           | ISO 8601            | —       | Return entries at or before this timestamp.                                                                                                                                                                                                                                                                                                                                                         |
| `--limit <n>`                | integer             | `100`   | Maximum number of entries to return — one page, at most 1,000 entries. Since celigo-cli 2026.10.1 it is a true maximum (it was the page size of a walk over many pages), and a value that is not a positive integer is refused before any request. On the single-value queries, stderr says when more entries match: `Note: more entries exist beyond --limit 100; raise it or narrow the filters.` |

> **The window flags were renamed in celigo-cli 2026.8.1.** They were `--start-date` and `--end-date`. The new `--time-gte` and `--time-lte` match the date-bound naming used across the CLI and name the field they filter.

### Examples

```bash
# Every change to a flow (and its descendants) in April
celigo audit list --resource-type flows --resource-id 5f83a9b2c7d3e8f1a2b3c4d5 \
  --time-gte 2026-04-01T00:00:00Z --time-lte 2026-04-30T23:59:59Z \
  --format table

# API-driven changes only, in the last 500 entries
celigo audit list --source api --limit 500

# Deletions from the UI or the API, across flows and connections
celigo audit list --resource-type flows connections --source ui api --action delete

# Three named resources of two different types
celigo audit list \
  --resource flow:5f83a9b2c7d3e8f1a2b3c4d5 \
  --resource connection:60a1b2c3d4e5f6a7b8c9d0e1 \
  --resource connection:60a1b2c3d4e5f6a7b8c9d0e2

# Everything one user did in a window
celigo audit list --user-id 60a1b2c3d4e5f6a7b8c9d0e1 \
  --time-gte 2026-04-01T00:00:00Z --time-lte 2026-04-24T23:59:59Z

# Who changed a connection token, account-wide
celigo audit list --field-path http.auth.token.token
```

**Corresponds to**: [`GET /v1/audit`](https://developer.celigo.com/api/api-reference/monitoring/audit-logs#get-v1-audit) (account-wide), `GET /v1/{resourceType}/{resourceId}/audit` (per-resource, descendants included), or `POST /v1/audit` and `POST /v1/{resourceType}/{resourceId}/audit` (multi-select). The multi-select `POST` requests are read-only and work in a `read`-mode profile.

## `celigo audit download`

Request a signed URL that delivers up to 20,000 audit entries as CSV. Three shapes:

1. **Account-wide** — omit `--resource-type` to download the full account log.
2. **Per-resource** — pass one `--resource-type <type>` together with `--resource-id <id>[,<id>...]`, comma-separated for multiple IDs. Scope includes descendants.
3. **Multi-select** — pass several values on `--resource-type`, `--source`, or `--action`, or any `--resource` pair. The download covers the whole account, narrowed to the matching entries.

`--resource-type` on its own is rejected by the server with `422 Unprocessable Entity` and the error code `audit_not_supported`. For a type-only filter, use multi-select or `celigo audit list --resource-type <type>`.

Shapes 2 and 3 cannot be combined. CSV export has no per-resource multi-select endpoint, so descendant scope and multi-value filters are mutually exclusive. Use `audit list` when you need both.

| Flag                         | Type                | Default | Meaning                                                                                                                                                                                       |
| ---------------------------- | ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--resource-type <types...>` | string (repeatable) | —       | Resource types, written as on `list` (plural, singular, or kebab-case since celigo-cli 2026.10.1). A single value requires `--resource-id`. Several values switch to a multi-select download. |
| `--resource-id <ids>`        | string              | —       | One or more resource IDs, comma-separated for multiple. Since celigo-cli 2026.10.1 it requires `--resource-type`, as on `list`.                                                               |
| `--resource <pairs...>`      | string (repeatable) | —       | Scope to specific resources as `<type>:<id>` pairs. Repeatable.                                                                                                                               |
| `--user-id <id>`             | string              | —       | Filter by the user who made the change. Single-value query only.                                                                                                                              |
| `--source <sources...>`      | string (repeatable) | —       | One or more of `ui`, `api`, `system`, `connector`, `script`, `stack`, `sso`, `cli`, `mcp`, `ora`.                                                                                             |
| `--action <actions...>`      | string (repeatable) | —       | One or more actions, for example `create`, `update`, `delete`.                                                                                                                                |
| `--time-gte <iso>`           | ISO 8601            | —       | Include entries at or after this timestamp.                                                                                                                                                   |
| `--time-lte <iso>`           | ISO 8601            | —       | Include entries at or before this timestamp.                                                                                                                                                  |

> **The window flags were renamed in celigo-cli 2026.8.1**, from `--start-date` and `--end-date` to `--time-gte` and `--time-lte`.

### Examples

```bash
# Signed URL for a single flow (and its descendants)
celigo audit download --resource-type flows --resource-id 5f83a9b2c7d3e8f1a2b3c4d5

# Signed URL for several connections at once
celigo audit download --resource-type connections \
  --resource-id 60a1b2c3d4e5f6a7b8c9d0e1,60a1b2c3d4e5f6a7b8c9d0e2

# Account-wide, narrowed to deletions on two resource types
celigo audit download --resource-type flows connections --action delete

# Signed URL for the full account log over a date range
celigo audit download --time-gte 2026-04-01T00:00:00Z --time-lte 2026-04-24T23:59:59Z
```

**Corresponds to**: [`GET /v1/audit/signedURL`](https://developer.celigo.com/api/api-reference/monitoring/audit-logs#get-v1-audit-signedurl) (account-wide), `POST /v1/{resourceType}/audit/signedURL` (per-resource), or `POST /v1/audit/signedURL` (multi-select). Every shape only issues a download URL, so the `POST` requests are read-only and work in a `read`-mode profile.

## Gotchas

* **A single `--resource-type` is invalid for `download`.** The account-wide signed-URL endpoint rejects a type-only filter with `422 Unprocessable Entity` and the error code `audit_not_supported`. Add `--resource-id <id>[,<id>...]`, pass a second `--resource-type` value to switch to multi-select, or drop the flag.
* **`list` with both `--resource-type` and `--resource-id` uses a different endpoint.** The per-resource endpoint includes descendants, so listing a flow also surfaces changes to its exports, imports, and scripts. The account-wide endpoint does not expand descendants.
* **Resource types are taken in any spelling.** Since celigo-cli 2026.10.1, `--resource-type` and the type in a `--resource` pair accept the plural (`flows`), the singular (`flow`), or the kebab-case group name (`lookup-caches`), and the CLI sends whichever form each endpoint takes. `on-premise-agents` and `workspace-users` become the API's `agent` and `ashare`. Until then a type had to be spelled the way its endpoint takes it: a singular or kebab-case type with `--resource-id` failed with the API's "Audit is not enabled for the given resource". Since celigo-cli 2026.11.2, [`on-premise-agent-groups`](https://developer.celigo.com/cli/commands/on-premise-agent-groups.md) becomes the API's `agentgroup`. Knowledge bases are a type too: [`knowledge-bases`](https://developer.celigo.com/cli/commands/knowledge-bases.md), the API's `knowledgebase`.
* **Two types appear in entries and cannot filter.** The log holds `fileserver` and `mcpoauthprovider` entries, but either type as a `--resource-type` filter answers `422` "Audit is not enabled for the given resource". Read those entries from a list without a resource filter.
* **`--resource-id` needs `--resource-type`.** Since celigo-cli 2026.10.1 both `list` and `download` refuse it alone, before the request the API would reject: `--resource-id needs --resource-type: the API filters by a resource's id only together with its type.` A blank value (an unset shell variable) or one holding `/`, `?`, `#`, `\`, or whitespace is refused in either flag, so it can never widen the query to the whole account or change the request path.
* **A blank filter is refused.** Since celigo-cli 2026.11.2, `list` and `download` refuse a blank `--user-id`, `--source`, `--action`, `--field-path`, `--time-gte`, or `--time-lte` — usually an unset shell variable — before any request. Earlier releases could run the command without the filter.
* **Per-resource history is also on each group's `audit <id>`.** `celigo flows audit <id>`, `celigo connections audit <id>`, and the other groups' `audit` verbs show one resource's log. Since celigo-cli 2026.10.1 they read every page (the API pages audit logs at 1,000 entries), and their table shows `_id`, `resourceType`, `event`, `source`, `byUser.email`, and `time`. `resourceType` matters: an export's log also carries its connection's entries.
* **Multi-select filters OR-match within a flag and AND-match across flags.** `--source ui api --action delete` returns deletions made from the UI or the API. It does not return every UI action.
* **`--user-id` cannot be combined with multi-select.** It is supported on the single-value query only. To narrow by user across several resource types, run `audit list` per type, or filter the multi-select result with `--jq`.
* **`--field-path` is account-wide single-value only.** The API supports the field filter on neither the multi-select nor the per-resource query shapes, so the CLI rejects those combinations. An unknown path is not an error — it simply matches nothing.
* **`cli`, `mcp`, and `ora` are audit sources too.** Changes made through this CLI land with `source: cli`, so you can audit what automation did versus the UI: `celigo audit list --source cli`.
* **`download` returns a signed URL, not the CSV.** Fetch the URL separately, for example with `curl`, to retrieve the file. Each download is capped at 20,000 rows.
* **Audit listings are never field-projected.** Every entry comes back complete, so the [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md) applied to other `list` commands does not apply here.
* **Dates are ISO 8601.** Use full timestamps such as `2026-04-24T00:00:00Z`. Date-only strings may be interpreted inconsistently. Since celigo-cli 2026.11.2, `list` and `download` refuse, before any request, a value that is not a timestamp — `Invalid --time-gte 'last week'. Use an ISO-8601 timestamp (e.g. 2026-10-01T00:00:00Z).` — and a window whose `--time-gte` is after its `--time-lte`.

## Related

* [jobs](https://developer.celigo.com/cli/commands/jobs.md) — operational history of flow runs (distinct from audit, which tracks configuration changes).
* [workspace-users](https://developer.celigo.com/cli/commands/workspace-users.md) — resolve `--user-id` values to names and emails.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.celigo.com/cli/commands/audit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
