Querying the ReST API for alarms using an invalid alarmId returns HTTP 200

Description

When querying a ReST API for an element that doesn't exist, the answer should be either an HTTP 204 (No Content) or an HTTP 404 (Not Found).

Unfortunately, this is not the case for the Alarms end point. It returns an HTTP 200 with no content.

In order to reproduce the problem, do the following:

  • Install OpenNMS

  • Add a test node

  • Generate a fake node down event using send-event.pl

  • Query the alarms ReST end point to verify that there is one alarm for the node down.

  • Query the alarms ReST end point for a specific alarm using a number you know it doesn't exist on the alarms table

I verified this behavior with Meridian 2015.1.0 and latest build of 17.0.0-SNAPSHOT.

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Alejandro Galue April 2, 2016 at 9:02 AM

Yes

Ronny Trommer April 1, 2016 at 8:14 PM

seems to be fixed, can we delete the associated branch: https://github.com/OpenNMS/opennms/tree/jira/NMS-7972

Alejandro Galue November 10, 2015 at 8:17 AM

Merged into release-17.0.0 on revision ef5966c888280aea15589ff4290dcad86dda415a

Alejandro Galue November 9, 2015 at 2:54 PM

The changes have been committed to a branch from release-17.0.0 called jira/NMS-7972.

As soon as Bamboo goes green, I'll merge it to release-17.0.0:

http://bamboo.internal.opennms.com:8085/browse/OPENNMS-ONMS260

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

PagerDuty

Created November 9, 2015 at 1:01 PM
Updated April 2, 2016 at 9:02 AM
Resolved November 10, 2015 at 8:17 AM