---
title: "Delete all hierarchy items"
method: POST
path: "/api/hierarchy/delete-all"
tags: ["Hierarchy"]
---

# Delete all hierarchy items

`POST /api/hierarchy/delete-all`

## Request

- Base URL: `https://indexing-dev.hawksearch.net`
- URL: `https://indexing-dev.hawksearch.net/api/hierarchy/delete-all`
- Auth: none declared. Required headers: `X-HawkSearch-ApiKey`
- TypeScript: <https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi/docs/api/hierarchy/delete-all/post.ts> (a function with typed inputs; its response is checked against the schema)

This method removes all hierarchy items. After all hierarchy objects have been removed, the hierarchy/rebuild method can be used.

## Headers

- `X-HawkSearch-ApiKey` string, required

## Request body

- IndexParams: Index params
  - `IndexName` string: Index used for operation
  - `KeepIndexTemplate` boolean: (Optional)Do not delete Index Template

## Response `200`

OK

- object

---

[API](https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi.md) - [All operations](https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hawksearch/apis/hawksearch-elasticsearch-indexingapi/revisions/24cba7bf3468?raw)
