Get Column Label Names for Incident Table with Rest API

Tim McFadden
Kilo Contributor

How do I query the rest API for Column Label Names?  I can query one incident to get all the columns like this.

https://myDev.service-now.com/api/now/v1/table/incident?sysparm_limit=1

find_real_file.png

 

But I need to get all the labels for each of the columns

find_real_file.png

1 ACCEPTED SOLUTION

John VanBruggen
Giga Guru

You can use this and it will get all the fields from incident and task.

Incident extends task so it also inherits all the fields from task.

https://{INSTANCENAME}.service-now.com/api/now/table/sys_dictionary?sysparm_query=name%3Dincident%5EORname%3Dtask&sysparm_fields=column_label

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

View solution in original post

19 REPLIES 19

John VanBruggen
Giga Guru

You can use this and it will get all the fields from incident and task.

Incident extends task so it also inherits all the fields from task.

https://{INSTANCENAME}.service-now.com/api/now/table/sys_dictionary?sysparm_query=name%3Dincident%5EORname%3Dtask&sysparm_fields=column_label

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

John VanBruggen
Giga Guru

Here is a deeper dive into this with a demo of ServiceNow's RESt API explorer.  Let med know if you have any other questions.

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

This is awesome.  Thanks for recording this video.  Super Helpful!!

You are very welcome!

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

Harika Bhupathi
Giga Guru
Hi Tim, I think you have marked another comment as correct. Since I have provided you the same solution first. Can you please choose appropriate one and mark it as correct answer?