Servicenow APIs getting back wrong results due to pagination parameters
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 02:41 AM
Hi, I'm a security consultant at our organization and we read user and group member information from Servicenow using APIs.
Our servicenow instance has 292 groups and 1744 group memberships. When I do a call to servicenow APIs without any pagination parameters, I get 1744 unique records.
{{snow_prod_baseurl}}/table/sys_user_grmember?sysparm_fields=sys_id,group,user
But if I do a query using pagination parameters like below, I get 1000 unique results back in the first query and the second query gets back 744 results but some records of these 744 are duplicates of what I get in the first query
{{snow_prod_baseurl}}/table/sys_user_grmember?sysparm_fields=sys_id,group,user&sysparm_limit=1000&sysparm_query=ORDERBYsys_created_on&sysparm_offset=0
{{snow_prod_baseurl}}/table/sys_user_grmember?sysparm_fields=sys_id,group,user&sysparm_limit=1000&sysparm_query=ORDERBYsys_created_on&sysparm_offset=1000
Am I passing the wrong pagination parameters?
0 REPLIES 0