The REST API provides the following methods to retrieve and modify alerts, as well as component thresholds settings and default settings:

Active Alerts

GET /api/alerts/active

URI

GET /api/alerts/active

Description

Retrieves a list of all active alerts in the Rhapsody engine, including those alerts that have been dismissed by the user but are still considered active by Rhapsody (although they will indicate their dismissed state). Active alerts for specific components (in other words, communication points or routes) are only returned if the user has permission to view the locker that contains them.

Request Header

Accept: application/json, text/html

Accept: application/vnd.orchestral.rhapsody.6_0+json

Request Body

Empty.

Response Status

200 OK - operation successful.

Response Body

The response body has the following data object structure:

    • highestSeverity - [enumerated string] severity of the highest active alert, not including any dismissed alerts (NONE, WARNING, ALARM, ESCALATION).
    • alertCount - [int] number of active alerts.
    • alerts- [array] of alerts:
      • id - [str] alert identifier.
      • alertName - [str] name of alert.
      • alertMnemonic - [enumerated string] type of alert.
      • alertDescription - [str] a description of the alert.
      • state - [enumerated string] alert state (for example ACTIVE, USER_DISMISSED).
      • severity - [enumerated string] severity of the alert (for example WARNING, ALARM, ESCALATION).
      • timestamp - [str] date-time in ISO8601 format.
      • parameters- [array] of runtime parameters generated for this specific alert:
        • id - [str] parameter identifier.
        • value - [str] parameter value.
        • displayName - [str] parameter name.
      • componentInfo - [object] information about the component associated with the alert:
        • id - [str] component identifier or -1 for notifications relating to the system as a whole.
        • name - [str] component name or null for notifications relating to the system as a whole.
        • folderPath - [str] folder path of component or null for notifications relating to web services or the system as a whole.

A response body is returned even if there are no active alerts (alertCount=0, highestSeverity=NONE, alerts=[]), and a 200 OK response is used regardless of which, if any, alerts are returned.

Example - 13 active alerts

Example - no active alerts

Access Rights

'View notifications REST API'.
'View locker'.

GET /api/alerts/active/<id>/state

URI

GET /api/alerts/active/<id>/state

Description

Retrieves the current state of the specified active or user-dismissed alert. Active alerts for specific components (communication points or routes) are only returned if the user has permission to view the locker that contains them.

Request Header

Accept: text/plain

Accept: text/vnd.orchestral.rhapsody.6_0+plain

Request Body

Empty.

Response Status

200 OK - operation successful.

Response Body

Alert state (for example: ACTIVE, USER_DISMISSED).

Access Rights

'View notifications REST API'.
'View locker'.

PUT /api/alerts/active/<id>/state

URI

PUT /api/alerts/active/<id>/state

Description

Allows you to change the state of the specified active (or active but dismissed) alert. Active alerts for specific components, such as communication points or routes, are only changed if the user has permissions to view the locker that contains them. To change system alerts, the change system notification access right is required. This is a compare-and-set operation requiring the caller to provide the current state/severity of the alert, and the desired new state, in order to perform the transition. This is to prevent accidental suppression of an alert whose priority has escalated in the meantime.

This method provides for the following alert state transitions:

    • Dismiss an alert: Active → User Dismissed / Resolved.
    • Reactivate a dismissed alert: User Dismissed → Active.

If you are dismissing a threshold-based alert, then a suspend duration is required to indicate the length of time to suspend the notification for (in other words, how long the measured value remains above the configured threshold before the alert raised again).

Request Header

Accept: application/json
Content-Type: application/json
CSRF Protection Enabled

Accept:application/vnd.orchestral.rhapsody.6_0+json 
Content-Type: application/vnd.orchestral.rhapsody.6_0+json
CSRF Protection Enabled

Request Body

Current severity, action, suspend duration (must be greater than zero), comment (optional), for example:

{"initialSeverity":"ESCALATION", "changeAction":"DISMISS", "suspendMinutes": 4, "comment":"Dismiss for 30 mins while system being restarted."}.
Response Status 204 No Content - operation successful.

Response Body

No value is returned.

Access Rights

'Change notifications REST API'.
'View locker'.
'Change system notifications REST API'.

GET /api/alerts/active/<id>/assignee

URI

GET /api/alerts/active/<id>/assignee

Description Retrieves the assigned user for the specified alert.
Request Header Accept: text/plain
Accept: text/vnd.orchestral.rhapsody.6_4+plain
Request Body Empty.
Response Status 200 OK - operation successful.
204 No Content - operation successful if no user is assigned to the alert.
Response Body The assigned user's username. The response body is blank if no user is assigned to the alert.
Access Rights

'View locker'.
'View notifications REST API'.

PUT /api/alerts/active/<id>/assignee

URI PUT /api/alerts/active/<id>/assignee
Description Assigns a user to the specified alert, overriding any currently assigned user.
Request Header Accept: text/plain
CSRF Protection Enabled
Accept: text/vnd.orchestral.rhapsody.6_4+plain
CSRF Protection Enabled
Request Body The username of the user to assign to the alert.
Response Status 204 No Content - operation successful.
Response Body Empty.
Access Rights 'View locker'.
'Change notifications REST API'.
'Change system notifications REST API'.

GET /api/alerts/unmonitored

URI GET /api/alerts/unmonitored
Description Retrieves the unmonitored component notification settings.
Request Header Accept: application/json
Accept: application/vnd.orchestral.rhapsody.6_4+json
Request Body Empty.
Response Status 200 OK - operation successful.
Response Body

The response body has the following data object structure:

  • resendWarningsPeriod - [number] the resend period for warnings (in minutes).
  • resendAlarmsPeriod - [number] the resend period for alarms after period (in minutes).
  • escalatePeriod - [number] the escalation period (in minutes).
  • notificationRecipients - [array] a list of notification recipients:
    • type - [enumberated string] the recipient type (one of EMAILEVENTLOGSNMPWATCHLIST or USER).
    • value - [string] the type value, either email address, watchlist name or username.
    • notificationLevel - [enumerated value] the level of notifications this recipient should receive (one of WARNINGALARMESCALATION).
Example...
{
  "data":{
    "resendWarningsPeriod":55,
    "resendAlarmsPeriod":45,
    "escalatePeriod":6067,
    "notificationRecipients":[
    {
      "type":"WATCHLIST",
      "value":"watch1",
      "notificationLevel":"WARNING"
    },{
      "type":"USER",
      "value":"Administrator",
      "notificationLevel":"WARNING"
    },{
      "type":"EVENTLOG",
      "value":"",
      "notificationLevel":"ESCALATION"
    },{
      "type":"SNMP",
      "value":"",
      "notificationLevel":"ALARM"
    },{
      "type":"EMAIL",
      "value":"user1@rhapsody.com",
      "notificationLevel":"ALARM"
    }]
  },
  "error":null
}
Access Rights 'View notification settings REST API'

PUT /api/alerts/unmonitored

URI PUT /api/alerts/unmonitored
Description Updates the unmonitored component notification settings.
Request Header Content-Type: application/json
CSRF Protection Enabled
Content-Type: application/vnd.orchestral.rhapsody.6_4+json
CSRF Protection Enabled
Request Body

The request body has the following data object structure:

  • resendWarningsPeriod - [number] the resend period for warnings (in minutes).
  • resendAlarmsPeriod - [number] the resend period for alarms (in minutes).
  • escalatePeriod - [number] the escalation period (in minutes).
  • notificationRecipients - [array] a list of notification recipients:
    • type - [enumberated string] the recipient type (one of EMAILEVENTLOGSNMPWATCHLIST or USER).
    • value - [string] the type value, either email address, watchlist name or username.
    • notificationLevel - [enumerated value] the level of notifications this recipient should receive (one of WARNINGALARMESCALATION).
Example...
{
  "resendWarningsPeriod":55,
  "resendAlarmsPeriod":45,
  "escalatePeriod":6067,
  "notificationRecipients":[
  {
    "type":"WATCHLIST",
    "value":"watch1",
    "notificationLevel":"WARNING"
  },{
    "type":"USER",
    "value":"Administrator",
    "notificationLevel":"WARNING"
  },{
    "type":"EVENTLOG",
    "value":"",
    "notificationLevel":"ESCALATION"
  },{
    "type":"SNMP",
    "value":"",
    "notificationLevel":"ALARM"
  },{
    "type":"EMAIL",
    "value":"user1@rhapsody.com",
    "notificationLevel":"ALARM"
  }]
}
Response Status 204 No Content - operation successful.
Response Body Empty.
Access Rights 'Edit unmonitored component notifications REST API'

PUT /api/alerts/suspend

URI PUT /api/alerts/suspend
Description Suspends or resumes the global notifications.
Request Header Content-Type: application/json
CSRF Protection Enabled
Content-Type: application/vnd.orchestral.rhapsody.6_4+json
CSRF Protection Enabled
Request Body

The request body has the following data object structure:

  • action - [enumerated string] the action to perform (one of SUSPEND or RESUME).
  • duration - [number] the length of time to suspend for, in minutes.
{"action":"SUSPEND", "duration":10}
{"action":"RESUME"}
Response Status 204 No Content - operation successful.
Response Body Empty.
Access Rights 'Suspend/resume global notifications REST API'.

PUT /api/alerts/active/<id>/suspend

URI PUT /api/alerts/active/<id>/suspend
Description Suspends or resumes the notifications for the specified alert.
Request Header Content-Type: application/json
CSRF Protection Enabled
Content-Type: application/vnd.orchestral.rhapsody.6_4+json
CSRF Protection Enabled
Request Body

The request body has the following data object structure:

  • action - [enumerated string] the action to perform (one of SUSPEND or RESUME).
  • duration - [number] the length of time to suspend for, in minutes.
Examples...
{"action":"SUSPEND", "duration":10}
{"action":"RESUME"}
Response Status 204 No Content - operation successful.
Response Body Empty.
Access Rights 'Suspend/resume component and issue notifications REST API'.

Alert Settings

GET /api/alerts/defaultsettings

URI GET /api/alerts/defaultsettings
Description Retrieves the default component threshold settings.
Request Header Accept: application/json
Accept: application/vnd.orchestral.rhapsody.6_4+json
Request Body Empty.
Response Status 200 OK - operation successful.
Response Body

The default component threshold settings response has the following structure:

Example...
{
  "data":[
  {
    "id": 268632067,
    "alertName": "Large Queue",
    "alertMnemonic": "LARGE_ROUTE_QUEUE",
    "enabled": true,
    "parameters": {
      "alarm": {
        "unit": "QUEUE_SIZE",
        "value": 5000
      },
      "warning": {
         "unit": "QUEUE_SIZE",
        "value": 2500
      },
      "type": "BINARY"
    }
  },{
    "id": 134414338,
    "alertName": "Route Started",
    "alertMnemonic": "ROUTE_STARTED",
    "enabled": false,
    "parameters": {
      "severity": "WARNING",
      "type": "UNARY"
    }
  }{...}]
  "error":null
}
Access Rights 'View notification settings REST API'.

PUT /api/alerts/defaultsettings

URI PUT /api/alerts/defaultsettings
Description Modifies the default component threshold settings. Provided issues are updated, all other issue settings remain unmodified.
Request Header Content-Type: application/json 
CSRF Protection Enabled
Content-Type: application/vnd.orchestral.rhapsody.6_4+json
CSRF Protection Enabled
Request Body

The issues to update settings for:

  • data - [array] an array of issues:
    • id - [str] issue identifier.
    • enabled - [boolean] if the issue is enabled or not.
    • parameters - [object] the issue setting parameters:
      • type - [enumerated string] the parameter type (one of UNARYBINARY or TERNARY).
      • severity - [enumerated string] the parameter setting for UNARY types (one of WARNING or ALARM).
      • warning - [object] the warning threshold settings for BINARY and TERNARY types:
        • value - [string] the value of the warning threshold.
      • alarm - [object] the alarm threshold settings for BINARY and TERNARY types:
        • value - [string] the value of the alarm threshold.
      • sharedParam - [object] the shared parameter settings for TERNARY types:
        • value - [string] the value of the shared param threshold.
[
	{"id":52,"enabled":true,"parameters":{"type":"TERNARY","alarm":{"value":45},"warning":{"value":25},"sharedParam":{"value":80}}},
	{"id":49,"enabled":false,"parameters":{"type":"UNARY","severity":"WARNING"}}
]
Response Status 204 No Content - operation successful.
Response Body No value is returned.
Access Rights

'Change notification settings REST API'.

GET /api/alerts/settings

URI

GET /api/alerts/settings

Description Retrieves the system alert settings.
Request Header Accept: application/json
Accept: application/vnd.orchestral.rhapsody.6_2+json
Request Body Empty.
Response Status 200 OK - operation successful.
Response Body

The system alert settings response has the following structure:

Example...
 {
  "data":{
    id: 402718730,
    alertName: "Large Route Queue",
    alertMnemonic: "LARGE_ROUTE_QUEUE_IN_SYSTEM",
    enabled: true,
    parameters: {
      alarm: {
        unit: "QUEUE_SIZE",
        value: 78
      },
      warning: {
        unit: "QUEUE_SIZE",
        value: 334
      },
      type: "BINARY"
    }
  },{
    id: 134479876,
    alertName: "Custom Module Changed",
    alertMnemonic: "CUSTOM_MODULE_CHANGED",
    enabled: false,
    parameters: {
      severity: "WARNING",
      type: "UNARY"
    }
  }{...}
  "error":null
}
Access Rights 'View notification settings REST API'.

PUT /api/alerts/settings

URI PUT /api/alerts/settings
Description Modifies the system alert settings. Provided issues are updated, all other issue settings remain unmodified.
Request Header  Content-Type: application/json 
CSRF Protection Enabled
Content-Type: application/vnd.orchestral.rhapsody.6_2+json
CSRF Protection Enabled
Request Body

The issues to update settings for:

  • data - [array] an array of issues:
    • id - [str] issue identifier.
    • enabled - [boolean] if the issue is enabled or not.
    • parameters - [object] the issue setting parameters:
      • type - [enumerated string] the parameter type (one of UNARYBINARY or TERNARY).
      • severity - [enumerated string] the parameter setting for UNARY types (one of WARNING or ALARM).
      • warning - [object] the warning threshold settings for BINARY and TERNARY types:
        • value - [string] the value of the warning threshold.
      • alarm - [object] the alarm threshold settings for BINARY and TERNARY types:
        • value - [string] the value of the alarm threshold.
      • sharedParam - [object] the shared parameter settings for TERNARY types:
        • value - [string] the value of the shared param threshold.
[
	{"id":52,"enabled":true,"parameters":{"type":"TERNARY","alarm":{"value":45},"warning":{"value":25},"sharedParam":{"value":80}}},
	{"id":49,"enabled":false,"parameters":{"type":"UNARY","severity":"WARNING"}}
]
Response Status 204 No Content - operation successful.
Response Body No value is returned.
Access Rights 'Change notification settings REST API'.

GET /api/alerts/deliverymethods

URI GET /api/alerts/deliverymethods
Description Retrieves the delivery method settings.
Request Header Accept: application/json
Accept: application/vnd.orchestral.rhapsody.6_4+json
Request Body Empty.
Response Status 200 OK - operation successful.
Response Body

The delivery method settings response has the following structure:

Example...
{
  "data":{
    "snmpSettings":{
      "enabled": true,
      "deliveryAddress": "udp:127.0.0.1/162",
      "snmpCommunity": "public"
    },
    "emailSettings":{
      "enabled": true,
      "fromAddress": "a@a.com",
      "server": "aaa",
      "port": 25,
      "sslMode": "SMTP",
      "authenticateEnabled": false,
      "username": null,
      "password": "********",
      "threshold": 10
    },
    "smsSettings":{
      "enabled": false,
      "sendScript":null,
      "availableCarriers":[],
      "threshold": 10
    },
    "pagerSettings":{
      "enabled": false,
      "sendScript": null, 
      "availableCarriers":[],
      "threshold": 10
     }
  },
  "error": null
}
Access Rights 'View notification settings REST API'.

PUT /api/alerts/deliverymethods

URI PUT /api/alerts/deliverymethods
Description Sets the delivery method settings.
Request Content-Type: application/json
CSRF Protection Enabled
Content-Type: application/vnd.orchestral.rhapsody.6_4+json 
CSRF Protection Enabled
Request Body

The delivery method settings request has the following structure:

  • snmpSettings [object] the SNMP settings:
    • enabled - [boolean] true if SNMP delivery is enabled.
    • deliveryAddress - [string] the SNMP delivery address.
    • snmpCommunity - [string] the SNMP community.
  • emailSettings - [object] the Email settings:
    • enabled - [boolean] true if the Email delivery method is enabled
    • fromAddress - [string] the email address emails appear to be sent from.
    • server - [string] the email server.
    • port - [number] the email port.
    • sslMode - [enumerated string] the email server SSL mode: one of SMTP, SMTPS or STARTTLS.
    • authenticateEnabled - [boolean] true if authentication on the email server is enabled.
    • username - [string] the email server username.
    • password - [string] the email server password.
    • floodControl - [number] the maximum number of emails to send with a five-minute window.
  • smsSettings - [object] the SMS settings:
    • enabled - [boolean] true if the SMS delivery method is enabled.
    • sendScript - [string] the SMS JavaScript to generate SMS messages.
    • availableCarriers - [array] the list of SMS carriers.
    • floodControl - [number] the maximum number of SMS messages to send with a five-minute window.
  • pagerSettings - [object] the pager settings:
    • enabled - [boolean] true if the pager delivery method is enabled.
    • sendScript - [string] the pager JavaScript to generate pager messages.
    • availableCarriers - [array] list of pager carriers.
    • floodControl - [number] the maximum number of pager messages to send with a five-minute window.
Example...
{
  "snmpSettings":{
    "enabled": true,
    "deliveryAddress": "udp:127.0.0.1/162",
    "snmpCommunity": "public"
  },
  "emailSettings":{
    "enabled": false,
    "fromAddress": null,
    "server": null,
    "port": 25,
    "sslMode": "SMTP",
    "authenticateEnabled": false,
    "username": null,
    "password": "********",
    "floodControl": 10
  },
  "smsSettings":{
    "enabled": false,
    "sendScript": null,
    "availableCarriers":[],
    "floodControl": 10
  },
  "pagerSettings":{
    "enabled": false,
    "sendScript": null,
    "availableCarriers":[],
    "floodControl": 10
  }
}
Response Status 204 No Content - operation successful.
Response Body Empty.
Access Rights 'Change notification settings REST API'.