We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Pass Multiple values for same parameter in REST get method

harishdasari
Tera Guru

Hi,

I am trying to fetch some details using REST API GET method.

I am successfully able to retrieve the information.

But here issue I have a table and it contains multiple unique id's.

I need to pass multiple Unique Ids for single parameter, I tried something like below, but it is sending only one uniqueid along with the request. and I am receiving response for only one id

for example:

Here is the JSON format

{

"unique_id" : current.getValue('u_unique_id")

}

Anyone could you please help.

 

6 REPLIES 6

Brad Tilton
ServiceNow Employee

I think this really depends on how your endpoint wants those values formatted. If it's in a comma separated list and your data already exists in a comma separated list you shouldn't have to do anything else. Otherwise you might need to split on the commas to get an array.

harishdasari
Tera Guru

Thanks Brad.