---
title: "Clear the caller's query history"
method: DELETE
path: "/api/{org_id}/query_history"
tags: ["Query History"]
---

# Clear the caller's query history

`DELETE /api/{org_id}/query_history`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/query_history`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/query_history/delete.ts> (a function with typed inputs; its response is checked against the schema)

Deletes the caller's query history entries for the given sources, or all sources. Starred entries are kept unless include_starred is true.

## Path parameters

- `org_id` string, required

## Query parameters

- `source` string
- `include_starred` boolean

## Response `200`

Success

- QueryHistoryClearResponse
  - `deleted` integer, required: Number of entries deleted.

## Other responses

- `400`: Unknown source
- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
