How to modify a variable in RITM using REST API?

Apex Predator
Kilo Expert

I have a catalog item with a few variables. I am able to create RITM's for this. But I want to modify an RITM at a later time i.e I want to update one of the variable's value of the RITM using REST API. How can I achieve this? Is there an out of the box API to do this?
Thank you

1 ACCEPTED SOLUTION
5 REPLIES 5

Allen Andreas
Tera Patron

Hi,

Please take a look at the ServiceNow Rest API Explorer.

https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/technology_partner_program/ap...

Please mark reply as Helpful/Correct, if applicable. Thanks!

I already went through this. I am able to query an RITM with variables as parameters(GET) but I not able to figure out how to update a particular variable of an RITM using PUT or PATCH.

Ankur Bawiskar
Tera Patron

Hi,

You cannot update variables directly using OOB API unless you use Table API on this table "sc_item_option_mtom"

Catalog variable values are stores in the table Variable Ownership [sc_item_option_mtom] and sc_item_option.

I would suggest to create custom Scripted REST API which accepts RITM number, Variable Name and the Variable value to be updated

Regards
Ankur