-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
The reports page is going to show a huge quantity of data, so we need to think about paginating this data. The backend should modify the time-entries endpoint so that it can return only certain data.
Acceptance criteria
-
Create a new GET
time-entries/paginatedendpoint. -
The GET
time-entries/paginatedreceives the following query parameters:
- length (number): The number of rows the endpoint should return
- start: ( number): The number of rows to be removed from the query. ( aka
offset) - search (string): A string query to be used as a data filter.
- The GET
time-entries/paginatedreturns the following body:
{"recordsTotal":57,"recordsFiltered":1,"data":[{running: true, owner_id: "dd76e5d6-3949-46fd-b418-f15bf7c354fa", project_name: "Time Tracker",…}]}
where:
recordsTotal: Total number of entries
recordsFiltered: Number of entries returned by the endpoint
data: the entry list