Notification Service (3.1.0)

Download OpenAPI specification:Download

This spec defines the API provided by the Notification Service.

Authentication

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Subscriber

getSubscribers

Get all the subscribers from the notification service.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getSubscriber

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

Authorizations:
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:
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:
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 ip>:<port> and for relp it is <syslog-ip>:<port>

config
required
object

config parameters is a dictionary/ordered map. Valid keys are "username", "password", "insecure", "cacert", "conn-timeout" and "filters". | 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 | | | | | | 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
    Empty list of "filters" indicate no filters and all events will be notified to subscribers.

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:
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": [
    ]
}