mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
service discovery: add pagination and filtering support to info requests (#12552)
* services: add pagination and filter support to info RPC. * cli: add filter flag to service info command. * docs: add pagination and filter details to services info API. * paginator: minor updates to comment and func signature.
This commit is contained in:
@@ -77,6 +77,23 @@ The table below shows this endpoint's support for
|
||||
- `:service_name` `(string: <required>)` - Specifies the service name. This is
|
||||
specified as part of the path.
|
||||
|
||||
- `namespace` `(string: "default")` - Specifies the target namespace. This
|
||||
parameter is used before any `filter` expression is applied.
|
||||
|
||||
- `next_token` `(string: "")` - This endpoint supports paging. The `next_token`
|
||||
parameter accepts a string which identifies the next expected service. This
|
||||
value can be obtained from the `X-Nomad-NextToken` header from the previous
|
||||
response.
|
||||
|
||||
- `per_page` `(int: 0)` - Specifies a maximum number of services to return for
|
||||
this request. If omitted, the response is not paginated. The value of the
|
||||
`X-Nomad-NextToken` header of the last response can be used as the `next_token`
|
||||
of the next request to fetch additional pages.
|
||||
|
||||
- `filter` `(string: "")` - Specifies the [expression](/api-docs#filtering)
|
||||
used to filter the results. Consider using pagination or a query parameter to
|
||||
reduce resource used to serve the request.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session
|
||||
|
||||
Reference in New Issue
Block a user