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

# lookup-caches

In-memory key-value stores for deduplication, cross-reference resolution, and state tracking during flow execution.

**REST API**: [Lookup Caches](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches)

## Subcommands

| Command                                              | Purpose                                                                                                   |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| [`list`](#celigo-lookup-caches-list)                 | List every lookup cache on the account, or the ones registered to one integration (`--integration <id>`). |
| [`get`](#celigo-lookup-caches-get)                   | Fetch one cache definition by id.                                                                         |
| [`create`](#celigo-lookup-caches-create)             | Create a new cache from a JSON body (`--file <path>` or stdin).                                           |
| [`update`](#celigo-lookup-caches-update)             | Full-replace PUT from a JSON body (`--file <path>` or stdin).                                             |
| [`set`](#celigo-lookup-caches-set)                   | Patch fields with `key=value` assignments. Supports `key=file://<path>`.                                  |
| [`delete`](#celigo-lookup-caches-delete)             | Delete a cache definition.                                                                                |
| [`dependencies`](#celigo-lookup-caches-dependencies) | List resources that depend on this cache (alias `used-by`).                                               |
| [`audit`](#celigo-lookup-caches-audit)               | Show the audit log (change history) for one cache.                                                        |
| [`put-data`](#celigo-lookup-caches-put-data)         | Upsert entries into a cache (auto-batched).                                                               |
| [`get-data`](#celigo-lookup-caches-get-data)         | Read entries from a cache; `--all` reads every page.                                                      |
| [`delete-data`](#celigo-lookup-caches-delete-data)   | Delete specific keys from a cache.                                                                        |
| [`purge-data`](#celigo-lookup-caches-purge-data)     | Purge every entry from a cache.                                                                           |

## celigo lookup-caches list

List every lookup cache. Columns: `_id`, `name`, `size`, `lastModified`.

In celigo-cli 2026.8.1 through 2026.8.8 the default `list` failed with `422 Unprocessable Entity` because the endpoint rejects the `include` projection, and only `--fields all` worked; since 2026.9.1 the default form works again (rows are trimmed client-side to the same columns).

`--integration <id>` lists only the caches registered to that integration — the registration that [`integrations register-lookup-caches`](https://developer.celigo.com/cli/commands/integrations.md#celigo-integrations-register-lookup-caches) / [`deregister-lookup-caches`](https://developer.celigo.com/cli/commands/integrations.md#celigo-integrations-deregister-lookup-caches) change. Added in celigo-cli 2026.9.6.

| Flag                 | Description                                                                                                                                                                                  |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--fields <spec>`    | Fields to print per row: `default` (`_id`, `name`, and the table columns), `all` (complete documents), or a comma-separated field list (dot notation allowed). Rows are trimmed client-side. |
| `--limit <n>`        | Return at most `<n>` rows (fetches a single page).                                                                                                                                           |
| `--integration <id>` | List only the caches registered to this integration. Added in celigo-cli 2026.9.6.                                                                                                           |

Since celigo-cli 2026.10.1, `--fields a,b,…` with `--format table` draws `_id`, `name`, and the fields you name instead of the default columns.

```bash
celigo lookup-caches list

# The caches one integration has registered
celigo lookup-caches list --integration 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`GET /v1/lookupcaches`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#get-v1-lookupcaches); with `--integration`, [`GET /v1/integrations/{_id}/lookupcaches`](https://developer.celigo.com/api/api-reference/integrations-and-flows/integrations) instead.

## celigo lookup-caches get

Fetch one cache by id.

```bash
celigo lookup-caches get <id>
```

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

## celigo lookup-caches create

Create a cache from a JSON body. Read the body from a file with `-f, --file` (recommended), or pipe it on stdin (`--file -` also means 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 cache is still created. Refused before any request, with no override: a body that is not a JSON object (a JSON `null` used to create an empty cache) and masked `"******"` credential placeholders.

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

```bash
celigo lookup-caches create --file cache.json
celigo lookup-caches create < cache.json
```

**Corresponds to**: [`POST /v1/lookupcaches`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#post-v1-lookupcaches)

## celigo lookup-caches update

Full-replace PUT. Reads the complete cache document from `-f, --file` or stdin — omitted fields are erased.

> ⚠️ **`update` replaces the entire cache definition.** Any field you omit from the body is erased. GET the current document first, modify it, then PUT 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 cache 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 is refused before any request. On an Integration App's cache (`_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`.

| Flag                | Description                                                                                                                                                                                                                                              |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-f, --file <path>` | Read the JSON body from a file instead of stdin (`--file -` also means stdin). Added in celigo-cli 2026.6.1.                                                                                                                                             |
| `--force`           | 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`. |

```bash
celigo lookup-caches update <id> --file cache.json
celigo lookup-caches update <id> < cache.json
```

**Corresponds to**: [`PUT /v1/lookupcaches/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#put-v1-lookupcaches-_id)

## celigo lookup-caches set

Patch individual fields with `key=value` assignments. `name` and `description` — the lookup-cache PATCH whitelist — are applied via an atomic `PATCH`; other fields go through GET → modify → PUT so omitted fields are preserved. Values are auto-parsed as JSON (`disabled=false` is a boolean, `description=null` removes the field). Dot notation and array indexing are supported. A `key=file://<path>` value loads that field from a file instead of the command line (a leading `~` and relative paths are supported). Added in celigo-cli 2026.6.1.

Since celigo-cli 2026.10.1:

* `description=null` clears the field through a GET + PUT: the lookup-cache PATCH takes only `replace`, and the `remove` the CLI used to send was refused.
* `operate` mode refuses every field — a lookup cache has no operational field — where a field name such as `disabled` used to open a GET + PUT. `set` needs `full` mode. See [Profiles & regions](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).
* The assigned values (PATCH) or the document a GET + PUT would send are checked against the published API schemas; findings are stderr warnings and never block.
* 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`.

```bash
celigo lookup-caches set <id> name="State code cache"
```

**Corresponds to**: [`PATCH /v1/lookupcaches/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches) for `name` and `description`; otherwise [`GET /v1/lookupcaches/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#get-v1-lookupcaches-_id) then [`PUT /v1/lookupcaches/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#put-v1-lookupcaches-_id)

## celigo lookup-caches delete

Delete the cache definition. Prompts for confirmation unless `-y` is supplied.

> ⚠️ **Deleting a cache removes its definition.** Run `dependencies` first — flows and imports that reference this cache will break.

The platform refuses the delete while an integration's alias still names the cache. Since celigo-cli 2026.10.1, the error then says how to drop the alias first: `celigo integrations set <integrationId> aliases=[]` removes every alias of that integration; to drop just this one, edit `aliases` in the integration and `update` it.

| Flag        | Description        |
| ----------- | ------------------ |
| `-y, --yes` | Skip confirmation. |

```bash
celigo lookup-caches delete <id> -y
```

**Corresponds to**: [`DELETE /v1/lookupcaches/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#delete-v1-lookupcaches-_id)

## celigo lookup-caches dependencies

List resources that depend on this cache (alias: `used-by`). Use it to check whether a cache is safe to delete — an empty result means nothing references it. Since celigo-cli 2026.10.1, an id that matches no cache answers with the cache's `404` instead of an empty result, so a typo never reads as safe to delete.

```bash
celigo lookup-caches dependencies <id>
```

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

## celigo lookup-caches audit

Show the audit log (change history) for one cache. Since celigo-cli 2026.10.1, every page of the log is read (the endpoint pages at 1,000 entries), and the table columns are `_id`, `resourceType`, `event`, `source`, `byUser.email`, and `time`.

```bash
celigo lookup-caches audit <id>
```

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

## celigo lookup-caches put-data

Upsert entries into the cache. Reads `{ "data": [{ "key", "value" }, ...] }` on stdin or from `--file` and auto-batches by count (1000) and size (5 MB). A key is a string of 1–255 characters with no tab, newline, carriage return, or NUL; a value is any JSON value except a top-level array or an object with its own `key` property.

Since celigo-cli 2026.10.1, every entry is checked before the first batch is sent, and a key that appears twice is refused, so an entry the platform would refuse no longer arrives after earlier batches were stored: `data[3] repeats the key of data[1] ("CA"): the platform refuses a duplicate key. Nothing was sent.` A body that is not a JSON object is refused the same way.

Since celigo-cli 2026.11.2, a value over the platform's 64 KB row limit is refused before anything is sent. The limit counts the UTF-8 bytes of the value's JSON: `data[1] key "B": the value is 70002 bytes of JSON; the platform takes at most 64 KB per entry (400 row_size_exceeded). Nothing was sent.` Earlier releases sent such an entry, and the platform failed its whole batch. A batch's 5 MB now counts the whole request body, its `{"data": [...]}` envelope and commas included.

| Flag                | Description                                                                    |
| ------------------- | ------------------------------------------------------------------------------ |
| `-f, --file <path>` | Read the JSON body from a file instead of stdin (`--file -` also means stdin). |

```bash
echo '{"data":[{"key":"CA","value":"California"},{"key":"NY","value":"New York"}]}' \
  | celigo lookup-caches put-data <id>
```

**Corresponds to**: [`POST /v1/lookupcaches/{_id}/data`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#post-v1-lookupcaches-_id-data)

## celigo lookup-caches get-data

Read entries from the cache. Behaviour depends on the body (stdin or `--file`):

* No body — returns the first page of all data: up to 1000 entries, in no particular order.
* `{ "keys": ["k1", "k2"] }` — returns only those entries; at most 1000 keys.
* `{ "startsWith": "abc" }` — returns entries whose key matches the prefix, a page at a time.

A read without keys is paged. Since celigo-cli 2026.11.2, a note on stderr says when more entries remain (`Note: more entries remain — this is one page of the cache. Read every page with --all.`), and `--all` reads every page of an unfiltered or prefix read into one `{success, data, pages}`. A cache that fits in one page prints `pages: 1`. A keys read is not paged, and prints as the platform answers it. `--all` stops with an error after 1000 pages, or when the next page that the platform names is one already read, instead of printing part of the cache as all of it.

The body is optional. Without `--file`, a terminal is never read, a file redirected to stdin is read in full, and a pipe gets one second for its first byte and is then read to its end. Since celigo-cli 2026.10.1, `get-data` no longer waits forever on an open, idle stdin pipe, and invalid JSON piped to it is an error instead of a read of every entry. A read-only `POST`, so it works in `read` mode.

| Flag                | Description                                                                                                                                         |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-f, --file <path>` | Read the JSON body from a file instead of stdin (`--file -` waits for stdin to close; a body piped without `--file` must start arriving within 1s). |
| `--all`             | Read every page of an unfiltered or prefix read, not only the first. Added in celigo-cli 2026.11.2.                                                 |

```bash
echo '{"keys":["CA","NY"]}' | celigo lookup-caches get-data <id>

# Every entry of the cache, page after page
celigo lookup-caches get-data <id> --all

# Every entry whose key starts with a prefix
echo '{"startsWith":"US-"}' | celigo lookup-caches get-data <id> --all
```

**Corresponds to**: [`POST /v1/lookupcaches/{_id}/getData`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#post-v1-lookupcaches-_id-getdata). `--all` repeats the request at the position that each page's `nextPageURL` names.

## celigo lookup-caches delete-data

Delete specific keys. Reads `{ "keys": ["k1", "k2", ...] }` on stdin or from `--file`. Prompts for confirmation unless `-y` is supplied. Since celigo-cli 2026.10.1, a body that is not a JSON object is refused before any request.

> ⚠️ **Deleting cache entries is irreversible.** The specified keys are removed; the cache definition itself is untouched.

| Flag                | Description                                                                    |
| ------------------- | ------------------------------------------------------------------------------ |
| `-y, --yes`         | Skip confirmation.                                                             |
| `-f, --file <path>` | Read the JSON body from a file instead of stdin (`--file -` also means stdin). |

```bash
echo '{"keys":["CA","NY"]}' | celigo lookup-caches delete-data <id> -y
```

**Corresponds to**: [`DELETE /v1/lookupcaches/{_id}/data`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#delete-v1-lookupcaches-_id-data)

## celigo lookup-caches purge-data

Purge every entry from the cache. Prompts for confirmation unless `-y` is supplied.

> ⚠️ **Purging clears every entry in the cache.** This cannot be undone. The cache definition remains, but all stored data is removed.

| Flag        | Description        |
| ----------- | ------------------ |
| `-y, --yes` | Skip confirmation. |

```bash
celigo lookup-caches purge-data <id> -y
```

**Corresponds to**: [`DELETE /v1/lookupcaches/{_id}/data/purge`](https://developer.celigo.com/api/api-reference/data-stores/lookup-caches#delete-v1-lookupcaches-_id-data-purge)

## Gotchas

* **Cache data writes use `POST`, not `PUT`.** `put-data` maps to `POST /v1/lookupcaches/{_id}/data`; there is no PUT on the `/data` endpoint.
* **Reads also use `POST`.** `get-data` posts to `/getData` so the key list or prefix filter can ride in the request body.
* **5 MB / 1000-entry batch ceiling.** `put-data` auto-splits large payloads. Since celigo-cli 2026.11.2, the size is measured in UTF-8 bytes of the whole request body, and one value over 64 KB of JSON is refused before anything is sent.
* **`get-data` without keys returns one page.** A page holds up to 1000 entries. Since celigo-cli 2026.11.2, a note on stderr says when more remain, and `--all` reads every page.
* **Definition vs. contents.** `delete` removes the cache itself. `delete-data` and `purge-data` only clear entries — the cache definition stays put.
* **Empty `data` array is rejected.** `put-data` errors out if the parsed `data` array has zero entries.
* **Permission modes.** `put-data`, `delete-data`, and `purge-data` change data, not the definition, and run in `operate` mode; since celigo-cli 2026.10.1 `read` mode refuses them before any request. `get-data` works in `read` mode. `create`, `update`, `set`, and `delete` need `full` mode. See [Profiles & regions](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).

## Related

* [`flows`](https://developer.celigo.com/cli/commands/flows.md) — flows reference caches for enrichment and deduplication during `pageProcessors[]` execution.
* [`imports`](https://developer.celigo.com/cli/commands/imports.md) — import lookups can be configured to hit a lookup cache instead of the source system.
* [`topics`](https://developer.celigo.com/cli/commands/topics.md) — Event Streams topics are registered on integrations the same way (`list --integration`, `integrations register-topics`).
* [Pull a tree](https://developer.celigo.com/cli/local-tree/pull.md) — `celigo pull` writes a cache's entries to `lookup-caches/<Name>/data.json`; since celigo-cli 2026.10.1 numbers, booleans, nulls, and objects round-trip there with their types, not only strings.


---

# 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/lookup-caches.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.
