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