Notifications API
Note
Version: 1.0.0
Base URL:https://next.itrslab.com/notifications/api
The Notifications API provides endpoints to manage notifications and notification targets within the ITRS Analytics platform. You can create, update, delete, and retrieve notifications and their associated targets through this REST API.
The Notifications API is organized around two main resources:
- Notifications: Configure notification rules, conditions, triggers, and payloads
- Notification Targets: Define connection settings for external services (Slack, Email, and ServiceNow.)
Notifications API endpoints Copied
Get All Notifications Copied
GET /v1/notifications
Returns a list of all configured notifications.
Response Copied
Status Code: 200 OK
{
"notifications": [
{
"id": "string",
"version": "string",
"notification": {
"name": "string",
"description": "string",
"conditions": {
"comparison": {
"namespace": "",
"name": "string",
"operator": "EQUALS",
"value": "string",
"matchOn": "ANY"
}
},
"groupBy": ["string"],
"disabled": false,
"triggers": {
"onCritical": "60s",
"onWarning": "300s",
"onClear": "300s",
"reminder": "3600s"
},
"payloads": {
"onTriggered": {
"title": "${severity} | ${date} | ${time}",
"body": "Entity with dimensions ${dimensions} has been triggered!"
}
}
}
}
]
}
Create Notification Copied
POST /v1/notifications
Creates a new notification.
Request Body Copied
Parameter | Type | Required | Description |
---|---|---|---|
notification | Notification | Yes | The notification configuration to create |
{
"notification": {
"name": "Critical System Alert",
"description": "Alerts for critical system issues",
"conditions": {
"comparison": {
"name": "severity",
"operator": "EQUALS",
"value": "critical",
"matchOn": "ATTRIBUTE"
}
},
"triggers": {
"onCritical": "60s"
},
"payloads": {
"onTriggered": {
"title": "Critical Alert: ${entity}",
"body": "Critical issue detected on ${entity}"
}
},
"targets": {
"email": {
"emailRecipients": ["admin@company.com"]
}
}
}
}
Response Copied
Status Code: 200 OK
{
"id": "12345",
"version": "1",
"notification": {
"name": "Critical System Alert",
"description": "Alerts for critical system issues",
"disabled": false,
"triggers": {
"onCritical": "60s"
}
}
}
Update Notification Copied
PUT /v1/notifications
Updates an existing notification.
Request Body Copied
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The notification ID |
version | string | Yes | The current version of the notification |
notification | Notification | Yes | The updated notification configuration |
{
"id": "12345",
"version": "1",
"notification": {
"name": "Updated Critical System Alert",
"description": "Updated alerts for critical system issues",
"disabled": false,
"triggers": {
"onCritical": "30s"
},
"payloads": {
"onTriggered": {
"title": "Updated Critical Alert: ${entity}",
"body": "Updated critical issue detected on ${entity}"
}
}
}
}
Response Copied
Status Code: 200 OK
{
"id": "12345",
"version": "2",
"notification": {
"name": "Updated Critical System Alert",
"description": "Updated alerts for critical system issues",
"disabled": false
}
}
Delete Notification Copied
DELETE /v1/notifications/{id}
Deletes a notification.
Path Parameters Copied
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The notification ID |
Query Parameters Copied
Parameter | Type | Required | Description |
---|---|---|---|
version | string | No | The notification version |
Response Copied
Status Code: 200 OK
{}
Notification Targets Copied
Get All Notification Targets Copied
GET /v1/notifications/targets
Returns a list of all notification targets.
Response Copied
Status Code: 200 OK
{
"targets": [
{
"id": "string",
"version": "string",
"target": {
"name": "string",
"description": "string",
"disabled": false,
"settings": {
"slack": {
"channelId": "C1234567890",
"apiToken": "xoxb-..."
}
}
}
}
]
}
Create Notification Target Copied
POST /v1/notifications/targets
Creates a new notification target.
Request Body Copied
Parameter | Type | Required | Description |
---|---|---|---|
target | NotificationTarget | Yes | The notification target to create |
{
"target": {
"name": "Slack Operations Channel",
"description": "Notifications to operations Slack channel",
"disabled": false,
"settings": {
"slack": {
"channelId": "C1234567890",
"apiToken": "xoxb-your-slack-token"
}
}
}
}
Response Copied
Status Code: 200 OK
{
"id": "target123",
"version": "1",
"target": {
"name": "Slack Operations Channel",
"description": "Notifications to operations Slack channel",
"disabled": false,
"settings": {
"slack": {
"channelId": "C1234567890",
"apiToken": "xoxb-your-slack-token"
}
}
}
}
Update Notification Target Copied
PUT /v1/notifications/targets
Updates an existing notification target.
Request Body Copied
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The target ID |
version | string | Yes | The current version of the target |
target | NotificationTarget | Yes | The updated target configuration |
{
"id": "target123",
"version": "1",
"target": {
"name": "Updated Slack Operations Channel",
"description": "Updated notifications to operations Slack channel",
"disabled": false,
"settings": {
"slack": {
"channelId": "C1234567890",
"apiToken": "xoxb-updated-slack-token"
}
}
}
}
Response Copied
Status Code: 200 OK
{
"id": "target123",
"version": "2",
"target": {
"name": "Updated Slack Operations Channel",
"description": "Updated notifications to operations Slack channel",
"disabled": false
}
}
Delete Notification Target Copied
DELETE /v1/notifications/targets/{id}
Deletes a notification target.
Path Parameters Copied
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The unique numeric identifier of the target |
Query Parameters Copied
Parameter | Type | Required | Description |
---|---|---|---|
version | string | No | The updated version of the target |
Response Copied
Status Code: 200 OK
{}
Supported Integration Types Copied
The Notifications API supports the following target types:
Email Settings Copied
- SMTP Host — SMTP server hostname.
- SMTP Port— SMTP server port number.
- TLS Mode— Security mode (NONE, TLS, STARTTLS).
- Authentication— Basic authentication with username/password.
- Email Recipients— List of email addresses.
Slack Settings Copied
- Channel ID— Slack channel ID (for example, C1234567890).
- API Token— Slack bot token (for example, xoxb-…).
- Reply to Thread— Whether to reply in threads for subsequent notifications.
Microsoft Teams Settings Copied
- URL— Teams Workflow URL.
ServiceNow Settings Copied
- Instance— ServiceNow instance name.
- Incident Table— Table name for incidents (defaults to ‘incident’).
- Authentication— Basic or OAuth 2.0 authentication.
- Table Field Overrides— Custom field mappings.
Webhook Settings Copied
- URL— Webhook endpoint URL.
- HTTP Method— POST or PUT (defaults to POST).
- Authentication— Optional basic authentication.
- Content Type— JSON or YAML format.
- Batch Size— Number of notifications per batch (defaults to 1).
Notification Triggers Copied
Notifications can be configured with the following triggers:
Trigger | Description | Default Duration |
---|---|---|
onCritical | Triggers when entity has critical severity | 60s |
onWarning | Triggers when entity has warning severity | 300s |
onClear | Triggers when entity severity is cleared | 300s |
reminder | Sends reminder for continuous triggers | 3600s |
Template Variables Copied
Notification payloads support template variables for dynamic content:
${severity}
— Current severity level.${date}
— Current date.${time}
— Current time.${entity}
— Entity name.${dimensions}
— Entity dimensions.- Other entity attributes and dimensions can be referenced by name.
Schemas Copied
This section describes the data structures used in the Notifications API.
ArrayComparisonPredicate Copied
Compares an entity attribute to an array of values.
Property | Type | Required | Description |
---|---|---|---|
namespace | string | No | Namespace for the attribute |
name | string | Yes | Attribute name |
operator | string | Yes | Comparison operator: “EQUALS” or “NOT_EQUALS” |
values | array[string] | Yes | Array of values to compare against |
BasicAuth Copied
Basic authentication credentials.
Property | Type | Required | Description |
---|---|---|---|
username | string | Yes | Username for authentication |
password | string | Yes | Password for authentication |
BooleanExpression Copied
Logically combines other expressions using AND/OR operators.
Property | Type | Required | Description |
---|---|---|---|
left | Expression | Yes | Left expression operand |
operator | string | Yes | Logical operator: “AND” or “OR” |
right | Expression | Yes | Right expression operand |
ComparisonPredicate Copied
Compares an entity dimension or attribute to a single specified value.
Property | Type | Required | Description |
---|---|---|---|
namespace | string | No | Namespace for the attribute |
name | string | Yes | Attribute/dimension name |
operator | string | Yes | Comparison operator: “EQUALS”, “NOT_EQUALS”, “GREATER_THAN_OR_EQUAL”, “GREATER_THAN”, “LESS_THAN_OR_EQUAL”, “LESS_THAN” |
value | string | Yes | Value to compare against |
matchOn | string | Yes | Entity value type: “ANY”, “DIMENSION”, “ATTRIBUTE” |
CreateNotificationRequest Copied
Request to create a new notification.
Property | Type | Required | Description |
---|---|---|---|
notification | Notification | Yes | The notification configuration to create |
CreateNotificationResponse Copied
Response containing the created notification.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The notification ID |
version | string | Yes | The notification version |
notification | Notification | Yes | The created notification |
CreateTargetRequest Copied
Request to create a new notification target.
Property | Type | Required | Description |
---|---|---|---|
target | NotificationTarget | Yes | The notification target to create |
CreateTargetResponse Copied
Response containing the created notification target.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The unique identifier of the target |
version | string | Yes | The version of the target |
target | NotificationTarget | Yes | The created target |
DeleteNotificationResponse Copied
Response for notification deletion (empty response).
Property | Type | Required | Description |
---|
DeleteTargetResponse Copied
Response for target deletion (empty response).
Property | Type | Required | Description |
---|
EmailSettings Copied
Configuration for email notification delivery.
Property | Type | Required | Description |
---|---|---|---|
smtpHost | string | Yes | SMTP server hostname |
smtpPort | integer | Yes | SMTP server port |
tlsMode | string | Yes | TLS mode: “NONE”, “TLS”, “STARTTLS” (defaults to “STARTTLS”) |
basic | BasicAuth | No | Basic authentication credentials |
emailSender | string | Yes | Email address to send notifications from |
skipHostVerification | boolean | No | Whether to skip SSL/TLS certificate verification (defaults to false) |
serverCertificate | string | No | Server certificate for verification |
EmailTarget Copied
Notification-specific settings for email targets within a notification.
Property | Type | Required | Description |
---|---|---|---|
emailRecipients | array[string] | Yes | List of email addresses to send notifications to |
ExistencePredicate Copied
Tests whether an entity has a dimension or attribute, regardless of value.
Property | Type | Required | Description |
---|---|---|---|
namespace | string | No | Namespace for the attribute |
name | string | Yes | Attribute/dimension name |
operator | string | Yes | Existence operator: “EXISTS” or “NOT_EXISTS” |
matchOn | string | Yes | Entity value type: “ANY”, “DIMENSION”, “ATTRIBUTE” |
Expression Copied
Represents a boolean condition to be evaluated against an entity. Used for filtering notifications.
Property | Type | Required | Description |
---|---|---|---|
boolean | BooleanExpression | No | Logical combination of other expressions |
comparison | ComparisonPredicate | No | Compare entity dimension/attribute to single value |
arrayComparison | ArrayComparisonPredicate | No | Compare entity attribute to array of values |
existence | ExistencePredicate | No | Test if entity has dimension/attribute |
set | SetPredicate | No | Compare entity dimension/attribute against set of values |
GetNotificationsResponse Copied
Response containing all configured notifications.
Property | Type | Required | Description |
---|---|---|---|
notifications | array[WrappedNotification] | Yes | List of all configured notifications |
GetTargetsResponse Copied
Response containing all notification targets.
Property | Type | Required | Description |
---|---|---|---|
targets | array[WrappedNotificationTarget] | Yes | List of all notification targets |
IncidentTableField Copied
ServiceNow incident table field override configuration.
Property | Type | Required | Description |
---|---|---|---|
id | string | No | Unique identifier for the field |
key | string | Yes | Table field key |
value | string | Yes | Table field value |
Notification Copied
Represents a notification configuration with conditions, triggers, and payloads.
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the notification |
description | string | No | Longer description for the notification |
conditions | Expression | No | Expression that limits notification scope to matching entities |
groupBy | array[string] | No | List of attribute names or dimension keys to group by |
disabled | boolean | No | Whether the notification is disabled (defaults to false) |
triggers | NotificationTargetTriggers | Yes | Notification triggers configuration |
payloads | NotificationTargetPayloads | Yes | Notification payloads for different trigger types |
targets | Notification_Targets | No | Notification target type and settings |
NotificationTarget Copied
Defines connection settings for external notification services.
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Descriptive name for the target |
description | string | No | Longer description for the target |
disabled | boolean | No | Whether the target is disabled (defaults to false) |
settings | NotificationTargetSettings | Yes | Integration-specific connection settings |
NotificationTargetPayload Copied
Defines the content structure for notification messages.
Property | Type | Required | Description |
---|---|---|---|
title | string | Yes | Short description (max 100 chars) used as email subject, ticket title, or push notification payload. Supports template variables |
body | string | Yes | Main notification content. Supports template variables |
NotificationTargetPayloads Copied
Contains payload templates for different notification trigger types.
Property | Type | Required | Description |
---|---|---|---|
onTriggered | NotificationTargetPayload | Conditional | Required if on_critical or on_warning triggers are set |
onReminder | NotificationTargetPayload | Conditional | Required if reminder trigger is set |
onClear | NotificationTargetPayload | Conditional | Required if on_clear trigger is set |
NotificationTargetSettings Copied
Contains integration-specific connection settings. Only one integration type should be specified.
Property | Type | Required | Description |
---|---|---|---|
slack | SlackSettings | No | Slack integration settings |
webhook | WebhookSettings | No | Webhook integration settings |
serviceNow | ServiceNowSettings | No | ServiceNow integration settings |
teams | TeamsSettings | No | Microsoft Teams integration settings |
EmailSettings | No | Email integration settings |
NotificationTargetTriggers Copied
Configures when notifications should be triggered based on entity severity states.
Property | Type | Required | Description |
---|---|---|---|
onCritical | string | No | Triggers if entity has critical severity for specified duration (default: 60s) |
onWarning | string | No | Triggers if entity has warning severity for specified duration (default: 300s) |
onClear | string | No | Triggers if entity severity is cleared and stays clear for specified duration (default: 300s) |
reminder | string | No | Send reminder if triggered continuously for specified duration (default: 3600s) |
Duration Format: Duration strings follow the pattern ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
(e.g., “60s”, “300s”, “3600s”).
Notification_Targets Copied
Notification target type and notification-specific settings.
Property | Type | Required | Description |
---|---|---|---|
slack | SlackTarget | No | Slack-specific settings |
webhook | WebhookTarget | No | Webhook-specific settings |
serviceNow | ServiceNowTarget | No | ServiceNow-specific settings |
teams | TeamsTarget | No | Microsoft Teams-specific settings |
EmailTarget | No | Email-specific settings | |
targetIds | array[string] | No | List of notification target IDs |
OAuth Copied
OAuth 2.0 authentication credentials using password grant.
Property | Type | Required | Description |
---|---|---|---|
username | string | Yes | User’s username |
password | string | Yes | User’s password |
clientId | string | Yes | OAuth client identifier |
clientSecret | string | Yes | OAuth client secret |
ServiceNowSettings Copied
Configuration for ServiceNow integration.
Property | Type | Required | Description |
---|---|---|---|
instance | string | Yes | ServiceNow instance name |
incidentTable | string | No | Incident table name (defaults to ‘incident’) |
basic | BasicAuth | No | Basic authentication credentials |
oauth | OAuth | No | OAuth 2.0 authentication credentials |
incidentTableFields | array[IncidentTableField] | No | Incident table field overrides |
ServiceNowTarget Copied
Notification-specific settings for ServiceNow targets within a notification.
Property | Type | Required | Description |
---|
SetPredicate Copied
Compares an entity dimension or attribute value against a set of specified values.
Property | Type | Required | Description |
---|---|---|---|
namespace | string | No | Namespace for the attribute |
name | string | Yes | Attribute/dimension name |
operator | string | Yes | Set operator: “IN” or “NOT_IN” |
values | array[string] | Yes | Set of values to compare against |
matchOn | string | Yes | Entity value type: “ANY”, “DIMENSION”, “ATTRIBUTE” |
SlackSettings Copied
Configuration for Slack notification delivery.
Property | Type | Required | Description |
---|---|---|---|
channelId | string | Yes | Slack channel ID |
apiToken | string | Yes | Slack API token |
SlackTarget Copied
Notification-specific settings for Slack targets within a notification.
Property | Type | Required | Description |
---|---|---|---|
replyToThread | boolean | Yes | Whether to reply in threads for subsequent notifications |
TeamsSettings Copied
Configuration for Microsoft Teams notification delivery.
Property | Type | Required | Description |
---|---|---|---|
url | string | Yes | Teams Workflow URL |
TeamsTarget Copied
Notification-specific settings for Microsoft Teams targets within a notification.
Property | Type | Required | Description |
---|
UpdateNotificationRequest Copied
Request to update an existing notification.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The notification ID |
version | string | Yes | The current version of the notification |
notification | Notification | Yes | The updated notification configuration |
UpdateNotificationResponse Copied
Response containing the updated notification.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The notification ID |
version | string | Yes | The updated notification version |
notification | Notification | Yes | The updated notification |
UpdateTargetRequest Copied
Request to update an existing notification target.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The target ID |
version | string | Yes | The current version of the target |
target | NotificationTarget | Yes | The updated target configuration |
UpdateTargetResponse Copied
Response containing the updated notification target.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The target ID |
version | string | Yes | The updated target version |
target | NotificationTarget | Yes | The updated target |
WebhookSettings Copied
Configuration for webhook notification delivery.
Property | Type | Required | Description |
---|---|---|---|
url | string | Yes | Webhook endpoint URL |
basic | BasicAuth | No | Basic authentication credentials |
method | string | No | HTTP method: “POST” or “PUT” (defaults to “POST”) |
batchSize | integer | No | Batch size for notifications (defaults to 1) |
WebhookTarget Copied
Notification-specific settings for webhook targets within a notification.
Property | Type | Required | Description |
---|---|---|---|
contentType | string | No | Content type: “JSON” or “YAML” (defaults to “JSON”) |
WrappedNotification Copied
Container for notification with metadata.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The notification ID |
version | string | Yes | The notification version |
notification | Notification | Yes | The notification configuration |
WrappedNotificationTarget Copied
Container for notification target with metadata.
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | The unique identifier of the target |
version | string | Yes | The version of the target |
target | NotificationTarget | Yes | The notification target configuration |