-
Notifications
You must be signed in to change notification settings - Fork 490
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
Dataset files API extension for file display data with pagination and sorting #9693
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Make sure you look at #9204 (merged, part of 5.14) which 'pre-sorts' by tags and/or file directory/folder - that's going to complicate your queries (assuming the initial goal is to stay current with 5.14). |
…for new endpoints
on testing for long parameters: will installations with FilePIDsEnabled ever want to send persistentIDs instead? (or am I mis-reading) |
@donsizemore Thanks for this comment. It made me remember that @qqmyers I'm going to add the |
…ata file existence verifications
…pi-extension-display-data
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
…pi-extension-display-data
…SS/dataverse into 9692-files-api-extension-display-data
This comment has been minimized.
This comment has been minimized.
…pi-extension-display-data
This comment has been minimized.
This comment has been minimized.
…pi-extension-display-data
This comment has been minimized.
This comment has been minimized.
@GPortas I'll move this milestone 6.1 issue to "ready for Review", but I'm assigning you first so that you can handle the 6.0 merge and address any EE10 issues. When done, this one can actually go back to ready for QA (barring no major edits). |
…pi-extension-display-data
This comment has been minimized.
This comment has been minimized.
@GPortas The dataTables endpoint allows downloading table of a restricted file by a guest (no perms, no key) |
@kcondon By downloading you mean getting the json payload from the In that case, how sensitive do you think the dataTables payload is? I was treating it at the same level as fileMetadata |
@GPortas I've discussed with members of the team and our data privacy project, OpenDP, does allow access to summary stats to private files but only after they calculate them with some noise added so a user cannot reverse engineer, along with some outside data for which they also have summary stats, who or what is being described. So, yes, summary stats should not be shared when "private", either due to belonging to a restricted or embargoed file (it happens here, too). The OpenDP summary stats get saved as a separate auxiliary file, not in the datatable. Additionally, the export as DDI endpoint normally contains summary stats but it does not for restricted files. |
…d embargoed files
@kcondon Makes sense, thank you for the explanation. I have updated the code following that approach. In addition to permission checks for restricted files, I've also added them for embargoed files, since I consider that they meet the same requirements here regarding their privacy. Furthermore, there is already an endpoint related to tabular files where these permission checks are done (restricted + embargoed): https://github.com/IQSS/dataverse/blob/develop/src/main/java/edu/harvard/iq/dataverse/api/Access.java#L468C17-L468C17 |
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
What this PR does / why we need it:
We need this API extension to support dataset files tab display data in the new frontend, as well as extend the capabilities of the API for other use cases.
In particular, this API extension includes:
Which issue(s) this PR closes:
Closes #9692
Special notes for your reviewer:
Support for category and folder grouping in Files tab
Initially mentioned in: #9693 (comment)
This PR does not include changes recently implemented in #9204 for JSF. An issue has been created in the frontend repository for supporting those changes in the SPA: IQSS/dataverse-frontend#142 (This will potentially result in an API extension spike issue to support the SPA).
Suggestions on how to test this:
You can test the
getVersionFiles
endpoint by combining its new optional parameters (offset, limit, and orderCriteria). For example:curl -H "X-Dataverse-Key: <API_TOKEN>" -X GET "http://localhost:8080/api/v1/datasets/:persistentId/versions/:latest/files?persistentId=<PID>&offset=10&limit=5&orderCriteria=Newest"
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
Yes
Additional documentation:
No