Bulk Deletion
It is possible to delete multiple objects, of a given resource, sending as URL parameters the list of keys:
DELETE: http://{host}/ws/rest/{Resource name}/delete?key={key 1}&key={key 2}&key={key 3}...
All the objects will be deleted in the same transaction
Furthermore, Bulk Delete supports object resequencing. This is useful in cases where the order of the objects is crucial and has to be precise, but also it's required to delete several objects at once. For instance, BunkerCategories on Vessel are following strict priority order, thus upon deletion, the order should be re-aligned.
Re-sequencing is active ONLY when at least a valid 'resequenceBy' string is passed.
DELETE: http://{host}/ws/rest/{ResourceName}/delete?resequenceBy={sequence field}&parentProperty={parent property}&key={key1}&key={key2}...
Sequence field - is a string identifying the 'sequence property'. For example, it would be portCallSequence for ResourceName = PortCall.
Parent property - Optionally filter by the parent group using a string specifying the parent field. For example, if ResourceName is PortCall, pass the field ownedByVoyage to re-sequence only PortCalls belonging to the same voyage.
Last updated