Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to filter with multiple parameters in Rest API

Phanikanth
Kilo Contributor

Hi Team,

I want to make api which will filter the data based on short_description and u_requested_for.When I tried able to filter by requested for and not able to filter by short_desc. could you please suggest the exact query to filter.

https://****.service-now.com/api/now/table/sc_req_item?sysparm_limit=5&sysparm_display_value=true&sysparm_query=u_requested_for.name=Selina Forte&short_descriptionLIKESHOP

 

 

 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you gave incorrect query

you should use ^ to give AND condition

if you want OR then give ^OR

https://****.service-now.com/api/now/table/sc_req_item?sysparm_limit=5&sysparm_display_value=true&sysparm_query=u_requested_for.name=Selina Forte^short_descriptionLIKESHOP

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader