All Products
Document Center

Time Series Database:Clear data

Last Updated:May 19, 2022

This topic describes how to clear data in a Time Series Database (TSDB) instance. In the testing phase, you can use the /api/truncate API endpoint to quickly clear the test data.


  • If the API operation is successful, all data in the TSDB instance is cleared and cannot be recovered. Alibaba Cloud does not initiate the request to clear user data.

  • During the execution process, all the write operations are rejected by nodes in TSDB clusters. We recommend that you proceed with caution.

  • Request path and method

Request path Request method Description
/api/truncate POST Clears all data.
  • Request parameters


  • Sample request

    Request: POST/api/truncate

  • Response description

    • If the HTTP status code 200 is returned, the operation is successful. Otherwise, the operation fails. For more information about the error messages, see the common response status codes.
    • If the HTTP status code 500 is returned, check whether the error message contains “The attempt to broadcast locking truncate remotely against [address 1, … ]failed,while the attempt against [address 2, … ]succeeded.” If yes, the failure of the truncate operation causes state inconsistency between nodes in TSDB clusters. If the inconsistency issue is not resolved, TSDB write operations may fail. If the error occurs, submit this error message to the Alibaba Cloud operations and maintenance (O&M) team.