Rest API v2 returns http-404 (not found) for http-204 (no content) cases
Description
Rest calls against the api/v2 rest api return wrong http-404 status codes. If the result sets are empty the api always returns http-404 instead of http-204 for no content. For example a call against the nodes returns a 404 if no nodes exist. Calls using a criteria that causes an empty result also returns an 404 instead of http-204.
They don't specifically say what should happen when you perform a filtering query on a root resource and the result has no elements, but I think that code 204 makes sense. Please commit this change to 18.0.0.
Rest calls against the api/v2 rest api return wrong http-404 status codes.
If the result sets are empty the api always returns http-404 instead of http-204 for no content.
For example a call against the nodes returns a 404 if no nodes exist.
Calls using a criteria that causes an empty result also returns an 404 instead of http-204.
relevant class:
org.opennms.web.rest.v2.AbstractDaoRestService