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>
This commit is contained in:
Julien Pivotto 2026-01-02 17:29:17 +01:00
parent 46e58a68da
commit bbd1e63783

View file

@ -84,8 +84,9 @@ URL query parameters:
- `time=<rfc3339 | unix_timestamp>`: Evaluation timestamp. Optional.
- `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and
is capped by the value of the `-query.timeout` flag.
- `limit=<number>`: Maximum number of returned series. Doesnt affect scalars or strings but truncates the number of series for matrices and vectors. Optional. 0 means disabled.
- `limit=<number>`: 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=<number>`: Override the the [lookback period](#staleness) just for this query. Optional.
- `stats=<string>`: 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=<number>`: Maximum number of returned series. Optional. 0 means disabled.
- `lookback_delta=<number>`: Override the the [lookback period](#staleness) just for this query. Optional.
- `stats=<string>`: 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