Situation Feedback

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

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

GETs (Reading Data)

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 situaiton 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
    }
]

POSTs (Adding Data)

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

On a successful request, the feedback will be persisted.

Resource Description

/situation-feedback/{situationid}

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

Use examples with cURL

Submit positve 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