@kyverno/backstage-plugin-policy-reporter-backend 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/config.schema.json +19 -0
- package/dist/index.d.ts +190 -4
- package/dist/plugin.cjs.js +8 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/schema/openapi/generated/router.cjs.js +1108 -11
- package/dist/schema/openapi/generated/router.cjs.js.map +1 -1
- package/dist/service/policyReporterService.cjs.js +188 -0
- package/dist/service/policyReporterService.cjs.js.map +1 -0
- package/dist/service/router.cjs.js +139 -78
- package/dist/service/router.cjs.js.map +1 -1
- package/package.json +23 -17
|
@@ -193,7 +193,17 @@ const spec = {
|
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
195
|
"400": {
|
|
196
|
-
description: "Bad request -
|
|
196
|
+
description: "Bad request - environment entity missing required annotations",
|
|
197
|
+
content: {
|
|
198
|
+
"application/json": {
|
|
199
|
+
schema: {
|
|
200
|
+
$ref: "#/components/schemas/RequestError"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"404": {
|
|
206
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
197
207
|
content: {
|
|
198
208
|
"application/json": {
|
|
199
209
|
schema: {
|
|
@@ -211,15 +221,119 @@ const spec = {
|
|
|
211
221
|
}
|
|
212
222
|
}
|
|
213
223
|
}
|
|
224
|
+
},
|
|
225
|
+
"502": {
|
|
226
|
+
description: "Bad Gateway",
|
|
227
|
+
content: {
|
|
228
|
+
"application/json": {
|
|
229
|
+
schema: {
|
|
230
|
+
$ref: "#/components/schemas/RequestError"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"503": {
|
|
236
|
+
description: "Service Unavailable",
|
|
237
|
+
content: {
|
|
238
|
+
"application/json": {
|
|
239
|
+
schema: {
|
|
240
|
+
$ref: "#/components/schemas/RequestError"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
214
244
|
}
|
|
215
245
|
}
|
|
216
246
|
}
|
|
217
247
|
},
|
|
218
|
-
"/v1/
|
|
248
|
+
"/v1/namespaced-resources/sources": {
|
|
219
249
|
get: {
|
|
220
|
-
summary: "Get
|
|
221
|
-
description: "
|
|
222
|
-
operationId: "
|
|
250
|
+
summary: "Get sources",
|
|
251
|
+
description: "List of all Sources with namespace scoped results",
|
|
252
|
+
operationId: "getSources",
|
|
253
|
+
parameters: [
|
|
254
|
+
{
|
|
255
|
+
name: "environment",
|
|
256
|
+
in: "query",
|
|
257
|
+
required: true,
|
|
258
|
+
description: "The environment entity reference (URL encoded)",
|
|
259
|
+
schema: {
|
|
260
|
+
type: "string",
|
|
261
|
+
example: "default/component/my-service"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
responses: {
|
|
266
|
+
"200": {
|
|
267
|
+
description: "List of sources",
|
|
268
|
+
content: {
|
|
269
|
+
"application/json": {
|
|
270
|
+
schema: {
|
|
271
|
+
type: "array",
|
|
272
|
+
items: {
|
|
273
|
+
type: "string"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"400": {
|
|
280
|
+
description: "Bad request - environment entity missing required annotations",
|
|
281
|
+
content: {
|
|
282
|
+
"application/json": {
|
|
283
|
+
schema: {
|
|
284
|
+
$ref: "#/components/schemas/RequestError"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"404": {
|
|
290
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
291
|
+
content: {
|
|
292
|
+
"application/json": {
|
|
293
|
+
schema: {
|
|
294
|
+
$ref: "#/components/schemas/RequestError"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"500": {
|
|
300
|
+
description: "Internal server error",
|
|
301
|
+
content: {
|
|
302
|
+
"application/json": {
|
|
303
|
+
schema: {
|
|
304
|
+
$ref: "#/components/schemas/RequestError"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"502": {
|
|
310
|
+
description: "Bad Gateway",
|
|
311
|
+
content: {
|
|
312
|
+
"application/json": {
|
|
313
|
+
schema: {
|
|
314
|
+
$ref: "#/components/schemas/RequestError"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"503": {
|
|
320
|
+
description: "Service Unavailable",
|
|
321
|
+
content: {
|
|
322
|
+
"application/json": {
|
|
323
|
+
schema: {
|
|
324
|
+
$ref: "#/components/schemas/RequestError"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"/v1/namespaced-resources/kinds": {
|
|
333
|
+
get: {
|
|
334
|
+
summary: "Get kinds",
|
|
335
|
+
description: "List of all Kubernetes resource kinds with namespace scoped results",
|
|
336
|
+
operationId: "getKinds",
|
|
223
337
|
parameters: [
|
|
224
338
|
{
|
|
225
339
|
name: "environment",
|
|
@@ -245,9 +359,106 @@ const spec = {
|
|
|
245
359
|
explode: true
|
|
246
360
|
},
|
|
247
361
|
{
|
|
248
|
-
name: "
|
|
362
|
+
name: "namespaces",
|
|
249
363
|
in: "query",
|
|
250
|
-
description: "Filter by a list of
|
|
364
|
+
description: "Filter by a list of namespaces",
|
|
365
|
+
schema: {
|
|
366
|
+
type: "array",
|
|
367
|
+
items: {
|
|
368
|
+
type: "string"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
style: "form",
|
|
372
|
+
explode: true
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
responses: {
|
|
376
|
+
"200": {
|
|
377
|
+
description: "List of kinds",
|
|
378
|
+
content: {
|
|
379
|
+
"application/json": {
|
|
380
|
+
schema: {
|
|
381
|
+
type: "array",
|
|
382
|
+
items: {
|
|
383
|
+
type: "string"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"400": {
|
|
390
|
+
description: "Bad request - environment entity missing required annotations",
|
|
391
|
+
content: {
|
|
392
|
+
"application/json": {
|
|
393
|
+
schema: {
|
|
394
|
+
$ref: "#/components/schemas/RequestError"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"404": {
|
|
400
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
401
|
+
content: {
|
|
402
|
+
"application/json": {
|
|
403
|
+
schema: {
|
|
404
|
+
$ref: "#/components/schemas/RequestError"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"500": {
|
|
410
|
+
description: "Internal server error",
|
|
411
|
+
content: {
|
|
412
|
+
"application/json": {
|
|
413
|
+
schema: {
|
|
414
|
+
$ref: "#/components/schemas/RequestError"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"502": {
|
|
420
|
+
description: "Bad Gateway",
|
|
421
|
+
content: {
|
|
422
|
+
"application/json": {
|
|
423
|
+
schema: {
|
|
424
|
+
$ref: "#/components/schemas/RequestError"
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"503": {
|
|
430
|
+
description: "Service Unavailable",
|
|
431
|
+
content: {
|
|
432
|
+
"application/json": {
|
|
433
|
+
schema: {
|
|
434
|
+
$ref: "#/components/schemas/RequestError"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"/v1/namespaced-resources/categories": {
|
|
443
|
+
get: {
|
|
444
|
+
summary: "Get categories",
|
|
445
|
+
description: "List of all Categories with namespace scoped results",
|
|
446
|
+
operationId: "getCategories",
|
|
447
|
+
parameters: [
|
|
448
|
+
{
|
|
449
|
+
name: "environment",
|
|
450
|
+
in: "query",
|
|
451
|
+
required: true,
|
|
452
|
+
description: "The environment entity reference (URL encoded)",
|
|
453
|
+
schema: {
|
|
454
|
+
type: "string",
|
|
455
|
+
example: "default/component/my-service"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
name: "sources",
|
|
460
|
+
in: "query",
|
|
461
|
+
description: "Filter by a list of sources",
|
|
251
462
|
schema: {
|
|
252
463
|
type: "array",
|
|
253
464
|
items: {
|
|
@@ -258,9 +469,9 @@ const spec = {
|
|
|
258
469
|
explode: true
|
|
259
470
|
},
|
|
260
471
|
{
|
|
261
|
-
name: "
|
|
472
|
+
name: "namespaces",
|
|
262
473
|
in: "query",
|
|
263
|
-
description: "Filter by a list of
|
|
474
|
+
description: "Filter by a list of namespaces",
|
|
264
475
|
schema: {
|
|
265
476
|
type: "array",
|
|
266
477
|
items: {
|
|
@@ -273,7 +484,7 @@ const spec = {
|
|
|
273
484
|
],
|
|
274
485
|
responses: {
|
|
275
486
|
"200": {
|
|
276
|
-
description: "List of
|
|
487
|
+
description: "List of categories",
|
|
277
488
|
content: {
|
|
278
489
|
"application/json": {
|
|
279
490
|
schema: {
|
|
@@ -286,7 +497,17 @@ const spec = {
|
|
|
286
497
|
}
|
|
287
498
|
},
|
|
288
499
|
"400": {
|
|
289
|
-
description: "Bad request -
|
|
500
|
+
description: "Bad request - environment entity missing required annotations",
|
|
501
|
+
content: {
|
|
502
|
+
"application/json": {
|
|
503
|
+
schema: {
|
|
504
|
+
$ref: "#/components/schemas/RequestError"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"404": {
|
|
510
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
290
511
|
content: {
|
|
291
512
|
"application/json": {
|
|
292
513
|
schema: {
|
|
@@ -304,6 +525,882 @@ const spec = {
|
|
|
304
525
|
}
|
|
305
526
|
}
|
|
306
527
|
}
|
|
528
|
+
},
|
|
529
|
+
"502": {
|
|
530
|
+
description: "Bad Gateway",
|
|
531
|
+
content: {
|
|
532
|
+
"application/json": {
|
|
533
|
+
schema: {
|
|
534
|
+
$ref: "#/components/schemas/RequestError"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"503": {
|
|
540
|
+
description: "Service Unavailable",
|
|
541
|
+
content: {
|
|
542
|
+
"application/json": {
|
|
543
|
+
schema: {
|
|
544
|
+
$ref: "#/components/schemas/RequestError"
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"/v1/namespaces": {
|
|
553
|
+
get: {
|
|
554
|
+
summary: "Get namespaces",
|
|
555
|
+
description: "Retrieves a list of namespaces from the policies",
|
|
556
|
+
operationId: "getNamespaces",
|
|
557
|
+
parameters: [
|
|
558
|
+
{
|
|
559
|
+
name: "environment",
|
|
560
|
+
in: "query",
|
|
561
|
+
required: true,
|
|
562
|
+
description: "The environment entity reference (URL encoded)",
|
|
563
|
+
schema: {
|
|
564
|
+
type: "string",
|
|
565
|
+
example: "default/component/my-service"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
name: "sources",
|
|
570
|
+
in: "query",
|
|
571
|
+
description: "Filter by a list of sources",
|
|
572
|
+
schema: {
|
|
573
|
+
type: "array",
|
|
574
|
+
items: {
|
|
575
|
+
type: "string"
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
style: "form",
|
|
579
|
+
explode: true
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
name: "categories",
|
|
583
|
+
in: "query",
|
|
584
|
+
description: "Filter by a list of categories",
|
|
585
|
+
schema: {
|
|
586
|
+
type: "array",
|
|
587
|
+
items: {
|
|
588
|
+
type: "string"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
style: "form",
|
|
592
|
+
explode: true
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: "policies",
|
|
596
|
+
in: "query",
|
|
597
|
+
description: "Filter by a list of policies",
|
|
598
|
+
schema: {
|
|
599
|
+
type: "array",
|
|
600
|
+
items: {
|
|
601
|
+
type: "string"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
style: "form",
|
|
605
|
+
explode: true
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
responses: {
|
|
609
|
+
"200": {
|
|
610
|
+
description: "List of namespaces",
|
|
611
|
+
content: {
|
|
612
|
+
"application/json": {
|
|
613
|
+
schema: {
|
|
614
|
+
type: "array",
|
|
615
|
+
items: {
|
|
616
|
+
type: "string"
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"400": {
|
|
623
|
+
description: "Bad request - environment entity missing required annotations",
|
|
624
|
+
content: {
|
|
625
|
+
"application/json": {
|
|
626
|
+
schema: {
|
|
627
|
+
$ref: "#/components/schemas/RequestError"
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"404": {
|
|
633
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
634
|
+
content: {
|
|
635
|
+
"application/json": {
|
|
636
|
+
schema: {
|
|
637
|
+
$ref: "#/components/schemas/RequestError"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
"500": {
|
|
643
|
+
description: "Internal server error",
|
|
644
|
+
content: {
|
|
645
|
+
"application/json": {
|
|
646
|
+
schema: {
|
|
647
|
+
$ref: "#/components/schemas/RequestError"
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
"502": {
|
|
653
|
+
description: "Bad Gateway",
|
|
654
|
+
content: {
|
|
655
|
+
"application/json": {
|
|
656
|
+
schema: {
|
|
657
|
+
$ref: "#/components/schemas/RequestError"
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"503": {
|
|
663
|
+
description: "Service Unavailable",
|
|
664
|
+
content: {
|
|
665
|
+
"application/json": {
|
|
666
|
+
schema: {
|
|
667
|
+
$ref: "#/components/schemas/RequestError"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"/v1/namespaced-resources/policies": {
|
|
676
|
+
get: {
|
|
677
|
+
summary: "Get policies with namespaced policy results",
|
|
678
|
+
description: "List of all Policies with namespace scoped results",
|
|
679
|
+
operationId: "getPolicies",
|
|
680
|
+
parameters: [
|
|
681
|
+
{
|
|
682
|
+
name: "environment",
|
|
683
|
+
in: "query",
|
|
684
|
+
required: true,
|
|
685
|
+
description: "The environment entity reference (URL encoded)",
|
|
686
|
+
schema: {
|
|
687
|
+
type: "string",
|
|
688
|
+
example: "default/component/my-service"
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: "sources",
|
|
693
|
+
in: "query",
|
|
694
|
+
description: "Filter by a list of sources",
|
|
695
|
+
schema: {
|
|
696
|
+
type: "array",
|
|
697
|
+
items: {
|
|
698
|
+
type: "string"
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
style: "form",
|
|
702
|
+
explode: true
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
name: "namespaces",
|
|
706
|
+
in: "query",
|
|
707
|
+
description: "Filter by a list of namespaces",
|
|
708
|
+
schema: {
|
|
709
|
+
type: "array",
|
|
710
|
+
items: {
|
|
711
|
+
type: "string"
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
style: "form",
|
|
715
|
+
explode: true
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
name: "categories",
|
|
719
|
+
in: "query",
|
|
720
|
+
description: "Filter by a list of categories",
|
|
721
|
+
schema: {
|
|
722
|
+
type: "array",
|
|
723
|
+
items: {
|
|
724
|
+
type: "string"
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
style: "form",
|
|
728
|
+
explode: true
|
|
729
|
+
}
|
|
730
|
+
],
|
|
731
|
+
responses: {
|
|
732
|
+
"200": {
|
|
733
|
+
description: "List of policies",
|
|
734
|
+
content: {
|
|
735
|
+
"application/json": {
|
|
736
|
+
schema: {
|
|
737
|
+
type: "array",
|
|
738
|
+
items: {
|
|
739
|
+
type: "string"
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
"400": {
|
|
746
|
+
description: "Bad request - environment entity missing required annotations",
|
|
747
|
+
content: {
|
|
748
|
+
"application/json": {
|
|
749
|
+
schema: {
|
|
750
|
+
$ref: "#/components/schemas/RequestError"
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"404": {
|
|
756
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
757
|
+
content: {
|
|
758
|
+
"application/json": {
|
|
759
|
+
schema: {
|
|
760
|
+
$ref: "#/components/schemas/RequestError"
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
"500": {
|
|
766
|
+
description: "Internal server error - failed to fetch policies",
|
|
767
|
+
content: {
|
|
768
|
+
"application/json": {
|
|
769
|
+
schema: {
|
|
770
|
+
$ref: "#/components/schemas/RequestError"
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
"502": {
|
|
776
|
+
description: "Bad Gateway",
|
|
777
|
+
content: {
|
|
778
|
+
"application/json": {
|
|
779
|
+
schema: {
|
|
780
|
+
$ref: "#/components/schemas/RequestError"
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"503": {
|
|
786
|
+
description: "Service Unavailable",
|
|
787
|
+
content: {
|
|
788
|
+
"application/json": {
|
|
789
|
+
schema: {
|
|
790
|
+
$ref: "#/components/schemas/RequestError"
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
"/v1/cluster-resources/sources": {
|
|
799
|
+
get: {
|
|
800
|
+
summary: "Get cluster sources",
|
|
801
|
+
description: "List of all Sources with cluster scoped results",
|
|
802
|
+
operationId: "getClusterSources",
|
|
803
|
+
parameters: [
|
|
804
|
+
{
|
|
805
|
+
name: "environment",
|
|
806
|
+
in: "query",
|
|
807
|
+
required: true,
|
|
808
|
+
description: "The environment entity reference (URL encoded)",
|
|
809
|
+
schema: {
|
|
810
|
+
type: "string",
|
|
811
|
+
example: "default/component/my-service"
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
responses: {
|
|
816
|
+
"200": {
|
|
817
|
+
description: "List of sources",
|
|
818
|
+
content: {
|
|
819
|
+
"application/json": {
|
|
820
|
+
schema: {
|
|
821
|
+
type: "array",
|
|
822
|
+
items: {
|
|
823
|
+
type: "string"
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
"400": {
|
|
830
|
+
description: "Bad request - environment entity missing required annotations",
|
|
831
|
+
content: {
|
|
832
|
+
"application/json": {
|
|
833
|
+
schema: {
|
|
834
|
+
$ref: "#/components/schemas/RequestError"
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"404": {
|
|
840
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
841
|
+
content: {
|
|
842
|
+
"application/json": {
|
|
843
|
+
schema: {
|
|
844
|
+
$ref: "#/components/schemas/RequestError"
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
"500": {
|
|
850
|
+
description: "Internal server error",
|
|
851
|
+
content: {
|
|
852
|
+
"application/json": {
|
|
853
|
+
schema: {
|
|
854
|
+
$ref: "#/components/schemas/RequestError"
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
"502": {
|
|
860
|
+
description: "Bad Gateway",
|
|
861
|
+
content: {
|
|
862
|
+
"application/json": {
|
|
863
|
+
schema: {
|
|
864
|
+
$ref: "#/components/schemas/RequestError"
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"503": {
|
|
870
|
+
description: "Service Unavailable",
|
|
871
|
+
content: {
|
|
872
|
+
"application/json": {
|
|
873
|
+
schema: {
|
|
874
|
+
$ref: "#/components/schemas/RequestError"
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
"/v1/cluster-resources/kinds": {
|
|
883
|
+
get: {
|
|
884
|
+
summary: "Get cluster kinds",
|
|
885
|
+
description: "List of all Kubernetes resource kinds with cluster scoped results",
|
|
886
|
+
operationId: "getClusterKinds",
|
|
887
|
+
parameters: [
|
|
888
|
+
{
|
|
889
|
+
name: "environment",
|
|
890
|
+
in: "query",
|
|
891
|
+
required: true,
|
|
892
|
+
description: "The environment entity reference (URL encoded)",
|
|
893
|
+
schema: {
|
|
894
|
+
type: "string",
|
|
895
|
+
example: "default/component/my-service"
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
name: "sources",
|
|
900
|
+
in: "query",
|
|
901
|
+
description: "Filter by a list of sources",
|
|
902
|
+
schema: {
|
|
903
|
+
type: "array",
|
|
904
|
+
items: {
|
|
905
|
+
type: "string"
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
style: "form",
|
|
909
|
+
explode: true
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: "namespaces",
|
|
913
|
+
in: "query",
|
|
914
|
+
description: "Filter by a list of namespaces",
|
|
915
|
+
schema: {
|
|
916
|
+
type: "array",
|
|
917
|
+
items: {
|
|
918
|
+
type: "string"
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
style: "form",
|
|
922
|
+
explode: true
|
|
923
|
+
}
|
|
924
|
+
],
|
|
925
|
+
responses: {
|
|
926
|
+
"200": {
|
|
927
|
+
description: "List of kinds",
|
|
928
|
+
content: {
|
|
929
|
+
"application/json": {
|
|
930
|
+
schema: {
|
|
931
|
+
type: "array",
|
|
932
|
+
items: {
|
|
933
|
+
type: "string"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"400": {
|
|
940
|
+
description: "Bad request - environment entity missing required annotations",
|
|
941
|
+
content: {
|
|
942
|
+
"application/json": {
|
|
943
|
+
schema: {
|
|
944
|
+
$ref: "#/components/schemas/RequestError"
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
"404": {
|
|
950
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
951
|
+
content: {
|
|
952
|
+
"application/json": {
|
|
953
|
+
schema: {
|
|
954
|
+
$ref: "#/components/schemas/RequestError"
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"500": {
|
|
960
|
+
description: "Internal server error",
|
|
961
|
+
content: {
|
|
962
|
+
"application/json": {
|
|
963
|
+
schema: {
|
|
964
|
+
$ref: "#/components/schemas/RequestError"
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"502": {
|
|
970
|
+
description: "Bad Gateway",
|
|
971
|
+
content: {
|
|
972
|
+
"application/json": {
|
|
973
|
+
schema: {
|
|
974
|
+
$ref: "#/components/schemas/RequestError"
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"503": {
|
|
980
|
+
description: "Service Unavailable",
|
|
981
|
+
content: {
|
|
982
|
+
"application/json": {
|
|
983
|
+
schema: {
|
|
984
|
+
$ref: "#/components/schemas/RequestError"
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
"/v1/cluster-resources/categories": {
|
|
993
|
+
get: {
|
|
994
|
+
summary: "Get cluster categories",
|
|
995
|
+
description: "List of all Categories with cluster scoped results",
|
|
996
|
+
operationId: "getClusterCategories",
|
|
997
|
+
parameters: [
|
|
998
|
+
{
|
|
999
|
+
name: "environment",
|
|
1000
|
+
in: "query",
|
|
1001
|
+
required: true,
|
|
1002
|
+
description: "The environment entity reference (URL encoded)",
|
|
1003
|
+
schema: {
|
|
1004
|
+
type: "string",
|
|
1005
|
+
example: "default/component/my-service"
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
name: "sources",
|
|
1010
|
+
in: "query",
|
|
1011
|
+
description: "Filter by a list of sources",
|
|
1012
|
+
schema: {
|
|
1013
|
+
type: "array",
|
|
1014
|
+
items: {
|
|
1015
|
+
type: "string"
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
style: "form",
|
|
1019
|
+
explode: true
|
|
1020
|
+
}
|
|
1021
|
+
],
|
|
1022
|
+
responses: {
|
|
1023
|
+
"200": {
|
|
1024
|
+
description: "List of categories",
|
|
1025
|
+
content: {
|
|
1026
|
+
"application/json": {
|
|
1027
|
+
schema: {
|
|
1028
|
+
type: "array",
|
|
1029
|
+
items: {
|
|
1030
|
+
type: "string"
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
"400": {
|
|
1037
|
+
description: "Bad request - environment entity missing required annotations",
|
|
1038
|
+
content: {
|
|
1039
|
+
"application/json": {
|
|
1040
|
+
schema: {
|
|
1041
|
+
$ref: "#/components/schemas/RequestError"
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"404": {
|
|
1047
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
1048
|
+
content: {
|
|
1049
|
+
"application/json": {
|
|
1050
|
+
schema: {
|
|
1051
|
+
$ref: "#/components/schemas/RequestError"
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"500": {
|
|
1057
|
+
description: "Internal server error",
|
|
1058
|
+
content: {
|
|
1059
|
+
"application/json": {
|
|
1060
|
+
schema: {
|
|
1061
|
+
$ref: "#/components/schemas/RequestError"
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
"502": {
|
|
1067
|
+
description: "Bad Gateway",
|
|
1068
|
+
content: {
|
|
1069
|
+
"application/json": {
|
|
1070
|
+
schema: {
|
|
1071
|
+
$ref: "#/components/schemas/RequestError"
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
"503": {
|
|
1077
|
+
description: "Service Unavailable",
|
|
1078
|
+
content: {
|
|
1079
|
+
"application/json": {
|
|
1080
|
+
schema: {
|
|
1081
|
+
$ref: "#/components/schemas/RequestError"
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
"/v1/cluster-resources/policies": {
|
|
1090
|
+
get: {
|
|
1091
|
+
summary: "Get cluster policies",
|
|
1092
|
+
description: "List of all Policies with cluster scoped results",
|
|
1093
|
+
operationId: "getClusterPolicies",
|
|
1094
|
+
parameters: [
|
|
1095
|
+
{
|
|
1096
|
+
name: "environment",
|
|
1097
|
+
in: "query",
|
|
1098
|
+
required: true,
|
|
1099
|
+
description: "The environment entity reference (URL encoded)",
|
|
1100
|
+
schema: {
|
|
1101
|
+
type: "string",
|
|
1102
|
+
example: "default/component/my-service"
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
name: "sources",
|
|
1107
|
+
in: "query",
|
|
1108
|
+
description: "Filter by a list of sources",
|
|
1109
|
+
schema: {
|
|
1110
|
+
type: "array",
|
|
1111
|
+
items: {
|
|
1112
|
+
type: "string"
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
style: "form",
|
|
1116
|
+
explode: true
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
name: "categories",
|
|
1120
|
+
in: "query",
|
|
1121
|
+
description: "Filter by a list of categories",
|
|
1122
|
+
schema: {
|
|
1123
|
+
type: "array",
|
|
1124
|
+
items: {
|
|
1125
|
+
type: "string"
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
style: "form",
|
|
1129
|
+
explode: true
|
|
1130
|
+
}
|
|
1131
|
+
],
|
|
1132
|
+
responses: {
|
|
1133
|
+
"200": {
|
|
1134
|
+
description: "List of policies",
|
|
1135
|
+
content: {
|
|
1136
|
+
"application/json": {
|
|
1137
|
+
schema: {
|
|
1138
|
+
type: "array",
|
|
1139
|
+
items: {
|
|
1140
|
+
type: "string"
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
"400": {
|
|
1147
|
+
description: "Bad request - environment entity missing required annotations",
|
|
1148
|
+
content: {
|
|
1149
|
+
"application/json": {
|
|
1150
|
+
schema: {
|
|
1151
|
+
$ref: "#/components/schemas/RequestError"
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
"404": {
|
|
1157
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
1158
|
+
content: {
|
|
1159
|
+
"application/json": {
|
|
1160
|
+
schema: {
|
|
1161
|
+
$ref: "#/components/schemas/RequestError"
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
"500": {
|
|
1167
|
+
description: "Internal server error - failed to fetch policies",
|
|
1168
|
+
content: {
|
|
1169
|
+
"application/json": {
|
|
1170
|
+
schema: {
|
|
1171
|
+
$ref: "#/components/schemas/RequestError"
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"502": {
|
|
1177
|
+
description: "Bad Gateway",
|
|
1178
|
+
content: {
|
|
1179
|
+
"application/json": {
|
|
1180
|
+
schema: {
|
|
1181
|
+
$ref: "#/components/schemas/RequestError"
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"503": {
|
|
1187
|
+
description: "Service Unavailable",
|
|
1188
|
+
content: {
|
|
1189
|
+
"application/json": {
|
|
1190
|
+
schema: {
|
|
1191
|
+
$ref: "#/components/schemas/RequestError"
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
"/v1/cluster-resources/results": {
|
|
1200
|
+
get: {
|
|
1201
|
+
summary: "Get cluster policy results",
|
|
1202
|
+
description: "Retrieves policy results for a specific environment with optional filtering and pagination",
|
|
1203
|
+
operationId: "getClusterResults",
|
|
1204
|
+
parameters: [
|
|
1205
|
+
{
|
|
1206
|
+
name: "environment",
|
|
1207
|
+
in: "query",
|
|
1208
|
+
required: true,
|
|
1209
|
+
description: "The environment entity reference (URL encoded)",
|
|
1210
|
+
schema: {
|
|
1211
|
+
type: "string",
|
|
1212
|
+
example: "default/component/my-service"
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
name: "sources",
|
|
1217
|
+
in: "query",
|
|
1218
|
+
description: "Filter by a list of sources",
|
|
1219
|
+
schema: {
|
|
1220
|
+
type: "array",
|
|
1221
|
+
items: {
|
|
1222
|
+
type: "string"
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
style: "form",
|
|
1226
|
+
explode: true
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
name: "kinds",
|
|
1230
|
+
in: "query",
|
|
1231
|
+
description: "Filter by a list of Kubernetes resource kinds",
|
|
1232
|
+
schema: {
|
|
1233
|
+
type: "array",
|
|
1234
|
+
items: {
|
|
1235
|
+
type: "string"
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1238
|
+
style: "form",
|
|
1239
|
+
explode: true
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
name: "categories",
|
|
1243
|
+
in: "query",
|
|
1244
|
+
description: "Filter by a list of categories",
|
|
1245
|
+
schema: {
|
|
1246
|
+
type: "array",
|
|
1247
|
+
items: {
|
|
1248
|
+
type: "string"
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
style: "form",
|
|
1252
|
+
explode: true
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
name: "policies",
|
|
1256
|
+
in: "query",
|
|
1257
|
+
description: "Filter by a list of policies",
|
|
1258
|
+
schema: {
|
|
1259
|
+
type: "array",
|
|
1260
|
+
items: {
|
|
1261
|
+
type: "string"
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
style: "form",
|
|
1265
|
+
explode: true
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
name: "status",
|
|
1269
|
+
in: "query",
|
|
1270
|
+
description: "Filter by policy result status",
|
|
1271
|
+
schema: {
|
|
1272
|
+
type: "array",
|
|
1273
|
+
items: {
|
|
1274
|
+
$ref: "#/components/schemas/Status"
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
style: "form",
|
|
1278
|
+
explode: true
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
name: "severities",
|
|
1282
|
+
in: "query",
|
|
1283
|
+
description: "Filter by severity levels",
|
|
1284
|
+
schema: {
|
|
1285
|
+
type: "array",
|
|
1286
|
+
items: {
|
|
1287
|
+
$ref: "#/components/schemas/Severity"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
style: "form",
|
|
1291
|
+
explode: true
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
name: "search",
|
|
1295
|
+
in: "query",
|
|
1296
|
+
description: "Search string to filter results",
|
|
1297
|
+
schema: {
|
|
1298
|
+
type: "string"
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
name: "labels",
|
|
1303
|
+
in: "query",
|
|
1304
|
+
description: "Filter by label-value pairs",
|
|
1305
|
+
schema: {
|
|
1306
|
+
type: "array",
|
|
1307
|
+
items: {
|
|
1308
|
+
type: "string"
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
style: "form",
|
|
1312
|
+
explode: true
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
name: "page",
|
|
1316
|
+
in: "query",
|
|
1317
|
+
description: "Requested list page number",
|
|
1318
|
+
schema: {
|
|
1319
|
+
type: "integer",
|
|
1320
|
+
minimum: 1,
|
|
1321
|
+
default: 1
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
name: "offset",
|
|
1326
|
+
in: "query",
|
|
1327
|
+
description: "Number of results per page",
|
|
1328
|
+
schema: {
|
|
1329
|
+
type: "integer",
|
|
1330
|
+
minimum: 1,
|
|
1331
|
+
maximum: 100,
|
|
1332
|
+
default: 20
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
name: "direction",
|
|
1337
|
+
in: "query",
|
|
1338
|
+
description: "Sort direction for results",
|
|
1339
|
+
schema: {
|
|
1340
|
+
$ref: "#/components/schemas/Direction"
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
],
|
|
1344
|
+
responses: {
|
|
1345
|
+
"200": {
|
|
1346
|
+
description: "Policy results retrieved successfully",
|
|
1347
|
+
content: {
|
|
1348
|
+
"application/json": {
|
|
1349
|
+
schema: {
|
|
1350
|
+
$ref: "#/components/schemas/ResultList"
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
"400": {
|
|
1356
|
+
description: "Bad request - environment entity missing required annotations",
|
|
1357
|
+
content: {
|
|
1358
|
+
"application/json": {
|
|
1359
|
+
schema: {
|
|
1360
|
+
$ref: "#/components/schemas/RequestError"
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
"404": {
|
|
1366
|
+
description: "Not Found - environment entity not found in the catalog",
|
|
1367
|
+
content: {
|
|
1368
|
+
"application/json": {
|
|
1369
|
+
schema: {
|
|
1370
|
+
$ref: "#/components/schemas/RequestError"
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
"500": {
|
|
1376
|
+
description: "Internal server error - failed to fetch policies",
|
|
1377
|
+
content: {
|
|
1378
|
+
"application/json": {
|
|
1379
|
+
schema: {
|
|
1380
|
+
$ref: "#/components/schemas/RequestError"
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
"502": {
|
|
1386
|
+
description: "Bad Gateway",
|
|
1387
|
+
content: {
|
|
1388
|
+
"application/json": {
|
|
1389
|
+
schema: {
|
|
1390
|
+
$ref: "#/components/schemas/RequestError"
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
"503": {
|
|
1396
|
+
description: "Service Unavailable",
|
|
1397
|
+
content: {
|
|
1398
|
+
"application/json": {
|
|
1399
|
+
schema: {
|
|
1400
|
+
$ref: "#/components/schemas/RequestError"
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
307
1404
|
}
|
|
308
1405
|
}
|
|
309
1406
|
}
|