Skip to main content
DELETE
Delete Annotations
Click for Python SDK
This endpoint deletes all ground truth annotations on the dataset items or scenes you name. It works per item: you can’t delete a single annotation by its ID, and there’s no call that deletes every annotation in a dataset.
  • reference_ids is required and must contain at least one reference ID. Each ID can be a dataset item or a scene. If any ID isn’t in the dataset, the whole request fails with a 400.
  • For dataset items, this removes the item’s ground truth annotations and segmentation masks. For scenes, it removes the scene’s category annotations. Model predictions are not affected.
  • keep_history defaults to true, which keeps the annotations’ version history. Set it to false to delete the history as well.
Deleting annotations can take a while, so the request runs asynchronously. It returns 202 with a job_id before deletion has finished; use the job to check its status.
Re-uploading with update=True doesn’t remove annotations: it only overwrites annotations that match on annotation_id and reference_id, and leaves the rest in place. To keep only some of an item’s annotations, delete all of the item’s annotations with this endpoint, wait for the job to complete, then upload the annotations you want to keep. See Add Geometric Annotations.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

dataset_id
string
required

The Scale-generated ID of the Dataset.

Body

application/json
reference_ids
string[]
required

Reference IDs of the dataset items or scenes whose ground truth annotations you want to delete. At least one is required. If any ID is not in the dataset, the whole request fails with a 400.

Minimum array length: 1
keep_history
boolean
default:true

Whether to keep version history. If true (the default), the version history, including the deletion, is kept. If false, all previous versions are deleted along with the annotations.

Response

202

job_id
string
Example:

"job_c19xcf9mkws46gah0000"

job_last_known_status
string
Example:

"Running"

job_type
string
Example:

"ingestTasks"

job_creation_time
string
Example:

"2021-07-20T18:07:13.055Z"

dataset_id
string
Example:

"ds_bw6de8s84pe0vbn6p5zg"

message
string
Example:

"Deleting ground truth annotations, this may take a few minutes."