v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Triggers

Create Trigger

Create a new trigger for scheduled job execution.

**Action Types:**
- `cluster`: Execute clustering on a cluster definition
- `taxonomy_enrichment`: Apply taxonomy enrichment to a collection

**Schedule Types:**
- `cron`: Execute at specific times using cron expressions (e.g., "0 2 * * *" for daily at 2am)
- `interval`: Execute at fixed intervals (e.g., every 6 hours)
- `event`: Execute when specific events occur (e.g., after 100 documents added)
- `conditional`: Execute when conditions are met (e.g., drift threshold exceeded)

**Examples:**

Cluster trigger (daily at 2am):
```json
{
  "action_type": "cluster",
  "action_config": {"cluster_id": "clust_abc123"},
  "trigger_type": "cron",
  "schedule_config": {"cron_expression": "0 2 * * *", "timezone": "UTC"},
  "description": "Daily clustering at 2am"
}
```

Taxonomy enrichment trigger (every 6 hours):
```json
{
  "action_type": "taxonomy_enrichment",
  "action_config": {
    "taxonomy_id": "tax_products",
    "collection_id": "col_inventory",
    "batch_size": 1000
  },
  "trigger_type": "interval",
  "schedule_config": {"interval_seconds": 21600},
  "description": "Re-enrich products every 6 hours"
}
```
post/v1/triggers

Request body

action_type'cluster' | 'taxonomy_enrichment' | 'batch_rerun' | 'collection_trigger' required

Type of action to execute when trigger fires.

Supported action types:

  • cluster: Execute clustering on a cluster definition
  • taxonomy_enrichment: Apply taxonomy enrichment to a collection
  • batch_rerun: Re-execute a completed/failed batch
action_configobject required

Action-specific configuration

trigger_type'cron' | 'interval' | 'event' | 'conditional' required

Type of trigger schedule.

Supported trigger types:

  • cron: Schedule-based execution using cron expressions
  • interval: Fixed-interval execution
  • event: Event-driven execution
  • conditional: Condition-based execution
schedule_configobject required

Schedule-specific configuration

descriptionstring nullable

Human-readable description

status'active' | 'paused' | 'disabled' | 'failed'

Status of a trigger.

Example request

{
  "action_config": {
    "cluster_id": "clust_abc123"
  },
  "action_type": "cluster",
  "description": "Daily clustering at 2am",
  "schedule_config": {
    "cron_expression": "0 2 * * *",
    "timezone": "UTC"
  },
  "trigger_type": "cron"
}

Response

Successful Response

trigger_idstring

Unique trigger identifier

namespace_idstring required

Namespace ID

internal_idstring required

Organization internal ID

action_type'cluster' | 'taxonomy_enrichment' | 'batch_rerun' | 'collection_trigger' required

Type of action to execute when trigger fires.

Supported action types:

  • cluster: Execute clustering on a cluster definition
  • taxonomy_enrichment: Apply taxonomy enrichment to a collection
  • batch_rerun: Re-execute a completed/failed batch
action_configobject required

Action-specific configuration

trigger_type'cron' | 'interval' | 'event' | 'conditional' required

Type of trigger schedule.

Supported trigger types:

  • cron: Schedule-based execution using cron expressions
  • interval: Fixed-interval execution
  • event: Event-driven execution
  • conditional: Condition-based execution
schedule_configobject required

Schedule-specific configuration

status'active' | 'paused' | 'disabled' | 'failed'

Status of a trigger.

last_triggered_atstring date-time nullable

Last time trigger fired

last_execution_task_idstring nullable

Task ID of last execution

next_scheduled_atstring date-time nullable

Next scheduled execution time

execution_countinteger

Total successful executions

consecutive_failuresinteger

Consecutive failures

last_execution_statusstring nullable

Status of last execution

last_execution_errorstring nullable

Error from last execution (if failed)

event_counterinteger

Current event count since last trigger

last_cooldown_atstring date-time nullable

Last time cooldown was applied

baseline_snapshotobject nullable

Baseline snapshot for drift measurement (captured after successful execution)

last_drift_measurementobject nullable

Result of most recent drift measurement check

last_volume_measurementobject nullable

Result of most recent volume (document count) condition check

last_condition_check_atstring date-time nullable

When condition was last evaluated

descriptionstring nullable

Human-readable description

created_atstring date-time

Creation timestamp

updated_atstring date-time

Last update timestamp

created_bystring nullable

User who created trigger