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

Add an API endpoint for extended File Level metadata #4616

Closed
raprasad opened this issue Apr 25, 2018 · 10 comments
Closed

Add an API endpoint for extended File Level metadata #4616

raprasad opened this issue Apr 25, 2018 · 10 comments

Comments

@raprasad
Copy link
Contributor

raprasad commented Apr 25, 2018

5/4/2018 update

Add an API endpoint where File Level metadata can be retrieved using a File ID or File DOI:

  • API input: Datafile id or Datafile DOI, optional Dataverse token
  • output: Datafile metadata including:
    • Owning dataset DOI
    • File-specific information already included in the native API for datasets
    • JSON-LD Metadata for the file's dataset
    • Any other relevant info

Notes:

  1. My specific use case involves knowing the Datafile ID and wanting to retrieve the JSON-LD citation for that file's dataset. Currently this is done in 3 steps:
    1. Use the search API to retrieve the file's dataset citation
    2. Parse the text citation for the dataset DOI
    3. Call the existing JSON-LD endpoint using the dataset DOI from above
  2. community benefit: If I am understanding Dataverse External Tools correctly, this will help other developers who could use the Datafile ID/DOI to get more display information for users and/or access other existing APIs. * http://guides.dataverse.org/en/4.8.5/installation/external-tools.html
  3. google group: https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!topic/dataverse-community/u6VjVQ0h8RU
@scolapasta
Copy link
Contributor

We also want to add an API for editing the metadata of a file, so we'll use this issue to track both edit and view of a file's metadata.

@scolapasta
Copy link
Contributor

It was pointed out you may be able to edit the md5 of a file with the existing dataset APIs. If so, this is a bug, and we should also fix that as a result of adding these new file level APIs (since they should use the same code fragments, ideally.

@matthew-a-dunlap
Copy link
Contributor

@scolapasta By editing file metadata do you mean updating? In other words the ability to upload json that overrides the current metadata?

@scolapasta
Copy link
Contributor

@matthew-a-dunlap yes, that's what I mean.

@matthew-a-dunlap
Copy link
Contributor

Should the new GET endpoint allow access to any arbitrary version of the metadata, or should it just return the latest?

@pdurbin
Copy link
Member

pdurbin commented Mar 19, 2019

@matthew-a-dunlap we don't want users to be able to change the MD5 of a file, for example.

Please see the "Create a dataset with files and directoryLabels using json" test here for the existing API endpoint:

https://github.com/IQSS/dataverse/blob/v4.11/src/test/java/edu/harvard/iq/dataverse/api/FileMetadataIT.java#L115

@matthew-a-dunlap matthew-a-dunlap changed the title Add an API endpoint for File Level metadata File Level Metadata API Improvements Mar 21, 2019
@matthew-a-dunlap
Copy link
Contributor

matthew-a-dunlap commented Mar 21, 2019

The new requirements for this story:

EDIT: we decided instead upon a new story #5674

@matthew-a-dunlap matthew-a-dunlap changed the title File Level Metadata API Improvements Streamline DataFile Metadata Creation/Read/Update Mar 21, 2019
@matthew-a-dunlap matthew-a-dunlap changed the title Streamline DataFile Metadata Creation/Read/Update Add an API endpoint for extended File Level metadata Mar 21, 2019
@matthew-a-dunlap matthew-a-dunlap removed their assignment Mar 21, 2019
@pdurbin
Copy link
Member

pdurbin commented Mar 21, 2019

@raprasad hi! Now that pull request #5529 has been merged, the first item on your list is easier:

  • Owning dataset DOI

curl -s https://dataverse.harvard.edu/api/search?q=entityId:3371438 | jq -r '.data.items[0].dataset_persistent_id'

doi:10.7910/DVN/TJCLKP

How much more of this issue are you still interested in?

@djbrooke
Copy link
Contributor

I'll close this one out. We can implement other parts of this as specific issues as needed as we build out additional external tools.

@pdurbin
Copy link
Member

pdurbin commented May 18, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants