Create function triggers
Changed onSubscribe a function to one or more event types, optionally scoped to specific senders. Provide eventTypes and senderIds (use null in senderIds for all senders); a trigger is created for each event type and sender combination.
The special event type cron runs the function on a schedule instead of a messaging event: include a cron field with a 5-field UTC cron expression (minimum granularity one minute). A cron trigger ignores the sender axis, and a function may hold several cron triggers with different expressions. The function receives an event with type: "cron" and data.cron.
Request
- Base URLhttps://api.zavu.dev
- URLhttps://api.zavu.dev/v1/functions/{functionId}/triggers
- AuthHTTP bearer
Path parameters
Zavu Function ID.
Request body
Example request
{
"cron": "0 9 * * 1-5"
}Response
Triggers created.
Example response
{
"triggers": [
{
"cron": "*/15 * * * *"
}
]
}Changes
- info
added the new optional request property
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
endpoint added
- info