latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

notification-template-controller

Save notification template (saveNotificationTemplate)

Creates or updates notification template.

Here is an example of template to send notification via Web, SMS and Slack:

{
  "name": "Greetings",
  "notificationType": "GENERAL",
  "configuration": {
    "deliveryMethodsTemplates": {
      "WEB": {
        "enabled": true,
        "subject": "Greetings",
        "body": "Hi there, ${recipientTitle}",
        "additionalConfig": {
          "icon": {
            "enabled": true,
            "icon": "back_hand",
            "color": "#757575"
          },
          "actionButtonConfig": {
            "enabled": false
          }
        },
        "method": "WEB"
      },
      "SMS": {
        "enabled": true,
        "body": "Hi there, ${recipientTitle}",
        "method": "SMS"
      },
      "SLACK": {
        "enabled": true,
        "body": "Hi there, @${recipientTitle}",
        "method": "SLACK"
      }
    }
  }
}

Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.

post/api/notification/template

Request body

createdTimeinteger

Entity creation timestamp in milliseconds since Unix epoch

namestring required
notificationType'GENERAL' | 'ALARM' | 'DEVICE_ACTIVITY' | 'ENTITY_ACTION' | 'ALARM_COMMENT' | 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' | 'ALARM_ASSIGNMENT' | 'NEW_PLATFORM_VERSION' | 'ENTITIES_LIMIT' | 'ENTITIES_LIMIT_INCREASE_REQUEST' | 'API_USAGE_LIMIT' | 'RULE_NODE' | 'RATE_LIMITS' | 'EDGE_CONNECTION' | 'EDGE_COMMUNICATION_FAILURE' | 'TASK_PROCESSING_FAILURE' | 'RESOURCES_SHORTAGE' required

Example request

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "NOTIFICATION_TEMPLATE"
  },
  "createdTime": 1746028547220,
  "tenantId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  }
}

Response

OK

createdTimeinteger

Entity creation timestamp in milliseconds since Unix epoch

namestring required
notificationType'GENERAL' | 'ALARM' | 'DEVICE_ACTIVITY' | 'ENTITY_ACTION' | 'ALARM_COMMENT' | 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' | 'ALARM_ASSIGNMENT' | 'NEW_PLATFORM_VERSION' | 'ENTITIES_LIMIT' | 'ENTITIES_LIMIT_INCREASE_REQUEST' | 'API_USAGE_LIMIT' | 'RULE_NODE' | 'RATE_LIMITS' | 'EDGE_CONNECTION' | 'EDGE_COMMUNICATION_FAILURE' | 'TASK_PROCESSING_FAILURE' | 'RESOURCES_SHORTAGE' required

Example response

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "NOTIFICATION_TEMPLATE"
  },
  "createdTime": 1746028547220,
  "tenantId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  }
}