Fetch the RITM details using Catalog item name

Sai Shravan
Mega Sage

Hi Team,

I would like to fetch the RITM field details using the item name which specific filters like created, updated, resolved and timeframe with today, yesterday, this week using REST API, can anyone please help me to do this.

Thanks in advance.

 

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you
4 REPLIES 4

kamlesh kjmar
Mega Sage
Mega Sage

Hi @Sai Shravan ,

 

You can use the API in below format and modify accordingly, in below example Access is the name of the catalog item whose RITMs list I am extracting :

 

https://dev60855.service-now.com/api/now/table/sc_req_item?sysparm_query=cat_item.nameSTARTSWITHAcce...sys_created_onONThis week@javascript:gs.beginningOfThisWeek()@javascript:gs.endOfThisWeek()^ORsys_updated_onONThis week@javascript:gs.beginningOfThisWeek()@javascript:gs.endOfThisWeek()

 

I Hope this helps.

 

Please mark this helpful if this helps and mark as correct if this solves your issue.

 

Regards,

Kamlesh

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

To fetch the details using API explorer first go to the RITM table and apply the filter which you want as below:-

 

Saurav11_0-1667900620303.png

 

then run the filter and copy the query as below:-

 

Saurav11_1-1667900649696.png

 

Then after copying the query go to rest api explorer select the table as sc_req_item and paste the query in sysparm_query

 

Saurav11_2-1667900756756.png

 

then click on send you will see the response.

 

Saurav11_3-1667900788840.png

 

Please mark my answer as correct based on impact.

Sai Shravan
Mega Sage

Thanks for the response, 

I want it from scripted rest API not from the rest API explorer.

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you

Hello,

 

Please check the below article. It has step by step on how you can achieve it. 

 

https://snprotips.com/blog/2016/7/15/scripted-rest-apis-in-servicenow-how-to-retrieve-catalog-item-v...

 

Please mark my answer as correct based on impact.