Pass multiple parameters in api call

lklk1
Kilo Contributor

How do i pass multiple parameters in api call?

3 REPLIES 3

Priyanka Vasant
Tera Guru

Hello,

Try the below link that might help you.

Multiple System Parameter REST

How to pass multiple parameter

mark helpful or correct based on impact.

Regards,

Priyanka A.

Namrata Khabale
Giga Guru

Hey  lklk,

 

Here is a same thread that you Looking for it might help you:

 

https://community.servicenow.com/community?id=community_question&sys_id=b1dbc7e1db9cdbc01dcaf3231f96...

 

Kindly Mark Correct if this solves your issue and also mark  Helpful if you find my response worthy!

 

 

Best Regards,

Namrata

Indrajit
Mega Guru

Hey,

you can pass multiple parameters usin JSON Object. Refer below example here they passed the multiple parameters for eventQueue() method

var jsonObj = {};
jsonObj.name = 'Abel Tuter';
jsonObj.email = 'abel.tuter@example.com';

gs.eventQueue('Event Name', GlideRecord Obj, recipientArray, JSON.stringify(jsonObj));

In the email script use this to parse the json

var jsonObj = JSON.parse(event.parm2);

var email = jsonObj.email;
var name = jsonObj.name;

Kindly mark Correct and Helpful if my response is worthy.

Regards,

Indrajit.