Queries metrics, TagKeys, and TagValues stored in Time Series Database (TSDB).
Request path and method
| Path | Method | Description |
|---|---|---|
| /api/suggest | POST | Queries metrics, TagKeys, and TagValues. |
Request parameters
| Name | Type | Required | Description | Default value | Example |
|---|---|---|---|---|---|
| type | String | Yes | The type of data to query. Valid values: metrics, TagKey, TagValue. | None | metrics |
| q | String | No | A prefix used to filter results. Only items that start with this prefix are returned. | None | my_ |
| max | Integer | No | The maximum number of results to return. | 25 | 4 |
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" ]