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

Create Catalog task via Rest API

Michael51
Tera Guru

Hello All,

one of our external system wants to create and catalog task in ServiceNow , do we have any OOB API to create only (Sc_task) record , post creation we need to associate to an Item , 

 

or should we go with scripted rest API?

 

@Ankur Bawiskar @Sandeep Rajput  

5 REPLIES 5

Snehal13
Kilo Sage

Quite simple. use Cart API and scripted rest API.

 

Get payload from API , parse it in scripted rest API and add variable to a cat item using Cart APi and place order. You may get request number at end of creation.

 

Please check docs/ ref on how to parse payload from API in scripted rest API and how to create a task in server script using variables from the payload. 

Hello snehal, can I have any sample script for this

You should try to be hands on and script on own. It is not complex. parse the APi payload , instiantiate cart API and add variables and place order. good luck