I am on version 2.0.2.
When doing API requests that return multipage results, the page and device count seems to be off.
When I do a request for e.g. device by description (http://unimus/api/v2/devices/findByDesc ... escription>), the pagination data seems to return the total number of devices in the database, and not the devices matching the search. The exemption being when I hit the last page, where it returns the correct results.
Example:
When searching for a description that should return 379 devices, with a result size of 50, page 0:
http://unimus/api/v2/devices/findByDesc ... =50&page=0
"paginator":{"totalCount":22728,"totalPages":455,"page":0,"size":50}}
Then page 7 (last page) for the same search:
http://unimus/api/v2/devices/findByDesc ... =50&page=7
"paginator":{"totalCount":379,"totalPages":8,"page":7,"size":50}}
Is there something I am doing wrong here, or is it a bug in the API?
Thank you in advance for any input.
[Fixed in 2.0.5] API paginator
-
- Posts: 23
- Joined: Tue Aug 11, 2020 12:08 pm
Hi,
Perfect, thank you for your quick reply.
I'll work around it until the next update.
Perfect, thank you for your quick reply.
I'll work around it until the next update.