X-Pagination-Total-Pages response header when the number of items per bucket is limited

Hello,

Following the issue discussed in https://community.vikunja.io/t/typesense-250-hits-limit, I decided to reset the VIKUNJA_SERVICE_MAXITEMSPERPAGE to 50. I am currently making an API request to retrieve tasks in a project via the /projects/{id}/views/{view}/tasks endpoint.

My question is: when a bucket contains more than 50 items, the response is limited to 50 items per bucket, and the X-Pagination-Total-Pages response header always shows a value of 1. If I add the query parameter /projects/{id}/views/{view}/tasks?page=2 to fetch the next set of 50 items from all buckets with more than 50 items, I still only receive the first 50 items.

How can I paginate to retrieve the next 50 items for all buckets using this endpoint?


I am using version v0.23.0-939-038e4ba386

That’s because the pagination value in that case is related to the number of buckets, not the number of tasks in a bucket.

To fetch tasks for a single bucket, you’ll need to do a request with a filter for buckets like this: bucket_id = 42 and set the page parameter to 2 (or which page you want to query).

The full url would look something like this:

https://try.vikunja.io/api/v1/projects/53/views/456/tasks?sort_by[]=position&order_by[]=asc&filter=bucket_id+%3D+68&page=2

Take a look at how the frontend loads the tasks in buckets when you scroll, that’s what we do there.