Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Getting referencing tables via API

AleksaStojanov
Tera Contributor

Hi all,
Is there a way to get referencing tables via API?

AleksaStojanov_1-1708337702137.png

Thanks in advance!

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron

Hi @AleksaStojanov 

Let's give the Table API a try.

GET https://<your_instance_name>/api/now/table/{tableName}

 

Basically you can query to the Dictionary [sys_dictionary] table to retrieve all the entries that referencing to the Stockroom [alm_stockroom]. So in your case the API is like below.

https://<your_instance_name>/api/now/table/sys_dictionary?sysparm_query=internal_type=reference^reference=alm_stockroom&sysparm_fields=name

Timi_0-1708339285622.png

 

 

Cheers,

Tai Vu

View solution in original post

2 REPLIES 2

Dr Atul G- LNG
Tera Patron

Hi @AleksaStojanov 

 

I doubt we have any direct way to do , but we can use the records of these tables. What is use case of refereeing table via API.

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Tai Vu
Kilo Patron

Hi @AleksaStojanov 

Let's give the Table API a try.

GET https://<your_instance_name>/api/now/table/{tableName}

 

Basically you can query to the Dictionary [sys_dictionary] table to retrieve all the entries that referencing to the Stockroom [alm_stockroom]. So in your case the API is like below.

https://<your_instance_name>/api/now/table/sys_dictionary?sysparm_query=internal_type=reference^reference=alm_stockroom&sysparm_fields=name

Timi_0-1708339285622.png

 

 

Cheers,

Tai Vu