function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
UjwalaUjwala 

Rest call to tool installed on localhost

Hi all,

I am working on integration PRTG with salesforce. PRTG is locally installed (at http://127.0.0.1 ).
I used following endpoint


public String baseUrl = 'http://127.0.0.1/api/table.xml?content=sensors&columns=sensor&username=prtgadmin&passhash=xxxx'; /
         public String username = 'prtgadmin';  
         public String password = 'Pune@123'; 
         public void PRTGIntegration1(){   
          HttpRequest req = new HttpRequest();
          Http http = new Http();
         
        // req.setHeader('Accept', 'application/xml');
      //  req.setHeader('Content-Type','application/xml');
        Blob headerValue = Blob.valueOf(username+':'+password);
     // req.setHeader('Authorization','Basic '+ EncodingUtil.base64Encode(headerValue));
        req.setMethod('GET');
        req.setEndpoint(baseUrl);
        
    try{
            //Execute web service call here      
    HTTPResponse res = http.send(req);  
    String ResponseJsonString = res.getStatus();    
}

But i am getting status code as 403 forbidden after execution.

is there any problem with url i am mentioning because prtg is on LAN. So when i call endpoint from cloud do i have to mention ip address or something else i should take care of

Please help!!