Skip to content

Triggers API

Trigger endpoints manage trigger definitions, drafts, bulk operations, and test helpers.

GET /api/v2/triggers

Returns triggers with optional filters.

Arguments:

ArgumentLocationDescription
projectQueryProject fullname filter.
workspaceQueryWorkspace fullname filter.

Payload: none.

Response: TriggerView[].

GET /api/v2/triggers/:fullname

Returns trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: none.

Response: TriggerDraftView.

PUT /api/v2/triggers/:fullname

Creates or fully saves trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname. Must match payload.fullname.

Payload:

FieldRequiredDescription
nameYesTrigger name inside project.
fullnameYesTrigger fullname.
projectYesProject fullname.
workspaceYesWorkspace fullname.
backendYesBackend object. Usually { type: "sdk", trigger, values }.
inputsYesInput schema.
meta.titleYesVisible title.
meta.descriptionNoDescription.
defaultsNoNotification defaults.
outputNoLegacy output schema.
triggerSpecNoSource matching spec or null.
providersNoArray of provider definitions.
filtersSchemaNoOptional filters schema.
outputSchemaNoHuman/raw output schema.
transformNoJavaScript transform or null.
activationNoJavaScript activation condition or null.
executionPolicyNoRuntime limits override object or null.
statusNo{ status, issue, source, updatedAt }.
tagsNoTags.
labelsNoLabels.

Response: TriggerDraftView.

PATCH /api/v2/triggers/:fullname

Partially updates trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload:

FieldRequiredDescription
setOne ofObject with dotted paths and values to set.
unsetOne ofArray of dotted paths to remove.
dryRunNoIf true, validate patch without saving.

Response: TriggerPatchResult.

DELETE /api/v2/triggers/:fullname

Deletes trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: none.

Response: OperationResult.

POST /api/v2/triggers/patch

Bulk patch for several triggers.

Arguments: none.

Payload:

FieldRequiredDescription
itemsYesArray of { fullname, set?, unset? }.
dryRunNoValidate without saving.

Response: TriggerBulkPatchResult.

POST /api/v2/triggers/remove

Bulk remove for several triggers.

Arguments: none.

Payload:

FieldRequiredDescription
fullnamesYesArray of trigger fullnames.
dryRunNoValidate without deleting.

Response: TriggerBulkRemoveResult.

GET /api/v2/triggers/:fullname/draft

Returns trigger draft view.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: none.

Response: TriggerDraftView.

PUT /api/v2/triggers/:fullname/draft

Saves trigger draft.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: same shape as PUT /api/v2/triggers/:fullname.

Response: TriggerDraftView.

POST /api/v2/triggers/:fullname/draft/validate

Validates trigger draft without final save.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: same shape as trigger save payload.

Response: TriggerValidationResult.

POST /api/v2/triggers/preview

Previews transform/providers output without saving trigger.

Arguments: none.

Payload:

FieldRequiredDescription
providersYesProvider definitions.
transformYesJavaScript transform object.
inputYesSource item/input for preview.
inputsNoTrigger input values.
outputSchemaNoOutput schema used for formatting.

Response: TriggerPreviewResult.

POST /api/v2/triggers/test

Tests trigger definition on sample source item.

Arguments: none.

Payload:

FieldRequiredDescription
triggerSpecYesSource matching spec.
providersYesProvider definitions.
transformYesJavaScript transform.
outputSchemaYesOutput schema.
activationNoActivation condition.
inputsNoInput values.
inputOne ofDirect test input.
testOne ofTest source/match object.

Response: TriggerTestResult.

POST /api/v2/triggers/test-block

Tests trigger on a specific block.

Arguments: none.

Payload:

FieldRequiredDescription
triggerSpecYesSource matching spec.
providersYesProvider definitions.
transformYesJavaScript transform.
outputSchemaYesOutput schema.
blockYesBlock number.
itemIndexNoSource item index inside block.
activationNoActivation condition.
filtersSchemaNoFilters schema.
inputsNoInput values.

Response: TriggerTestResult.

POST /api/v2/triggers/providers/test

Tests one provider.

Arguments: none.

Payload:

FieldRequiredDescription
triggerSpecYesSource matching spec.
providerYesProvider definition.
projectNoProject fullname.
workspaceNoWorkspace fullname.
templateValuesNoTemplate values for provider placeholders.

Response: ProviderTestResult.

GET /api/v2/triggers/runtime-sources

Returns runtime data sources available to trigger builder.

Arguments: none.

Payload: none.

Response: RuntimeSource[].

POST /api/v2/triggers/find-latest-block

Finds latest block/test input for trigger testing.

Arguments: none.

Payload: trigger/source-specific search object.

Response: LatestBlockResult.

Trigger Spec

triggerSpec describes source matching.

Supported variants:

TypeRequired fieldsOptional fields
evm_logtype, dataSourcecontract, event, abiFragment, topicsCount, dataBytes, testInput
evm_transactiontype, dataSourcetestInput
substrate_eventtype, dataSourcepallet, event, testInput
timertype, intervaltestInput

Provider Definition

Each provider has id, type, optional weight, optional timeoutMs, and optional outputSchema.

Supported provider types:

TypeRequired fieldsMain optional fields
httpid, type, urlmethod, headers, queryParams, body
graphqlid, type, url, queryheaders, variables
rpc with transport: "endpoint"id, type, url, methodheaders, params, body
rpc with transport: "source"id, type, transport, methodparams
substrate_storageid, type, module, entrysource, args, block
evm_readid, type, contract, method, abiFragmentsource, abiContract, args
state_windowid, type, dedupeBy, value, keepLastpartitionBy, valueType, aggregate
javascriptid, type, sourcevariables