The CreatorCon Call for Content is officially open! Get started here.

Rest api call for *todays* incident tickets

jonmuni
Kilo Contributor

Hi guys,

Im trying to construct a rest api call ( using the rest explorer ) to query for all "new" tickets created "today" with a specific "Origination method".

Can anyone help?

I'm very new to this so please be gentle!

thanks!

Jon

1 ACCEPTED SOLUTION

Shiva Thomas
Kilo Sage

Hi Jon,



Go to the incident.list or task.list and use the filter to define your query.


Execute it to preview the result.


Now you can do a left click on the filter breadcrumb to copy the query.


2017-07-11 14_46_32-Incidents _ ServiceNow.png


In the REST API Explorer, paste this in the field sysparm_query


2017-07-11 14_48_59-REST API Explorer _ ServiceNow.png


View solution in original post

5 REPLIES 5

Alikutty A
Tera Sage

Hi Jon,



Please add this line in your sysparm_query "sys_created_onONToday@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoEnd(0)"



and it should return you all tickets created today. What do you mean by origination method?



Thanks


Ali