Get a list of catalog/service names from ServiceNow

neha_joshi
Kilo Contributor

I am using the below REST API URL to get the list of Service names from ServiceNow. But this is returning non-service entries as well. Am I using the wrong URL? Please help.

https://<baseurl>.service-now.com/api/now/table/sc_cat_item?sysparm_fields=name,sys_id

1 ACCEPTED SOLUTION

Hi Neha,



You're close. To add the additional parameters on the URL, add &sysparm_query=sys_class_name!=sc_cat_item_guide&type!=package&sys_class_name!=sc_cat_item_content



I recommend using the REST API Explorer on your instance to help you build the URL and see the returned results. It's a great helper tool.


View solution in original post

10 REPLIES 10

spartacus1
Tera Contributor

Thanks Chuck for the reply



I did copy paste it but still doesn't. But I did instead of word.. Laptops I used ID, see below and it works. But I don't want to do that, I want to use category name instead of using the id.



sys_class_name!=sc_cat_item_content^active=true^sys_class_name!=sc_cat_item_guide^category=59f586f23731300054b6a3549dbe5db7^EQ