use REST API in a local server

use REST API in a local server

  

I'm trying to use a REST API that is available in a local server, for example, at http://localhost:8085/rest/api/latest/result.json

This works without any trouble in the browser, for example. However, if I try to access it in outystems, I get an "Unable to connect to the remote server" error.

Do I need to do anything to make a local server call work?

Thank you in advance

A local call to a web service should work fine.

Are you getting that error in runtime, or in Service Studio? If you are getting it in Service Studio, the issue is likely that the service is local to your server and not the machine where you have Service Studio, so you'd need to add the service using another address and then change that service's runtime configuration to "localhost" in Service Center.

João Pedro Abreu wrote:

A local call to a web service should work fine.

Are you getting that error in runtime, or in Service Studio? If you are getting it in Service Studio, the issue is likely that the service is local to your server and not the machine where you have Service Studio, so you'd need to add the service using another address and then change that service's runtime configuration to "localhost" in Service Center.

Hello João.

I have the error in Service Studio, and I have the server running on the exact same computer I'm working (even though I'm planning on extending the functionality to access a local server through a VPN) and I can access the server without any trouble from either a browser or an application such as postman.

How do I change the configuration to "localhost"?

I'm also getting the same error.

I'm trying to use a REST API that is running on my local tomcat 7 server, for example, at http://localhost:8080/SolrIndexer/rest/solr/index

This works without any trouble in the browser. But while consuming from OutSystems (which is hosted on a different development environment) using rest integration, I'm getting "Unable to connect to the remote server". Do I need to do anything to make a local server call work?

Will this work if I host my rest API service on the same server as my OutSystems platform.

Som wrote:

I'm also getting the same error.

I'm trying to use a REST API that is running on my local tomcat 7 server, for example, at http://localhost:8080/SolrIndexer/rest/solr/index

This works without any trouble in the browser. But while consuming from OutSystems (which is hosted on a different development environment) using rest integration, I'm getting "Unable to connect to the remote server". Do I need to do anything to make a local server call work?

Will this work if I host my rest API service on the same server as my OutSystems platform.

Hello Som, Since you are exposing rest from your local machine, which doesn't seems to be exposing on public IP. I think you should try both expose and consume into the same environment.


Hi,


What are all those localhost supposed to target? All rest calls done in the platform are executed in the server machine (not the one that you have Service Studio open, unless they are the same machine).



Regards,
João Rosado