Page 1 of 1

Execute REST-service with additional request parameter

Posted: Thu Jan 02, 2014 5:37 pm
by Sam6522984

Hi

I have a REST-service which I start multiple times in a for-loop. The configuration of the service looks like this:
Image

Image

Now I would like to set the campaign_id with JS when I start the execution. My code looks currently like this:
Image

Is it possible to set the campaign_id when I start the execution? Or do I need another approach?


Execute REST-service with additional request parameter

Posted: Thu Jan 02, 2014 5:51 pm
by Kateryna Grynko

Hi Sam,

I'd recommend you to save this parameter as a localStorage variable and then map it.


Execute REST-service with additional request parameter

Posted: Thu Jan 02, 2014 7:38 pm
by Sam6522984

Hi Katya

Thank you for your help.
This was my first approach, but I wanted to take advantage of the async calls in JS. I think with the localStorage I have to sync the calls of the service, is there no other option?


Execute REST-service with additional request parameter

Posted: Thu Jan 02, 2014 9:21 pm
by Kateryna Grynko

Sam,

You can call a service manually: https://getsatisfaction.com/apperyio/... Please note all the parameters must be send in request. Also it's not recommended to call it in cycle.


Execute REST-service with additional request parameter

Posted: Fri Jan 03, 2014 3:22 pm
by Sam6522984

Hi Katya

Thank you for the clarification, I will stick with sync calls.


Execute REST-service with additional request parameter

Posted: Fri Jan 03, 2014 3:54 pm
by Kateryna Grynko

Sam,

Let us know if you need help.