Sam6522984
Posts: 0
Joined: Thu Dec 26, 2013 2:35 pm

Execute REST-service with additional request parameter

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Execute REST-service with additional request parameter

Hi Sam,

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

Sam6522984
Posts: 0
Joined: Thu Dec 26, 2013 2:35 pm

Execute REST-service with additional request parameter

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Execute REST-service with additional request parameter

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.

Sam6522984
Posts: 0
Joined: Thu Dec 26, 2013 2:35 pm

Execute REST-service with additional request parameter

Hi Katya

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Execute REST-service with additional request parameter

Sam,

Let us know if you need help.

Return to “Issues”