How to get only number of records with Rest API filter conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 03:16 AM
Hi all, we have given Rest API url to other tool to fetch records from one table. As there are more records, they wanted to call two or three time and use sysparm_limit and sysparm_offset, but to use this, they wanted to know how many records present in the table. How to get only number of records with given condition in REST API url.
Also how to exclude soem particular fields in Json when querying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 02:47 PM
Hi Krishna,
Would you try making the below API call to obtain record count?
https://<ServiceNowInstanceName>.service-now.com/api/now/v1/stats/incident?sysparm_query=sys_updated_on>=javascript:gs.dateGenerate('2023-01-01','00:00:00')^sys_updated_on<=javascript:gs.dateGenerate('2023-12-31','23:59:59')&sysparm_count=true&api=api
