4. Using Integration Manager : Configuring Job Notifications
 
Share this page                  
Configuring Job Notifications
Job notifications allow you to receive email notifications for unsuccessful jobs based on Job Configuration.
Emails are sent whenever a subscribed-to configuration ends in an ERROR or ABORTED state. A subscription to a Job Configuration is made through an API call. You must be an admin of the account to create or modify subscriptions within the account. You can also activate or deactivate subscriptions by updating the "active" field using the PUT. The endpoints can be found at: http://actian-im-api-docs-us-east-1.s3-website-us-east-1.amazonaws.com/#/, but they are also listed in Step 2.
To enable job notifications, you must update the application.properties file and then subscribe to job configurations to begin receiving email notifications.
To configure job notifications
1. Set key-value pairs in the application.properties file.
Enable notifications:
notification.enabled =true
Configure the SMTP server:
spring.mail.host=<smtp-host-url>
spring.mail.username=<smtp-username>
spring.mail.password=<smtp-password>
spring.mail.properties.mail.transport.protocol=smtp
spring.mail.properties.mail.smtp.port=587
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
Configure the email sender and recipients:
notification.mailFrom=<email>
notification.mailTo=<email>
2. Create a subscription to a Job Configuration using the Rest API.
Here is an example of a POST call to create a subscription:
POST /api/jobconfigs/{id}/subscriptions
Host: localhost:8080
Authorization: Bearer:eyJhbGciOi…
Content-type: application/json
{
    "active" : "true"
}
These are all the endpoints for managing subscriptions:
POST: api/jobconfigs/{id}/subscription
PUT: api/subscriptions/{id}
DELETE: api/subscriptions/{id}
GET: api/subscriptions/{id}
GET: api/subscriptions
For more information about the REST API endpoints, see http://actian-im-api-docs-us-east-1.s3-website-us-east-1.amazonaws.com/#/.