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

Using REST API to submit request for Service Catalog

Girish5
Kilo Contributor

The use case is to invoke REST API from Jenkins and submit a Service request from Service Catalog. Checked the Service Now documentation and it says REST API is for getting the data from the Service Now tables. What we are looking for is REST API which will represent the function "Submit Request" in the Snow UI. We are using London. 

1 ACCEPTED SOLUTION

You should be able to do it using REST.

Check REST API explorer in servicenow and name space is sn_sc

find_real_file.png

and use Buy Item (POST) from the list


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

View solution in original post

4 REPLIES 4

Prateek kumar
Mega Sage

Have you checked cart API in servicenow?

https://docs.servicenow.com/bundle/london-application-development/page/script/server-scripting/reference/r_ServiceCatalogScriptAPI.html


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Yes I checked, but it is scripted API. Can we call this over REST? As per my reading, scripted API cannot be invoked over REST

You should be able to do it using REST.

Check REST API explorer in servicenow and name space is sn_sc

find_real_file.png

and use Buy Item (POST) from the list


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Girish5
Kilo Contributor

Thanks for the information. We do not have access to the explorer, however I could access APIs which has good information on creating the cart item. We will use that.