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

Modify Dataverse API calls to use 'excludeFiles' parameter #111

Closed
ekraffmiller opened this issue Jan 2, 2024 · 0 comments · Fixed by #112
Closed

Modify Dataverse API calls to use 'excludeFiles' parameter #111

ekraffmiller opened this issue Jan 2, 2024 · 0 comments · Fixed by #112
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: 3 A percentage of a sprint. 2.1 hours.

Comments

@ekraffmiller
Copy link
Contributor

In this Dataverse PR the Dataverse API has changed to use 'excludeFiles' instead of 'includeFiles'. So the library calls to Dataverse need to use this new parameter.
IQSS/dataverse#10191

For the SPA, we need to be able to show the View Dataset page for the Deaccessioned dataset, whether or not the user has edit permissions on the dataset. So we can get the dataset by using parameters includeDeaccessioned=true & excludeFiles=true.

From the Dataverse ticket:

We agreed to change the parameter name from includeFiles with excludeFiles, this is the default and the lack of the parameter will default to false so files are expected to be included by default if this parameter is not provided.

getVersionFiles, getVersionFileCounts and getDownloadSize act exactly as before, this check would execute every time includeDeaccessioned was set to true, getDatasetVersionCitation will skip this test when includeDeaccessioned is true and getVersion will check for when includeDeaccessioned is true and excludeFiles is false. This change also replaced includeFiles with excludeFiles which is the default behaviour.

This change required to update Datasets.getDatasetVersionOrDie which impacted the following methods:

getVersion {id}/versions/{versionId: Will check file permissions when files when excludeFiles and includeDeaccessioned are true.
getVersionFiles {id}/versions/{versionId}/files: Will check file permissions when includeDeaccessioned is true.
getVersionFileCounts {id}/versions/{versionId}/files/counts: Will check file permissions when includeDeaccessioned is true.
getDownloadSize {identifier}/versions/{versionId}/downloadsize: Will check file permissions when includeDeaccessioned is true.
getDatasetVersionCitation {id}/versions/{versionId}/citation: Won't check file permissions.
listVersions {id}/versions: replaced includeFiles with excludeFiles which is the default.

@ekraffmiller ekraffmiller added 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 labels Jan 2, 2024
@ekraffmiller ekraffmiller changed the title Modify Dataverse API calls use cases to use 'excludeFiles' parameter Modify Dataverse API calls to use 'excludeFiles' parameter Jan 2, 2024
@GPortas GPortas moved this to In Progress 💻 in IQSS Dataverse Project Jan 3, 2024
@GPortas GPortas self-assigned this Jan 3, 2024
@GPortas GPortas added Size: 10 A percentage of a sprint. 7 hours. Size: 3 A percentage of a sprint. 2.1 hours. and removed Size: 10 A percentage of a sprint. 7 hours. labels Jan 3, 2024
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: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
2 participants