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
/v1/triggersReturns a page of triggers across all jobs, most recent first.
- 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
curl 'http://localhost:8022/v1/triggers?per_page=20&enabled=true' \
-H 'X-Tenant-Id: acme'List triggers for a job
/v1/jobs/{job_id}/triggersReturns a page of triggers belonging to a single job, most recent first. The
{job_id} path segment is the job's UUID.
- 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
curl 'http://localhost:8022/v1/jobs/3f1a…/triggers?per_page=20' \
-H 'X-Tenant-Id: acme'Create a trigger
/v1/jobs/{job_id}/triggersCreates a trigger for a job. The {job_id} path segment is the job's UUID.
- 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
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
/v1/triggers/{trigger_id}Returns a single trigger by ID. The {trigger_id} path segment is the
trigger's UUID.
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.
- kind stringrequired
Identifies the condition kind.
schedule- Recurring schedule condition.
- params objectrequired
- expression stringrequired
A cron schedule that decides when the trigger fires.
Fires on a recurring schedule.
- 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.
Fires after the job's run finishes, following an optional delay.
Delete a trigger
/v1/triggers/{trigger_id}Deletes a trigger. The {trigger_id} path segment is the trigger's UUID.
curl -X DELETE 'http://localhost:8022/v1/triggers/7d4e…' \
-H 'X-Tenant-Id: acme'Enable a trigger
/v1/triggers/{trigger_id}/enableEnables a trigger so it can fire. The {trigger_id} path segment is the
trigger's UUID.
curl -X PUT 'http://localhost:8022/v1/triggers/7d4e…/enable' \
-H 'X-Tenant-Id: acme'Disable a trigger
/v1/triggers/{trigger_id}/disableDisables a trigger so it no longer fires. The {trigger_id} path segment is
the trigger's UUID.
curl -X PUT 'http://localhost:8022/v1/triggers/7d4e…/disable' \
-H 'X-Tenant-Id: acme'List trigger executions
/v1/triggers/{trigger_id}/executionsReturns a page of a trigger's executions, most recent first. The
{trigger_id} path segment is the trigger's UUID.
- 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
curl 'http://localhost:8022/v1/triggers/7d4e…/executions?per_page=20' \
-H 'X-Tenant-Id: acme'