Situation Feedback

Situation feedback is an optional feature for the management of user-contributed feedback regarding correlation of alarms.

It is a simple API for the submission and retrieval of correlation feedback.

GET (reading data)

Situation Feedback API GET function
Parameter Description

/situation-feedback/{situationid}

Get situation feedback for the situation with AlarmId = {situationid}.

situationId is the same as the AlarmId for the situation.

Use examples with cURL

Retrieve situation feedback for the situation with AlarmId == 210
curl -u admin:admin "http://localhost:8980/opennms/rest/situation-feedback/210"
Response
[
    {
        "situationKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:FEEDBACK_A",
        "situationFingerprint": "NDg3ZjdiMjJmNjgzMTJkMmMxYmJjOTNiMWFlYTQ0NWI=",
        "alarmKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:ALARM_A",
        "feedbackType": "CORRECT",
        "reason": "okay",
        "user": "admin",
        "timestamp": 1535057676107
    },
    {
        "situationKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:FEEDBACK_A",
        "situationFingerprint": "NDg3ZjdiMjJmNjgzMTJkMmMxYmJjOTNiMWFlYTQ0NWI=",
        "alarmKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:ALARM_B",
        "feedbackType": "CORRECT",
        "reason": "okay",
        "user": "admin",
        "timestamp": 1535057676107
    }
]

POST (adding data)

POST requires using application/json as a Content-Type.

On a successful request, the feedback will be persisted.

Situation Feedback API POST function
Resource Description

/situation-feedback/{situationid}

Submits feedback for the situation identified with AlarmId = {situationid}.

Use examples with cURL

Submit positive Feedback for a Situation with 2 alarms.
curl -X POST  -H "Accept: application/json" -H "Content-Type: application/json" -u admin:admin  -d @feedback.json  http://127.0.0.1:8980/opennms/rest/situation-feedback/210
Contents of feedback.json
[
    {
        "situationKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:FEEDBACK_A",
        "situationFingerprint": "NDg3ZjdiMjJmNjgzMTJkMmMxYmJjOTNiMWFlYTQ0NWI=",
        "alarmKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:ALARM_A",
        "feedbackType": "CORRECT",
        "reason": "okay",
        "user": "admin",
        "timestamp": 1535057676107
    },
    {
        "situationKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:FEEDBACK_A",
        "situationFingerprint": "NDg3ZjdiMjJmNjgzMTJkMmMxYmJjOTNiMWFlYTQ0NWI=",
        "alarmKey": "uei.opennms.org/alarms/trigger:localhost:0.0.0.0:ALARM_B",
        "feedbackType": "CORRECT",
        "reason": "okay",
        "user": "admin",
        "timestamp": 1535057676107
    }
]
Response

204 No Content