---
title: "deleteCasesByCollectionExerciseId"
method: DELETE
path: "/casegroups/collectionExercise/{collectionExerciseId}"
tags: ["case-group-endpoint"]
---

# deleteCasesByCollectionExerciseId

`DELETE /casegroups/collectionExercise/{collectionExerciseId}`

## Request

- Base URL: `https://localhost:8171`
- URL: `https://localhost:8171/casegroups/collectionExercise/{collectionExerciseId}`
- Auth: none declared

deletes all casegroups, cases and caseevents

## Path parameters

- `collectionExerciseId` string, required

## Response `200`

OK

- object
  - `deleted` integer: count of deleted caseGroups

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2023-06-20** `ec0acd609f95`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/office-of-national-statistics/apis/case-service-api/changes/casegroups/collectionExercise/:collectionExerciseId/delete.md)

---

[API](https://skmtc.dev/office-of-national-statistics/apis/case-service-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/case-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/case-service-api/revisions/6523753b5522?raw)
