how to get multiple ticket (incident) information using REST calls

mangun
Kilo Explorer

Hi ,

I have been trying to retrieve multiple ticket information by single REST call (using: sys_id OR indecent_id ). I was able to get ticket information one by one by using multiple REST calls (Sample URL format   - https://instance.service-now.com/api/now/v1/table/incident?sys_id=ticketid).   I tried to use "^OR"   to concatenate multiple sys_id (Sample URL format - https://instance.service-now.com/api/now/v1/table/incident?sys_id=ticketid^ORincident?sys_id=ticketid) , but it didn't work . If anyone knows the way to achieve this , please share the solution.

Thanks in advance

1 REPLY 1

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Mananu,



You can generate a query from a list view and use a sysparm_query - along the lines of:


/api/now/v1/table/incident?sysparm_query=sys_id=d71f7935c0a8016700802b64c67c11c6^ORsys_id=d71da88ac0a801670061eabfe4b28f77



more examples here:


REST API Date Range Search



Best Regards



Tony