Integrations

Operations with Notifications

Introduction

The following are the basic operations that can be performed via API for Notifications. All calls are located in Hermes. For more details on the endpoints, see Swagger

Get all sent notifications

Allows retrieving all sent notifications according to the specified search criteria, provided that the user making the request is a recipient of them (either by name or by their role and organizational unit)

It consists of the call:

POST https://{{host}}/gateway/api/admin/hermes/notification

It is mandatory to filter by at least one variable; otherwise we will receive a 400 bad request error.

For this endpoint it is recommended to include the “x-language” header, since notifications always contain translated values.

Send a notification

Allows sending a notification to a user or any role with the desired parameters.

The call is made:

POST https://{{host}}/gateway/api/admin/hermes/send

The request body is as follows:

JSON
{
    "senderUser": "maria.gonzalez",
    "moduleType": "DC",
    "notificationReceiverType": "USER",
    "notificationType": "NOTICE",
    "read": false,
    "severity": "HIGH",
    "typeObject": "ENTITY",
    "subtypeObject": "DATASET",
    "idObject": 2247,
    "redirectionType": "OBJECT",
    "objectName": "",
    "objectVersion": "0",
    "organizationalUnit": "SPA/Finance",
    "idNotification": 7,
    "execution": null,
    "task": "",
    "creationDate": "2023-11-30T17:09:00.000Z",
    "endDate": null,
    "receiverUser": "maria.gonzalez",
    "receiverRole": null,
    "messageKey": "NOTIFICATION.7.DC.USER",
    "messageParams": null
}

Below, each variable is explained:

  • senderUser User who sends the notification

  • moduleType Notification module. Possible values: ALL, DC, and BG

  • notificationReceiverType Receiver type. Possible values: USER and ROLE

  • notificationType Notification type. Possible values: NOTICE, ALERT, and ADMIN_ALERT.

  • read Indicates whether the notification has been read

  • severity Notification importance. Possible values: LOW, MEDIUM, and HIGH

  • typeObject Object type. Possible values: ENTITY and RELATIONSHIP

  • subtypeObject Object subtype. E.g.: DATASET, DSA, INSTANCE… or client-specific subtypes defined in the ObjectSubType table

  • idObject Internal object ID

  • redirectionType notification redirection type

  • objectName Object name

  • objectVersion Object version

  • organizationalUnit Organizational Unit

  • idNotification Identifier of the notification defined in the Notification table.

  • execution Workflow identifier if it is a notification associated with an execution.

  • task Name of the task related to the notification

  • creationDate Notification creation date

  • endDate Notification end date

  • receiverUser User who receives the notification if the notification's notificationReceiverType is USER

  • receiverRole User who receives the notification if the notification's notificationReceiverType is ROLE

  • messageKey Translation key for the notification message

  • messageParams Map of notification variables that will be replaced by their corresponding value in the messageKey translation.