Forum Discussion

prateek-hcl's avatar
prateek-hcl
Contributor
12 years ago

Using rest() method for making restAPI call from endpoint

 

We use <#assign message = restadmin("/messages/id/${mid}").message /> to make API call.

Restadmin method adds the complete restAPI path and makes the call.

 

Is there anyway where we can give the complete absolute path to make the call?

Something like this, <#assign message = restadmin("http://www.abc.com/mno/xyz/messages/id/${mid}").message />

 

I have to make api call to an outside environment.

 

Thanks in advance,

-Prateek

  • Not currently. When we need to make external REST calls (remember XSS), we use JSONP requests using jQuery on the client side. This has worked well for us, but we would also like a server-sided way to do this. We've been told such a thing is in the works.

    If you need an example of the client sided jQuery AJAX, let me know.
  • JeffY's avatar
    JeffY
    Lithium Alumni (Retired)

    Hi Prateek -- We don't currently support server-to-server calls to external services from endpoints.  However, we're developing this feature right now.  We're running a limited beta in the version 13.3 release (which will ship to customers starting next week) and expect for it to be available to everyone in the next few months.  

     

    If you (or other developers who see this thread) would like to participate in the beta, send me a PM and we can discuss the eligibility criteria.  The beta will only support a limited set of use cases and we're keeping the number of participants small.