Extend getVersionFiles API endpoint to include the total file count, which is required for pagination #10202
Labels
pm.GREI-d-2.7.1
NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows
pm.GREI-d-2.7.2
NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows
Size: 10
A percentage of a sprint. 7 hours.
User Role: API User
Makes use of APIs
Milestone
Overview of the Feature Request
To paginate the results of getVersionFiles it is necessary to know the total file count and thus know the pagination limit. Currently a separate endpoint (getVersionFileCounts) is used to know the total file count.
The goal is to add the total file count in the getVersionFiles response so we don't have to use an additional endpoint to know the total file count and avoid an additional API call.
The Solr search API implements pagination in this way, returning {"total_count", "items"} in the response payload, so this extension will make the API experience more consistent between search endpoints.
The getVersionFileCounts endpoint is necessary to know the different file counts for each filter option, so it is necessary in any case and should remain in the API.
What kind of user is the feature intended for?
API User
What inspired the request?
What existing behavior do you want changed?
Any brand new behavior do you want to add to Dataverse?
Any open or closed issues related to this feature request?
The text was updated successfully, but these errors were encountered: