POST /v2/functions/namespaces/{namespace_id}/triggers

Creates a new trigger for a given function in a namespace. To create a trigger, send a POST request to /v2/functions/namespaces/$NAMESPACE_ID/triggers with the name, function, type, is_enabled and scheduled_details properties.

Servers

Path parameters

Name Type Required Description
namespace_id String Yes

The ID of the namespace to be managed.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
function String Yes

Name of function(action) that exists in the given namespace.

name String Yes

The trigger's unique name within the namespace.

scheduled_details Object Yes

Trigger details for SCHEDULED type, where body is optional.

scheduled_details.body Object No

Optional data to be sent to function while triggering the function.

scheduled_details.body.name String No
scheduled_details.cron String Yes

valid cron expression string which is required for SCHEDULED type triggers.

type String Yes

One of different type of triggers. Currently only SCHEDULED is supported.

is_enabled Boolean Yes

Indicates weather the trigger is paused or unpaused.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.