How can I get the list of Incidents created by particular user using REST API in ServiceNow

sanjaydhonde
Kilo Contributor

How can I get the list of Incidents created by particular user using REST API in ServiceNow?

Harikrishnan Vijayan

1 ACCEPTED SOLUTION

ghaing
Giga Expert

Hello,



Bellow the service to call:


https://<your instance>.service-now.com/api/now/v1/table/incident?sysparm_query=caller_id=<id of caller>



Regards,


View solution in original post

4 REPLIES 4

harikrish_v
Mega Guru

Well you can pass that in the GET method you use, like this:-



sysparm_query=caller_id=javascript:gs.getUserID()



You can refer this wiki link if you are still not clear.



http://wiki.servicenow.com/index.php?title=Table_API#GET_.2Fapi.2Fnow.2Fv1.2Ftable.2F.28tableName.29


Thanks. Do you have any working example?


ghaing
Giga Expert

Hello,



Bellow the service to call:


https://<your instance>.service-now.com/api/now/v1/table/incident?sysparm_query=caller_id=<id of caller>



Regards,


I am able to fetch around 501 Incidents in one request. I have following queries -


  • How to fetch the latest Incidents? (sorted by time)
  • How to fetch the next set of Incidents? Its required for pagination.

Harikrishnan Vijayan ghaing