update metadata with API: validation error restricted files

34 views
Skip to first unread message

Christian Bischof

unread,
Oct 20, 2023, 6:12:46 AM10/20/23
to Dataverse Users Community

Hello,

 

I tried to update metadata via API on v5.12.1 following https://guides.dataverse.org/en/5.12.1/api/native-api.html#update-metadata-for-a-dataset

curl -H X-Dataverse-key:xxx "https://dv03.aussda.at/api/datasets/:persistentId/versions/:latest?persistentId=doi:10.11587/NVWE8Y" | jq '.data | {metadataBlocks: .metadataBlocks}' > dataset-update-metadata.json

curl -H X-Dataverse-key:xxx -X PUT "https://dv03.aussda.at/api/datasets/:persistentId/versions/:draft?persistentId=doi:10.11587/NVWE8Y" --upload-file dataset-update-metadata_new.json

And I got this error:

Error: "Validation Failed: Terms of Use and Access are invalid. You must enable request access or add terms of access in datasets with restricted files.”

I only want update the fields in the metadata block. Enable request access and terms of access are set and there are no changes.

 

A really appreciate your help

Christian

Philip Durbin

unread,
Oct 20, 2023, 11:50:33 AM10/20/23
to dataverse...@googlegroups.com
Hmm, I'm a little confused myself about editing license/terms via API. We closed https://github.com/IQSS/dataverse/issues/5899 a while ago, possibly because it should be possible with the semantic API instead? Would you be able to give that a try? https://guides.dataverse.org/en/5.12.1/developers/dataset-semantic-metadata-api.html

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/dd9ced2d-4bd8-46a8-80e1-e48edaa79e4cn%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages