Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Can I do a rest request to my localhost from a "developer" instance?

pierrothpsa
Kilo Contributor

Is it possible to call a rest request from a developer instance app to my localhost?

I got the rest integration done, but always get HTTP 500 error.

Thanks

Pierre

4 REPLIES 4

Community Alums
Not applicable

Pierre,



the 500 error doesn't tell us a lot, but I would assume that since ServiceNow is running on an external network, you'd have to use your external IP address.


Joe McCarty1
ServiceNow Employee
ServiceNow Employee

If I understand you correctly, you are making an outbound REST call from the developer instance to a workstation.   If that's the case, you won't be able to reference your machine as https://localhost/REST/API because local host to the instance is itself.   You would need provide a public facing IP or dns that is resolvable to your machine.



The one exception would be if you were using a MID Server to process the REST message.   In which case, using localhost should attempt to call a web service running on the MID Server itself.


pierrothpsa
Kilo Contributor

Thanks everyone, I installed a MID server locally and pointed my app to it, so now it works great.



Thanks again.



Pierre


RBT
Giga Contributor

Please consider marking one of the answers as an accepted answer if your problem is resolved. This helps the future readers as well.