How to add sys_choice table on Rest API Explorer ?

Bhaskar
Tera Contributor

Bhaskar_0-1675186050031.png

 

Here i am not able to see the sys_choice table Please help me out .

 

Thanks

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, looking at an OOB PDI (tokyo)
sys_choice 'Allow access to this table via web services' == true

so you should be able to access the table via webservcies.


If you are trying to access via REST API Explorer (your screenshot) then I believe that the table is hidden by the same sys property that hides system tables for reporting.
https://docs.servicenow.com/en-US/bundle/tokyo-now-intelligence/page/use/reporting/concept/c_ReportO...


So adding sys_choice to 'glide.ui.permitted_tables'
/nav_to.do?uri=sys_properties.do?sys_id=c3dee8670a0a0aa70064b48de5ad973e
should allow it to be selected in REST API Explorer

but will also allow the table to be selecatble (by other users) in other places like reporting, so probably best not to enable this in a Production environment.

View solution in original post

5 REPLIES 5

Prince Arora
Tera Sage
Tera Sage

@Bhaskar ,

As per below mentioned thread, it seems that this work under "Inbound Rest API".
Direct API call on sys_choice 

Please mark my answer helpful, if it works for you!

Community Alums
Not applicable

DrewW
Mega Sage
Mega Sage

I believe sys_choice is filtered out along with some other system tables.  But if memory serves you can just pick another table to get the basic URL and then use Postman to test querying it.

Prabu Velayutha
Mega Sage
Mega Sage

Hello Bhaskar, can you explain what you're trying to achieve? You can create a scripted Rest API for post or get to an table, also it would appear on the Rest API explorer for test.