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

Extend DataFile API payload and new endpoints for Files (getHasBeenDeleted) and Access (userFileAccessRequested) #9900

Merged

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented Sep 12, 2023

What this PR does / why we need it:

While developing the Files tab UI for the SPA, we noticed that we need this API extension.

This PR includes the following new endpoints:

  • userFileAccessRequested (/api/access/datafile/{id}/userFileAccessRequested): Returns true or false depending on whether or not the calling user has requested access to a particular file.

  • hasBeenDeleted (/api/files/{id}/hasBeenDeleted): Know if a particular file that existed in a previous version of the dataset no longer exists in the latest version.

In addition, the DataFile API payload has been extended to include the following fields:

  • tabularData: Boolean field to know if the DataFile is of tabular type

  • fileAccessRequest: Boolean field to know if the file access requests are enabled on the Dataset (DataFile owner)

Which issue(s) this PR closes:

Suggestions on how to test this:

Test new API endpoints with curl calls:

curl -H "X-Dataverse-key:$API_TOKEN" -X GET "$SERVER_URL/api/files/$ID/hasBeenDeleted"

curl -H "X-Dataverse-key:$API_TOKEN" -X GET "$SERVER/api/access/datafile/{id}/userFileAccessRequested"

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

@GPortas GPortas marked this pull request as ready for review September 12, 2023 11:43
@GPortas GPortas added this to Ready for Review ⏩ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) via automation Sep 12, 2023
@github-actions

This comment has been minimized.

@GPortas GPortas added the Size: 3 A percentage of a sprint. 2.1 hours. label Sep 13, 2023
…S/dataverse into 9851-datafile-payload-extension
@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:9851-datafile-payload-extension
ghcr.io/gdcc/configbaker:9851-datafile-payload-extension

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

@sekmiller sekmiller self-assigned this Sep 27, 2023
@scolapasta scolapasta moved this from Ready for Review ⏩ to In Review 🔎 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Sep 27, 2023
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from In Review 🔎 to Ready for QA ⏩ Sep 27, 2023
@sekmiller sekmiller removed their assignment Sep 27, 2023
@kcondon kcondon self-assigned this Sep 28, 2023
@kcondon kcondon merged commit d4af8cf into 9834-files-api-extension-file-counts Sep 28, 2023
13 of 14 checks passed
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Ready for QA ⏩ to Done 🚀 Sep 28, 2023
@kcondon kcondon deleted the 9851-datafile-payload-extension branch September 28, 2023 20:45
@pdurbin pdurbin added this to the 6.1 milestone Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 3 A percentage of a sprint. 2.1 hours.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants