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 |
|
---|---|
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/vnd.orchestral.rhapsody.6_0+json |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
The response body has the following data object structure:
A response body is returned even if there are no active alerts ( |
Access Rights |
'View notifications REST API'. |
GET /api/alerts/active/<id>/state
URI |
|
---|---|
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/vnd.orchestral.rhapsody.6_0+plain |
|
Request Body |
Empty. |
Response Status |
|
Response Body |
Alert state (for example: |
Access Rights |
'View notifications REST API'. |
PUT /api/alerts/active/<id>/state
URI |
|
---|---|
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:
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/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'. |
GET /api/alerts/active/<id>/assignee
URI |
|
---|---|
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'. |
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:
|
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/ jsonCSRF 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:
|
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":"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:
|
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: |
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:
[ {"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 |
|
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: |
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:
[ {"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: |
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:
|
Response Status | 204 No Content - operation successful. |
Response Body | Empty. |
Access Rights | 'Change notification settings REST API'. |