Skip to content

Commit

Permalink
document "delete PID" API endpoint #5093
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed May 29, 2020
1 parent 786a7a4 commit 27da57a
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,7 @@ The fully expanded example above (without environment variables) looks like this
curl -H X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx https://demo.dataverse.org/api/pids?persistentId=10.70122/FK2/9BXT5O
List Unreserved PIDs
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
Get a list of PIDs that have not been reserved on the PID provider side. This can happen, for example, if a dataset is created while the PID provider is down. A superuser API token is required.
Expand Down Expand Up @@ -2589,6 +2589,28 @@ The fully expanded example above (without environment variables) looks like this
curl -H X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx https://demo.dataverse.org/api/pids/:persistentId/reserve?persistentId=10.70122/FK2/9BXT5O
Delete a PID
~~~~~~~~~~~~
Delete PID from DataCite (this is only possible for PIDs that are in the "draft" state) and within Dataverse, set ``globalidcreatetime`` to null and ``identifierregistered`` to false. A superuser API token is required.
.. note:: See :ref:`curl-examples-and-environment-variables` if you are unfamiliar with the use of export below.
.. code-block:: bash
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SERVER_URL=https://demo.dataverse.org
export PID=10.70122/FK2/9BXT5O
curl -H "X-Dataverse-key:$API_TOKEN" -X DELETE $SERVER_URL/api/pids/delete?persistentId=$PID
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl -H X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -X DELETE https://demo.dataverse.org/api/pids/delete?persistentId=10.70122/FK2/9BXT5O
.. _admin:
Admin
Expand Down

0 comments on commit 27da57a

Please sign in to comment.