Get the total no of records via api for meta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 12:20 AM
For table API, api/now/stats/tablename returns the total no of records.
For some fields like priority, impact, category, subcategory and etc in incidents. I don't find any direct table api to get the records. So i tried with /api/now/ui/meta/incident fetching the choices of each json.
But how will i get the total no of records for this ?
"subcategory": {
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 02:53 AM
Team, Kindly provide update on the posted query

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 03:39 AM
Hi,
Your question is unclear. What is it you want to do here?
Have you played around with the REST API explorer in ServiceNow?
It might help you get what you're after.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 04:55 AM
Okay. Yeah i tried REST API explorer but i couldn't find any for my requirement.
For incidents there are some fields like channel , state , impact, urgency , priority, category , subcategory.
For getting these fields data, i have used the api - /api/now/ui/meta/incident.
How will i get the number of data in each field ? For instance i want to know the count of data under priority.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 05:07 AM - edited 07-05-2023 05:11 AM
Sorry, I'm still not following.
Are you interested in getting all records with a specific choice ?
If so, use the REST API Explorer to build a query from your requirements.
If you are interested in getting the valid choices, for example the Category choice, that data is stored in another table [sys_choice], you can examine the choices available by opening a record, and inspect the dictionary entry.
How to inspect Dictionary entry, right-click the field label.