[FOLIO-1157] /users?limit=0 returns "totalRecords": 0 Created: 21/Mar/18  Updated: 12/Nov/18  Resolved: 22/Sep/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Jon Miller Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Duplicate
duplicates RMB-96 Return count for query like /users?li... Closed
Sprint:

 Description   

Would it be possible to make it so that if you set limit=0, the query is still executed and sets totalRecords to the number of records that matches the filter criteria (if present)?

I found that if I execute

/users?limit=0

it returns

{
"users": [],
"totalRecords": 0,
"resultInfo":

{ "totalRecords": 0, "facets": [], "diagnostics": [] }

}

If I set limit=1, it will return the first user as expected and the totalRecords value is set to the number of matching records (not the limit value). I.e. if there are 208 matching records, it will return 208 not, 1. This is exactly what I want. It just doesn't work if limit is 0.

It would be nice to have this functionality so that you could get counts without having to return any user data.

I haven't yet tried the other APIs to see if the behavior is the same, but, it it would be good if it worked across all the APIs.


Generated at Thu Feb 08 23:11:15 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.