Skip to content

Change by media name

By cluster through Web UI

For example, to change all labels in cluster Unknown C0 that match a query criteria Includes media filename trinity-2_20231109T19120, you might query in the web ui and see something like:

You can then make that change page by page.

Tip

Ctrl+A is a quick key to capture everything on the page, and ESC to deselect all. Be sure to choose verified to confirm you looked at them.

By cluster through the REST API

In the bulk REST API, you can change all of the localizations in the cluster. This process is faster and recommended for large clusters.

** First, do a dry run to see what will be changed - not this should match what you expect in the ui query **

curl -X 'POST' \
  'http://localhost:8001/label/filename_cluster/Kelp' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filter_media": "Includes",
  "media_name": "trinity-2_20231109T19120",
  "cluster_name": "Unknown C0",
  "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!!

{"message": "2352 localizations that include ['$name::trinity-2_20231109T19120'] and include ['cluster::Unknown C0']"}

** Then, do the cluster modifications with **

curl -X 'POST' \
  'http://localhost:8001/label/filename_cluster/Kelp' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filter_media": "Includes",
  "media_name": "trinity-2_20231109T19120",
  "cluster_name": "Unknown C0",
  "project_name": "901902-uavs",
  "dry_run": false
}'

You can also change localizations by cluster name in a given version in the web UI. This is useful if you want to change all localizations in a specific cluster across all media in that version.

For example, to change all localizations in cluster Unknown C0 in a given version Baseline, setting the attribute verified to true,

curl -X 'POST' \
  'http://mantis.shore.mbari.org:8001/label/cluster_name/Kelp' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "cluster_name": "Unknown C0",
  "project_name": "901902-uavs",
  "version": "Baseline",
  "dry_run": false,
  "verify": true
}'
{"message": "Set 2352 localizations in cluster Unknown C0 to verified true"}

To set to unverified instead, set the verify parameter to false:

curl -X 'POST' \
  'http://mantis.shore.mbari.org:8001/label/cluster_name/Kelp' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "cluster_name": "Unknown C0",
  "project_name": "901902-uavs",
  "version": "Baseline",
  "dry_run": false,
  "verify": false
}'
To leave the verified attribute unchanged, leave-off the verify parameter

curl -X 'POST' \
  'http://mantis.shore.mbari.org:8001/label/cluster_name/Kelp' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "cluster_name": "Unknown C0",
  "project_name": "901902-uavs",
  "version": "Baseline",
  "dry_run": false
}'

🗓️ Updated: 2025-09-02