forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsm.yaml
325 lines (297 loc) · 10 KB
/
sm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
openapi: 3.1.0
info:
title: OpenSearch Snapshot Management API
description: API for automating snapshot management tasks.
version: 1.0.0
paths:
/_plugins/_sm/policies:
get:
operationId: sm.get_policies.0
x-operation-group: sm.get_policies
x-version-added: '2.1'
description: Retrieves all snapshot management policies with optional pagination and filtering.
parameters:
- $ref: '#/components/parameters/sm.get_policies::query.from'
- $ref: '#/components/parameters/sm.get_policies::query.queryString'
- $ref: '#/components/parameters/sm.get_policies::query.size'
- $ref: '#/components/parameters/sm.get_policies::query.sortField'
- $ref: '#/components/parameters/sm.get_policies::query.sortOrder'
responses:
'200':
$ref: '#/components/responses/sm.get_policies@200'
/_plugins/_sm/policies/{policy_name}:
get:
operationId: sm.get_policy.0
x-operation-group: sm.get_policy
x-version-added: '2.1'
description: Retrieves a specific snapshot management policy by name.
parameters:
- $ref: '#/components/parameters/sm.get_policy::path.policy_name'
responses:
'200':
$ref: '#/components/responses/sm.get_policy@200'
'404':
$ref: '#/components/responses/sm.get_policy@404'
post:
operationId: sm.create_policy.0
x-operation-group: sm.create_policy
x-version-added: '2.1'
description: Creates a snapshot management policy.
parameters:
- $ref: '#/components/parameters/sm.create_policy::path.policy_name'
requestBody:
$ref: '#/components/requestBodies/sm.create_policy'
responses:
'201':
$ref: '#/components/responses/sm.create_policy@201'
'400':
$ref: '#/components/responses/sm.create_policy@400'
put:
operationId: sm.update_policy.0
x-operation-group: sm.update_policy
x-version-added: '2.1'
description: Updates an existing snapshot management policy. Requires `if_seq_no` and `if_primary_term`.
parameters:
- $ref: '#/components/parameters/sm.update_policy::path.policy_name'
- $ref: '#/components/parameters/sm.update_policy::query.if_primary_term'
- $ref: '#/components/parameters/sm.update_policy::query.if_seq_no'
requestBody:
$ref: '#/components/requestBodies/sm.update_policy'
responses:
'200':
$ref: '#/components/responses/sm.update_policy@200'
'404':
$ref: '#/components/responses/sm.update_policy@404'
delete:
operationId: sm.delete_policy.0
x-operation-group: sm.delete_policy
x-version-added: '2.1'
description: Deletes a snapshot management policy.
parameters:
- $ref: '#/components/parameters/sm.delete_policy::path.policy_name'
responses:
'200':
$ref: '#/components/responses/sm.delete_policy@200'
'404':
$ref: '#/components/responses/sm.delete_policy@404'
/_plugins/_sm/policies/{policy_name}/_explain:
get:
operationId: sm.explain_policy.0
x-operation-group: sm.explain_policy
x-version-added: '2.1'
description: Explains the state of the snapshot management policy.
parameters:
- $ref: '#/components/parameters/sm.explain_policy::path.policy_name'
responses:
'200':
$ref: '#/components/responses/sm.explain_policy@200'
/_plugins/_sm/policies/{policy_name}/_start:
post:
operationId: sm.start_policy.0
x-operation-group: sm.start_policy
x-version-added: '2.1'
description: Starts a snapshot management policy.
parameters:
- $ref: '#/components/parameters/sm.start_policy::path.policy_name'
responses:
'200':
$ref: '#/components/responses/sm.start_policy@200'
/_plugins/_sm/policies/{policy_name}/_stop:
post:
operationId: sm.stop_policy.0
x-operation-group: sm.stop_policy
x-version-added: '2.1'
description: Stops a snapshot management policy.
parameters:
- $ref: '#/components/parameters/sm.stop_policy::path.policy_name'
responses:
'200':
$ref: '#/components/responses/sm.stop_policy@200'
components:
requestBodies:
sm.create_policy:
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/CreateUpdatePolicyRequest'
sm.update_policy:
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/CreateUpdatePolicyRequest'
responses:
sm.get_policies@200:
description: Successfully retrieved the list of snapshot management policies.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/GetPoliciesResponse'
sm.create_policy@201:
description: Successfully created the snapshot management policy.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/PolicyResponse'
sm.create_policy@400:
description: Bad request when creating the snapshot management policy.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/BadRequestResponse'
sm.get_policy@200:
description: Successfully retrieved the snapshot management policy.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/PolicyResponse'
sm.get_policy@404:
description: Snapshot management policy not found.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/NotFoundResponse'
sm.update_policy@200:
description: Successfully updated the snapshot management policy.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/PolicyResponse'
sm.update_policy@404:
description: Snapshot management policy not found.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/NotFoundResponse'
sm.delete_policy@200:
description: Successfully deleted the snapshot management policy.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/DeletePolicyResponse'
sm.delete_policy@404:
description: Snapshot management policy not found.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/NotFoundResponse'
sm.explain_policy@200:
description: Successfully explained the state of the snapshot management policy.
content:
application/json:
schema:
$ref: '../schemas/sm._common.yaml#/components/schemas/PolicyExplanation'
sm.start_policy@200:
description: Successfully started the snapshot management policy.
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
sm.stop_policy@200:
description: Successfully stopped the snapshot management policy.
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
parameters:
sm.create_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.get_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.get_policies::query.from:
name: from
in: query
description: 'The starting index (default: 0)'
schema:
type: integer
sm.update_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.update_policy::query.if_seq_no:
name: if_seq_no
in: query
description: The sequence number of the policy to update.
required: true
schema:
type: integer
sm.update_policy::query.if_primary_term:
name: if_primary_term
in: query
description: The primary term of the policy to update.
required: true
schema:
type: integer
sm.delete_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.explain_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.start_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.stop_policy::path.policy_name:
name: policy_name
in: path
description: The name of the snapshot management policy.
required: true
schema:
type: string
sm.get_policies::query.size:
name: size
in: query
description:
The number of policies to return.
schema:
type: integer
sm.get_policies::query.queryString:
name: queryString
in: query
description: A query string to filter policies.
schema:
type: string
sm.get_policies::query.sortField:
name: sortField
in: query
description: The field to sort on.
schema:
type: string
sm.get_policies::query.sortOrder:
name: sortOrder
in: query
description: The order of sorting.
schema:
type: string
enum: [asc, desc]
default: asc