All Products
Search
Document Center

Time Series Database:Clean the data

Last Updated:Mar 28, 2026

Deletes time series data for a specified metric within a given time range.

Request syntax

POST /api/delete_data

Request parameters

ParameterTypeRequiredDescriptionDefault valueExample
metricStringYesThe metric name of the data to delete.Nonecpu.usage
startIntegerYesThe start timestamp of the time range, in seconds.None1499308591
endIntegerNoThe end timestamp of the time range, in seconds.Current time1499508591

Examples

Delete all data for the cpu.usage metric between timestamps 1499308591 and 1499508591.

Request:

POST /api/delete_data

Body:

{
    "metric": "cpu.usage",
    "start": 1499308591,
    "end": 1499508591
}

Response

A response code of 200 indicates success. Any other code indicates failure. For a complete list of response codes, see Response codes.