From bbd1e6378359eb118a3e0bc26259ae4bba26bc95 Mon Sep 17 00:00:00 2001 From: Julien Pivotto <291750+roidelapluie@users.noreply.github.com> Date: Fri, 2 Jan 2026 17:29:17 +0100 Subject: [PATCH] docs: Update API documentation for missing features - Add stats parameter documentation for query endpoints. - Add documentation for new /api/v1/scrape_pools endpoint (added in v2.42). Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com> --- docs/querying/api.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/querying/api.md b/docs/querying/api.md index 4cd5e175fd..4891db8980 100644 --- a/docs/querying/api.md +++ b/docs/querying/api.md @@ -84,8 +84,9 @@ URL query parameters: - `time=`: Evaluation timestamp. Optional. - `timeout=`: Evaluation timeout. Optional. Defaults to and is capped by the value of the `-query.timeout` flag. -- `limit=`: Maximum number of returned series. Doesn’t affect scalars or strings but truncates the number of series for matrices and vectors. Optional. 0 means disabled. +- `limit=`: Maximum number of returned series. Doesn't affect scalars or strings but truncates the number of series for matrices and vectors. Optional. 0 means disabled. - `lookback_delta=`: Override the the [lookback period](#staleness) just for this query. Optional. +- `stats=`: Include query statistics in the response. If set to `all`, includes detailed statistics. Optional. The current server time is used if the `time` parameter is omitted. @@ -159,6 +160,7 @@ URL query parameters: is capped by the value of the `-query.timeout` flag. - `limit=`: Maximum number of returned series. Optional. 0 means disabled. - `lookback_delta=`: Override the the [lookback period](#staleness) just for this query. Optional. +- `stats=`: Include query statistics in the response. If set to `all`, includes detailed statistics. Optional. You can URL-encode these parameters directly in the request body by using the `POST` method and `Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large @@ -670,6 +672,35 @@ Note that with the currently implemented bucket schemas, positive buckets are “open left”, negative buckets are “open right”, and the zero bucket (with a negative left boundary and a positive right boundary) is “closed both”. +## Scrape pools + +The following endpoint returns a list of all configured scrape pools: + +``` +GET /api/v1/scrape_pools +``` + +The `data` section of the JSON response is a list of string scrape pool names. + +```bash +curl http://localhost:9090/api/v1/scrape_pools +``` + +```json +{ + "status": "success", + "data": { + "scrapePools": [ + "prometheus", + "node_exporter", + "blackbox" + ] + } +} +``` + +*New in v2.42* + ## Targets The following endpoint returns an overview of the current state of the