Rest API to get the incidents assigned to a user in last month?

Kiddy
Tera Guru

Hi

I want to sent all incidents assigned  to a user in last 30 days ,i cant see assigned to date field

on incident so that i can filter the date can you please suggest how to sent this information

we were provided by the userid by the requester and in response need to send the incidents assigned to him in this month

thanks

 

 

1 ACCEPTED SOLUTION

Hi @Kiddy ,

 

along with ID number, it is not possible to get short description and state of incident. In the end of endpoint URL, i have done the dot walk to get incident number from ID, same way you can get short description by giving like this id.short_description but that will not give response along with number.

 

 

View solution in original post

9 REPLIES 9

The SN Nerd
Giga Sage
Giga Sage

You can use the Table API and Rest API Explorer to easily achieve this.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hi morris 

 

can you please eloborate on which table we can do this as i dont get date of assignent on incident

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Use table API and test this via REST API Explorer

1) Form the query

find_real_file.png

2) copy the query

find_real_file.png

3) Use REST API Explorer from left navigation

4) Select table as incident

5) give the query you copied in the sysparm_query

6) Give the other parameters and the fields you wish to receive in response

find_real_file.png

Regards
Ankur

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

Hi Ankur,

 

Thanks,but i am looking for the assigned date,

ex:assigned to me in last month it can be created more than 1 month before but assigned to me in last month