---
title: "Clear usage data from a specified table"
method: DELETE
path: "/api/nodes/clear_usage_data/{table}"
tags: ["Node"]
---

# Clear usage data from a specified table

`DELETE /api/nodes/clear_usage_data/{table}`

Deletes **all rows** from the selected usage data table. Use with caution.

Allowed tables:
    - `node_user_usages`: Deletes user-specific node usage traffic records.
    - `node_usages`: Deletes node-level aggregated traffic (uplink/downlink) records.

**Optional filters:**
    - `start`: ISO 8601 timestamp to filter from (inclusive)
    - `end`: ISO 8601 timestamp to filter to (exclusive)

⚠️ This operation is irreversible. Ensure correct usage in production environments.

## Path parameters

- `table` 'node_user_usages' | 'node_usages', required

## Query parameters

- `start` string, date-time, nullable
- `end` string, date-time, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `401` — Unauthorized Error
- `403` — Forbidden Error
- `422` — Validation Error

---

[API](https://skmtc.dev/ha-man2/apis/pasarguardapi.md) · [All operations](https://skmtc.dev/ha-man2/apis/pasarguardapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ha-man2/pasarguardapi/revisions/84d9ff88fcda/schema)
