forked from korrel8r/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.json
447 lines (447 loc) · 15 KB
/
swagger.json
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"https",
"http"
],
"swagger": "2.0",
"info": {
"description": "REST API for the Korrel8r correlation engine.",
"title": "REST API",
"contact": {
"name": "Project Korrel8r",
"url": "https://github.com/korrel8r/korrel8r"
},
"license": {
"name": "Apache 2.0",
"url": "https://github.com/korrel8r/korrel8r/blob/main/LICENSE"
},
"version": "v1alpha1"
},
"host": "localhost:8080",
"basePath": "/api/v1alpha1",
"paths": {
"/config": {
"put": {
"summary": "Set verbose level for logging on a running server.",
"parameters": [
{
"type": "integer",
"description": "verbose setting for logging",
"name": "verbose",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK"
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
},
"/domains": {
"get": {
"summary": "Get name, configuration and status for each domain.",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Domain"
}
}
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
},
"/domains/{domain}/classes": {
"get": {
"summary": "Get class names and descriptions for a domain.",
"parameters": [
{
"type": "string",
"description": "Domain name",
"name": "domain",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Classes"
}
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
},
"/graphs/goals": {
"post": {
"summary": "Create a correlation graph from start objects to goal queries.",
"parameters": [
{
"type": "boolean",
"description": "include rules in graph edges",
"name": "rules",
"in": "query"
},
{
"description": "search from start to goal classes",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Goals"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Graph"
}
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
},
"/graphs/neighbours": {
"post": {
"summary": "Create a neighbourhood graph around a start object to a given depth.",
"parameters": [
{
"type": "boolean",
"description": "include rules in graph edges",
"name": "rules",
"in": "query"
},
{
"description": "search from neighbours",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Neighbours"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Graph"
}
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
},
"/lists/goals": {
"post": {
"summary": "Create a list of goal nodes related to a starting point.",
"parameters": [
{
"description": "search from start to goal classes",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Goals"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Node"
}
}
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
},
"/objects": {
"get": {
"summary": "Execute a query, returns a list of JSON objects.",
"parameters": [
{
"type": "string",
"description": "query string",
"name": "query",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object"
}
}
},
"default": {
"description": "",
"schema": {
"type": "object"
}
}
}
}
}
},
"definitions": {
"Classes": {
"description": "Classes is a map from class names to a short description.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"Constraint": {
"description": "Constraint constrains the objects that will be included in search results.",
"type": "object",
"properties": {
"end": {
"description": "End of time interval, quoted RFC 3339 format.",
"type": "string",
"format": "date-time"
},
"limit": {
"description": "Limit number of objects returned per query, \u003c=0 means no limit.",
"type": "integer"
},
"start": {
"description": "Start of time interval, quoted RFC 3339 format.",
"type": "string",
"format": "date-time"
},
"timeout": {
"description": "Timeout per request, h/m/s/ms/ns format",
"type": "string"
}
}
},
"Domain": {
"description": "Domain configuration information.",
"type": "object",
"properties": {
"name": {
"description": "Name of the domain.",
"type": "string"
},
"stores": {
"description": "Stores configured for the domain.",
"type": "array",
"items": {
"$ref": "#/definitions/Store"
}
}
}
},
"Edge": {
"description": "Directed edge in the result graph, from Start to Goal classes.",
"type": "object",
"properties": {
"goal": {
"description": "Goal is the class name of the goal node.",
"type": "string",
"example": "domain:class"
},
"rules": {
"description": "Rules is the set of rules followed along this edge.",
"type": "array",
"items": {
"$ref": "#/definitions/Rule"
},
"x-omitempty": true
},
"start": {
"description": "Start is the class name of the start node.",
"type": "string"
}
}
},
"Goals": {
"description": "Starting point for a goals search.",
"type": "object",
"properties": {
"goals": {
"description": "Goal classes for correlation.",
"type": "array",
"items": {
"type": "string"
},
"example": [
"domain:class"
]
},
"start": {
"$ref": "#/definitions/Start"
}
}
},
"Graph": {
"description": "Graph resulting from a correlation search.",
"type": "object",
"properties": {
"edges": {
"type": "array",
"items": {
"$ref": "#/definitions/Edge"
}
},
"nodes": {
"type": "array",
"items": {
"$ref": "#/definitions/Node"
}
}
}
},
"Neighbours": {
"description": "Starting point for a neighbours search.",
"type": "object",
"properties": {
"depth": {
"description": "Max depth of neighbours graph.",
"type": "integer"
},
"start": {
"$ref": "#/definitions/Start"
}
}
},
"Node": {
"description": "Node in the result graph, contains results for a single class.",
"type": "object",
"properties": {
"class": {
"description": "Class is the full class name in \"DOMAIN:CLASS\" form.",
"type": "string",
"example": "domain:class"
},
"count": {
"description": "Count of results found for this class, after de-duplication.",
"type": "integer"
},
"queries": {
"description": "Queries yielding results for this class.",
"type": "array",
"items": {
"$ref": "#/definitions/QueryCount"
}
}
}
},
"QueryCount": {
"description": "Query run during a correlation with a count of results found.",
"type": "object",
"properties": {
"count": {
"description": "Count of results or -1 if the query was not executed.",
"type": "integer"
},
"query": {
"description": "Query for correlation data.",
"type": "string"
}
}
},
"Rule": {
"description": "Rule is a correlation rule with a list of queries and results counts found during navigation.",
"type": "object",
"properties": {
"name": {
"description": "Name is an optional descriptive name.",
"type": "string"
},
"queries": {
"description": "Queries generated while following this rule.",
"type": "array",
"items": {
"$ref": "#/definitions/QueryCount"
}
}
}
},
"Start": {
"description": "Start identifies a set of starting objects for correlation.",
"type": "object",
"properties": {
"class": {
"description": "Class for `objects`",
"type": "string"
},
"constraint": {
"$ref": "#/definitions/Constraint"
},
"objects": {
"description": "Objects of `class` serialized as JSON",
"type": "object"
},
"queries": {
"description": "Queries for starting objects",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"Store": {
"description": "Store is a map of name:value attributes used to connect to a store.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}