How to set Http Query parameter in Rest message?

snehalmadakatti
Mega Expert

Hi Developers,

Can anyone let me know how o set the Http Query parameter dynamically?

I am just trying to use Get method to get incident details. And i am triggering this rest from below scheduled job.

Rest Outbound message:

find_real_file.png

Scheduled job: (hardcoded sysid just for testing, later will use the dynamic sysid)

find_real_file.png

Regards,

Snehal

1 ACCEPTED SOLUTION

snehalmadakatti
Mega Expert

I got it solved! 

I used setStringParameter to set the http query parameter and in http query parameter set the value as ${variablename}

find_real_file.png

find_real_file.png

Regards,

Snehal

View solution in original post

5 REPLIES 5

HI

I was looking at your post as I have a similar issue. I am needing to set up a variable and pass the variable. I see you defined the variable {sys_id} in the HTTP Parameter, but in the code you hard coded the variable value.   r.setStringParameter('sys_id', '599fc2c5db65e41011762183ca9619cc'). Do you know how you would code a variable in the script instead? Thanks!