-
Notifications
You must be signed in to change notification settings - Fork 0
How to: change the year that appears in a dataset citation field
Baptiste Vandecrux edited this page Mar 26, 2021
·
1 revision
The date in the citation can be set to the field "production date" (defined by the user in the metadata) instead of the "publication date" (dataset creation date).
To do so you need an API_Token and your dataset ID.
To get your API_TOKEN, click on your name in the top-right corner of the dataverse website, then see the API Token page.
To get a dataset ID, go to the dataset page then go to Edit > Permissions > Dataset On the permissions webpage, the ID will appear in the url of your browser: https://dataverse01.geus.dk/permissions-manage.xhtml?id=3196
Now, in your command prompt:
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SERVER=https:// dataverse01.geus.org export ID=123
curl -H "X-Dataverse-key:$API_TOKEN" -X PUT -d productionDate http://$SERVER/api/datasets/$ID/citationdate
You should get:
{"status":"OK","data":{"message":"Citation Date for dataset 123 set to: Production Date"}}
Original help page (not so clear to me): https://guides.dataverse.org/en/4.12/api/native-api.html#set-citation-date-field-for-a-dataset