-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.yml
176 lines (172 loc) · 4.53 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
openapi: 3.0.0
info:
title: QUMOMF API
version: 0.0.1
paths:
/api/v0/snapshots:
get:
summary: "Get list of clusters"
responses:
'200':
description: 'Request succefully finished'
content:
application/json:
schema:
$ref: '#/components/schemas/ClusterInfo'
'500':
description: 'Internal error'
/api/v0/snapshots/{cluster_name}:
get:
summary: "Get all information about cluster"
parameters:
- $ref: '#/components/parameters/cluster_name'
responses:
'200':
description: 'Request succefully finished'
'400':
description: 'Invalid request'
'500':
description: 'Internal error'
/api/v0/snapshots/{cluster_name}/{shard_uuid}:
get:
summary: "Get all information about shard"
parameters:
- $ref: '#/components/parameters/cluster_name'
- $ref: '#/components/parameters/shard_uuid'
responses:
'200':
description: 'Request succefully finished'
'400':
description: 'Invalid request'
'500':
description: 'Internal error'
/api/v0/snapshots/{cluster_name}/{shard_uuid}/{instance_uuid}:
get:
summary: "Get all information about instance"
parameters:
- $ref: '#/components/parameters/cluster_name'
- $ref: '#/components/parameters/shard_uuid'
- $ref: '#/components/parameters/instance_uuid'
responses:
'200':
description: 'Request succefully finished'
'400':
description: 'Invalid request'
'500':
description: 'Internal error'
/api/v0/recoveries/{cluster_name}/{shard_uuid}:
get:
summary: "Get all recoceries for shard"
parameters:
- $ref: '#/components/parameters/cluster_name'
- $ref: '#/components/parameters/shard_uuid'
responses:
'200':
description: 'Request succefully finished'
'400':
description: 'Invalid request'
'500':
description: 'Internal error'
/api/v0/alerts:
get:
summary: "Get all active problems"
responses:
'200':
description: 'Request succefully finished'
content:
application/json:
schema:
$ref: '#/components/schemas/AlertsResponse'
'500':
description: 'Internal error'
/api/v0/alerts/{cluster_name}:
get:
summary: "Get all active problems for cluster"
parameters:
- $ref: '#/components/parameters/cluster_name'
responses:
'200':
description: 'Request succefully finished'
content:
application/json:
schema:
$ref: '#/components/schemas/AlertsResponse'
'400':
description: 'Invalid request'
'500':
description: 'Internal error'
components:
schemas:
ClusterInfo:
type: array
items:
properties:
name:
type: string
example: qumomf_sandbox
shards_count:
type: integer
example: 2
routers_count:
type: integer
example: 1
discovered_at:
type: integer
example: 1611231096
health_level:
type: string
example: green
AlertsResponse:
properties:
instances_alerts:
$ref: '#/components/schemas/InstanceAlerts'
routers_alerts:
$ref: '#/components/schemas/RoutersAlerts'
InstanceAlerts:
properties:
cluster_name:
type: string
shard_uuid:
type: string
instance_uri:
type: string
alerts:
type: array
items:
$ref: '#/components/schemas/Alert'
RoutersAlerts:
properties:
uri:
type: string
alerts:
type: array
items:
$ref: '#/components/schemas/Alert'
Alert:
properties:
Type:
type: string
Description:
type: string
parameters:
cluster_name:
in: path
name: cluster_name
schema:
type: string
required: true
description: Cluster name
shard_uuid:
in: path
name: shard_uuid
schema:
type: string
required: true
description: Shard uuid
instance_uuid:
in: path
name: instance_uuid
schema:
type: string
required: true
description: Instance uuid