# HG changeset patch # User Sebastien Jodogne # Date 1623859444 -7200 # Node ID 6c4fcd1ad33760a00fd9bce5311b3754899b2217 # Parent 4f658c25addd25db81470792cf12f86ca2154f57 bulk deletion diff -r 4f658c25addd -r 6c4fcd1ad337 Sphinx/source/users/anonymization.rst --- 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" } - ] -} + ] + } diff -r 4f658c25addd -r 6c4fcd1ad337 Sphinx/source/users/rest.rst --- 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 ` 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 ^^^^^^^^^^^^^^^^^^^^^^^