How to Receive Alerts
Alert is a powerful tool that serves to notify users about incidents in your processes. If your project has configured alerts, you receive a message every time timelines match some conditions. Alerts are triggered after every data upload. Combine alerts receiving with the data upload and redirect alert notifications to the 3rd party system so users process incidents efficiently.
Before you begin
- Project alerts should be configured in advance via Timeline UI. For details, see Alerts.
- It is mandatory to have the Timeline API data source enabled for the target project of any API interaction, otherwise, your requests will fail.
Receiving alerts
To receive alerts triggered by a certain upload:
- Prepare the projectId parameter of the desired project. For example, send a GET request to the endpoint:
{your.timeline.instance}.com/api/ext/1.0/project
In response, you will get the list of projects, including their projectIds. See Project path parameters to learn more. - Prepare the uploadId parameter of the desired upload. Further, you will receive triggered alerts for the exact upload.
To get it, poll processingId on a finished upload. Send a GET request to the endpoint:
{your.timeline.instance}.com/api/ext/1.0/processing/{processingId}
In response, you will get uploadId. See Project path parameters to learn more. - Pull triggered alerts for the upload. Send a POST request to the endpoint:
{your.timeline.instance}.com/api/ext/1.0/project/{projectId}/alert-result/{uploadId}
In response, you will get a processingId.CURL example
- Send a GET request with the processingId returned by the request on step 3. Endpoint:
{your.timeline.instance}.com/api/ext/1.0/processing/{processingId}
After the processing is finished, the endpoint will return a URL, from where you can download the alert results in JSON format.CURL example
05.09.2024 16:23:54