Not getting table "sys_choice" in response of Schema API endpoint

jerryt
Tera Contributor

I send the request to the following URL "https://{HOST}/api/now/doc/table/schema" but I'm not getting tables "sys_choice" and "sys_translated_text" in the response. 

However I'm able to get the Schema for both the tables using endpoints "/sys_choice.do?SCHEMA" and "/sys_translated_text.do?SCHEMA". Is there anything I need to do so that both the tables will show up in the response of "api/now/doc/table/schema" endpoint?

Thanks,
Jerry

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Jerry,

Some system tables are not included by default.

To add them, add the table names to "glide.ui.permitted_tables" system properties.

  1. In Application Navigator, enter "sys_properties.list"
  2. Filter on "Name", "glide.ui.permitted_tables"
  3. Add "sys_choice" and "sys_translated_text" to Value field.

Example output

find_real_file.png

View solution in original post

4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, I cannot find any documentation for this API, and if it is not documented then I would not recommend that you utilize it; not only are you guessing at the intended functionality but you may develop a solution only to find the API is changed or unavailable following your next patch or upgrade.

There is a system property 'glide.ui.permitted_tables' that is used to control (reporting) access to system tables

Controlling access of reporting on system tables - Support and Troubleshooting (servicenow.com)

and testing quickly in a PDI it looks like this may be the cause.

But allowing reporting on this (or any system table) can have a negative impact on instance performance and I would suggest that you consider the potential impact very carefully before making any changes.

Hi Tony,

Nice work with your response as you covered both the system property and the appropriate supporting documentation that the author should review as well when making this change.

Otherwise, the other response merely echo'd what you've already said above.

It's unfortunate your reply wasn't mark as Correct, but I figured I'd call this out where you also include appropriate documentation as well. Thanks for helping the community!

-Allen


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Jerry,

Some system tables are not included by default.

To add them, add the table names to "glide.ui.permitted_tables" system properties.

  1. In Application Navigator, enter "sys_properties.list"
  2. Filter on "Name", "glide.ui.permitted_tables"
  3. Add "sys_choice" and "sys_translated_text" to Value field.

Example output

find_real_file.png

jerryt
Tera Contributor

Thank you both of you @Hitoshi Ozawa and @Tony Chatfield for your quick reply. I got the resolution.