Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Servicenow api to get catalog tasks based on short_description

Phanikanth
Kilo Contributor

Hi team,

I have catalog tasks and need to filter the SC task based on short_description. Please suggest the api.

I have tried the api below to get sc task which have shot desc,there are may sc tasks available in servicenow based on my shot_desc ,but in api it was returning only one sc task. 

find_real_file.png

 

 

\find_real_file.png

2 REPLIES 2

Tom Sienkiewicz
Mega Sage

Perhaps you can try with a different query in your URL. The below should return up to 10 test records:

 

https://devXXX.service-now.com/api/now/table/sc_task?sysparm_query=short_descriptionLIKEshop&sysparm_limit=10

 

I am able to retrieve multiple tasks that way. It could also be that somewhere in postman you have set a limit of records returned?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

check in the header if any sysparm_limit is set as 1 and hence it's returning 1 record only

Regards
Ankur

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