Skip to content

Commit d30cfed

Browse files
szabostevelcawl
andauthored
[8.x] Adds cluster, graph and ILM API example requests and responses (#2932)
Co-authored-by: lcawl <[email protected]>
1 parent 95e95b4 commit d30cfed

27 files changed

+457
-66
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 187 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,190 @@ actions:
4040
examples:
4141
resetFeaturesResponseExample1:
4242
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
43-
43+
- target: "$.components['requestBodies']['cluster.allocation_explain']"
44+
description: "Add examples for cluster allocation explain operation"
45+
update:
46+
content:
47+
application/json:
48+
examples:
49+
clusterAllocationExplainRequestExample1:
50+
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
51+
- target: "$.components['responses']['cluster.health#200']"
52+
description: "Add examples for cluster health operation"
53+
update:
54+
content:
55+
application/json:
56+
examples:
57+
clusterHealthResponseExample1:
58+
$ref: "../../specification/cluster/health/clusterHealthResponseExample1.json"
59+
- target: "$.paths['/_cluster/settings']['put']"
60+
description: "Add examples for cluster update settings operation"
61+
update:
62+
requestBody:
63+
content:
64+
application/json:
65+
examples:
66+
clusterPutSettingsRequestExample1:
67+
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
68+
- target: "$.paths['/_cluster/reroute']['post']"
69+
description: "Add examples for cluster reroute operation"
70+
update:
71+
requestBody:
72+
content:
73+
application/json:
74+
examples:
75+
clusterRerouteRequestExample1:
76+
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
77+
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
78+
description: "Add examples for nodes reload secure settings operation"
79+
update:
80+
content:
81+
application/json:
82+
examples:
83+
clusterNodesReloadSecureSettingsRequestExample1:
84+
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json"
85+
- target: "$.components['responses']['nodes.reload_secure_settings#200']"
86+
description: "Add response examples for nodes reload secure settings operation"
87+
update:
88+
content:
89+
application/json:
90+
examples:
91+
clusterNodesReloadSecureSettingsResponseExample1:
92+
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json"
93+
- target: "$.paths['/_tasks']['get']"
94+
description: "Add examples for task management operation"
95+
update:
96+
responses:
97+
200:
98+
content:
99+
application/json:
100+
examples:
101+
getTasksResponseExample1:
102+
$ref: "../../specification/tasks/get/getTasksResponseExample1.json"
103+
- target: "$.components['responses']['nodes.info#200']"
104+
description: "Add response examples for nodes info"
105+
update:
106+
content:
107+
application/json:
108+
examples:
109+
nodesInfoResponseExample1:
110+
$ref: "../../specification/nodes/info/nodesInfoResponseExample1.yaml"
111+
- target: "$.paths['/_ilm/policy/{policy}']['delete']"
112+
description: "Add examples for delete lifecycle policy operation"
113+
update:
114+
responses:
115+
200:
116+
content:
117+
application/json:
118+
examples:
119+
deleteLifecycleResponseExample1:
120+
$ref: "../../specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json"
121+
- target: "$.paths['/_ilm/policy/{policy}']['put']"
122+
description: "Add examples for create a lifecycle operation"
123+
update:
124+
update:
125+
requestBody:
126+
content:
127+
application/json:
128+
examples:
129+
putLifecycleRequestExample1:
130+
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json"
131+
responses:
132+
200:
133+
content:
134+
application/json:
135+
examples:
136+
putLifecycleResponseExample1:
137+
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json"
138+
- target: "$.components['responses']['ilm.get_lifecycle#200']"
139+
description: "Add examples for get lifecycle policy operation"
140+
update:
141+
content:
142+
application/json:
143+
examples:
144+
getLifecycleResponseExample1:
145+
$ref: "../../specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json"
146+
- target: "$.paths['/_ilm/migrate_to_data_tiers']['post']"
147+
description: "Add examples for migrate to data tiers routing operation"
148+
update:
149+
update:
150+
requestBody:
151+
content:
152+
application/json:
153+
examples:
154+
migrateToDataTiersRequestExample1:
155+
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json"
156+
responses:
157+
200:
158+
content:
159+
application/json:
160+
examples:
161+
migrateToDataTiersResponseExample1:
162+
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json"
163+
- target: "$.paths['/_ilm/move/{index}']['post']"
164+
description: "Add examples for move to lifecycle step operation"
165+
update:
166+
update:
167+
requestBody:
168+
content:
169+
application/json:
170+
examples:
171+
moveToStepRequestExample1:
172+
$ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json"
173+
responses:
174+
200:
175+
content:
176+
application/json:
177+
examples:
178+
moveToStepResponseExample1:
179+
$ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json"
180+
- target: "$.paths['/_ilm/start']['post']"
181+
description: "Add examples for start index lifecycle management operation"
182+
update:
183+
responses:
184+
200:
185+
content:
186+
application/json:
187+
examples:
188+
startILMResponseExample1:
189+
$ref: "../../specification/ilm/start/StartILMResponseExample1.json"
190+
- target: "$.paths['/_ilm/stop']['post']"
191+
description: "Add examples for stop index lifecycle management operation"
192+
update:
193+
responses:
194+
200:
195+
content:
196+
application/json:
197+
examples:
198+
stopILMResponseExample1:
199+
$ref: "../../specification/ilm/stop/stopILMResponseExample1.json"
200+
- target: "$.paths['/_ilm/status']['get']"
201+
description: "Add examples for get index lifecycle management status operation"
202+
update:
203+
responses:
204+
200:
205+
content:
206+
application/json:
207+
examples:
208+
getILMStatusResponseExample1:
209+
$ref: "../../specification/ilm/get_status/GetILMStatusResponseExample1.json"
210+
- target: "$.paths['/{index}/_ilm/explain']['get']"
211+
description: "Add examples for explain lifecycle operation"
212+
update:
213+
responses:
214+
200:
215+
content:
216+
application/json:
217+
examples:
218+
explainLifecycleResponseExample1:
219+
$ref: "../../specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json"
220+
- target: "$.paths['/{index}/_ilm/remove']['post']"
221+
description: "Add examples for remove policy from index operation"
222+
update:
223+
responses:
224+
200:
225+
content:
226+
application/json:
227+
examples:
228+
removePolicyResponseExample1:
229+
$ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json"

docs/overlays/elasticsearch-shared-example-overlays.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,11 @@ actions:
107107
examples:
108108
esqlQueryRequestExample1:
109109
$ref: "../../specification/esql/query/EsqlQueryApiRequestExample1.json"
110+
- target: "$.components['requestBodies']['graph.explore']"
111+
description: "Add example for graph explore request"
112+
update:
113+
content:
114+
application/json:
115+
examples:
116+
graphExploreRequestExample1:
117+
$ref: "../../specification/graph/explore/graphExploreRequestExample1.json"

0 commit comments

Comments
 (0)