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.

How to get all the table fields (including inherited table fields) through REST API

Haribabup
Mega Contributor

Team, 
We need to get all the fields for table for our feature. All the fields are coming except parent fields. 
Can anybody help me to get all the table fields ?

We are using this query to get all the fields : 

https://<our_instance>/api/now/table/sys_dictionary?sysparm_query=name=incident_task&sysparm_limit=10&sysparm_limit=1000


Thanks,
Hari

1 REPLY 1

Ratnakar7
Mega Sage

Hi @Haribabup ,

 

You can modify your query to include the sysparm_exclude_reference_link parameter and set it to true. This will exclude the reference links and provide the complete field information, including inherited fields.

Here's an example query to retrieve all the fields for the incident_task table:

 

 

https://<your_instance>/api/now/table/sys_dictionary?sysparm_query=name=incident_task&sysparm_limit=1000&sysparm_exclude_reference_link=true

 

 

 

Thanks,

Ratnakar