ViPR SRM/Watch4Net: Unable to use REST-API services

           

   Article Number:     504150                                   Article Version: 2     Article Type:    Break Fix 
   

 


Product:

 

ViPR SRM,Watch4net

 

Issue:

 

 

ViPR SRM/Watch4Net: Unable to use REST-API services    
   
    From the Frontend host get the following outputs:   
   
    in the URL below replace the frontend host with the details of the frontend hostname/ip   
    frontendhost:~ # curl --header "Authorization: Basic YWRtaW46Y2hhbmdlbWU=" "http://frontendhost:58080/APG-REST/metrics/properties/values/device"   
    {"values":[]}   
    frontendhost:~ #   
    the above output will indicate rest module is working fine but not fetching any data    
   
    frontendhost:~ # cd /opt/APG/bin   
    frontendhost:/opt/APG/bin # ./manage-resources.sh list   
    [   
    "rest/EVENTS",   
    "rest/METRICS"   
    ]   
    frontendhost:/opt/APG/bin # ./manage-resources.sh get "rest/EVENTS"   
    {   
    "type": "events",   
    "endpoint": "/events",   
    "parameters":   
    {"filter": "#EVENTS-GENERIC:ALL | #EVENTS-GENERICARCH:ALL"}   
    }   
     
                                                           

 

 

Cause:

 

 

APG-REST.xml file located on the Frontend Host within /opt/APG/Web-Servers/Tomcat/Default/conf/Catalina/localhost missing the resource links                                                           

 

 

Resolution:

 

 

Copy all the resource link information from APG.xml to APG-REST.xml file located on the Frontend Host within /opt/APG/Web-Servers/Tomcat/Default/conf/Catalina/localhost   
   
    Restart Tomcat service on Frontend Host   
    cd /opt/APG/bin ./manage-modules.sh service restart tomcat