Skip to content

Notifications API (1)

This API enables notifications and related configuration

Languages
Servers
Mock server

https://idp.cdq.com/_mock/apis/notifications-api/api-v1/

Production SOAP

https://notifications-api.reverse-proxy.prod.k8s.production.cdq-cloud-engine.com/soap/v1/

Production

https://notifications-api.reverse-proxy.prod.k8s.production.cdq-cloud-engine.com/

Notifications

-> Includes functionalities for creating, updating, deleting, and listing notification configurations, as well as sending notifications. The operations under this tag are designed to support various types of notifications, including email notifications and webhook notifications, thereby enabling a flexible and comprehensive notification system.

Email Notification Configurations

-> Defines a set of operations focused on the management of email notification configurations within the system. These operations encompass the creation, deletion, updating, and listing of email notification configurations, facilitating a comprehensive approach to handling how notifications are configured and managed.

Operations

Notifications Sending

-> Encompasses operations dedicated to the sending of notifications, specifically focusing on test notifications. This tag includes endpoints for sending test emails and test briefing notifications, allowing developers and system administrators to validate the content and delivery mechanisms of notifications before they're deployed in a live environment.

Operations

Send Test Emails

Request

Send test emails filled with specified data.

Security
oAuth2
Bodyapplication/jsonrequired
notificationTypeobject(NotificationTypeParam)required

Parameter for a notification type.

notificationType.​technicalKeystring(NotificationTypeTechnicalKeyEnum)required

Notification type technical key.

Enum"BRIEFING""DATA_QUALITY_SUMMARY""FRAUD_ALERT"
Example: "BRIEFING"
templatestring(EmailTemplateName)required

Name of a template.

Example: "Template name"
contentArray of objects(KeyValue)

Content to be replaced in the email template.

imagesArray of objects(ImageParameters)

Images to be replaced in the email template.

attachmentsArray of objects(Attachment)

Attachments to be added to the email.

recipientFilterobject(RecipientFilter)

Filter for recipients.

curl -i -X POST \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/sendTestEmail \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "notificationType": {
      "technicalKey": "BRIEFING"
    },
    "template": "Template name",
    "content": [
      {
        "key": "CLIENT_NAME",
        "value": "CDQ"
      }
    ],
    "images": [
      {
        "key": "OVERLAP_RATIO",
        "chartId": "overlap_ratio",
        "format": "png",
        "width": "800",
        "height": "600",
        "scale": "1.0",
        "timeRangeStart": "YESTERDAY",
        "timeRangeEnd": "YESTERDAY"
      }
    ],
    "attachments": [
      {
        "url": "customer-upload/user/file.xlsx",
        "name": "Attachment name",
        "mimeType": "application/pdf",
        "ticket": "Report.zip",
        "jobId": "74c218a6403d11efb237cea02f68292d",
        "downloadService": "FILES_API"
      }
    ],
    "recipientFilter": {
      "notificationConfigurationIds": [
        "5c5356588c72a028c448adbd"
      ],
      "recipients": [
        {
          "userId": "johndoe",
          "email": "developer@cdq.pl",
          "firstName": "John",
          "lastName": "Doe"
        }
      ]
    }
  }'

Responses

OK

Response
No content

Send Test Briefing Notification

Request

Sends briefing notification for the given workspace. Can be used to send briefing email to specified recipients or to all users specified in the notification configuration.

Security
oAuth2
Bodyapplication/jsonrequired
workspaceIdstring(WorkspaceId)required

Uniquely identifying ID of the workspace.

Example: "c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4"
notificationConfigurationIdsArray of strings(NotificationConfigurationId)

IDs of notification configurations for which the briefing notification should be sent. If left empty then all briefing notification configurations assigned to the specified workspace will be used.

Example: ["5c5356588c72a028c448adbd"]
recipientsArray of objects(Recipient)

Recipients for whom the briefing notification should be sent.

featuresOnArray of strings(TestBriefingNotificationFeatureEnum)

List of features to be activated.

Items Enum ValueDescription
SEND_TO_NOTIFICATION_CONFIGURATIONS_RECIPIENTS

Allows to send briefing notification to all recipients specified in the notification configurations assigned to provided workspace.

ENABLE_SENDING_OUTSIDE_CDQ

Allows to send briefing notification to recipients whose email addresses do not end with cdq.com or cdq.ch.

Example: ["SEND_TO_NOTIFICATION_CONFIGURATIONS_RECIPIENTS"]
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/sendTestBriefingNotification \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "workspaceId": "c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4",
    "notificationConfigurationIds": [
      "5c5356588c72a028c448adbd"
    ],
    "recipients": [
      {
        "userId": "johndoe",
        "email": "developer@cdq.pl",
        "firstName": "John",
        "lastName": "Doe"
      }
    ],
    "featuresOn": [
      "SEND_TO_NOTIFICATION_CONFIGURATIONS_RECIPIENTS"
    ]
  }'

Responses

OK

Response
No content