From f71526dd1fc69c1a780102be724fc86e2074883d Mon Sep 17 00:00:00 2001 From: Leonid Andreev Date: Tue, 28 Jul 2020 18:12:51 -0400 Subject: [PATCH] still not sure about the formatting... #6978 --- .../6980-datacite-reservation-upgrade | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/doc/release-notes/6980-datacite-reservation-upgrade b/doc/release-notes/6980-datacite-reservation-upgrade index 0d54aef744a..dd0bb702b01 100644 --- a/doc/release-notes/6980-datacite-reservation-upgrade +++ b/doc/release-notes/6980-datacite-reservation-upgrade @@ -5,20 +5,19 @@ For Dataverses using Datacite v5.0 changes the process of registering the Global This approach makes the process of publishing datasets simpler and less error-prone. One drawback is that a dataset cannot be published until the DOI is reserved. Specifically, if your installation uses Datacite, the moment it is upgraded to v5.0, all the pre-existing unpublished drafts will become "unpublishable", until the DOIs are reserved. So it is important to do that immediately after the upgrade, by using the following APIs: `/api/pids/unreserved` will report the ids of the datasets -`/api/pids/:persistentId/reserve` - reserves the assigned DOI with Datacite (will need to be run on every id reported by the the first API). +`/api/pids/:persistentId/reserve` reserves the assigned DOI with Datacite (will need to be run on every id reported by the the first API). Scripted, the whole process would look as follows (adjust as needed):: - API_TOKEN='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' - - curl -H "X-Dataverse-key:$API_TOKEN" http://localhost:8080/api/pids/unreserved | - # the API outputs JSON; note the use of jq to parse it: - jq '.data.count[].pid' | tr -d '"' | - while read doi - do - curl -H "X-Dataverse-key:$API_TOKEN" -X POST http://localhost:8080/api/pids/:persistentId/reserve?persistentId=$doi - done - + API_TOKEN='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' + + curl -H "X-Dataverse-key:$API_TOKEN" http://localhost:8080/api/pids/unreserved | + # the API outputs JSON; note the use of jq to parse it: + jq '.data.count[].pid' | tr -d '"' | + while read doi + do + curl -H "X-Dataverse-key:$API_TOKEN" -X POST http://localhost:8080/api/pids/:persistentId/reserve?persistentId=$doi + done If you have a large number of unpublished drafts in the database, reserving them one by one may take some time. So if you want to be extra nice to your users, you may warn them ahead of time that some of them may not be able to publish their drafts immediately after the upgrade.