Hi Phil,
Based on our tests, it seems we need to make the following requests to determine which metadata is required in a given collection:
1) Obtain the metadata blocks specific to that collection:
https://guides.dataverse.org/en/6.7.1/api/native-api.html#show-info-about-all-metadata-blocks2) Iterate over each metadata block and check which fields are required:
For example:
https://demo.dataverse.org/api/metadatablocks/citation3) Obtain the metadata required globally by the repository:
The resource to be queried seems to be (/api/dataverses/$ID/inputLevels).:
https://guides.dataverse.org/en/6.7.1/api/native-api.html#id38However, it only returns results if the collection does not inherit from the parent Dataverse.
For instance, here is a case where it returns an empty result:
https://demo.dataverse.org/api/dataverses/dataverseDeTestes/inputLevelsresponse:
{
“status”: “OK”,
“data”: []
}
Here is a case where it returns the complete metadata listing:
https://demo.dataverse.org/api/dataverses/reqFields/inputLevelsExcerpt from the response:
"
{
“status”: “OK”,
“data”: [{
“datasetFieldTypeName”: “datasetContactAffiliation”,
“required”: false,
“include”: true
}, {
...
"
How we can perform this query?
Would this approach work, or is there a simpler way?
Thanks,
Pablo