Skip to content

Commit 7570ddf

Browse files
committed
Add watcher.get_settings
1 parent 1916222 commit 7570ddf

File tree

9 files changed

+269
-75
lines changed

9 files changed

+269
-75
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,3 +556,14 @@ actions:
556556
examples:
557557
updateWatcherSettingsRequestExample1:
558558
$ref: "../../specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml"
559+
- target: "$.paths['/_watcher/settings']['get']"
560+
description: "Add response example for get watcher settings"
561+
update:
562+
responses:
563+
200:
564+
content:
565+
application/json:
566+
examples:
567+
updateWatcherSettingsRequestExample1:
568+
$ref: "../../specification/watcher/get_settings/examples/200_response/WatcherGetSettingsResponseExample1.yaml"
569+

output/openapi/elasticsearch-openapi.json

Lines changed: 105 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 71 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,6 @@
431431
"interface definition watcher._types:TriggerEventContainer - Property schedule is a single-variant and must be required"
432432
]
433433
},
434-
"watcher.get_settings": {
435-
"request": [
436-
"Missing request & response"
437-
],
438-
"response": []
439-
},
440434
"xpack.info": {
441435
"request": [
442436
"Request: query parameter 'human' does not exist in the json spec",

output/typescript/types.ts

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ watcher-api-activate-watch,https://www.elastic.co/guide/en/elasticsearch/referen
729729
watcher-api-deactivate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-deactivate-watch.html
730730
watcher-api-delete-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-delete-watch.html
731731
watcher-api-execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-execute-watch.html
732+
watcher-api-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-settings.html
732733
watcher-api-get-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-watch.html
733734
watcher-api-put-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-put-watch.html
734735
watcher-api-query-watches,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-query-watches.html
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Duration } from '@_types/Time'
22+
23+
/**
24+
* Get Watcher index settings.
25+
* Get settings for the Watcher internal index (`.watches`).
26+
* Only a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.
27+
* @rest_spec_name watcher.get_settings
28+
* @availability stack stability=stable visibility=public
29+
* @doc_id watcher-api-get-settings
30+
*/
31+
export interface Request extends RequestBase {
32+
query_parameters: {
33+
/**
34+
* The period to wait for a connection to the master node.
35+
* If no response is received before the timeout expires, the request fails and returns an error.
36+
*/
37+
master_timeout?: Duration
38+
}
39+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { IndexSettings } from '@indices/_types/IndexSettings'
21+
22+
export class Response {
23+
body: {
24+
index: IndexSettings
25+
}
26+
}

0 commit comments

Comments
 (0)