-
Notifications
You must be signed in to change notification settings - Fork 531
Description
Overview of the Feature Request
Extend the /metadatablocks/{identifier} endpoint to include the multiple field such that the schema can be used to programmatically upload data.
What kind of user is the feature intended for?
API Users
What inspired the request?
While presenting the EasyDataverse library at the Dataverse Community Meeting 2022 it was brought up in the discussion that the missing field could allow more users to upload datasets programmatically.
What existing behavior do you want changed?
The current REST-API implementation offers the possibility to fetch all metadatablock configurations by using the /metadatablocks/{identifier} endpoint. It provides relevant information of a metadatablock but lacks the multiple statement in a field, which on the flip is necessary to upload data via PyDataverse/HTTP. At the moment, the TSV file has to be inspected to find the corresponding values, but since metadatablock TSVs usually aren't hosted publicly this is only possible for those with access (except for the default TSVs)
An extension of the endpoint would allow users to infer the correct schema to upload datasets programmatically. Furthermore, this would allow EasyDataverse to generate Python interfaces at runtime without the need of hosting a generated API such as the one we are hosting at our university. This would allow the following functionality as an example:
from easyDataverse import Dataset
# Adds metadata configs as objects to which data can be added
dataset = Dataset.from_installation("https://www.mydataverse.com")
dataset.citation.add_author(...)