-
Notifications
You must be signed in to change notification settings - Fork 490
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
API for auditing physical files and file metadata #11016
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
60d6f92
audit physical files
stevenwinship 804d284
Update doc/release-notes/220-harvard-edu-audit-files.md
stevenwinship a62193c
Update doc/sphinx-guides/source/api/native-api.rst
stevenwinship d0df4f0
Update doc/sphinx-guides/source/api/native-api.rst
stevenwinship a1d1030
Update doc/sphinx-guides/source/api/native-api.rst
stevenwinship e433ee2
Update doc/release-notes/220-harvard-edu-audit-files.md
stevenwinship e4751c5
Update doc/release-notes/220-harvard-edu-audit-files.md
stevenwinship 456f9f6
Update doc/release-notes/220-harvard-edu-audit-files.md
stevenwinship 9b15681
Update src/main/java/edu/harvard/iq/dataverse/api/Admin.java
stevenwinship 2586c33
fix camelcase for datasetIdentifierList
stevenwinship abfc738
fix camelcase for datasetIdentifierList
stevenwinship b64addc
reformat json output
stevenwinship e89f1ca
reformat json output
stevenwinship 7e9aae9
reformat json output
stevenwinship 11cbe85
reformat json output
stevenwinship 3eec366
adding directory label to json and changing camelCase
stevenwinship 26e8574
tabs to spaces
stevenwinship 2db26b2
add pid
stevenwinship 2c5aca8
fix typos
stevenwinship 3c67a79
Update doc/release-notes/220-harvard-edu-audit-files.md
stevenwinship 58d3235
Update doc/release-notes/220-harvard-edu-audit-files.md
stevenwinship 50b752a
fix typos
stevenwinship a192c17
fix release note
stevenwinship e06e1d2
fix api doc
stevenwinship 8c79f67
fix api doc
stevenwinship File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
### New API to Audit Datafiles across the database | ||
|
||
This is a superuser only API endpoint to audit Datasets with DataFiles where the physical files are missing or the file metadata is missing. | ||
The Datasets scanned can be limited by optional firstId and lastId query parameters, or a given CSV list of Dataset Identifiers. | ||
Once the audit report is generated, a superuser can either delete the missing file(s) from the Dataset or contact the author to re-upload the missing file(s). | ||
|
||
The JSON response includes: | ||
- List of files in each DataFile where the file exists in the database but the physical file is not in the file store. | ||
- List of DataFiles where the FileMetadata is missing. | ||
- Other failures found when trying to process the Datasets | ||
|
||
curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles" | ||
curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles?firstId=0&lastId=1000" | ||
curl -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/admin/datafiles/auditFiles?datasetIdentifierList=doi:10.5072/FK2/RVNT9Q,doi:10.5072/FK2/RVNT9Q" | ||
|
||
For more information, see [the docs](https://dataverse-guide--11016.org.readthedocs.build/en/11016/api/native-api.html#datafile-audit), #11016, and [#220](https://github.com/IQSS/dataverse.harvard.edu/issues/220) |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is out of scope for this PR, but if there is missing file metadata, what do I do? Can I fix this via API? Or do I have to hack on the database?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the owner has to delete the file and re-upload it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds right. Thanks.