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

file-definitions

Parsing and generation rules for structured file formats — fixed-width, delimited (CSV/TSV), X12, and EDIFACT. Referenced by exports and imports that process file-based payloads.

REST API: File Definitions

celigo file-definitions <subcommand> [args] [flags]

Supports all global flags.


Subcommands

Subcommand
Purpose

list

List every file definition in the account.

get

Fetch a single file definition by ID.

create

Create a file definition from a JSON body (--file <path> or stdin).

update

Full replace from a JSON body (--file <path> or stdin); destructive PUT.

set

Patch one or more fields via GET → modify → PUT. Supports key=file://<path>.

delete

Delete a file definition by ID.

dependencies <id> (alias used-by)

List resources that depend on this file definition.

audit <id>

Show the file definition's audit log (change history).


celigo file-definitions list

List all file definitions configured on the account.

Signature

Arguments

None.

Flags

None beyond the global flags (--format, --jq, --profile, --verbose).

Example

Default table columns: _id, name, lastModified.

Corresponds to: GET /v1/filedefinitions


celigo file-definitions get

Fetch one file definition, including its full parsing rule tree.

Signature

Arguments

Argument
Type
Required
Description

<id>

string

Yes

File definition _id (24-character hex).

Flags

None beyond the global flags.

Example

Corresponds to: GET /v1/filedefinitions/{_id}


celigo file-definitions create

Create a new file definition from a JSON body. Read the body from a file with -f, --file, or pipe it on stdin. See the create request schema for the full body shape (format, rule tree, delimiters, and EDI globalId).

Signature

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.

Blocked in read mode.

Example

Corresponds to: POST /v1/filedefinitions


celigo file-definitions update

Replace an existing file definition with a JSON body (--file <path> or stdin). PUT is a full replace — omitted fields are cleared.

⚠️ PUT fully replaces the file definition. Any omitted field is cleared, including the nested parsing rule tree. Prefer set, or get | jq | update, to preserve the rest of the document.

Signature

Arguments

Argument
Type
Required
Description

<id>

string

Yes

File definition _id to replace.

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.

Blocked in read mode.

Example

Corresponds to: PUT /v1/filedefinitions/{_id}


celigo file-definitions set

Patch one or more fields on a file definition without re-sending the full document. The CLI does GET → apply assignments → PUT, which preserves unmodified fields (including the nested rule tree).

Signature

Arguments

Argument
Type
Required
Description

<id>

string

Yes

File definition _id to modify.

<key=value>

string

Yes (≥1)

One or more assignments. Values are auto-parsed as JSON — null removes the field. Dot notation (rules.delimiter=",") and array indexing (rules.elements[0].name=orderId) are supported. Use key=file://<path> to load a value from a file (added in celigo-cli 2026.6.1).

Flags

None beyond the global flags. Blocked in read mode.

Examples

Corresponds to: GET /v1/filedefinitions/{_id} followed by PUT /v1/filedefinitions/{_id}.


celigo file-definitions delete

Delete a file definition by ID. Prompts for confirmation unless -y/--yes is supplied.

⚠️ Deleting a file definition is destructive. Exports and imports that reference it by ID will break. Run dependencies first to confirm nothing references it.

Signature

Arguments

Argument
Type
Required
Description

<id>

string

Yes

File definition _id to delete.

Flags

Flag
Type
Default
Description

-y, --yes

boolean

false

Skip the interactive confirmation prompt.

Example

Corresponds to: DELETE /v1/filedefinitions/{_id}


celigo file-definitions dependencies

List resources that depend on this file definition (alias: used-by). Use it to check whether a file definition is safe to delete — an empty result means nothing references it.

Signature

Arguments

Argument
Type
Required
Description

<id>

string

Yes

File definition _id.

Example

Corresponds to: GET /v1/filedefinitions/{_id}/dependencies


celigo file-definitions audit

Show the audit log (change history) for one file definition.

Signature

Arguments

Argument
Type
Required
Description

<id>

string

Yes

File definition _id.

Example

Corresponds to: GET /v1/filedefinitions/{_id}/audit


Gotchas

  • EDI formats need a globalId. delimited/x12 and delimited/edifact definitions must reference a known standard document definition via globalId. Accounts without an EDI license cannot create these formats via the API — use the UI to generate them from a standard.

  • PUT is a full replace. The parsing rule tree is deeply nested; a bare update that omits rules will erase it. Prefer set for small edits, or get | jq | update to preserve the rest of the document.

  • File definitions are referenced, not owned. Exports and imports link to a file definition by ID (file.fileDefinition._id). Deleting a file definition that is still referenced will break those flows — list the references first before removing.

  • Name conflicts are not enforced. Two file definitions with identical name values can coexist; always key off _id when linking from an export or import.

  • edi-profiles — trading-partner-level EDI configuration that pairs with X12/EDIFACT file definitions.

  • exports — file-based exports (FTP, S3, local files) reference a file definition to parse inbound data.

  • imports — file-based imports reference a file definition to generate outbound files.

Last updated

Was this helpful?