Find Prometheus series
- POST GET /_prometheus/{index}/api/v1/series
- POST GET /_prometheus/api/v1/series
Get the time series that match the given selectors.
The endpoint mirrors the Prometheus /api/v1/series endpoint.
GET requests send parameters in the query string.
On Serverless and on Elasticsearch 9.5.0 and later, POST requests send the same parameters as an application/x-www-form-urlencoded body.
Form-encoded POST requests are accepted only on authenticated TLS connections.
If you send the same parameter in both the query string and the form body, the API returns 400 with the standard Elasticsearch error body.
Required privileges
read
Path parameters
-
indexstringoptional -
An index expression that restricts which indices are considered, for example
metrics-generic.prometheus-*. If you omit it, the default expressionmetrics-*is used. Only indices withindex.mode: time_seriesare considered. An alias is accepted and index privileges are checked against that alias name.Leave it out to use
/_prometheus/api/v1/series.
Query parameters
Responses
The request is not valid after the handler has started.
A failure while reading parameters, such as a missing match[], is the standard Elasticsearch { error, status } body instead, including a form parameter that is also in the query string.
-
errorTypeenumrequired -
The Prometheus error type, from the HTTP status:
400isbad_data;503,408, and504aretimeout; every other status isexecution.Supported values include:
bad_data: HTTP400. The request or expression is not valid.timeout: HTTP503,408, or504. The query timed out or a gateway timed out.execution: Every other status, including HTTP403and500.
-
Values:
bad_datatimeoutexecution
The caller is not allowed to run the query.
-
errorTypeenumrequired -
The Prometheus error type, from the HTTP status:
400isbad_data;503,408, and504aretimeout; every other status isexecution.Supported values include:
bad_data: HTTP400. The request or expression is not valid.timeout: HTTP503,408, or504. The query timed out or a gateway timed out.execution: Every other status, including HTTP403and500.
-
Values:
bad_datatimeoutexecution
On Serverless and on Elasticsearch 9.5.0 and later, form-encoded POST requests are accepted only on authenticated TLS connections.
Otherwise the response is 406 with the standard Elasticsearch error body.
The query ran, but the response could not be written.
-
errorTypeenumrequired -
The Prometheus error type, from the HTTP status:
400isbad_data;503,408, and504aretimeout; every other status isexecution.Supported values include:
bad_data: HTTP400. The request or expression is not valid.timeout: HTTP503,408, or504. The query timed out or a gateway timed out.execution: Every other status, including HTTP403and500.
-
Values:
bad_datatimeoutexecution