Querying for Dictionary Entries using REST interface

macmceldon
Kilo Contributor

Hi,

I'm trying to use the REST TABLE API (Fuji, Latest) to pull dictionary entries such as Priority, State etc. I can get access to the sys_dictionary table but not seeing how I get to the dictionaries within. Please help.

Thanks

MM

1 ACCEPTED SOLUTION

Hi MM,



If you want to retrieve all the categories for the incident table then you may want to query the sys_choice table where table is incident and element is category.



The query string will be something like: sysparm_query=nameSTARTSWITHincident%5EelementSTARTSWITHcategory



Thanks,


Berny


View solution in original post

7 REPLIES 7

Tony;



I want to retrieve ALL of the dictionary entries for Category (as an example) using the REST API.



Pseudo example;



https://myinstance.service-now.com/api/now/table/sys_dictionary?sysparm_limit=10&sysparm_query=GIVE ME ALL CATEGORIES FOR INCIDENT TABLE



The goal being to retrieve all key value pairs as per below;



Capture.JPG


Thank You


MM


Hi MM,



If you want to retrieve all the categories for the incident table then you may want to query the sys_choice table where table is incident and element is category.



The query string will be something like: sysparm_query=nameSTARTSWITHincident%5EelementSTARTSWITHcategory



Thanks,


Berny


You nailed it Berny - thanks for the assistance..



MM