All Products
Search
Document Center

Time Series Database:Query Metric, TagKey, and Tag

Last Updated:Mar 28, 2026

Queries metrics, TagKeys, and TagValues stored in Time Series Database (TSDB).

Request path and method

PathMethodDescription
/api/suggestPOSTQueries metrics, TagKeys, and TagValues.

Request parameters

NameTypeRequiredDescriptionDefault valueExample
typeStringYesThe type of data to query. Valid values: metrics, TagKey, TagValue.Nonemetrics
qStringNoA prefix used to filter results. Only items that start with this prefix are returned.Nonemy_
maxIntegerNoThe maximum number of results to return.254

Request body example

Example: Query up to four metrics with the prefix my_.

Request: POST /api/suggest

Body:

{
  "type": "metrics",
  "q": "my_",
  "max": 4
}

Response description

The response is a string array of matching results.

[ "my_metric1", "my_metric2", "my_metric3", "my_metric4" ]