Skip to content

Commit

Permalink
still not sure about the formatting... #6980
Browse files Browse the repository at this point in the history
  • Loading branch information
landreev committed Jul 28, 2020
1 parent 23de0df commit 94121e7
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions doc/release-notes/6980-datacite-reservation-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 94121e7

Please sign in to comment.