prometheus/docs
Yijie Qin d2802c6fac
api: Add rule group pagination to list rules api (#14017)
* Add paginated feature to list rules api

Signed-off-by: Yijie Qin <qinyijie@amazon.com>

* Refactor to simplify code:

* Reduce number of variables
* Reduce type convesion

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Simplify paginated implementation

* Remove maxAlerts parameter.
* Reuse existing API responses by using omitempty in some fields

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Simplify pagination implementation

* Eliminate the need to sort the rule groups.

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Fix linting error

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Add more unit tests

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Update pagination parameters to be consistent with existing parameters

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Rename max_rule_groups to max_groups

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Refactor to simplify code

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Refactor to simplify the calculation of next token

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Handle corner case in pagination request

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Handle corner cases for pagination of list rules

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Update documentation for list rules parameters

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Refactor comments

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Simplify pagination implementation

* Eliminate need for extra structs to store pagination parameters

Signed-off-by: Raphael Silva <rapphil@gmail.com>

* Update docs/querying/api.md

Co-authored-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Raphael Philipe Mendes da Silva <rapphil@gmail.com>

* Update web/api/v1/api.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Raphael Philipe Mendes da Silva <rapphil@gmail.com>

* Update comment describing the need for next token

Signed-off-by: Raphael Silva <rapphil@gmail.com>

---------

Signed-off-by: Yijie Qin <qinyijie@amazon.com>
Signed-off-by: Raphael Silva <rapphil@gmail.com>
Signed-off-by: Raphael Philipe Mendes da Silva <rapphil@gmail.com>
Co-authored-by: Raphael Silva <rapphil@gmail.com>
Co-authored-by: Julius Volz <julius.volz@gmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-10-22 00:04:40 +01:00
..
command-line OTLP: Remove experimental word form OTLP receiver (#14894) 2024-10-01 14:36:52 +02:00
configuration Merge pull request #11474 from clwluvw/group-label 2024-10-21 14:47:12 +01:00
images Add 2.0 storage docs (#3423) 2017-11-07 22:00:38 +01:00
querying api: Add rule group pagination to list rules api (#14017) 2024-10-22 00:04:40 +01:00
feature_flags.md Merge pull request #15164 from machine424/quantile 2024-10-19 21:13:03 +02:00
federation.md docs: Update federation docs for native histograms 2023-01-12 20:43:02 +05:30
getting_started.md Update getting_started.md 2023-05-15 13:18:30 +05:30
http_sd.md Added a failure counter to the HTTP service discovery (#10372) 2022-03-08 14:10:45 +01:00
index.md Update prometheus.io's URL to the latest version (#5270) 2019-02-27 10:39:50 +00:00
installation.md docs: clarify default Docker command line parameters (#14194) 2024-06-10 20:16:02 +02:00
management_api.md /-/{healthy,ready}/ respond to HEAD (#11160) 2022-08-16 21:06:26 +02:00
migration.md Document command line tools 2023-03-13 14:20:55 +01:00
stability.md docs: state that remote write is stable 2023-05-09 10:29:52 +00:00
storage.md chore: Fix typos (#14868) 2024-09-10 22:32:03 +02:00