The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fetch Table Schema using REST API

adigelli
Kilo Contributor

Hi,

How can i fetch the schema of the particular table in serviceNow.

Can any one help.

Thanks.

4 REPLIES 4

Subhajit1
Giga Guru

You should be able to fetch the primary information from the sys_dictionary table by passing the table name parameter.


adigelli
Kilo Contributor

Hi Subhajit,



I have tried this command, i am getting big amount of o/p which is too large.



curl   -H "Authorization:Bearer BearerToken" "https://dev.service-now.com/api/now/v1/table/sys_dictionary?sysparm_query=GOTOname%3Dsys_user" -H "Accept:application/json"



Whether it is correct or not.


udaykemburu
ServiceNow Employee
ServiceNow Employee

Max C
Kilo Explorer

Looks like even with the http header -H "Accept:application/json" it is returning Xml.

 

Is there a way to force it to return Json?