How to fetch variables of Task from REST API?

Karthik Reddy T
Kilo Sage

Hi All,

How to fetch variables of catalog task from REST API?

Thanks and Regards,

Karthik Reddy T

Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.
4 REPLIES 4

SatheeshKumar
Kilo Sage
From where you are triggering the rest calls?? If you are doing from a BR or script include in sc task table.. Then... current.fieldname ehould work If you are calling from some other places you need to use glideRecord to get task field values.

sachin_namjoshi
Kilo Patron
Kilo Patron

Service now provides OOB Service catalog REST API to fetch RITM variables.

 

https://<<<YOUR_INSTANCE_NAME>>>.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/variables


REgards,
Sachin

Hi Sachin,

Thanks for the response.

I want to fetch variables from Table API.

Is it possible?

 

Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.

You won't be able to use Table API to fetch RITM variables.

It's better to use Service Catalog OOB REST API since functionality is already available.

 

Regards,

Sachin