inndx
GitHub

Triggers

Schedule and manage automatic runs of a crawl job, and inspect their executions.

A trigger creates runs of a job automatically based on a condition, such as a recurring schedule or the completion of the job's previous run.

These endpoints share the pagination and error conventions.

List triggers

GET/v1/triggers

Returns a page of triggers across all jobs, most recent first.

Query parametersin: query
page
string

Pagination cursor. See pagination.

per_page
numberdefault: 10

Maximum number of triggers to return.

min: 1max: 100
job_ids
string[]

Return only triggers belonging to these jobs.

format: uuid
include_ids
string[]

Return only triggers with these IDs.

format: uuid
exclude_ids
string[]

Omit triggers with these IDs.

format: uuid
names
string[]

Return only triggers with these exact names.

enabled
boolean

Return only triggers with this enabled state.

created_before
string

Return only triggers created before this timestamp.

format: date-time
created_after
string

Return only triggers created after this timestamp.

format: date-time
executed_before
string

Return only triggers last executed before this timestamp.

format: date-time
executed_after
string

Return only triggers last executed after this timestamp.

format: date-time
Responses

curl 'http://localhost:8022/v1/triggers?per_page=20&enabled=true' \
  -H 'X-Tenant-Id: acme'

List triggers for a job

GET/v1/jobs/{job_id}/triggers

Returns a page of triggers belonging to a single job, most recent first. The {job_id} path segment is the job's UUID.

Query parametersin: query
page
string

Pagination cursor. See pagination.

per_page
numberdefault: 10

Maximum number of triggers to return.

min: 1max: 100
include_ids
string[]

Return only triggers with these IDs.

format: uuid
exclude_ids
string[]

Omit triggers with these IDs.

format: uuid
names
string[]

Return only triggers with these exact names.

enabled
boolean

Return only triggers with this enabled state.

created_before
string

Return only triggers created before this timestamp.

format: date-time
created_after
string

Return only triggers created after this timestamp.

format: date-time
executed_before
string

Return only triggers last executed before this timestamp.

format: date-time
executed_after
string

Return only triggers last executed after this timestamp.

format: date-time
Responses

curl 'http://localhost:8022/v1/jobs/3f1a…/triggers?per_page=20' \
  -H 'X-Tenant-Id: acme'

Create a trigger

POST/v1/jobs/{job_id}/triggers

Creates a trigger for a job. The {job_id} path segment is the job's UUID.

Request bodyin: body
name
stringrequired

A human-readable name for the trigger.

minLength: 1maxLength: 255
condition
objectrequired

The condition that decides when the trigger fires. See Condition for the available kinds.

id
string

The ID to assign. Generated when omitted.

format: uuid
Responses

curl -X POST 'http://localhost:8022/v1/jobs/3f1a…/triggers' \
  -H 'X-Tenant-Id: acme' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "nightly",
    "condition": { "kind": "schedule", "params": { "expression": "0 0 * * *" } }
  }'

Get a trigger

GET/v1/triggers/{trigger_id}

Returns a single trigger by ID. The {trigger_id} path segment is the trigger's UUID.

Responses

curl 'http://localhost:8022/v1/triggers/7d4e…' \
  -H 'X-Tenant-Id: acme'

Condition

A condition is a tagged object. The kind field selects the condition type, and params holds the settings for that kind.

One of
schedule

Fires on a recurring schedule.

kind
stringrequired

Identifies the condition kind.

schedule
Recurring schedule condition.
params
objectrequired
expression
stringrequired

A cron schedule that decides when the trigger fires.

on_finish

Fires after the job's run finishes, following an optional delay.

kind
stringrequired

Identifies the condition kind.

on_finish
Run completion condition.
params
objectrequired
delay
string

A duration to wait after the run finishes before firing, such as 5m. Fires immediately when omitted.

Delete a trigger

DELETE/v1/triggers/{trigger_id}

Deletes a trigger. The {trigger_id} path segment is the trigger's UUID.

Responses

curl -X DELETE 'http://localhost:8022/v1/triggers/7d4e…' \
  -H 'X-Tenant-Id: acme'

Enable a trigger

PUT/v1/triggers/{trigger_id}/enable

Enables a trigger so it can fire. The {trigger_id} path segment is the trigger's UUID.

Responses

curl -X PUT 'http://localhost:8022/v1/triggers/7d4e…/enable' \
  -H 'X-Tenant-Id: acme'

Disable a trigger

PUT/v1/triggers/{trigger_id}/disable

Disables a trigger so it no longer fires. The {trigger_id} path segment is the trigger's UUID.

Responses

curl -X PUT 'http://localhost:8022/v1/triggers/7d4e…/disable' \
  -H 'X-Tenant-Id: acme'

List trigger executions

GET/v1/triggers/{trigger_id}/executions

Returns a page of a trigger's executions, most recent first. The {trigger_id} path segment is the trigger's UUID.

Query parametersin: query
page
string

Pagination cursor. See pagination.

per_page
numberdefault: 10

Maximum number of executions to return.

min: 1max: 100
include_ids
string[]

Return only executions with these IDs.

format: uuid
exclude_ids
string[]

Omit executions with these IDs.

format: uuid
scheduled_before
string

Return only executions scheduled before this timestamp.

format: date-time
scheduled_after
string

Return only executions scheduled after this timestamp.

format: date-time
executed_before
string

Return only executions that ran before this timestamp.

format: date-time
executed_after
string

Return only executions that ran after this timestamp.

format: date-time
Responses

curl 'http://localhost:8022/v1/triggers/7d4e…/executions?per_page=20' \
  -H 'X-Tenant-Id: acme'

Search docs

Search the Self-host documentation