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

Delete Email Notification Configurations

Request

-> Delete email notification configurations by their IDs. This operation will delete all configurations that are found and that the user has access to.

Security
oAuth2
Bodyapplication/jsonrequired
emailNotificationConfigurationsArray of objects(EmailNotificationConfigurationDelete)required

List of email notification configurations to be deleted.

emailNotificationConfigurations[].​idstringrequired

Unique identifier of a notification configuration.

Example: "5c5356588c72a028c448adbd"
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations/delete \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "emailNotificationConfigurations": [
      {
        "id": "5c5356588c72a028c448adbd"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
emailNotificationConfigurationsArray of objects(EmailNotificationConfigurationDeleteResult)

List of email notification configurations that were deleted.

Response
application/json
{ "emailNotificationConfigurations": [ {} ] }

List Email Notification Configurations

Request

-> List email notification configurations. This operation allows users to retrieve a list of email notification configurations based on specified filters, such as workspace IDs, notification type technical keys, and notification configuration IDs. The operation supports pagination and filtering of various parameters.

Security
oAuth2
Query
startAfterstring

Pagination cursor, which should be filled with nextStartAfter value provided in the previous page read response.

Example: startAfter=5c5356588c72a028c448adbd
limitinteger(int32)>= 1

Number of items to be returned on the page.

Default 500
Example: limit=500
workspaceIdsArray of strings(WorkspaceId)

Workspace IDs, which are to be filtered. By default, workspaceId from context is retrieved.

Example: workspaceIds=c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
notificationTypeTechnicalKeysArray of strings(NotificationTypeTechnicalKeyEnum)

Notification type technical keys.

Items Enum"BRIEFING""DATA_QUALITY_SUMMARY""FRAUD_ALERT"
Example: notificationTypeTechnicalKeys=BRIEFING
notificationConfigurationIdsArray of strings(NotificationConfigurationId)<= 50 items

IDs of notification configurations to read.

Example: notificationConfigurationIds=5c5356588c72a028c448adbd
featuresOnArray of strings(EmailNotificationConfigurationReadFeatureParam)

-> List of features to enable. * FETCH_CLIENT_ID - fetches client ID for each configuration * READ_ALL_OF_TYPE - reads all configurations of provided types. Ignores workspaceIds and notificationConfigurationIds filters. * READ_ALL - reads all configurations. Ignores workspaceIds and notificationConfigurationIds filters.

Example: featuresOn=FETCH_CLIENT_ID
curl -i -X GET \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
limitinteger(Limit)

Number of items per page.

Example: "100"
startAfterstring(StartAfter)

The ID which is used to read the page.

Example: "5712566172571652"
nextStartAfterstring(NextStartAfter)

Provides a value to be used as a startAfter in next page request.

Example: "5712566172571652"
totalinteger(PageTotal)

Total number of items which can be paged.

Example: "67"
valuesArray of objects(EmailNotificationConfigurationsSearchResult)

List of email notification configurations.

Response
application/json
{ "limit": "100", "startAfter": "5712566172571652", "nextStartAfter": "5712566172571652", "total": "67", "values": [ {} ] }

Create Email Notification Configuration

Request

Create a new email notification configuration that defines recipients to which notifications will be sent. If the recipient is specified, it must have either userId or firstName/lastName filled out. It can't have both userId and firstName/lastName filled out.

Security
oAuth2
Bodyapplication/jsonrequired
notificationTypeobject(NotificationTypeParam)

Parameter for a notification type.

workspaceIdstring(WorkspaceId)required

Uniquely identifying ID of the workspace.

Example: "c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4"
namestring(NotificationConfigurationName)<= 50 characters

Name of a notification configuration.

Example: "Briefing Notification Configuration"
descriptionstring(NotificationConfigurationDescription)<= 200 characters

Description of a notification configuration.

Example: "This configuration sends a briefing notification to all users."
recipientsArray of objects(Recipient)

List of recipients to which the notification will be sent.

activeboolean

Flag indicating whether the configuration is active.

Default true
Example: "true"
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "notificationType": {
      "technicalKey": "BRIEFING"
    },
    "workspaceId": "c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4",
    "name": "Briefing Notification Configuration",
    "description": "This configuration sends a briefing notification to all users.",
    "recipients": [
      {
        "userId": "johndoe",
        "email": "developer@cdq.pl",
        "firstName": "John",
        "lastName": "Doe"
      }
    ],
    "active": "true"
  }'

Responses

OK

Bodyapplication/json
emailNotificationConfigurationobject(EmailNotificationConfiguration)

Configuration for email notifications.

Response
application/json
{ "emailNotificationConfiguration": { "id": "5c5356588c72a028c448adbd", "notificationType": {}, "name": "Briefing Notification Configuration", "description": "This configuration sends a briefing notification to all users.", "recipients": [], "active": "true" } }

Update Email Notification Configuration

Request

Update email notification configuration, null values will not overwrite existing data. In order to modify recipients use these endpoints: * Adding recipient * Removing recipient

Security
oAuth2
Path
idstringrequired

Unique ID of an email notification configuration.

Example: 5c5356588c72a028c448adbd
Bodyapplication/jsonrequired
notificationTypeobject(NotificationTypeParam)

Parameter for a notification type.

namestring(NotificationConfigurationName)<= 50 characters

Name of a notification configuration.

Example: "Briefing Notification Configuration"
descriptionstring(NotificationConfigurationDescription)<= 200 characters

Description of a notification configuration.

Example: "This configuration sends a briefing notification to all users."
activeboolean

Flag indicating whether the configuration is active.

Example: "true"
curl -i -X PATCH \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations/5c5356588c72a028c448adbd \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "notificationType": {
      "technicalKey": "BRIEFING"
    },
    "name": "Briefing Notification Configuration",
    "description": "This configuration sends a briefing notification to all users.",
    "active": "true"
  }'

Responses

OK

Bodyapplication/json
emailNotificationConfigurationobject(EmailNotificationConfigurationsSearchResult)

Search result for email notification configurations.

statusstring(EmailNotificationConfigurationUpdateResultStatus)

Status of the update operation.

  • OK - Configuration has been updated
Example: "OK"
Response
application/json
{ "emailNotificationConfiguration": { "id": "5c5356588c72a028c448adbd", "workspaceId": "c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4", "organizationId": "cdq_monitor", "notificationType": {}, "name": "Briefing Notification Configuration", "description": "This configuration sends a briefing notification to all users.", "active": "true", "clientId": "12345678-1234-5678-1234-567812345678", "createdAt": "2020-08-31T16:47+00:00", "createdBy": "76248934691294444", "modifiedBy": "76248934691294444", "modifiedAt": "2020-08-31T16:47+00:00" }, "status": "OK" }

List Email Notification Configuration Recipients

Request

List recipients of the specified email notification configuration.

Security
oAuth2
Path
idstringrequired

Unique ID of an email notification configuration.

Example: 5c5356588c72a028c448adbd
Query
startAfterstring

Pagination cursor, which should be filled with nextStartAfter value provided in the previous page read response.

Example: startAfter=5c5356588c72a028c448adbd
limitinteger(int32)>= 1

Number of items to be returned on the page.

Default 500
Example: limit=500
curl -i -X GET \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations/5c5356588c72a028c448adbd/recipients \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
limitinteger(Limit)

Number of items per page.

Example: "100"
startAfterstring(StartAfter)

The ID which is used to read the page.

Example: "5712566172571652"
nextStartAfterstring(NextStartAfter)

Provides a value to be used as a startAfter in next page request.

Example: "5712566172571652"
totalinteger(PageTotal)

Total number of items which can be paged.

Example: "67"
valuesArray of objects(RecipientSearchResult)

List of recipients.

Response
application/json
{ "limit": "100", "startAfter": "5712566172571652", "nextStartAfter": "5712566172571652", "total": "67", "values": [ {} ] }

Add Email Notification Configuration Recipient

Request

Adds recipient to the specified email notification configuration. Recipient must have either userId or firstName/lastName filled out. It can't have both userId and firstName/lastName filled out.

Security
oAuth2
Path
idstringrequired

Unique ID of an email notification configuration.

Example: 5c5356588c72a028c448adbd
Bodyapplication/jsonrequired
userIdstring(UserId)

Unique ID of a user.

Example: "johndoe"
emailstring(Email)required

Email address of a recipient. Must follow RFC 5322 email address conventions.

Example: "developer@cdq.pl"
firstNamestring(UserFirstName)

First name of a user.

Example: "John"
lastNamestring(UserLastName)

Last name of a user.

Example: "Doe"
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations/5c5356588c72a028c448adbd/recipients \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "johndoe",
    "email": "developer@cdq.pl",
    "firstName": "John",
    "lastName": "Doe"
  }'

Responses

OK

Bodyapplication/json
recipientobject(Recipient)

Recipient of an email notification.

statusstring(RecipientCreateResultStatus)

Status of the creation operation.

  • OK - The email has been added to email notification configuration
Example: "OK"
Response
application/json
{ "recipient": { "userId": "johndoe", "email": "developer@cdq.pl", "firstName": "John", "lastName": "Doe" }, "status": "OK" }

Delete Email Notification Configuration Recipients

Request

Delete specified recipients from the specified email notification configuration.

Security
oAuth2
Path
idstringrequired

Unique ID of an email notification configuration.

Example: 5c5356588c72a028c448adbd
Bodyapplication/jsonrequired
recipientsArray of objects(RecipientDelete)required

List of recipients to be deleted.

recipients[].​emailstring(Email)required

Email address of a recipient. Must follow RFC 5322 email address conventions.

Example: "developer@cdq.pl"
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/notifications-api/api-v1/emailnotificationconfigurations/5c5356588c72a028c448adbd/recipients/delete \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "recipients": [
      {
        "email": "developer@cdq.pl"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
recipientsArray of objects(RecipientDeleteResult)

List of recipients that were deleted.

Response
application/json
{ "recipients": [ {} ] }

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