Issues
3 of 3
Inconsistencies between outages and resources API endpoints
Description
Acceptance / Success Criteria
None
Lucidchart Diagrams
Created October 17, 2017 at 5:12 PM
Updated September 21, 2021 at 6:21 PM
Activity
Show:
Brynjar EideOctober 17, 2017 at 5:40 PM
I just realised that this will probably not be an issue in v2 of the API, after noticing and https://github.com/OpenNMS/opennms/blob/foundation-2017/opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/README.adoc
This would perhaps be more appropriately filed as a feature request, but I've noticed two differences between the 'outages' and 'resources' API endpoints:
/resources/fornode/{nodeCriteria
}vs.
/outages/forNode/{nodeId
}The most trivial problem is that "forNode" (or "fornode") is spelled differently, and the API is case-sensitive:
This constantly trips me up while testing or while writing new integrations, so it would probably be beneficial to fix the casing for one of the endpoints, while still allowing the original spelling to avoid breaking current implementations.
The other discrepancy is that outages only accepts 'nodeId' as the identifier. All the external systems I use to access the API only deals with the 'foreign-source:foreign-ID' tuplet, which means an extra request to the 'nodes'-API before it's possible to fetch the outages for a node: