Skip to content

Commit

Permalink
metric on watcher stats is a list not an enum (#39114)
Browse files Browse the repository at this point in the history
`enum` is a single option from a known list of `options`
`list` is an array of unknown values
`flags` are multiple options from a list of known `options`.

We don't support the `flags` type but a `list` with `options` acts as one. This is already the case for other API's taking metric such as `node.stats.json`. 

watcher.stats behaves the same as other API's as `metrics` and as such accepts the following `GET _xpack/watcher/stats/queued_watches,current_watches`
  • Loading branch information
Mpdreamz committed Mar 4, 2019
1 parent e0f728b commit 4c00a02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"paths": [ "/_watcher/stats", "/_watcher/stats/{metric}" ],
"parts": {
"metric": {
"type" : "enum",
"type" : "list",
"options" : ["_all", "queued_watches", "current_watches", "pending_watches"],
"description" : "Controls what additional stat metrics should be include in the response"
}
},
"params": {
"metric": {
"type" : "enum",
"type" : "list",
"options" : ["_all", "queued_watches", "current_watches", "pending_watches"],
"description" : "Controls what additional stat metrics should be include in the response"
},
Expand Down

0 comments on commit 4c00a02

Please sign in to comment.