> 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)

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

Supports all [global flags](/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: 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).                              |
| `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.

**Signature**

```bash
celigo exports list [--integration <id>]
```

**Arguments**

None.

**Flags**

| Flag                 | Type   | Default | Description                                      |
| -------------------- | ------ | ------- | ------------------------------------------------ |
| `--integration <id>` | string | —       | List only exports belonging to this integration. |

Output columns: `_id`, `name`, `adaptorType`, `_connectionId`, `lastModified`.

**Example**

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

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

***

## `celigo exports get <id>`

Fetch a single export by ID.

**Signature**

```bash
celigo exports get <id>
```

**Arguments**

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

**Flags**

None beyond [global flags](/cli/getting-started/global-flags.md).

**Example**

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

**Corresponds to**: [`GET /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports#get-v1-exports-_id)

***

## `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.

**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#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.

**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.                         |

**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#put-v1-exports-_id)

***

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

Safely edit fields in place. Whitelisted fields (e.g. `name`, `debugUntil`, `schedule.*`) are applied via an atomic PATCH; other fields go through `GET → modify → PUT` so you don't lose unrelated fields.

**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 (`filter[0]=...`) are supported. `key=null` removes the field. Values are JSON-parsed first (e.g. `disabled=false` → boolean), then fall back to string. 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](/cli/getting-started/global-flags.md).

**Example**

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

**Corresponds to**: [`GET /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/exports#get-v1-exports-_id) followed by [`PUT /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/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#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`.

**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](/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.

**Signature**

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

**Arguments**

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

**Flags**

None beyond [global flags](/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.

**Signature**

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

**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. |

**Request body** (optional, cross-env clone only)

Reads JSON on stdin when you need to remap connections across environments:

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

Omit stdin for same-env clones — the CLI derives the self-map automatically.

**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
```

**Corresponds to**: [`POST /v1/exports/{_id}/clone`](https://developer.celigo.com/api/api-reference/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](/cli/getting-started/global-flags.md).

**Example**

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

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

***

## `celigo exports invoke [id]`

Run an export and return its data without creating a job. Two modes:

* **By ID** — invokes the saved export exactly as stored. 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).

**Signature**

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

**Arguments**

| Argument | Type   | Required | Description                                                         |
| -------- | ------ | -------- | ------------------------------------------------------------------- |
| `[id]`   | string | No       | Saved export ID. Omit to preview a document from stdin or `--file`. |

**Flags**

| Flag                | Type    | Default | Description                                                                                                                                                                               |
| ------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--all`             | boolean | `false` | Auto-paginate through all pages by chaining `pagedExportState` (ID mode only; safety cap 1000 pages).                                                                                     |
| `-f, --file <path>` | string  | stdin   | Read the preview 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.

**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
```

**Corresponds to**: [`POST /v1/exports/{_id}/invoke`](https://developer.celigo.com/api/api-reference/exports#post-v1-exports-_id-invoke) (ID mode) or [`POST /v1/exports/preview`](https://developer.celigo.com/api/api-reference/exports) (document mode)

***

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

Turn on debug request logging by setting `debugUntil` via `PATCH`. Capped at 60 minutes by the server.

**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. |

**Example**

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

**Corresponds to**: [`PATCH /v1/exports/{_id}`](https://developer.celigo.com/api/api-reference/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`.

**Signature**

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

**Arguments**

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

**Flags**

None beyond [global flags](/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#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.

**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. |

**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#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, or `celigo flows test-run` once the export is wired into a flow.

## Related

* [imports](/cli/commands/imports.md) — destination side of a flow.
* [flows](/cli/commands/flows.md) — exports plug into `pageGenerators[]`.
* [connections](/cli/commands/connections.md) — every export references a `_connectionId`.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
