Skip to content

Commit

Permalink
Update documentation for list rules parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Raphael Silva <[email protected]>
  • Loading branch information
rapphil committed Oct 8, 2024
1 parent dc47970 commit cd75574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/querying/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,8 @@ URL query parameters:
- `file[]=<string>`: only return rules with the given filepath. If the parameter is repeated, rules with any of the provided filepaths are returned. When the parameter is absent or empty, no filtering is done.
- `exclude_alerts=<bool>`: only return rules, do not return active alerts.
- `match[]=<label_selector>`: only return rules that have configured labels that satisfy the label selectors. If the parameter is repeated, rules that match any of the sets of label selectors are returned. Note that matching is on the labels in the definition of each rule, not on the values after template expansion (for alerting rules). Optional.
- `max_groups=<number>`: return up to `max_groups` rule groups. In case there are more groups, a `nextToken` property will be present in the response. The value in that property can be used in subsequent requests in the `next_token` property to paginate over the remaining rule groups. The `nextToken` property will not be present in the last response.
- `next_token`: the pagination token that was returned in previous request when the `max_groups` property is set. The pagination token is used to iteratively paginate over a large number of rule groups.
- `max_groups=<number>`: The `max_groups` parameter allows you to specify the maximum number of rule groups to return in a single response. If the total number of rule groups exceeds the specified `max_groups` value, the response will include a `nextToken` property. You can use the value of this `nextToken` property in subsequent requests in the `next_token` parameter to paginate over the remaining rule groups. The `nextToken` property will not be present in the final response, indicating that you have retrieved all the available rule groups. Please note that there are no guarantees regarding the consistency of the response if the rule groups are being modified during the pagination process. If a rule group is removed while you are paginating over the rule groups, an error might be raised if the removed rule group coincides with the next token.
- `next_token`: the pagination token that was returned in previous request when the `max_groups` property is set. The pagination token is used to iteratively paginate over a large number of rule groups. To use the `next_token` parameter, the `max_groups` parameter also need to be present.

```json
$ curl http://localhost:9090/api/v1/rules
Expand Down

0 comments on commit cd75574

Please sign in to comment.