For the complete documentation index, see llms.txt. This page is also available as Markdown.

state

Manage state key-value stores — durable JSON values keyed by name. Commands target global (account-wide) state by default; pass --resource-type and --resource-id together to target a specific resource's state instead.

REST API: State

celigo state <subcommand> [args] [flags]

Supports all global flags.

Subcommands

Subcommand
Purpose

list

List state keys — global, or a resource's.

get <key>

Get a state value — global, or a resource's.

set <key>

Set a state key from a JSON body (stdin, or --file).

delete <key>

Delete one state key — global, or a resource's.

purge

Delete all state keys — global, or a resource's.

The --resource-type <type> and --resource-id <id> flags switch any subcommand from global state to a resource's state. They must be passed together.


celigo state list

List state keys. Global by default; pass --resource-type/--resource-id to list a resource's keys instead.

Signature

celigo state list [flags]

Flags

Flag
Type
Default
Description

--resource-type <type>

string

Target a resource's state (e.g. flows, exports) instead of global state. Requires --resource-id.

--resource-id <id>

string

Resource id whose state to target. Requires --resource-type.

Example

Corresponds to: GET /v1/state (global) or GET /v1/{resourceType}/{resourceId}/state (resource-scoped).


celigo state get

Get the value stored under one state key.

Signature

Arguments

Argument
Type
Required
Description

<key>

string

Yes

State key name.

Flags

Flag
Type
Default
Description

--resource-type <type>

string

Target a resource's state instead of global state. Requires --resource-id.

--resource-id <id>

string

Resource id whose state to target. Requires --resource-type.

Example

Corresponds to: GET /v1/state/{key} (global) or GET /v1/{resourceType}/{resourceId}/state/{key} (resource-scoped).


celigo state set

Set a state key from a JSON body read from stdin or --file. Full replace of the value stored under the key.

Signature

Arguments

Argument
Type
Required
Description

<key>

string

Yes

State key name.

Flags

Flag
Type
Default
Description

-f, --file <path>

string

stdin

Read the JSON body from a file instead of stdin (- also means stdin).

--resource-type <type>

string

Target a resource's state instead of global state. Requires --resource-id.

--resource-id <id>

string

Resource id whose state to target. Requires --resource-type.

Request body

Reads JSON on stdin (or from --file). The body is stored verbatim as the value for the key.

Example

Corresponds to: PUT /v1/state/{key} (global) or PUT /v1/{resourceType}/{resourceId}/state/{key} (resource-scoped).


celigo state delete

Delete one state key. Prompts for confirmation unless -y is passed.

⚠️ Deleting a state key is permanent. The value stored under the key is removed and cannot be recovered.

Signature

Arguments

Argument
Type
Required
Description

<key>

string

Yes

State key name.

Flags

Flag
Type
Default
Description

-y, --yes

boolean

false

Skip confirmation.

--resource-type <type>

string

Target a resource's state instead of global state. Requires --resource-id.

--resource-id <id>

string

Resource id whose state to target. Requires --resource-type.

Example

Corresponds to: DELETE /v1/state/{key} (global) or DELETE /v1/{resourceType}/{resourceId}/state/{key} (resource-scoped).


celigo state purge

Delete all state keys in scope. Global by default; pass --resource-type/--resource-id to purge a resource's keys instead. Prompts for confirmation unless -y is passed.

⚠️ purge deletes every key in scope. All state values for the target — global, or the specified resource — are removed and cannot be recovered.

Signature

Flags

Flag
Type
Default
Description

-y, --yes

boolean

false

Skip confirmation.

--resource-type <type>

string

Target a resource's state instead of global state. Requires --resource-id.

--resource-id <id>

string

Resource id whose state to target. Requires --resource-type.

Example

Corresponds to: DELETE /v1/state (global) or DELETE /v1/{resourceType}/{resourceId}/state (resource-scoped).


Gotchas

  • set is a full replace. The JSON body you pipe in replaces the entire value stored under the key — there is no partial merge.

  • --resource-type and --resource-id go together. Pass both to target a resource's state; pass neither for global state. One without the other is an error.

  • purge is destructive. It drops every key in its scope (global, or the targeted resource); it prompts for confirmation unless you pass -y.

  • Global vs. resource scope are separate stores. A key set globally is not visible when you target a resource, and vice versa.

Last updated

Was this helpful?