Notification Service (3.5.0)

Download OpenAPI specification:Download

This spec defines the API provided by the Notification Service.

Subscriber

getSubscribers

Get all the subscribers from the notification service.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getSubscriber

Get the subscriber from the notification service given subscriber. ID.

Authorizations:
bearerAuth
path Parameters
id
required
integer

ID of the subscriber entry.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "handler": "string",
  • "endpoint": "string",
  • "config": { }
}

deleteSubscriber

Delete the specified subscriber from the notification service.

Authorizations:
bearerAuth
path Parameters
id
required
integer

ID of the subscriber entry to be deleted.

Responses

Response samples

Content type
application/json
{
  • "message": "Subscriber is not found.",
  • "code": 101
}

Register

registerSubscriber

Register subscriber with the notification service.

Authorizations:
bearerAuth
Request Body schema: application/json

Register a new subscriber for notification messages.

handler
required
string

Type of handlers. Valid values are "http" and "relp"

endpoint
required
string

for http it is https://<webhook-ipv4/ipv6/hostname>:<port> and for relp it is <syslog-ipv4/ipv6/hostname>:<port>

config
required
object

config parameters is a dictionary/ordered map. Valid keys are "username", "password", "insecure", "cacert", "conn-timeout" "filters" "device-event" and "minimum-severity".

Valid keys Description Handler types
username username of the webhook/http url http
password password of the webhook/http url http
insecure indicates if the connection is secure or not http & relp
ca-cert CA certificate for secure connection http & relp
filters list of filters based on which selected notifications will be filtered to subscribers http & relp
device-event list of allowed device event notifications http & relp
minimum-severity minimum-severity-value http & relp
conn-timeout connection timeout for http/relp in seconds http & relp
rfc5424 enable RFC5424 message format for syslog relp

Following are the list values for filters:

  • "DEVICE_EVENTS" - Syslog/Raslog generated from devices
  • "APP_EVENTS" - Task or user events generated from the application
  • "APP_ALERTS" - Fault alerts generated from the application
  • "APP_ALARMS" - Fault alarms generated from the application
    Empty list of "filters" indicate no filters and all events will be notified to subscribers.

    Following are the list values for device-event:

  • "raslog" - Raslog log messages
  • "audit-firmware" - Audit log messages of class firmware
  • "audit-security" - Audit log messages of class security
  • "audit-configuration" - Audit log messages of class configuration
    Empty list or inclusion of all types of "device-event" indicates no sub-filter (no device events will be filtered out)

    Following are the possible minimum-severity values:

  • "critical"
  • "error"
  • "warning"
  • "info"
    No minimum-severity or a value of "INFO" indicate no sub-filtering by severity

Responses

Request samples

Content type
application/json
Example
{
  • "handler": "http",
  • "endpoint": "https://10.1.1.1:5000",
  • "configs": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "handler": "string",
  • "endpoint": "string",
  • "config": { }
}

Trouble Shooting

getExecutionList

Get the list of all the requests previously executed.

Authorizations:
bearerAuth
query Parameters
limit
required
integer
Default: 10

Limit the number of executions that will be sent in the response. Default is 10

status
string
Default: "all"

Filter the executions based on the status (failed/succeeded/all).

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}