Deletes time series from Time Series Database (TSDB).
Endpoint
| Path | Method |
|---|---|
/api/delete_meta |
POST |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
metric |
string | Yes | The metric name of the time series to delete. |
tags |
object | No | Tag 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.