diff --git a/README.md b/README.md index 3adc0bd..28f8718 100644 --- a/README.md +++ b/README.md @@ -322,6 +322,24 @@ Example: curl -H "Authorization: Bearer your-token" http://localhost:8080/deleteobject?hash=abc123 ``` +### Delete Old Versions of a Label + +Deletes all objects for a label except those with tags containing "latest". Objects that share the same hash as a "latest" tagged version are also preserved. + +``` +GET /deleteoldobjects?label={label} +``` + +Example: +```bash +curl -H "Authorization: Bearer your-token" "http://localhost:8080/deleteoldobjects?label=myproject" +``` + +Response: +```json +{"result": "success", "deleted": 3} +``` + ### List All Objects ```