Retrieving high priority tickets from Incident and Service Catalog ticket

alotofhippies
Giga Contributor

I'm a total newb at this but i was wondering if its possible get a high priority ticket with a single API call

I'm currently using python table API to call service now API. I managed to retrieved the high priority service catalog ticket or vice versa but not both at the same time

heres my endpoint

v2/table/task?active=true&priority=2&sysparm_query=incidentOR^sc_task

 

is it because of table name? Do i need to change this to something else?

v2/table/task?active=true&priority=2&sysparm_query=incidentOR^sc_task

 

Thanks! Any help is appreciated!

 

4 REPLIES 4

Swapna Abburi
Mega Sage
Mega Sage

@alotofhippies 

Please try below API

/api/now/v2/table/task?sysparm_query=priority=2^sys_class_name=incident^ORsys_class_name=sc_task

no didnt work ☹️ only retrieving service catalog tickets

Swapna Abburi
Mega Sage
Mega Sage

@alotofhippies 

Can you try the below URL in your ServiceNow instance and let me know the result?

https://<instanceName>.service-now.com/task_list.do?sysparm_query=active=true^priority=2^sys_class_name=incident^ORsys_class_name=sc_task

Its not showing the other high priority ticket like the incidents but for some reason i change it to moderate the high priority tickets showed up 

if i include catalog task the catalog moderate tickets shows in results now

alotofhippies_0-1672424317716.png