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.

API to get display name of all tables in sys_dictionary.

sasidharreddy
Kilo Explorer

1.What is the api to get all names and displaynames of all tables in sys_dictionary ?

For eg

There is an Incident(incident) table, where 'Incident' is displayname and 'incident' is table name.

How to get all display names and table names from sys_dictionary using web services.

2. What is the api to get all fields of a particular table providing associative table name ?

2 REPLIES 2

darius_koohmare
ServiceNow Employee
ServiceNow Employee

You can do this with any number of API's, but for simplicity I would say use REST.


To get the table names and display values, do a GET call on the sys_db_object table.



GET https://INSTANCEPREFIX.service-now.com/api/now/table/sys_db_object



The Label will be the display name, and the Name will be the table name.


darius_koohmare
ServiceNow Employee
ServiceNow Employee

Also for #2, do a GET call on the sys_dictionary table. Add a filter condition by the name of the table.


GET https://INSTANCEPREFIX.service-now.com/api/now/table/sys_dictionary?sysparm_query=name=NAMEOFTABLE^i...