Rest call to get associated catalog variables for a Request Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018 08:24 AM
I am looking for a way to verify the content of a catalog variable table that is associated with a Request item. I;'m new to ServiceNow and REST. I am using Postman to query ServiceNow and I am using the following command. I am not getting the data I was expecting.
GET https://xxhelpdesk.service-now.com/api/now/table/sc_item_option_mtom?sysparm_query=number%3DRITM0170655
Im not sure I have syntax correct for the second part of the command.
It's my understanding that the sc_item_optio_mtom is the variables table and I was hoping that:
?sysparm_query=number%3DRITM0170655 would pull the catalog variables for the RITM0170655.
But it returns 140,000 lines, that is not what I am looking for.
Any thoughts?
Thanks
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018 11:24 AM
Change your get query to
https://YourInstanceName.service-now.com/api/now/table/sc_item_option_mtom?request_item=RITM0070020
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2018 06:17 AM
I tired that and it didn't return what I expected. what I really want it the catalog variables that are associated with that RITM?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018 12:59 PM
Tim Woodruff wrote the article "ServiceNow Scripted REST APIs & Retrieving Catalog Item Variables" back on July 15, 2016 that might do the trick for you with a scripted REST API.
https://snprotips.com/blog/2016/7/15/scripted-rest-apis-in-servicenow-how-to-retrieve-catalog-item-variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2018 06:24 AM
Hello Patrick,
Your REST query should be fired on this endpoint
https://instance_name.service-now.com/api/now/table/sc_item_option_mtom?sysparm_query=request_item.number=RITM0010038
The filter should be
sysparm_query=request_item.number=RITM0010038
Thanks!