How to get RITM number using SC task number from Table REST api

Shreshth Nawand
Kilo Contributor

Hi, 

I am wondering how I can get the RITM (TASK number ex. TASK1045001) by using the Table REST api. 

The format of the GET API call I am currently makining is something like: 

curl -X GET 'org_name/api/now/table/sc_task/sysparm_limit==100&sysparm_display_value=true&sysparm_query=...'

I am expecting this GET request to give me me the details of each individual task in the table, however it is only giving the "sys_id", and "sys_domain" of each task. I am specifically looking for the RTIM number, along with other details and fields. 

How would I be able to do this? 

Thank you.

1 REPLY 1

Jon23
Mega Sage
Try including 'sysparm_fields=request_item.number':

curl "https://servicenow_instance/api/now/table/sc_task?sysparm_query=active%3Dtrue&sysparm_display_value=both&sysparm_fields=request_item.number&sysparm_limit=10"

 --> To help others, please mark this as Correct or Helpful if this response has been of any use. <--