
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 06:59 AM
Hi Team
Can you please tell me how to get the Variables of RITM using Rest Method.
Regards,
Priya
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2019 10:07 AM
Below link will hepl you to achieve this.
Regards,
Priya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 07:01 AM
Hello Priya,
Check out this blog for your solution:
You can use the REST API to pull data from any table, so it's just a matter of knowing where the data is and how to find what's related to your Requested Items (RITM). Variables are stored in their own table, not as a field on the RITM record, so you need to decipher the relationship before you can try to query for what you want.
Funny enough, variables are actually called "Options" once they have a value assigned and are stored in the Options table [sc_item_option]. The table called "Variables" ([item_option_new]) only stores the definition of that variable (i.e., it's type, associated question, hint, etc.). So the Options table is where you want to look at for your actual values.
To get to the Options you are looking for, you will need to look at a Many-to-Many table [sc_item_option_mtom] relating your Requested Items to their Options. So if you have the sys_id of your RITM handy:
- you would query [sc_item_option_mtom] to get a list of the Options (your variables) that belong to it.
- then you can use that list of option sys_id's to query [sc_item_option] for the values you are after.
If you need help querying with the REST API, please check the wiki article here:
Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 07:17 AM
Hi Priya,
Do you want to send the RITM variables to some 3rd party using REST or want to consume ServiceNow REST API endpoint to get the RITM variables?
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 08:46 AM
Hi Ankur
I will be using some 3rd party.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2019 03:31 AM
How can we achieve this in Scripted REST API?