-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.yml
219 lines (214 loc) · 6.12 KB
/
swagger.yml
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
swagger: "2.0"
info:
description: Orchestrates the recovery and cleanup of Elasticsearch index snapshots.
title: Elasticsearch Snapshot Index Orchestrator
version: 1.0.0
produces:
- application/json
consumes:
- application/json
schemes:
- http
host: "127.0.0.1:8000"
paths:
/{start}/{end}:
get:
tags:
- index
parameters:
- name: start
description: UTC start time, unix timestamp
in: path
required: true
type: integer
format: int64
- name: end
description: UTC end time, unix timestamp
in: path
required: true
type: integer
format: int64
- name: resolution
description: Optional override of the index resolution, must be 'day', 'month', or 'year'
in: query
type: string
- name: repo_pattern
description: Optional override of the repo pattern, must be URL encoded.
in: query
type: string
responses:
200:
description: All indices in [start,end] range are availble and ready.
schema:
$ref: "#/definitions/indice_status"
206:
description: Zero or more of the indices in the [start,end] range are available and ready.
schema:
$ref: "#/definitions/indice_status"
404:
description: Indices in the [start,end] range are available for restore but not available.
schema:
$ref: "#/definitions/indice_status"
416:
description: No indices are available for restore in given [start,end] range.
schema:
$ref: "#/definitions/error"
400:
description: invalid time range provided
schema:
$ref: "#/definitions/error"
default:
description: Unexpected error
schema:
$ref: "#/definitions/error"
post:
tags:
- index
parameters:
- name: start
description: start time, unix timestamp
in: path
required: true
type: integer
format: int64
- name: end
description: end time, unix timestamp
in: path
required: true
type: integer
format: int64
- name: resolution
description: Optional override of the index resolution, must be 'day', 'month', or 'year'
in: query
type: string
- name: repo_pattern
description: Optional override of the repo pattern, must be URL encoded.
in: query
type: string
responses:
200:
description: All indices in [start,end] range are availble and ready.
schema:
$ref: "#/definitions/indice_status"
202:
description: Index restore started
schema:
$ref: "#/definitions/indice_status"
206:
description: Zero or more of the indices in the [start,end] range are available and ready.
schema:
$ref: "#/definitions/indice_status"
416:
description: Not all indices in given [start,end] range were found to restore.
schema:
$ref: "#/definitions/error"
400:
description: invalid time range provided
schema:
$ref: "#/definitions/error"
default:
description: Unexpected error
schema:
$ref: "#/definitions/error"
delete:
tags:
- index
parameters:
- name: start
description: start time, unix timestamp
in: path
required: true
type: integer
format: int64
- name: end
description: end time, unix timestamp
in: path
required: true
type: integer
format: int64
- name: resolution
description: Optional override of the index resolution, must be 'day', 'month', or 'year'
in: query
type: string
- name: repo_pattern
description: Optional override of the repo pattern, must be URL encoded.
in: query
type: string
responses:
200:
description: All indices in [start,end] range are no longer online.
schema:
$ref: "#/definitions/indice_status"
202:
description: Index delete started
schema:
$ref: "#/definitions/indice_status"
416:
description: Not all indices in given [start,end] range were found to delete or were actively being restored.
schema:
$ref: "#/definitions/error"
400:
description: invalid time range provided
schema:
$ref: "#/definitions/error"
default:
description: Unexpected error
schema:
$ref: "#/definitions/error"
/healthz:
get:
tags:
- health
responses:
200:
description: API and Elasticsearch server are healthy.
schema:
$ref: "#/definitions/healthz"
default:
description: API or Elasticsearch server are not healthy.
schema:
$ref: "#/definitions/healthz"
definitions:
error:
type: object
required:
- message
properties:
message:
type: string
minLength: 1
indice_status:
type: object
properties:
ready:
description: List of indices restored and are ready for query.
type: array
items:
type: string
restoring:
description: List of indices being resotred.
type: array
items:
type: string
pending:
description: List of indices that are available not but being restored.
type: array
items:
type: string
deleting:
description: List of indices that are being deleted.
type: array
items:
type: string
healthz:
type: object
required:
- status
- message
properties:
status:
type: string
minLength: 2
message:
type: string
minLength: 1