REST API "Unable to connect to the remote server"

Hi everyone,


I am trying to consume an API, but I don't have any response in Outsystems. I've tried it in Postman and it works fine.


The response I get in Outsystems:


The same API in Postman:


The link to the API:

https://servicodados.ibge.gov.br/api/v1/localidades/estados/{UF}/municipios


And the value tested is 33




Hi,

tried to use your API & it took 21 seconds on Postman & browser too.

The error you are getting because there's a Request Timeout defined & in REST API; Like in Mobile Application, you can set the value of Server request Time..

because your Server is taking more than expected time seconds thus the Outsystems request is getting Timeout.

Try to bring the response in less than 10 seconds.. atleast


assif_tiger wrote:

Hi,

tried to use your API & it took 21 seconds on Postman & browser too.

The error you are getting because there's a Request Timeout defined & in REST API; Like in Mobile Application, you can set the value of Server request Time..

because your Server is taking more than expected time seconds thus the Outsystems request is getting Timeout.

Try to bring the response in less than 10 seconds.. atleast


Hi Assif,


But isn't the default timeout 100 seconds?


 



I'm having the same problem! :(

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo,

I have just tried consuming this REST API Method in my Personal Environment and it is working as expected. Are you also trying to consume it from your PE or from another environment?

Regards,

Nordin

Nordin Ahdi wrote:

Hi Nivaldo,

I have just tried consuming this REST API Method in my Personal Environment and it is working as expected. Are you also trying to consume it from your PE or from another environment?

Regards,

Nordin

Hi Nordin,

sorry, when I said same endpoint I was talking about the endpoint I’m using being the same between Servicestudio and Postman.


Regards,


Nivaldo Pereira wrote:

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo and Tarek, please check with the Network admin about the securities rules from your server, sometimes is the server blocking the request bcuz some rules they may have.

Cheers

Carlos Lessa


Nivaldo Pereira wrote:

Hi Nordin,

sorry, when I said same endpoint I was talking about the endpoint I’m using being the same between Servicestudio and Postman.


Regards,

That's ok, I misunderstood :).

Like Carlos said, it is probably related to fact that something is blocking your application server from accessing that endpoint. 

One thing you can do is ask a server admin to open up a browser on the application server and try and access that endpoint from there. That could shed some more light on what the issue might be.

Regards,

Nordin


Carlos Lessa wrote:

Nivaldo Pereira wrote:

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo and Tarek, please check with the Network admin about the securities rules from your server, sometimes is the server blocking the request bcuz some rules they may have.

Cheers

Carlos Lessa


Hi Carlos,

for me that was exactly the situation and it was solved.

Thanks :)


Nivaldo Pereira wrote:

Carlos Lessa wrote:

Nivaldo Pereira wrote:

Hi,

I'm having the same problem. Same endpoint, same input, same header and in one i have an error and in the other i don't.

In Postman it works with no problem, but in ServiceStudio I have the "Unable to connect to the remote server" error.

Anyone have solved this problem?

Thanks in advance.

Hi Nivaldo and Tarek, please check with the Network admin about the securities rules from your server, sometimes is the server blocking the request bcuz some rules they may have.

Cheers

Carlos Lessa


Hi Carlos,

for me that was exactly the situation and it was solved.

Thanks :)


Good I could help you, Bro, now you should invite me for lunch next time I'm in the city :)

Let's see if Tarek also manage to solve