-
Notifications
You must be signed in to change notification settings - Fork 495
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
kcondon
merged 14 commits into
9834-files-api-extension-file-counts
from
9851-datafile-payload-extension
Sep 28, 2023
Merged
Extend DataFile API payload and new endpoints for Files (getHasBeenDeleted) and Access (userFileAccessRequested) #9900
kcondon
merged 14 commits into
9834-files-api-extension-file-counts
from
9851-datafile-payload-extension
Sep 28, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…DataFile API payload
…S/dataverse into 9851-datafile-payload-extension
This comment has been minimized.
This comment has been minimized.
…S/dataverse into 9851-datafile-payload-extension
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
sekmiller
approved these changes
Sep 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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