Class OutageRestService


  • @Component("outageRestService")
    public class OutageRestService
    extends OnmsRestService
    TODO: Add functionality to getting outages by: nodelabel, nodeid, foreignsource, foreignsource+foreignid, ipaddress, etc. add filters for current, resolved, all

    REST service to the OpenNMS Outage OnmsOutage data.

    This service supports getting the list of outages or one specific outage by ID:

    Example 1: Query List of outages.

    curl -v -X GET -u admin:admin http://localhost:8980/opennms/rest/outages
    
    Since:
    1.8.1
    Version:
    $Id: $
    Author:
    Craig Miskell
    • Constructor Detail

      • OutageRestService

        public OutageRestService()
    • Method Detail

      • getOutage

        @Transactional
        public javax.ws.rs.core.Response getOutage​(@Context
                                                   javax.ws.rs.core.UriInfo uriInfo,
                                                   String outageId)

        getOutage

        Parameters:
        outageId - a String object.
        Returns:
        a OnmsOutage object.
      • getCount

        @Transactional
        public String getCount()

        getCount

        Returns:
        a String object.
      • forNodeId

        @Transactional
        public OnmsOutageCollection forNodeId​(@Context
                                              javax.ws.rs.core.UriInfo uriInfo,
                                              int nodeId,
                                              long dateRange,
                                              Long startTs,
                                              Long endTs)

        forNodeId

        Parameters:
        nodeId - a int.
        dateRange - a long.
        startTs - a java.lang.Long.
        endTs - a java.lang.Long.
        Returns:
        a OnmsOutageCollection object.