-
Notifications
You must be signed in to change notification settings - Fork 496
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 'metadatablocks' endpoint to include the 'multiple' field #8944
Comments
This is related to #8822 and IQSS/dataverse-pm#26 |
Yes, sure. Good idea @JR-1991. I assume you only want to add to the JSON output, not change anything. Are you thinking about making a pull request? We've been talking a lot internally about APIs and what the community needs. This is an API I sort of forgot even existed. 😄 Here's a handy link to the docs: https://guides.dataverse.org/en/5.11.1/api/native-api.html#show-info-about-all-metadata-blocks The API seems extremely useful. Here is some example output:
|
With toArray().toString() we were getting something like this: [Ljava.lang.Object;@76d0a290
#8944 - Extend 'metadatablocks/{block_id}' endpoint JSON output
Overview of the Feature Request
Extend the
/metadatablocks/{identifier}
endpoint to include themultiple
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 themultiple
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:
The text was updated successfully, but these errors were encountered: