The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When do outbound REST calls go via ecc_queue

dickhirsch
Mega Guru

Hi,

I'm trying to figure out when outbound REST calls are sent via the ecc queue. I used the canned Rest service from the sandbox.

I tried this script in a UI action and was expecting to see the results in the ecc queue table but I didn't see anything

try {

      var r = new sn_ws.RESTMessageV2('Yahoo Finance', 'get');

      r.setStringParameter('symbol', 'IBM');

      var response = r.execute();

      var responseBody = response.getBody();

      var httpStatus = response.getStatusCode();

} catch (ex) {

      var message = ex.getMessage();

}

I've noticed that outbound calls via Mid-server are visible in the ecc_queue.

Thanks,

D.

5 REPLIES 5

cwilker10
Giga Expert

The ECC Queue is always used for MID Server REST calls.   You can add your REST messages into the ECC Queue so you can see what's outbound by using r.execute(true).   It's not really using the ECC Queue since you're not necessarily going over a MID Server, but it will show up in the ECC Queue and you can see exactly what you're sending to the 3rd party application.


Are you sure that execute () has an input parameter? The API doesn't show this.



D.


Give it a try.   You should see the sent data in your ECC Queue.



-Chris


juancarlos_muro
Kilo Expert

Hi,



REST messages can be sent to an endpoint either from the instance or from a MID Server (for example if your endpoints are inside your network).



Whether a REST message will use MID Server or not is defined in the REST Funciton Message (System Web Services > Outbound > REST Message > (edit a message) > (edit a function from the related list) ), there is a field "Use MID Server" where you can enter a MID Server. Make sure that your MID Server has capability REST.



In case that the message is handled via MID Server you will observe an output (and hopefully an input) probe in the ECC Queue with topic "RESTProbe" and name "<function>" where function is "get/post/put/delete".



Cheers,



Carlos