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

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