Skip to content

Deletion

WIP

This is a work in progress. refresh the page to see any recent changes made

Any localization can be either deleted immediately or flagged for deletion by setting the deleted flag to true. Once flagged, the localization will still be visible in the UI, but will be marked as deleted. This is useful for keeping a record of what was deleted and by whom.

Deleting immediately

Flagging localizations for deletion

To do the deletion use the delete_flagged API, e.g.

curl -X 'DELETE' \
  'http://mantis.shore.mbari.org:8001/localizations/delete_flag' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "project_name": "901902-uavs",
  "dry_run": false
}'

Bulk deletion

Deleting by media filename

For example, delete all localizations for a given project that match a query criteria Includes media filename trinity-2_20231109T19120:

First, do a dry run to see what will be deleted. This should return a brief report of how many will be deleted. Make sure this matches what you expect by doing the equivalent query in the web UI!!

curl -X 'DELETE' \                                                                                                                                                            Mon Dec  4 17:35:55 2023
      'http://mantis.shore.mbari.org:8001/localizations/filename' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
  "filter": "Includes",
  "media_name": "trinity-2_20231109T19120",
  "project_name": "901902-uavs",
  "dry_run": true
}'

This will return a brief report of how many will be deleted. Make sure this matches what you expect by doing the equivalent query in the web UI!!

{"message":"Found 475 medias that equal ['$name::trinity-2_20231109T19120'] with 201 localizations"}

Then, do the actual delete by changing dry_run to false

curl -X 'DELETE' \                                                                                                                                                            Mon Dec  4 17:35:55 2023
      'http://mantis.shore.mbari.org:8001/localizations/filename' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
  "filter": "Includes",
  "media_name": "trinity-2_20231109T19120",
  "project_name": "901902-uavs",
  "dry_run": false
}'

🗓️ Updated: 2025-06-01