The CreatorCon Call for Content is officially open! Get started here.

How to update catalog variable through REST API

varunp
Tera Guru

we are integrating SNOW with some internal tools.

We are avoiding writing scripted API.

Is there a way we can update catalog variable value directly through an API?

I am trying but it is not working.

 

 

12 REPLIES 12

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Varun,

 

Catalog variables are store in another table. That said, I recommend using catalog item related APIs. Reference:

https://developer.servicenow.com/dev.do#!/reference/api/madrid/server/sn_sc-namespace/c_CatalogItemV...

 

- Pradeep Sharma

are you saying threre is not direct REST API to do this?I need to write scripted API.

 

Hi Varun,

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

please check below thread where I have mentioned the approach which is using scripted REST API

https://community.servicenow.com/community?id=community_question&sys_id=366fb6a9db58dbc01dcaf3231f961947

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Yes, you are right. The best practice is to use catalog specific Scoped API's. Please refer my response here for script reference https://community.servicenow.com/swp?id=community_question&sys_id=d0787f04db171f001cd8a345ca96195d&v...

https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/custom-web-service...

 

- Pradeep Sharma