Skip to main content
POST
/
api
/
v2
/
clear-database
Delete your BloodHound data
curl --request POST \
  --url https://your-tenant.bloodhoundenterprise.io/api/v2/clear-database \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deleteCollectedGraphData": true,
  "deleteSourceKinds": [
    123
  ],
  "deleteRelationships": [
    "<string>"
  ],
  "deleteFileIngestHistory": true,
  "deleteDataQualityHistory": true,
  "deleteAssetGroupSelectors": [
    123
  ]
}
'
"[this request has no response data]"

Documentation Index

Fetch the complete documentation index at: https://specterops-enable-tls-feedback.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Applies to BloodHound Enterprise and CE

Authorizations

Authorization
string
header
required

Authorization: Bearer $JWT_TOKEN

Headers

Prefer
string
default:wait=30

Prefer header, used to specify a custom timeout in seconds using the wait parameter as per RFC7240. Passing in wait=-1 bypasses all timeout limits when the feature is enabled.

Pattern: ^wait=(-1|[0-9]+)$

Body

application/json
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

No Content This response will contain no response body.

The response is of type string.