We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

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
Tera 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

Max C
Kilo Contributor

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?