Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9278

Finishing the implementation of the missing endpoints for ReST v2

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Meridian-2016.1.4, 19.0.1
    • Fix Version/s: 20.1.0, Meridian-2017.1.0
    • Component/s: REST
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      The current ReST API (i.e. /opennms/rest or /opennms/api/v1) is the official API.

      There is some work on /optnnms/api/v2 for some endpoints, but lots of them are missing.

      There are some features that don't have a v1 alternative, and only provide v2 alternative. This is fine, but as v2 is not documented and/or completed, but it seems reasonable to provide an implementation for the missing endpoints, just to be able to have v2 as an alternative of v1.

      The best feature of the v2 API, is the ability to specify powerful filters using FIQL. This by itself is enough reason to have a v1 alternative to be able to implement reach interfaces that can have filters as powerful as the filters you can currently use on the OpenNMS WebUI, and even have the ability to make more powerful filters.

      Another feature of FIQL in Apache CXF is the ability to create aliases. This is not used at the moment, but could provide human readable alternatives for some attributes, in order to define filters using the same names you see on the JSON/XML output, instead of defining the filters as HQL expects them (which is how the current implementation works not only on v2 but also on v1).

      Here is the list of the currently available endpoints in v2:

      /api/v2/applications
      /api/v2/minions
      /api/v2/monitoringLocations
      /api/v2/discovery
      /api/v2/scanreports
      /api/v2/nodes (not fully implemented compared with v1)
      /api/v2/outages
      /api/v2/notifications
      /api/v2/geolocation
      

      Here is the list of the missing endpoints (exist on v1 but not on v2 that can benefit from FIQL):

      /events
      /alarms
      /nodes/{ID}/ipinterfaces
      /nodes/{ID}/ipinterfaces/{IP}/services
      /nodes/{ID}/snmpinterfaces
      /nodes/{ID}/hardwareInventory
      /nodes/{ID}/categories
      /ifservices
      /acks
      /categories
      /remotelocations
      

      Note: I'm not 100% sure if the last 3 requires a v2 implementation.

      Here is the list of v1 end-points that may not have v2 counterparts, because those are not expected to have filtering capabilities (at the moment):

      /requisitions
      /requisitionNames
      /foreignSources
      /foreignSourcesConfig
      /snmpConfig
      /measurements
      /availability
      /config*
      /info
      /graphs
      /graphml
      /groups
      /users
      /heatmap
      /info
      /ksc
      /timeline
      /sched-outages
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                agalue Alejandro Galue
                Reporter:
                agalue Alejandro Galue
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: