changeset 712:6c4fcd1ad337

bulk deletion
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Jun 2021 18:04:04 +0200
parents 4f658c25addd
children d92edd545754 1c1afe3cb037
files Sphinx/source/users/anonymization.rst Sphinx/source/users/rest.rst
diffstat 2 files changed, 21 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/users/anonymization.rst	Wed Jun 16 17:05:36 2021 +0200
+++ b/Sphinx/source/users/anonymization.rst	Wed Jun 16 18:04:04 2021 +0200
@@ -274,11 +274,11 @@
 the output of the second sample above::
 
   {
-   "Description" : "REST API",
-   "FailedInstancesCount" : 0,
-   "InstancesCount" : 2,
-   "IsAnonymization" : true,
-   "Resources" : [
+    "Description" : "REST API",
+    "FailedInstancesCount" : 0,
+    "InstancesCount" : 2,
+    "IsAnonymization" : true,
+    "Resources" : [
       {
          "ID" : "04c04806-27b01a5a-08ea66cb-cb36c8b9-ebe62fe3",
          "Path" : "/instances/04c04806-27b01a5a-08ea66cb-cb36c8b9-ebe62fe3",
@@ -304,8 +304,8 @@
          "Path" : "/patients/5faa0bf8-8a45520b-3a07e536-fc24f241-f59ae3e1",
          "Type" : "Patient"
       }
-   ]
-}
+    ]
+  }
 
   
 
--- a/Sphinx/source/users/rest.rst	Wed Jun 16 17:05:36 2021 +0200
+++ b/Sphinx/source/users/rest.rst	Wed Jun 16 18:04:04 2021 +0200
@@ -1127,6 +1127,20 @@
     $ curl -X DELETE http://localhost:8042/instances/8e289db9-0e1437e1-3ecf395f-d8aae463-f4bb49fe
 
 
+Starting with Orthanc 1.9.4, it is also possible to ``POST`` on the
+new route ``/tools/bulk-delete`` to delete at once a set of multiple
+DICOM resources that are not related (i.e. that don't share any parent
+DICOM resource). A typical use case is to delete a list of DICOM
+instances that don't belong to the same parent patient/study/series.
+The list of the :ref:`Orthanc identifiers <orthanc-ids>` of the
+resources to be deleted (that may indifferently correspond to
+patients, studies, series or instances) must be provided in an
+argument ``Resources`` in the body of the request. Here is a sample
+call::
+
+  $ curl http://localhost:8042/tools/bulk-delete -d '{"Resources":["b6da0b16-a25ae9e7-1a80fc33-20df01a9-a6f7a1b0","d6634d97-24379e4a-1e68d3af-e6d0451f-e7bcd3d1"]}'
+
+    
 Clearing log of changes
 ^^^^^^^^^^^^^^^^^^^^^^^