From f2e1ff9858851e349ff1ca60a85c3bc69318eaed Mon Sep 17 00:00:00 2001 From: Don Sizemore Date: Mon, 25 Mar 2019 10:13:22 -0400 Subject: [PATCH] #2593 this should've gone in the dataset section --- doc/sphinx-guides/source/api/native-api.rst | 37 ++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/doc/sphinx-guides/source/api/native-api.rst b/doc/sphinx-guides/source/api/native-api.rst index 80a1d3c3362..bf4a8c458a1 100644 --- a/doc/sphinx-guides/source/api/native-api.rst +++ b/doc/sphinx-guides/source/api/native-api.rst @@ -264,13 +264,6 @@ Get JSON Representation of a Dataset GET http://$SERVER/api/datasets/$id?key=$apiKey -Delete Dataset -~~~~~~~~~~~~~~ - -Delete the dataset whose id is passed:: - - DELETE http://$SERVER/api/datasets/$id?key=$apiKey - List Versions of a Dataset ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -618,6 +611,23 @@ If the dataset is not locked (or if there is no lock of the specified type), the (Note that the API calls above all support both the database id and persistent identifier notation for referencing the dataset) +Delete Unpublished Dataset +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Delete the dataset whose id is passed:: + + curl -X DELETE http://$SERVER/api/datasets/$id?key=$apiKey + +Delete Published Dataset +~~~~~~~~~~~~~~~~~~~~~~~~ + +Normally published datasets should not be deleted, but there exists a "destroy" API endpoint which will act on a dataset given a persistent ID or dvobject database ID: + + curl -X DELETE http://$SERVER/api/datasets/:persistentId/destroy/?persistentId=doi:10.5072/FK2/AAA000 + + curl -X DELETE http://$SERVER/api/datasets/999/destroy + +Calling the destroy endpoint is permanent and irreversible. It will remove the dataset and its datafiles, then re-index the parent dataverse in Solr. This endpoint requires the API token of a superuser. Files ----- @@ -1343,15 +1353,4 @@ Recursively applies the role assignments of the specified dataverse, for the rol GET http://$SERVER/api/admin/dataverse/{dataverse alias}/addRoleAssignmentsToChildren -Note: setting ``:InheritParentRoleAssignments`` will automatically trigger inheritance of the parent dataverse's role assignments for a newly created dataverse. Hence this API call is intended as a way to update existing child dataverses or to update children after a change in role assignments has been made on a parent dataverse. - -Delete Published Dataverses or Datasets -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Normally published datasets should not be deleted, but there exists a "destroy" API endpoint which will act on a dataset given a persistent ID or dvobject database ID: - - DELETE http://$SERVER/api/datasets/:persistentId/destroy/?persistentId=doi:10.5072/FK2/AAA000 - - DELETE http://$SERVER/api/datasets/999/destroy - -Calling the destroy endpoint is permanent and irreversible. It will remove the dataset and its datafiles, then re-index the parent dataverse in Solr. This endpoint requires the API token of a superuser. +Note: setting ``:InheritParentRoleAssignments`` will automatically trigger inheritance of the parent dataverse's role assignments for a newly created dataverse. Hence this API call is intended as a way to update existing child dataverses or to update children after a change in role assignments has been made on a parent dataverse. \ No newline at end of file