Is there any API to get the List of tables present in ServiceNow?

rna
Kilo Explorer

Is there any SOAP or REST api which can get the list of tables Both standard and custom tables present in serviceNow?

1 ACCEPTED SOLUTION

emir_e_eminovic
Giga Contributor

sys_db_object_list



From the left navigation pane, select System Definition > Tables and Columns. Click tables


Name has all the tables/views.



Tables & views has th elist and a schema. use .list to view it remotely.


View solution in original post

8 REPLIES 8

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Rohit,



You can query sys_db_object via


REST api or


Table API - ServiceNow Wiki


SOAP api


SOAP Direct Web Service API - ServiceNow Wiki



As noted in Re: Staging table list


You could define sysparm_query=nameNOT LIKE00


or something similar, to exclude rotated tables as the rotated tables have names ending in 00[0-9][0-9]


Best Regards



Tony


adiddigi
Tera Guru

I don't believe there is an API to get the list of all the tables and columns. Your best bet is to build a processor that takes in a parameter and gives you the list of Fields / Tables. Another option is to use a Webservice on sys_dictionary table which I wouldn't recommend.


tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Rohit,



How are you getting on? Did you find a solution that suited you? Anything you would like to share with the Community?




Consider marking the question as answered, marking replies as helpful.




Best Regards




Tony


adiddigi
Tera Guru

If you doing a custom application in Fuji, then I see there is an API to get the fields.IT's called GlideTableHierarchy, and it is present on developer website.