Create a ReST API to expose the available detectors/policies/categories/assets/services required to manipulate foreign sources
Description
In order to create an external application to manipulate requisitions and foreign source definitions, the OpenNMS ReST API should expose the following information:
Available Detectors (with their parameters)
Available Policies (with their parameters, possible values for certain parameters, which parameters are required or not, etc.)
Available Asset Fields
Available Categories
Available Services (per requisition and for the default foreign source)
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Alejandro Galue April 13, 2015 at 2:44 PM
Fixed on revision 801c52c6b15bec33d8dcb173ee72b3b14a9c7edf for develop.
Alejandro Galue April 13, 2015 at 2:40 PM
The idea is to define a unique model to expose this data primarily through JSON, using the same service layer used by the current Requisitions WebUI.
For Services,
Return an array with the service names (ordered by name), for example:
For Asset Fields,
Return an array with the asset names (ordered by name), for example:
For Categories,
Return an array with the available categories (ordered by name):
For Policies,
Return a JSON object with the policy name, the policy class and the parameters available for the policy. For the parameters, include the required parameters at the begining (with the list of potential values if apply), and then the optional parameters; for example:
For Detectors,
Use a similar structure like the policies for the detectors. In this case, all the parameters will be marked as optional with an empty list of options, for example:
In order to create an external application to manipulate requisitions and foreign source definitions, the OpenNMS ReST API should expose the following information:
Available Detectors (with their parameters)
Available Policies (with their parameters, possible values for certain parameters, which parameters are required or not, etc.)
Available Asset Fields
Available Categories
Available Services (per requisition and for the default foreign source)