const triggers = await client.workflows.triggers
.list()
.autoPagingToArray({ limit: 100 });
Optionalquery: FilterQueryGet the run history of a trigger
Newest runs first.
const runs = await client.workflows.triggers
.listRuns('my-trigger')
.autoPagingToArray({ limit: 100 });
Optionalquery: FilterQueryThe API accepts one trigger per request, so the SDK sends one request per item, in sequence.
const [session] = await client.sessions.create([
{ clientId: 'my-client-id', clientSecret: 'my-client-secret' },
]);
const triggers = await client.workflows.triggers.upsert([
{
externalId: 'my-trigger',
triggerRule: { triggerType: 'schedule', cronExpression: '0 * * * *' },
workflowExternalId: 'my-workflow',
workflowVersion: '1',
authentication: { nonce: session.nonce },
},
]);
Delete triggers
The API accepts one trigger per request, so the SDK sends one request per item, in sequence.