All Products
Search
Document Center

Time Series Database:Clear data

Last Updated:Mar 28, 2026

Use the /api/truncate endpoint to clear all data in a Time Series Database (TSDB) instance. This endpoint is intended for the testing phase — use it to reset test data quickly without rebuilding your instance.

Warning

This operation permanently deletes all data in the instance and cannot be undone. Alibaba Cloud does not initiate the request to clear user data. During execution, the cluster rejects all write operations — plan accordingly before running this in any shared environment.

Clear all data

Send a POST request to /api/truncate. This endpoint requires no request body or parameters.

curl --request POST http://<instance-endpoint>/api/truncate

Replace <instance-endpoint> with the endpoint of your TSDB instance.

Response

HTTP status codeMeaning
200All data was cleared successfully.
500The operation failed. See Troubleshooting.

Troubleshooting

HTTP 500 with a broadcast error

If the response body contains a message similar to:

The attempt to broadcast locking truncate remotely against [address 1, …] failed, while the attempt against [address 2, …] succeeded.

The truncate operation left cluster nodes in inconsistent states. This inconsistency can cause write operations to fail until it is resolved. Submit the full error message to the Alibaba Cloud operations and maintenance (O&M) team.