Skip to content

Commit

Permalink
docs: deprecate some old filter parameters
Browse files Browse the repository at this point in the history
The filtering can be done with the general purpose `filter` query parameter.
  • Loading branch information
dnephin committed Nov 23, 2020
1 parent 0ba7f4c commit 3415521
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changelog/9262.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:deprecation
api: the `tag`, `node-meta`, and `passing` query parameters for various health and catalog
endpoints are now deprecated. The `filter` query parameter should be used as a replacement
for all of the deprecated fields. The deprecated query parameters will be removed in a future
version of Consul.
```
12 changes: 9 additions & 3 deletions website/pages/api-docs/catalog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ The table below shows this endpoint's support for
`?near=_agent` will use the agent's node for the sort. This is specified as
part of the URL as a query parameter.

- `node-meta` `(string: "")` - Specifies a desired node metadata key/value pair
- `node-meta` `(string: "")` **Deprecated** - Use `filter` with the `Meta` selector instead.
This parameter will be removed in a future version of Consul.
Specifies a desired node metadata key/value pair
of the form `key:value`. This parameter can be specified multiple times, and
will filter the results to nodes with the specified key/value pairs. This is
specified as part of the URL as a query parameter.
Expand Down Expand Up @@ -454,7 +456,9 @@ The table below shows this endpoint's support for
the datacenter of the agent being queried. This is specified as part of the
URL as a query parameter.

- `tag` `(string: "")` - Specifies the tag to filter on. This is specified as part of
- `tag` `(string: "")` **Deprecated** - Use `filter` with the `ServiceTags` selector instead.
This parameter will be removed in a future version of Consul.
Specifies the tag to filter on. This is specified as part of
the URL as a query parameter. Can be used multiple times for additional filtering,
returning only the results that include all of the tag values provided.

Expand All @@ -463,7 +467,9 @@ The table below shows this endpoint's support for
`?near=_agent` will use the agent's node for the sort. This is specified as
part of the URL as a query parameter.

- `node-meta` `(string: "")` - Specifies a desired node metadata key/value pair
- `node-meta` `(string: "")` **Deprecated** - Use `filter` with the `NodeMeta` selector instead.
This parameter will be removed in a future version of Consul.
Specifies a desired node metadata key/value pair
of the form `key:value`. This parameter can be specified multiple times, and
will filter the results to nodes with the specified key/value pairs. This is
specified as part of the URL as a query parameter.
Expand Down
16 changes: 12 additions & 4 deletions website/pages/api-docs/health.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ The table below shows this endpoint's support for
`?near=_agent` will use the agent's node for the sort. This is specified as
part of the URL as a query parameter.

- `node-meta` `(string: "")` - Specifies a desired node metadata key/value pair
- `node-meta` `(string: "")` **Deprecated** - Use `filter` with the `Node.Meta` selector instead.
This parameter will be removed in a future version of Consul.
Specifies a desired node metadata key/value pair
of the form `key:value`. This parameter can be specified multiple times, and
will filter the results to nodes with the specified key/value pairs. This is
specified as part of the URL as a query parameter.
Expand Down Expand Up @@ -232,17 +234,23 @@ The table below shows this endpoint's support for
`?near=_agent` will use the agent's node for the sort. This is specified as
part of the URL as a query parameter.

- `tag` `(string: "")` - Specifies the tag to filter the list. This is
- `tag` `(string: "")` **Deprecated** - Use `filter` with the `Service.Tags` selector instead.
This parameter will be removed in a future version of Consul.
Specifies the tag to filter the list. This is
specified as part of the URL as a query parameter. Can be used multiple times
for additional filtering, returning only the results that include all of the tag
values provided.

- `node-meta` `(string: "")` - Specifies a desired node metadata key/value pair
- `node-meta` `(string: "")` **Deprecated** - Use `filter` with the `Node.Meta` selector instead.
This parameter will be removed in a future version of Consul.
Specifies a desired node metadata key/value pair
of the form `key:value`. This parameter can be specified multiple times, and
will filter the results to nodes with the specified key/value pairs. This is
specified as part of the URL as a query parameter.

- `passing` `(bool: false)` - Specifies that the server should return only nodes
- `passing` `(bool: false)` **Deprecated** - Use `filter` with the `Checks.Status` selector instead.
This parameter will be removed in a future version of Consul.
Specifies that the server should return only nodes
with all checks in the `passing` state. This can be used to avoid additional
filtering on the client side.

Expand Down

0 comments on commit 3415521

Please sign in to comment.