In 2.0, there are new APIs that expose database functionalities for the advanced user. These APIs are not enabled unless the `--web.enable-admin-api` is set. All the APIs below are experimental and might change in the future.
We also expose a gRPC API whose definition can be found [here](https://github.com/prometheus/prometheus/blob/master/prompb/rpc.proto).
### Snapshot
Snapshot creates a snapshot of all current data into `snapshots/<datetime>-<rand>` under the TSDB's data directory and returns the directory as response.
The snapshot now exists at `<data-dir>/snapshots/2017-11-30T15:31:59Z-2366f0a55106d6e1`
### Delete Series
DeleteSeries deletes data for a selection of series in a time range. The actual data still exists on disk and is cleaned up in future compactions or can be explicitly cleaned up by hitting the Clean Tombstones endpoint.
```
POST /api/v2/admin/tsdb/delete_series
```
Parameters (body):
```json
{
"min_time": "date-time(iso-8601)" // optional, defaults to minmum-time.
"max_time": "date-time(iso-8601)" // optional, defaults to maximum-time
"matchers": [LabelMatcher]
}
```
```json
LabelMatchers: Matcher specifies a rule, which can match or set of labels or not.
{
"type": "string", // One of: EQ, NEQ, RE, NRE defaults to EQ.