Fix the current behavior when using the :latest tag in getVersion API calls for deaccessioned datasets and unauthenticated users #10207
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.
Type: Bug
a defect
User Role: API User
Makes use of APIs
Milestone
Overview of the Feature Request
The recent introduced changes on #10191 have introduced an unexpected behavior on the Datasets getVersion API endpoint.
Currently, we can obtain a deaccessioned dataset using :latest-published tag. Example:
curl -X GET "https://beta.dataverse.org/api/v1/datasets/:persistentId/versions/:latest-published?persistentId=doi:10.5072/FK2/UBKVYE&includeDeaccessioned=true&excludeFiles=true"
Or using the numeric tag (e.g. 1.0). Example:
curl -X GET "https://beta.dataverse.org/api/v1/datasets/:persistentId/versions/1.0?persistentId=doi:10.5072/FK2/UBKVYE&includeDeaccessioned=true&excludeFiles=true"
But we obtain a 404 error if we use :latest tag:
curl -X GET "https://beta.dataverse.org/api/v1/datasets/:persistentId/versions/:latest?persistentId=doi:10.5072/FK2/UBKVYE&includeDeaccessioned=true&excludeFiles=true"
The solution will involve modifying GetLatestAccessibleDatasetVersionCommand to handle "checkPerms" as an input parameter. This param should be set to false when the command is called from the getDataset endpoint with query params includeDeaccessioned=true and excludeFiles=true.
What kind of user is the feature intended for?
API User
What inspired the request?
What existing behavior do you want changed?
Support :latest tag in getVersion endpoint calls for deaccessioned datasets and unauthenticated users
Any brand new behavior do you want to add to Dataverse?
None
Any open or closed issues related to this feature request?
The text was updated successfully, but these errors were encountered: