Task triggers

Triggers allow content administrators to execute collections of report tasks on demand or based on external system events via the ConnectReport API, rather than on a schedule.

Configure task triggers in the Management Console

You can assign a trigger to one or more report tasks via the Management Console as follows:

  • Navigate to the Management Console and choose Manage Content in the sidebar
  • Under Report tasks, identify and tick the checkboxes of the report tasks you want to assign to a trigger
  • Under Actions, choose Set trigger.
  • Within the trigger input, you can enter the name of a new trigger or select an existing trigger by name, if any exist.
  • Choose Set

The tasks you assign to a trigger will no longer run on a schedule if they were previously assigned one, and will only execute when the trigger is run.

Run tasks assigned to a trigger from the Management Console

You can execute all of the tasks assigned to a trigger directly from the Management Console using the following steps:

  • Navigate to the Management Console and choose Triggers in the sidebar
  • Identify the trigger in the list of triggers that you wish to execute
  • Choose Run trigger

Upon running a trigger, the tasks assigned to the trigger immeditately enter the report execution queue.

Run tasks assigned to a trigger from the API

You may also execute tasks assigned to trigger from the Administration API as follows. In order to authenticate with the API, you will first need to configure an access token. See the section here for details on preparing an access token.

cURL example:

curl 'https://<YOUR_CONNECTREPORT_HOST>/admin/api/v1/report-tasks/run-trigger' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'Authorization: <ACCESS_TOKEN>' \
  --data-raw '{"name":"<TRIGGER_NAME>"}'