Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend getVersionFiles API endpoint to include the total file count, which is required for pagination #10202

Closed
GPortas opened this issue Dec 22, 2023 · 1 comment · Fixed by #10215
Assignees
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

Comments

@GPortas
Copy link
Contributor

GPortas commented Dec 22, 2023

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?

  • None

Any brand new behavior do you want to add to Dataverse?

  • New field with total file count in getVersionFiles API endpoint response

Any open or closed issues related to this feature request?

@GPortas GPortas added Type: Feature a feature request User Role: API User Makes use of APIs 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 and removed Type: Feature a feature request labels Dec 22, 2023
@GPortas GPortas added the Size: 10 A percentage of a sprint. 7 hours. label Dec 22, 2023
@cmbz cmbz moved this to SPRINT READY in IQSS Dataverse Project Jan 3, 2024
@GPortas GPortas moved this from SPRINT READY to This Sprint 🏃‍♀️ 🏃 in IQSS Dataverse Project Jan 3, 2024
@stevenwinship stevenwinship self-assigned this Jan 8, 2024
@stevenwinship stevenwinship moved this from This Sprint 🏃‍♀️ 🏃 to In Progress 💻 in IQSS Dataverse Project Jan 8, 2024
@stevenwinship
Copy link
Contributor

stevenwinship commented Jan 8, 2024

@GPortas Since getting the total count takes time should we only get it when the offset is 0 (first call) or is it ok/desirable to get the total with each call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants