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

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

Merged
merged 8 commits into from
Oct 9, 2023

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented Oct 4, 2023

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:

curl -H "X-Dataverse-key:<YOUR_API_KEY>" -X POST http://localhost:8080/api/files/<FILE_ID>/metadata/tabularTags -H "Content-type:application/json" --upload-file $FILE_PATH

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

@GPortas GPortas changed the title 9714 files api extension filters Reverts revert of 9714-files-api-extension-filters and adds tabular file tag filtering to getVersionFiles endpoint and new endpoint for tagging tab files Oct 4, 2023
@github-actions

This comment has been minimized.

@GPortas GPortas marked this pull request as ready for review October 4, 2023 15:53
@GPortas GPortas added the SPA These changes are required for the Dataverse SPA label Oct 4, 2023
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:9714-files-api-extension-filters
ghcr.io/gdcc/configbaker:9714-files-api-extension-filters

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@kcondon kcondon merged commit a209f43 into develop Oct 9, 2023
18 checks passed
@kcondon kcondon deleted the 9714-files-api-extension-filters branch October 9, 2023 17:45
@pdurbin pdurbin added this to the 6.1 milestone Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SPA These changes are required for the Dataverse SPA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants