Page 1 of 1

REST Service from Javascript

Posted: Wed Apr 18, 2012 11:52 am
by dornz

How do I call a REST service that I created in the ui from Javascript? How do I get the results of this call in Javascript?


REST Service from Javascript

Posted: Wed Apr 18, 2012 4:54 pm
by maxkatz

code
service_name.execute({});
/code

You should still map the service, so you can display the result on a page.


REST Service from Javascript

Posted: Wed May 16, 2012 1:06 pm
by dornz

Output from a service call can only be mapped to a grid/list or a local storage variable, which iterates over the results. I just want the results. I have attempted to map the results to a local storage variable and add to a string on each iteration but this causes unexpected behavior (white screen or app goes back to start page). I just want to know how to get the results in javascript so I can do something like:
service_name.execute({});
var results = service_name.results


REST Service from Javascript

Posted: Wed May 16, 2012 1:25 pm
by maxkatz

You could use service's success event to get the data it returns: http://help.tiggzi.com/documentation/...


REST Service from Javascript

Posted: Wed May 16, 2012 1:38 pm
by dornz

That works! Awesome support Max! Thank you!


REST Service from Javascript

Posted: Mon May 21, 2012 2:30 pm
by dornz

Hi Max,

One other related question: I would like to make some modifications to the result set (such as sorting) before mapping the output to a list on the screen. I tried making these changes in the success event but the changes don't get reflected when mapped to the list. Any suggestions?


REST Service from Javascript

Posted: Mon May 21, 2012 10:08 pm
by maxkatz

REST Service from Javascript

Posted: Tue Sep 16, 2014 11:47 pm
by Ed Chmiel

FYI that page is gone, can you report the correct url?


REST Service from Javascript

Posted: Wed Sep 17, 2014 12:02 am
by Illya Stepanov

Here you are: https://getsatisfaction.com/apperyio/...

// also there is a link in the bottom of the above link - here is correct reference: https://getsatisfaction.com/apperyio/...