GuidesAPI Reference
Guides

Job completion notifications

The Notifications (BETA) feature enables real-time updates by automatically pushing job statistics to configured endpoints upon job completion. This approach eliminates the need to continuously poll for job statuses, improving efficiency and responsiveness.

Key Features

  • Get Notifications on job completion: Automatically submit job results when a job is finished, instead of requiring status checks.
  • Customizable Notifications: Notifications can be added via a notification ID as part of a job's configuration.
  • CRUD API: Notifications can be created, updated, retrieved, and deleted using the provided API endpoints.
  • Validation Endpoint: A /test endpoint is available to validate the accessibility and correctness of the configured notification endpoint.

Notification Type

Currently, only WEB_HOOKS are supported, which:

  • Call a specified URL endpoint using an HTTP GET request.
  • Substitute job-related properties into the URL parameters.

Supported Job Properties

The following properties are available for substitution in WEB_HOOKS URLs:

PropertyDescription
JOB_IDUnique identifier of the job.
JOB_NAMEName of the job.
JOB_STATUSFinal status of the job
JOB_OUTPUT_TYPEType of the job's output.
JOB_RECORDS_SUCCEEDEDNumber of successfully processed records.
JOB_RECORDS_FAILEDNumber of records that failed processing.
JOB_RECORDS_TOTALTotal number of records processed.
JOB_RECORDS_VALIDNumber of valid records identified during processing.
JOB_RECORDS_INVALIDNumber of invalid records identified during processing.

Example

Example Notification configuration:

{
  "type": "WEB_HOOK",
  "config": {
    "url": "https://example.com/notify?jobId=${JOB_ID}&status=${JOB_STATUS}&success=${JOB_RECORDS_SUCCEEDED}&failed=${JOB_RECORDS_FAILED}"
  }
}

Example substituted url:

https://example.com/notify?jobId=JOB-00000000-0000-0000-0000-123456789abcd&status=completed&success=100000&failed=0