User notifications allow you to send notifications to a user based on subscribed events. User notifications are dependent on the user account setup; the groups and roles assigned to the user determine what connectors and jobs the user can receive notifications for from DataHub. Only connectors and jobs a user has access to based on the user setup will trigger notifications. Notifications can be added to an existing user account or added when creating a new user account.
List Details for All Users
Execute a GET to retrieve details for all users; specifically user id
GET {{url}}v1/users?fields=all
Example Response
{ "id": "2f4543e407724398b38ec783a1e95574", "login": "user1", "name": "user1", "roles": [], "permissions": [ { "id": "47c6cd5954f041df8d79e1972cc1ce3b", "name": "List Connections" }, { "id": "294eee9539354739b194da1a879bc163", "name": "Manage Connections" } ], "status": "active", "disabled": false, "notifications": { "emails": true, "sms": false, "notification_types": [ "license-expired", "job-completed" ] }, "created_on": 1577119682.0, "created_by": "21d58cf305c3467da0e6753d1b8863be", "type": "user" } ] }
List Available Categories Types
List all the categories available to be notified on
GET {{url}}v1/notifications/types
Example Response
{ "status": 200, "type": "notification_types", "notification_types": [ { "id": "connection-failed", "name": "Connection failed", "description": "Receive a notification whenever a connection fails to open." }, { "id": "product-upgrade-available", "name": "Upgrade available", "description": "Receive a notification when a new version of the software is available." }, { "id": "license-expired", "name": "License has expired", "description": "Receive a notification when your license has expired." }, { "id": "license-expiration-warning", "name": "License expiry approaching", "description": "Receive a notification when your license will expire soon." }, { "id": "job-failed", "name": "Job failed", "description": "Receive a notification whenever a job fails." }, { "id": "job-completed", "name": "Job completed", "description": "Receive a notification whenever a job meets its stop policy." } ] }
Change Notifications a User Receives
Update current configuration to add or remove notification types a user receives
PATCH {{url}}v1/users/{{user_id}}
Example Request Body
{ "notifications": { "emails": true, "notification_types": [ "job-completed", "job-failed", "connection-failed", "product-upgrade-available", "license-expired", "license-expiration-warning" ], "sms": false } }