-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Open
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>tech debtTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra teamtriagedIssue has been looked at, and is being left openIssue has been looked at, and is being left open
Description
Today we leniently accept named parameters in place of positional ones in some REST APIs. For instance:
Lines 35 to 36 in 99f88f1
| controller.registerHandler(RestRequest.Method.GET, "/_cluster/stats", this); | |
| controller.registerHandler(RestRequest.Method.GET, "/_cluster/stats/nodes/{nodeId}", this); |
The right way™ to get the cluster stats restricted to a subset of the nodes is
GET /_cluster/stats/nodes/node1,node2,...
However, the following also works:
GET /_cluster/stats?nodeId=node1,node2,...
I think in this case we should not accept nodeId as a named parameter.
Relates #36784
Metadata
Metadata
Assignees
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>tech debtTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra teamtriagedIssue has been looked at, and is being left openIssue has been looked at, and is being left open