Skip to main content

When to use

  • Deploy a data ingestion workflow (document embedding pipeline)
  • After creating or modifying data ingestion configuration in config.ts
  • The use case has a getDataIngestionConfig() export in config.ts

Prerequisites

  • codika CLI installed and authenticated
  • A use case folder with config.ts exporting getDataIngestionConfig() and a data-ingestion/ folder with exactly one workflow JSON file
  • A project to deploy to (via project.json)

Use case folder structure

my-use-case/
  project.json
  config.ts               # Must export getDataIngestionConfig()
  data-ingestion/
    <workflow>.json        # Exactly one workflow JSON file (auto-discovered)

Command

codika deploy process-data-ingestion <path> [options]

Arguments

ArgumentDescription
<path>Path to use case folder (config.ts must export getDataIngestionConfig(), and data-ingestion/ folder must contain exactly one workflow JSON file)

Options

OptionDescriptionDefault
--api-url <url>Override API URL
--api-key <key>Codika API keyCODIKA_API_KEY env or profile
--project-id <id>Override project IDproject.json
--project-file <path>Path to custom project file (e.g., project-client-a.json)project.json
--patchPatch version bump (default)
--minorMinor version bump
--majorMajor version bump
--target-version <version>Deploy to explicit API version (e.g., 3.0)
--profile <name>Use a specific profile instead of the active one
--jsonJSON output

What happens on deploy

  1. config.ts is loaded — getDataIngestionConfig() is read
  2. The CLI auto-discovers the single .json file in data-ingestion/
  3. Project ID is resolved from --project-id > project.json
  4. Configuration is sent to the platform
  5. On success:
    • version.json is updated with the new dataIngestionVersion
    • Deployment is archived in deployments/{projectId}/data-ingestion/{apiVersion}/
    • project-info.json is updated with the version mapping
    • project.json is updated with dataIngestionDeployments map

Version tracking

Data ingestion has its own version line, separate from use case deployments:
// version.json
{
  "version": "1.0.4",
  "dataIngestionVersion": "1.1.0"
}
// project.json (partial)
{
  "dataIngestionDeployments": {
    "1.0": {
      "dataIngestionId": "di-abc123",
      "createdAt": "2025-01-20T14:30:00.000Z",
      "webhookUrls": {
        "embed": "https://n8n.example.com/webhook/embed-xxx",
        "delete": "https://n8n.example.com/webhook/delete-xxx"
      }
    }
  }
}

Key differences from use case deployment

AspectUse Case DeployData Ingestion Deploy
Commanddeploy use-casedeploy process-data-ingestion
ScopePer-user instance (dev/prod)Per-process (shared by all users)
VersioningSemantic (X.Y.Z) + API (X.Y)Simple (X.Y) + local (X.Y.Z)
NotificationsTriggers “update available”Does NOT trigger notifications
Version flags--patch, --minor, --major, --target-version--patch, --minor, --major, --target-version

Examples

# Default deployment (minor bump)
codika deploy process-data-ingestion ./my-use-case

# Major version bump
codika deploy process-data-ingestion ./my-use-case --major

# Explicit version
codika deploy process-data-ingestion ./my-use-case --target-version 3.0

# JSON output for CI
codika deploy process-data-ingestion ./my-use-case --json

Output

✓ Data Ingestion Deployment Successful

  Data Ingestion ID:  di-abc123
  API Version:        1.2
  Local Version:      1.0.0 -> 1.1.0
  Project ID:         proj-456
  Webhook (embed):    https://n8n.example.com/webhook/embed-xxx
  Webhook (delete):   https://n8n.example.com/webhook/delete-xxx

Exit codes

CodeMeaning
0Deployment successful
1API error or validation failure