Reverts revert of 9714-files-api-extension-filters and adds tabular file tag filtering to getVersionFiles endpoint and new endpoint for tagging tab files #9972
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Reverts recent revert due to accidentally merged PR.
The PR needed changes related to file tab tags filtering and file tab tagging through API, finally added in this PR.
Which issue(s) this PR closes:
N/A
Special notes for your reviewer:
Suggestions on how to test this:
Create a dataset and upload files. One of the uploaded files should be tabular.
Add tabular tags to the new tabular file through the new API endpoint. Use valid tabular tag values, such as "Survey" and "Genomics".
First, create the request json file. For example:
{"tabularTags":["Survey","Genomics"]}
Next, create a FILE_PATH variable with the name of the json file.
export FILE_PATH=<JSON_FILE_NAME>
Then, call the endpoint like this:
Call getVersionFiles endpoint with the new query parameter for filtering by a specific tabular tag. For example: "Genomics".
curl -H "X-Dataverse-key:<API_KEY>" "http://localhost:8080/api/datasets/<dataset_id>/versions/:latest/files?tabularTagName=Genomics"
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:
N/A