---
title: "Delete your BloodHound data"
method: POST
path: "/api/v2/clear-database"
tags: ["Database", "Community", "Enterprise"]
---

# Delete your BloodHound data

`POST /api/v2/clear-database`

Wipes your BloodHound data permanently. Specify the data to delete in the request body. Possible data includes collected graph data, relationships of specific types, custom high value selectors, file ingest history, and data quality history.

## Request body

- object
  - `deleteCollectedGraphData` boolean — When true, deletes all collected graph nodes and edges. Cannot be combined with deleteSourceKinds or deleteRelationships.
  - `deleteSourceKinds` integer[] — A list of source kind IDs (from the source_kinds table) whose associated graph nodes and source kind records will be deleted. Use 0 as a special value to delete all "sourceless" nodes - nodes that exist in the graph but are not attributed to any source kind. Non-existent IDs will result in a 400 error.
  - `deleteRelationships` string[] — A list of relationship kind names (e.g. "HasSession") whose edges will be deleted from the graph. Each value must be a valid, known relationship kind. Cannot be combined with deleteCollectedGraphData.
  - `deleteFileIngestHistory` boolean — When true, deletes all file ingest job history records.
  - `deleteDataQualityHistory` boolean — When true, deletes all data quality history records.
  - `deleteAssetGroupSelectors` integer[] — A list of asset group IDs whose custom selectors will be deleted. Triggers a re-analysis after deletion.

## Response `204`

**No Content**
This response will contain no response body.

## Other responses

- `400` — **Bad Request** This could be due to one of the following reasons: - JSON payload is missing or malformed - Path or query parameters are missing or invalid/malformed - The data sent is not valid (ex- sending a `string` in an `integer` field)
- `401` — **Unauthorized** This endpoint failed an authentication requirement. Either the client tried to access a protected endpoint without being authenticated, or an auth validation failed (ex- invalid credentials or expired token).
- `403` — **Forbidden** This is most commonly caused by an authenticated client trying to access a resource that it does not have permission for.
- `429` — **Too Many Requests** The client has sent too many requests within a certain time window and tripped the rate limiting middleware.
- `500` — **Internal Server Error** This is usually the result of either an unexpected database or application error. The client may try modifying or resending the request, but the error is likely not related to the client doing something wrong.

---

[API](https://skmtc.net/specterops/apis/bloodhound-api.md) · [All operations](https://skmtc.net/specterops/apis/bloodhound-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/specterops/bloodhound-api/revisions/b7bbf50b77e7/schema)
