The Time Series Database (TSDB) HTTP API lets you read, write, and manage time series data over HTTP. Almost all TSDB features are accessible through the API, including querying time series data, managing metadata, and storing data points.
Protocol conventions
Before calling individual endpoints, review the following global conventions. They apply to every API request and response.
Data format
JSON is the default format for request and response bodies.
HTTP verbs
The API is RESTful in nature. Alternative access methods are also provided for clients that cannot strictly comply with the REST protocol.
Response codes
All responses use standard HTTP status codes. When a request fails, the response body contains error details in a specific format.
Endpoints
The following table lists all available TSDB HTTP API endpoints.
| Endpoint | Description |
|---|---|
/api/put | Writes data |
/api/query | Queries data |
/api/query/last | Queries the latest data points of a specified timeline |
/api/mput | Writes the multi-value data |
/api/mquery | Queries the multi-value data |
/api/query/mlast | Queries the latest data points in the multi-value data model |
/api/suggest | Queries metrics, tag keys, tag values, and fields |
/api/dump_meta | Queries the tag values of a specified tag key |
/api/ttl | Sets the time to live (TTL) of data |
/api/delete_data | Deletes data |
/api/delete_meta | Deletes timelines |