Purge\\ a\\ timeline

Updated at:
Copy as MD

Deletes time series from Time Series Database (TSDB).

Endpoint

PathMethod
/api/delete_metaPOST

Request body

ParameterTypeRequiredDescription
metricstringYesThe metric name of the time series to delete.
tagsobjectNoTag key-value pairs that identify the specific time series to delete. If omitted, all time series under the specified metric are deleted.
Important

Omitting tags deletes all time series associated with the metric. Specify tags to target a specific series.

Examples

Delete a specific time series

Deletes the time series where metric is cpu.usage, host is 192.168.0.2, and appName is hitsdb.

Request: POST /api/delete_meta

Body:

{
    "metric": "cpu.usage",
    "tags": {
        "host": "192.168.0.2",
        "appName": "hitsdb"
    }
}

Delete all time series for a metric

Deletes all time series associated with the cpu.usage metric.

Request: POST /api/delete_meta

Body:

{
    "metric": "cpu.usage"
}

Response

A 200 status code indicates success. For other status codes and their meanings, see Response codes.