> 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/exports.md).

# exports

Data sources that read records from external systems — HTTP APIs, files, databases, webhooks, NetSuite, Salesforce, and so on. Exports sit in a flow's `pageGenerators[]` (delta/once/scheduled) or are referenced as lookups from page processors.

**REST API**: [Exports](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports)

```
celigo exports <subcommand> [args] [flags]
```

Supports all [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

***

## Subcommands

| Subcommand                                  | Purpose                                                                                                                            |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `list`                                      | List all exports.                                                                                                                  |
| `get <id>`                                  | Fetch one export by ID.                                                                                                            |
| `create`                                    | Create an export from a JSON body (`--file <path>` or stdin).                                                                      |
| `update <id>`                               | Full replace from a JSON body (`--file <path>` or stdin); destructive `PUT`.                                                       |
| `set <id> key=value …`                      | Safe field edit: whitelisted fields as one atomic PATCH, any other field through GET → modify → PUT. Supports `key=file://<path>`. |
| `delete <id>`                               | Delete an export. `-y` skips confirmation.                                                                                         |
| `dependencies <id>` (alias `used-by`)       | List resources that depend on this export.                                                                                         |
| `audit <id>`                                | Show the audit log (change history) for one export.                                                                                |
| `clone <id>`                                | Clone an export (same-env or cross-env).                                                                                           |
| `replace-connection <id> <newConnectionId>` | Swap the underlying connection reference.                                                                                          |
| `invoke [id]`                               | Run an export and return data (no job created, nothing saved) — through its own connection, or another one with `--connection`.    |
| `enable-debug <id>`                         | Turn on debug request logging.                                                                                                     |
| `disable-debug <id>`                        | Turn off debug request logging.                                                                                                    |
| `reset-cursor <id>`                         | Reset the CDC cursor on a stream (Debezium) export.                                                                                |

***

## `celigo exports list`

List all exports in the account. Rows are projected to `_id`, `name`, and the table columns by default; `--fields all` returns complete documents.

**Signature**

```bash
celigo exports list [--integration <id>] [--fields <spec>] [--limit <n>]
```

**Arguments**

None.

**Flags**

| Flag                 | Type    | Default   | Description                                                                                                                                                                                                                                                                                  |
| -------------------- | ------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--integration <id>` | string  | —         | List only exports belonging to this integration. Since celigo-cli 2026.11.2, an id that matches no integration is reported as not found instead of printing an empty list.                                                                                                                   |
| `--fields <spec>`    | string  | `default` | Fields to request per row: `default` (`_id`, `name`, and the table columns), `all` (complete documents), or a comma-separated field list (dot notation allowed). See [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md#field-projection-on-list-commands). |
| `--limit <n>`        | integer | —         | Return at most `<n>` rows, fetching a single page.                                                                                                                                                                                                                                           |

Output columns: `_id`, `name`, `adaptorType`, `_connectionId`, `lastModified`. Since celigo-cli 2026.10.1, `--fields a,b,…` with `--format table` draws `_id`, `name`, and the fields you name instead.

**Example**

```bash
celigo exports list --format table
```

**Corresponds to**: [`GET /v1/exports`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#get-v1-exports)

***

## `celigo exports get <id>`

Fetch a single export by ID. With `--merge-instance-flow <flowId>`, the answer is the export as one instance flow runs it.

**Signature**

```bash
celigo exports get <id> [--merge-instance-flow <flowId>]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

| Flag                             | Type   | Default | Description                                                                                                                                                                                                                                             |
| -------------------------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--merge-instance-flow <flowId>` | string | —       | Return the export as one instance flow runs it: that instance's overrides for the export, such as `_connectionId` or `http.relativeURI`, in place of the stored values. Nothing is saved. Sent as `mergeInstanceFlowId`. Added in celigo-cli 2026.11.2. |

The API answers `400` for a flow that is not an instance flow, or whose abstract flow does not use this export, and `404` for a flow id that matches no flow. The error's hint says which: the flow is not an instance flow, or no flow has that id.

**Example**

```bash
celigo exports get 6a1b2c3d4e5f6a7b8c9d0e1f --format json

# The export as one instance flow runs it, with that instance's overrides
celigo exports get 6a1b2c3d4e5f6a7b8c9d0e1f --merge-instance-flow 7b2c3d4e5f6a7b8c9d0e1f2a
```

**Corresponds to**: [`GET /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#get-v1-exports-_id), with `mergeInstanceFlowId=<flowId>` as a query parameter for `--merge-instance-flow`.

***

## `celigo exports create`

Create an export from a JSON body. Read the body from a file with `-f, --file` (recommended), or pipe it on stdin.

Since celigo-cli 2026.10.1, the body is checked before it is sent. It is validated against the published API schemas — the pack [`celigo lint`](https://developer.celigo.com/cli/local-tree/lint-and-resolve.md#celigo-lint) uses: a field the spec does not document, a wrong JSON type, or a value outside an enum prints a `warning` line on stderr, and the export is still created. Refused before any request, with no override: a body that is not a JSON object, masked `"******"` credential placeholders (a create would store the asterisks as the credential), and a value that is not a string in a field the platform encrypts (`webhook.token`, `webhook.password`, `webhook.key`, `distributed.bearerToken`).

**Signature**

```bash
celigo exports create --file <path>
celigo exports create < export.json     # or pipe on stdin
```

**Arguments**

None.

**Flags**

| Flag                | Type   | Default | Description                                                                                                  |
| ------------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------ |
| `-f, --file <path>` | string | —       | Read the JSON body from a file instead of stdin (`--file -` also means stdin). Added in celigo-cli 2026.6.1. |

**Request body**

A JSON object matching the `POST /v1/exports` request schema (adaptor-specific variants: `HTTPExport`, `NetSuiteExport`, `FTPExport`, `RDBMSExport`, `WebhookExport`, etc.).

**Example**

```bash
celigo exports create --file ./export.json
cat export.json | celigo exports create
```

**Corresponds to**: [`POST /v1/exports`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#post-v1-exports)

***

## `celigo exports update <id>`

Replace an export in full from a JSON body. Read the body from a file with `-f, --file`, or pipe it on stdin. This is a destructive `PUT`: omitted fields are erased.

> ⚠️ **`PUT` fully replaces the export.** Any field omitted from the body is erased. `GET` the export first, edit, then send the complete object back — or use `set` for targeted edits.

Since celigo-cli 2026.10.1, the body is checked against the published API schemas before the PUT (when it has findings, the current export is read first, so only what the update adds or changes is reported); findings are stderr warnings and never block. A body that is not a JSON object, and a value that is not a string in a field the platform encrypts, are refused with no override — `--force` included. On an Integration App's export (`_connectorId` set), the platform answers `200` and keeps its own value for every field the app locks: each field the update changed whose reply still holds the previous value is named on stderr, and the command exits `1`.

**Signature**

```bash
celigo exports update <id> --file <path>
celigo exports update <id> < export.json     # or pipe on stdin
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

| Flag                | Type    | Default | Description                                                                                                                                                                                                                                              |
| ------------------- | ------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-f, --file <path>` | string  | —       | Read the JSON body from a file instead of stdin (`--file -` also means stdin). Added in celigo-cli 2026.6.1.                                                                                                                                             |
| `--force`           | boolean | `false` | Submit even if the body contains masked credential values (`"******"`) copied from a GET. Since celigo-cli 2026.10.1, a masked value is four or more asterisks and nothing else: a lone `*` (a wildcard, for example) is a value and needs no `--force`. |

**Request body**

A complete export object matching the `PUT /v1/exports/{_id}` request schema.

**Example**

```bash
celigo exports get 6a1b2c3d4e5f6a7b8c9d0e1f --format json \
  | jq '.name = "Renamed export"' \
  | celigo exports update 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`PUT /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#put-v1-exports-_id)

***

## `celigo exports set <id> [assignments...]`

Safely edit fields in place. The exports PATCH whitelist — `_networkPolicyId`, `assistantMetadata`, and `debugUntil` — is applied via an atomic PATCH; other fields go through `GET → modify → PUT` so you don't lose unrelated fields. A GET + PUT is refused when the export the server returned carries a masked `"******"` value, because `set` never sends a mask back on its own. A mask keeps the stored secret only on an encrypted field that already holds one: send the document with its masks through `exports update --force`, or through `exports update` with actual values in their place.

Since celigo-cli 2026.11.2, `_networkPolicyId` is on the PATCH whitelist. It assigns a [network policy](https://developer.celigo.com/cli/commands/network-policies.md) to a webhook or real-time listener, and `_networkPolicyId=null` unassigns it. The PATCH carries no other field, so a listener whose webhook token comes back masked needs no `update --force`. A `set` sent as one PATCH prints the PATCH's answer. When that answer has no body, stdout stays empty, stderr says `Updated export <id>.`, and the exit code is `0`. Earlier releases sent `_networkPolicyId` through the GET + PUT, which prints the PUT's answer, so read the export with `exports get <id>` where a script needs the document.

In `operate` mode, `set` takes only `debugUntil`. Since celigo-cli 2026.10.1, another operational field name such as `disabled` is refused in `operate` mode instead of opening a GET + PUT of the whole export. See [permission modes](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).

Since celigo-cli 2026.10.1, `set` checks what it sends and what landed:

* The assigned values (PATCH) or the document it would PUT are checked against the published API schemas; findings are stderr warnings and never block.
* A value that is not a string in a field the platform encrypts is refused before any request. `key=value` reads `123` and `true` as a number and a boolean, so quote such a secret as a JSON string: `webhook.token='"123"'`.
* After a GET + PUT, a field the server's reply still holds at its previous value prints `not stored <field> the server answered the PUT but still holds its previous value …` on stderr, and the command exits `1` — the platform answers `200` for a change it ignores. A legacy `filter.rules` is one: the platform rebuilds it from `filter.expression.rules` on every save, and the line says to set that instead.
* On an Integration App's export (`_connectorId` set), one stderr line names the fields the app kept — `celigo: exports set: the platform kept its own value for <fields> — the Integration App locks them` — and the command exits `1`.

Since celigo-cli 2026.10.2, `set` refuses a bare rules array for `filter` or `inputFilter` (`exports set <id> 'filter=[...]'`) before any request. Both fields hold a filter object. The platform answers `200` to an array there, stores no filter, and drops the one the export held, so every record would pass. The refusal names the expression form the published Filter schema takes, `{"type": "expression", "expression": {"version": "1", "rules": [...]}}`. `filter=null` still removes a filter.

Since celigo-cli 2026.10.2, the GET + PUT route sends a value that reads as a JSON object or array — typed or loaded with `file://` — as the text itself where the published spec types the field as a string. An HTTP export's `http.body` is one: a request template is text, not the object it spells. Earlier releases sent the parsed object with a spec warning, and the export kept its old body. A field the spec lets hold an object or an array, and a field it does not document, keep the parsed value. Only an assignment's last write counts: a later assignment in the same call to that field, or to a path inside it, wins.

**Signature**

```bash
celigo exports set <id> key=value [key2=value2 ...]
```

**Arguments**

| Argument           | Type              | Required  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | ----------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<id>`             | string            | Yes       | Export ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `[assignments...]` | `key=value` pairs | Yes (≥ 1) | Dot notation (`http.relativeURI=...`) and array indexing (`http.headers[0].value=...`) are supported. `key=null` removes the field. Values are JSON-parsed first (e.g. `disabled=false` → boolean), then fall back to string; a JSON object or array assigned to a field the spec types as a string is sent as text (see above). Use `key=file://<path>` to load a value from a file (a leading `~` and relative paths are supported); added in celigo-cli 2026.6.1. |

**Flags**

None beyond [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

**Example**

```bash
celigo exports set 6a1b2c3d4e5f6a7b8c9d0e1f \
  http.relativeURI=/admin/api/2024-10/orders.json \
  disabled=false

# Replace the output filter: wrap the rules in the expression form
celigo exports set 6a1b2c3d4e5f6a7b8c9d0e1f \
  'filter={"type":"expression","expression":{"version":"1","rules":["notempty",["string",["extract","email"]]]}}'

# Load a request template from a file: http.body is a string, so the JSON is sent as text
celigo exports set 6a1b2c3d4e5f6a7b8c9d0e1f http.body=file://./body.json

# Assign a network policy to a webhook listener, in one PATCH
celigo exports set 6a1b2c3d4e5f6a7b8c9d0e1f _networkPolicyId=8c3d4e5f6a7b8c9d0e1f2a3b
```

**Corresponds to**: [`PATCH /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports) for `_networkPolicyId`, `assistantMetadata`, and `debugUntil`; otherwise [`GET /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#get-v1-exports-_id) followed by [`PUT /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#put-v1-exports-_id)

***

## `celigo exports delete <id>`

Delete an export. Prompts for confirmation unless `-y` is supplied.

> ⚠️ **Deleting an export is destructive.** Flows that reference it will break. Run `dependencies` first to confirm nothing depends on it.

**Signature**

```bash
celigo exports delete <id> [-y]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

| Flag        | Type    | Default | Description                               |
| ----------- | ------- | ------- | ----------------------------------------- |
| `-y, --yes` | boolean | `false` | Skip the interactive confirmation prompt. |

**Example**

```bash
celigo exports delete 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`DELETE /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#delete-v1-exports-_id)

***

## `celigo exports dependencies <id>`

List resources that depend on this export (flows, tools, APIs, and so on). Use it to check whether an export is safe to delete: empty means no dependents. Aliased as `used-by`. Since celigo-cli 2026.10.1, an id that matches no export is reported as not found instead of as having no dependents.

**Signature**

```bash
celigo exports dependencies <id>
celigo exports used-by <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

None beyond [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

**Example**

```bash
celigo exports dependencies 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: `GET /v1/exports/{_id}/dependencies`

***

## `celigo exports audit <id>`

Show the audit log (change history) for one export. Since celigo-cli 2026.10.1, every page of the log is read, and the table shows `_id`, `resourceType`, `event`, `source`, `byUser.email`, and `time` — `resourceType` tells the export's own entries from its connection's, which the log carries too.

**Signature**

```bash
celigo exports audit <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

None beyond [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

**Example**

```bash
celigo exports audit 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: `GET /v1/exports/{_id}/audit`

***

## `celigo exports clone <id>`

Clone an export. Same-env clones auto-build a connection self-map from the source export's `_connectionId`. Cross-env clones require a `connectionMap` on stdin or in `--file`.

An export whose hooks or wrapper connections run on a [stack](https://developer.celigo.com/cli/commands/stacks.md) clones only when the request names one. Without `_stackId`, the platform refuses the clone with `400 stack_not_found`. Since celigo-cli 2026.10.2, `--stack-id` names the stack; earlier releases built the request body without `_stackId`, so such an export could not be cloned from the CLI.

**Signature**

```bash
celigo exports clone <id> [--name <name>] [-f <path>] [--stack-id <id>]
```

**Arguments**

| Argument | Type   | Required | Description       |
| -------- | ------ | -------- | ----------------- |
| `<id>`   | string | Yes      | Source export ID. |

**Flags**

| Flag                | Type   | Default                 | Description                                                                                                                                                                                                                                     |
| ------------------- | ------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--name <name>`     | string | `Clone - <source name>` | Name for the cloned export. Matches the UI default when omitted.                                                                                                                                                                                |
| `-f, --file <path>` | string | —                       | Read the `connectionMap` body from a file instead of stdin. `--file -` waits until stdin closes. Added in celigo-cli 2026.10.1.                                                                                                                 |
| `--stack-id <id>`   | string | —                       | The stack the copy's hooks and wrapper connections run on, sent as `_stackId`. Required when the clone preview says `stackRequired: true`; without it the platform refuses the clone with `400 stack_not_found`. Added in celigo-cli 2026.10.2. |

**Request body** (optional)

Reads JSON on stdin, or from `--file`, when you need to remap connections across environments:

```json
{ "connectionMap": { "sourceConnId": "targetConnId" } }
```

Omit the body for same-env clones — the CLI derives the self-map automatically. Since celigo-cli 2026.10.2, a string `_stackId` in the body is sent too, as `--stack-id` is; `--stack-id` wins when both are given. Since celigo-cli 2026.10.1, a body piped without `--file` must start arriving within one second and is then read to its end, however long the rest takes; behind a slower producer, use `--file -`. A body that is not a JSON object is refused before any request. Since celigo-cli 2026.11.2, a blank `--name` or `--stack-id` (an unset shell variable) is refused before any request too.

**Example**

```bash
# Same-env clone (auto connection map)
celigo exports clone 6a1b2c3d4e5f6a7b8c9d0e1f --name "Orders export (staging copy)"

# Cross-env clone (explicit connection map)
echo '{"connectionMap":{"src_conn_1":"tgt_conn_1"}}' \
  | celigo exports clone 6a1b2c3d4e5f6a7b8c9d0e1f

# The same map, from a file
celigo exports clone 6a1b2c3d4e5f6a7b8c9d0e1f --file connection-map.json

# An export whose hooks run on a stack: name the stack the copy runs on
celigo exports clone 6a1b2c3d4e5f6a7b8c9d0e1f --stack-id 7c3d4e5f6a7b8c9d0e1f2a3b
```

**Corresponds to**: [`POST /v1/exports/{_id}/clone`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#post-v1-exports-_id-clone)

***

## `celigo exports replace-connection <id> <newConnectionId>`

Swap the `_connectionId` on an export to a different connection.

**Signature**

```bash
celigo exports replace-connection <id> <newConnectionId>
```

**Arguments**

| Argument            | Type   | Required | Description                       |
| ------------------- | ------ | -------- | --------------------------------- |
| `<id>`              | string | Yes      | Export ID.                        |
| `<newConnectionId>` | string | Yes      | ID of the replacement connection. |

**Flags**

None beyond [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

**Example**

```bash
celigo exports replace-connection 6a1b2c3d4e5f6a7b8c9d0e1f 7b2c3d4e5f6a7b8c9d0e1f2a
```

**Corresponds to**: [`PUT /v1/exports/{_id}/replaceConnection`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports)

***

## `celigo exports invoke [id]`

Run an export and return its data without creating a job. Nothing is saved, so every form is a read: `invoke` works in every [permission mode](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes). Three modes:

* **By ID** — invokes the saved export exactly as stored, through its own connection. Any `--file` or piped body is **ignored** in this mode: to run a changed document, edit the export first, or omit the id to preview the ad-hoc document instead.
* **By document** — supply an export document (stdin, or `--file`) with no id for an ad-hoc preview (no ID required, no save). The preview runs the export's pipeline and returns its output stage by stage: `request` and `raw` for an HTTP export, `parse`, and `group` when the export groups records. Then the transform (`transformTwoDotZero`, or `transform` for version 1 rules), the output filter (`outputFilter`), and the preSavePage hook (`preSavePageHook`) each add a stage when the document sets them, and `data` holds the records the last of them kept. Since celigo-cli 2026.10.1, a body that is not a JSON object (`null`, an array, a string, a number) is refused before any request.
* **Through another connection** — with `--connection <id>`, either form runs as a *virtual export* through that connection; the document's own `_connectionId` is not used. With an id, the saved export is read first and sent as `{"export": <document>}`; without one, the piped document is sent bare or as `{"export": {...}}`. It returns only the records the source returned, `{data, dataURIs}` — not the preview's stages — in one request, so `--all` is refused with it. Use it to read from a system through an existing connection before an export exists, or to see what a changed export would return. Added in celigo-cli 2026.10.1.

Since celigo-cli 2026.11.2, `--integration <id>` runs the preview of an unsaved document in that integration's scope, and `--flow <id>` in the scope of one of its flows too. In an integration's scope, a `_connectionId` given as the name of one of the integration's aliases resolves to that alias's connection, the way a settings form's `resource.virtual` block names its connection. The unscoped preview answers `400` (`Please provide a valid _connectionId.`) for such a name, and its error now carries a hint that names `--integration`. `--flow` adds the flow's context, such as the flow-scoped settings the document references; the flow must belong to the integration. Both flags apply only to the preview of an unsaved document. With an `[id]` or `--connection` they are refused before any request, and so is `--flow` without `--integration`.

Since celigo-cli 2026.10.2, a streamed answer prints as one. A saved export's run and a run through `--connection` can answer several JSON objects in a row as `text/plain`: the records read, then `{"errors": [...]}` when paging stopped because a next page repeated the previous one (`page_response_error`). Earlier releases refused that body as invalid or truncated JSON. The CLI now joins the objects into one answer, `{data, dataURIs, errors}`, so the paging error shows beside the records. Any other route still refuses a body that is not one JSON document.

Since celigo-cli 2026.11.2, `--all` prints every page's `errors` beside the records: `{data, pages, errors}` when a page carried any. Earlier releases printed only the records, so a walk that an error cut short read as complete. `--all` also stops with an error when an answer repeats both the `pagedExportState` it was sent and the page before it.

Since celigo-cli 2026.11.1, a credential the result carries prints as `********`, as the platform's previews show it: the value of a credential header such as `authorization`, a cookie, or an API key, and a captured request URL's userinfo and credential query parameters. See [Credentials in a run's result](https://developer.celigo.com/cli/using-the-cli/output-formats.md#credentials-in-a-runs-result).

**Signature**

```bash
celigo exports invoke [id] [--all] [--connection <id>] [--integration <id> [--flow <id>]] [-f <path>]
```

**Arguments**

| Argument | Type   | Required | Description                                                                                                                                                                      |
| -------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[id]`   | string | No       | Saved export ID. Omit to preview a document from stdin or `--file`. Since celigo-cli 2026.10.1, a blank value (an unset shell variable) is refused instead of running a preview. |

**Flags**

| Flag                 | Type    | Default | Description                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--all`              | boolean | `false` | Auto-paginate through all pages of a saved export's run by chaining `pagedExportState` (ID mode only; not with `--connection`). A run of more than one page prints `{data, pages}`: every page's records and the page count. Since celigo-cli 2026.10.1, an export that still has pages after the 1000-page safety cap stops with an error instead of printing the pages read as the complete result. |
| `--connection <id>`  | string  | —       | Run the export through this connection instead, as a virtual export. Added in celigo-cli 2026.10.1.                                                                                                                                                                                                                                                                                                   |
| `--integration <id>` | string  | —       | Without `[id]`: preview the document in this integration's scope, where its aliases resolve. Added in celigo-cli 2026.11.2.                                                                                                                                                                                                                                                                           |
| `--flow <id>`        | string  | —       | With `--integration`: preview in this flow's scope too. The flow must belong to the integration. Added in celigo-cli 2026.11.2.                                                                                                                                                                                                                                                                       |
| `-f, --file <path>`  | string  | stdin   | Read the export document from a file instead of stdin (`-` also means stdin). Only used without `<id>`; with an id the saved export is invoked as stored and the file is ignored.                                                                                                                                                                                                                     |

**Request body** (document mode only)

Reads a full export document on stdin or from `--file`. See the `POST /v1/exports/preview` request schema in the Exports OpenAPI spec. With `--connection`, the same document is sent as `{"export": {...}}`; pipe it bare or already wrapped.

**Example**

```bash
# Invoke a saved export, auto-paginate
celigo exports invoke 6a1b2c3d4e5f6a7b8c9d0e1f --all --format json

# Preview an unsaved export doc
cat export-draft.json | celigo exports invoke
celigo exports invoke --file export-draft.json

# Run the saved export through another connection: only the records come back
celigo exports invoke 6a1b2c3d4e5f6a7b8c9d0e1f --connection 7b2c3d4e5f6a7b8c9d0e1f2a --jq '.data | length'

# Read through an existing connection with an export that is not saved yet
celigo exports invoke --connection 7b2c3d4e5f6a7b8c9d0e1f2a --file export-draft.json

# Preview a document whose _connectionId names an alias of an integration, in that integration's scope
celigo exports invoke --integration 5f83a9b2c7d3e8f1a2b3c4d5 --file export-draft.json
```

**Corresponds to**: [`POST /v1/exports/{_id}/invoke`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#post-v1-exports-_id-invoke) (ID mode) or [`POST /v1/exports/preview`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports) (document mode); with `--integration`, [`POST /v1/integrations/{_id}/exports/preview`](https://developer.celigo.com/api/api-reference/integrations-and-flows/integrations), or `POST /v1/integrations/{_id}/flows/{_flowId}/exports/preview` with `--flow`; with `--connection`, [`POST /v1/connections/{_id}/export`](https://developer.celigo.com/api/api-reference/connections-and-http-connectors/connections) (after [`GET /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports) when an id is given)

***

## `celigo exports enable-debug <id>`

Turn on debug request logging by setting `debugUntil` via `PATCH`. Capped at 60 minutes by the server. Request and response logs are then captured by any flow, API, or tool that runs this export — fetch them from the consumer with [`flows debug-requests <flowId> <exportId>`](https://developer.celigo.com/cli/commands/flows.md#celigo-flows-debug-requests) (or `apis`/`tools debug-requests`). Requires `operate` mode.

**Signature**

```bash
celigo exports enable-debug <id> [--duration <minutes>]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

| Flag                   | Type    | Default | Description                                                                                                                                                                                       |
| ---------------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--duration <minutes>` | integer | `60`    | Minutes to keep debug enabled. Clamped to a maximum of 60. Since celigo-cli 2026.10.1, a value that is not a positive whole number is refused instead of setting a window that has already ended. |

**Example**

```bash
celigo exports enable-debug 6a1b2c3d4e5f6a7b8c9d0e1f --duration 30
```

**Corresponds to**: [`PATCH /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#patch-v1-exports-_id) with `[{ "op": "replace", "path": "/debugUntil", "value": "<ISO timestamp>" }]`

***

## `celigo exports disable-debug <id>`

Turn off debug request logging by removing `debugUntil`. Requires `operate` mode.

**Signature**

```bash
celigo exports disable-debug <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Export ID.  |

**Flags**

None beyond [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

**Example**

```bash
celigo exports disable-debug 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`PATCH /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#patch-v1-exports-_id) with `[{ "op": "remove", "path": "/debugUntil" }]`

***

## `celigo exports reset-cursor <id>`

Reset the CDC cursor on a stream (Debezium) export. The platform deletes the stored stream offset and restarts the stream consumer — about a minute to restart, with fresh offsets persisting within \~5 minutes of streaming. No flow toggle is required.

The save is fail-soft: the server returns HTTP 200 either way and puts the verdict in `_cursorResetStatus`. The CLI prints the verdict and exits non-zero when the reset was refused. The server refuses a reset while the export's **saved** `cdc.snapshotMode` is `initial_only` (a one-shot snapshot that already fired) — pass `--snapshot-mode when_needed` to flip the mode and reset in the same save, which re-arms a one-shot snapshot export without cloning and deleting it. Since celigo-cli 2026.11.2, a blank `--snapshot-mode` (an unset shell variable) is refused; it used to reset the cursor without setting a mode.

The save is a PUT of the export the CLI just read, without `cdc.cursor` and the masked `sampleHeaders`. Since celigo-cli 2026.10.1, a masked `"******"` value anywhere else in that copy refuses the reset before the PUT, as `set`'s GET + PUT would: a mask keeps a stored secret only on an encrypted field that already holds one. Replace it with an actual value through `exports update` (or `""` to clear it), then reset the cursor again. Requires `operate` mode.

**Signature**

```bash
celigo exports reset-cursor <id> [--snapshot-mode <mode>]
```

**Arguments**

| Argument | Type   | Required | Description                                                                          |
| -------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| `<id>`   | string | Yes      | Export ID. Must be a stream (CDC) export — other types are refused before any write. |

**Flags**

| Flag                     | Type   | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------ | ------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--snapshot-mode <mode>` | string | —       | Also set `cdc.snapshotMode` (and the `snapshot.mode` properties-grid entry) in the same save — e.g. `when_needed`, `no_data`. Required to reset an `initial_only` export. Since celigo-cli 2026.10.1, every `snapshot.mode` entry of the grid is set: the platform derives the mode from the grid's last entry and adds an entry on every save. The output's `snapshotMode` is the mode the save left, and a mode the platform kept prints a `not stored` line on stderr (on an Integration App's export, a line naming the field the app locks) with exit code `1`. |

**Example**

```bash
# Plain cursor reset — stream restarts itself
celigo exports reset-cursor 6a1b2c3d4e5f6a7b8c9d0e1f

# Re-arm a one-shot (initial_only) snapshot export
celigo exports reset-cursor 6a1b2c3d4e5f6a7b8c9d0e1f --snapshot-mode when_needed
```

**Corresponds to**: [`PUT /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports-imports-and-tools/exports#put-v1-exports-_id) with root `pendingCursorReset: true` and `cdc.cursor` omitted; the outcome returns in `_cursorResetStatus` / `_cursorResetError`.

***

## Gotchas

* **`adaptorType` is PascalCase and case-sensitive** (`HTTPExport`, `NetSuiteExport`, `FTPExport`, `RDBMSExport`, `WebhookExport`, …).
* **HTTP delta exports use Handlebars** for the cursor — `{{{lastExportDateTime}}}` in `relativeURI`. `delta.dateField` is for RDBMS only.
* **Don't include a `rest:` block.** That creates a legacy `RESTExport` resource. Use `http:` with `adaptorType: "HTTPExport"` for new exports.
* **`mockOutput` shape** is `{ "page_of_records": [ { "record": { ... } } ] }` — object, not array.
* **No standalone `exports preview` CLI command.** Use `celigo exports invoke` (pipe a doc via stdin) for an unsaved preview. The preview runs the export's pipeline, the transform, the output filter, and the preSavePage hook included, and returns each stage's output. Use `celigo flows test-run` once the export is wired into a flow, to run it with the flow's other steps.
* **`invoke` never writes.** By id, as a preview, or through `--connection`, it reads the source, saves nothing, and creates no job, so it works in `read` mode and is retried like a GET. Its import counterpart, `imports invoke`, writes to the destination in every form.
* **`create` and `clone` are sent once.** Since celigo-cli 2026.10.1, a timeout or a 5xx on either is reported and never retried, and since celigo-cli 2026.11.1 neither is a `429`, which earlier releases retried: the request may have reached the server, so check with `list` before you run the command again.
* **Permission modes.** `list`, `get`, `dependencies`, `audit`, and `invoke` work in `read` mode. `enable-debug`, `disable-debug`, `reset-cursor`, and `set <id> debugUntil=…` need `operate`; since celigo-cli 2026.10.1, `read` mode refuses `reset-cursor` before the read it starts with. `create`, `update`, `delete`, `clone`, `replace-connection`, and any other `set` need `full`. See [Profiles & regions](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).

## Related

* [imports](https://developer.celigo.com/cli/commands/imports.md) — destination side of a flow.
* [flows](https://developer.celigo.com/cli/commands/flows.md) — exports plug into `pageGenerators[]`.
* [connections](https://developer.celigo.com/cli/commands/connections.md) — every export references a `_connectionId`.
* [network-policies](https://developer.celigo.com/cli/commands/network-policies.md) — `set <id> _networkPolicyId=<policyId>` assigns one to a webhook or real-time listener.


---

# 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/exports.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.
