Skip to content

Triggers API ​

Trigger endpoints gestionan trigger definitions, drafts, bulk operations y test helpers.

GET /api/triggers ​

Devuelve triggers con optional filters.

Arguments:

ArgumentLocationDescription
projectQueryProject fullname filter.
workspaceQueryWorkspace fullname filter.

Payload: ninguno.

Respuesta: TriggerView[].

GET /api/triggers/:fullname ​

Devuelve trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: ninguno.

Respuesta: TriggerDraftView.

PUT /api/triggers/:fullname ​

Crea o guarda trigger completo.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname. Debe coincidir con payload.fullname.

Payload:

FieldRequiredDescription
nameSíTrigger name dentro de project.
fullnameSíTrigger fullname.
projectSíProject fullname.
workspaceSíWorkspace fullname.
backendSíBackend object. Normalmente { type: "sdk", trigger, values }.
inputsSíInput schema.
meta.titleSíTítulo visible.
meta.descriptionNoDescripción.
defaultsNoNotification defaults.
triggerSpecNoSource matching spec o null.
providersNoArray of provider definitions.
filtersSchemaNoOptional filters schema.
outputSchemaNoHuman/raw output schema.
transformNoJavaScript transform o null.
activationNoJavaScript activation condition o null.
executionPolicyNoRuntime limits override object o null.
statusNo{ status, issue, source, updatedAt }.
tagsNoTags.
labelsNoLabels.

Respuesta: TriggerDraftView.

PATCH /api/triggers/:fullname ​

Actualiza trigger parcialmente.

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.

Respuesta: TriggerPatchResult.

DELETE /api/triggers/:fullname ​

Elimina trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: ninguno.

Respuesta: OperationResult.

POST /api/triggers/patch ​

Bulk patch para varios triggers.

Arguments: ninguno.

Payload:

FieldRequiredDescription
itemsSíArray of { fullname, set?, unset? }.
dryRunNoValidate without saving.

Respuesta: TriggerBulkPatchResult.

POST /api/triggers/remove ​

Bulk remove para varios triggers.

Arguments: ninguno.

Payload:

FieldRequiredDescription
fullnamesSíArray of trigger fullnames.
dryRunNoValidate without deleting.

Respuesta: TriggerBulkRemoveResult.

GET /api/triggers/:fullname/draft ​

Devuelve draft view de trigger.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: ninguno.

Respuesta: TriggerDraftView.

PUT /api/triggers/:fullname/draft ​

Guarda trigger draft.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

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

Respuesta: TriggerDraftView.

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

Valida trigger draft sin guardado final.

Arguments:

ArgumentLocationDescription
fullnamePathTrigger fullname.

Payload: same shape as trigger save payload.

Respuesta: TriggerValidationResult.

GET /api/triggers/:fullname/logs ​

Devuelve fallos de delivery y eventos de source pressure agregados para un trigger.

Argumentos:

ArgumentoUbicaciónDescripción
fullnamePathFullname del trigger.
limitQueryNúmero máximo opcional de entradas.
statusQueryFiltro opcional por estado de delivery.
directionQueryDirección de paginación opcional: before o after.
datetimeQueryTimestamp ISO usado con direction.

Payload: ninguno.

La respuesta contiene datos del trigger, estadísticas de subscriptions y logs normalizados.

POST /api/triggers/:fullname/reset-test-status ​

Restablece el estado de test del trigger a not_tested.

Argumentos: fullname en el path.

Payload: ninguno.

Respuesta: TriggerPatchResult.

POST /api/triggers/preview ​

Valida las definiciones de providers, ejecuta la activation opcional y los transforms raw/human sobre el input proporcionado, y valida el output resultante. No guarda ningún trigger.

Arguments: ninguno.

Payload:

FieldRequiredDescription
providersSíProvider definitions.
activationNoCondición de activation JavaScript o null.
transformSíJavaScript transform object.
inputSíSource item/input for preview.
inputsNoTrigger input values.
providersDataNoValores de providers ya calculados para activation y transforms.
outputSchemaNoOutput schema usada para validar el resultado del preview.

Respuesta: TriggerPreviewResult.

POST /api/triggers/test ​

Testea trigger definition en sample source item.

Arguments: ninguno.

Payload:

FieldRequiredDescription
triggerSpecSíSource matching spec.
providersSíProvider definitions.
transformSíJavaScript transform.
outputSchemaSíOutput schema.
activationNoActivation condition.
inputsNoInput values.
inputOne ofDirect test input.
testOne ofTest source/match object.

Respuesta: TriggerTestResult.

POST /api/triggers/test-block ​

Testea trigger en un block concreto.

Arguments: ninguno.

Payload:

FieldRequiredDescription
triggerSpecSíSource matching spec.
providersSíProvider definitions.
transformSíJavaScript transform.
outputSchemaSíOutput schema.
blockSíBlock number.
itemIndexNoSource item index inside block.
activationNoActivation condition.
filtersSchemaNoFilters schema.
inputsNoInput values.

Respuesta: TriggerTestResult.

POST /api/triggers/providers/test ​

Testea un provider.

Arguments: ninguno.

Payload:

FieldRequiredDescription
triggerSpecSíSource matching spec.
providerSíProvider definition.
projectNoProject fullname.
workspaceNoWorkspace fullname.
templateValuesNoTemplate values for provider placeholders.

Respuesta: ProviderTestResult.

GET /api/triggers/hypercore/actions ​

Devuelve el catálogo de actions de HyperCore disponible en el trigger builder.

Argumentos: ninguno.

Payload: ninguno.

La respuesta contiene un array actions.

GET /api/triggers/runtime-sources ​

Devuelve runtime data sources disponibles para trigger builder.

Arguments: ninguno.

Payload: ninguno.

Respuesta: RuntimeSource[].

GET /api/template-helpers ​

Devuelve metadatos públicos de los helpers de Handlebars disponibles en los valores predeterminados de triggers y en las plantillas de actions de suscripciones. No requiere autenticación.

Argumentos: ninguno.

Payload: ninguno.

La respuesta contiene un array handlebars.helpers. Cada helper tiene un name único y una description; los helpers de bloque también tienen block: true, y los helpers con opciones con nombre incluyen un array params con name y type.

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

Encuentra latest block/test input para trigger testing.

Arguments: ninguno.

Payload: trigger/source-specific search object.

Respuesta: 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
solana_eventtype, dataSourceprogramId, event, idl, 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
solana_accountid, type, accountsource, idl, programId, accountName, pda
state_windowid, type, dedupeBy, value, keepLastpartitionBy, valueType, aggregate
javascriptid, type, sourcevariables