mikroscope 0.0.1

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.
@@ -0,0 +1,949 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: MikroScope API
4
+ version: 0.1.0
5
+ description: |
6
+ HTTP API for ingesting, indexing, querying, and operating MikroScope logs.
7
+
8
+ Authentication behavior is runtime-configurable:
9
+ - `/api/reindex`, `/api/logs`, `/api/logs/aggregate` require Bearer API token and/or Basic auth only if enabled.
10
+ - `/api/ingest` requires producer Bearer token mapping and/or Basic auth username (used as `producerId`) when enabled.
11
+
12
+ If no auth is configured for a route category, that category is open.
13
+ servers:
14
+ - url: http://127.0.0.1:4310
15
+ description: Default local HTTP server
16
+ - url: https://127.0.0.1:4310
17
+ description: Local HTTPS server (when TLS is configured)
18
+ tags:
19
+ - name: Health
20
+ - name: Ingest
21
+ - name: Logs
22
+ - name: Admin
23
+ paths:
24
+ /health:
25
+ options:
26
+ tags: [Health]
27
+ summary: CORS preflight
28
+ operationId: preflightHealth
29
+ security: []
30
+ responses:
31
+ "204":
32
+ description: No Content
33
+ get:
34
+ tags: [Health]
35
+ summary: Service health and runtime status
36
+ operationId: getHealth
37
+ security: []
38
+ responses:
39
+ "200":
40
+ description: Runtime health snapshot
41
+ content:
42
+ application/json:
43
+ schema:
44
+ $ref: "#/components/schemas/HealthResponse"
45
+ "500":
46
+ $ref: "#/components/responses/InternalError"
47
+
48
+ /api/ingest:
49
+ options:
50
+ tags: [Ingest]
51
+ summary: CORS preflight
52
+ operationId: preflightIngest
53
+ security: []
54
+ responses:
55
+ "204":
56
+ description: No Content
57
+ post:
58
+ tags: [Ingest]
59
+ summary: Ingest log records
60
+ operationId: ingestLogs
61
+ description: |
62
+ Accepts logs as either:
63
+ - A top-level JSON array
64
+ - An object wrapper `{ "logs": [...] }`
65
+
66
+ `producerId` is always resolved from auth context, not trusted from payload.
67
+ - Bearer token is resolved via producer mapping (`token=producerId`).
68
+ - Basic auth uses the authenticated username as `producerId`.
69
+
70
+ Non-object log items are rejected per-item (`rejected` count) while valid objects are accepted.
71
+ security:
72
+ - producerBearerAuth: []
73
+ - basicAuth: []
74
+ requestBody:
75
+ required: true
76
+ content:
77
+ application/json:
78
+ schema:
79
+ $ref: "#/components/schemas/IngestRequest"
80
+ examples:
81
+ arrayPayload:
82
+ summary: Top-level array payload
83
+ value:
84
+ - timestamp: "2026-02-18T12:10:00.000Z"
85
+ level: "INFO"
86
+ event: "frontend.pageview"
87
+ message: "frontend.pageview"
88
+ producerId: "ignored"
89
+ - "invalid-item"
90
+ wrappedPayload:
91
+ summary: Wrapper payload
92
+ value:
93
+ logs:
94
+ - timestamp: "2026-02-18T12:10:00.000Z"
95
+ level: "INFO"
96
+ event: "frontend.click"
97
+ message: "frontend.click"
98
+ responses:
99
+ "200":
100
+ description: Ingested and flushed/indexed synchronously
101
+ content:
102
+ application/json:
103
+ schema:
104
+ $ref: "#/components/schemas/IngestResponse"
105
+ "202":
106
+ description: Accepted and queued (async queue enabled)
107
+ content:
108
+ application/json:
109
+ schema:
110
+ $ref: "#/components/schemas/IngestResponse"
111
+ "400":
112
+ description: Invalid JSON or invalid ingest payload structure
113
+ content:
114
+ application/json:
115
+ schema:
116
+ $ref: "#/components/schemas/ErrorResponse"
117
+ examples:
118
+ invalidJson:
119
+ value:
120
+ error: "Invalid JSON payload."
121
+ invalidPayload:
122
+ value:
123
+ error: "Invalid ingest payload. Expected an array or an object with a logs array."
124
+ "401":
125
+ $ref: "#/components/responses/Unauthorized"
126
+ "404":
127
+ description: Ingest endpoint disabled
128
+ content:
129
+ application/json:
130
+ schema:
131
+ $ref: "#/components/schemas/ErrorResponse"
132
+ example:
133
+ error: "Ingest endpoint is not enabled."
134
+ "413":
135
+ description: Payload too large
136
+ content:
137
+ application/json:
138
+ schema:
139
+ $ref: "#/components/schemas/ErrorResponse"
140
+ example:
141
+ error: "Payload too large. Max body size is 1048576 bytes."
142
+ "500":
143
+ $ref: "#/components/responses/InternalError"
144
+
145
+ /api/reindex:
146
+ options:
147
+ tags: [Admin]
148
+ summary: CORS preflight
149
+ operationId: preflightReindex
150
+ security: []
151
+ responses:
152
+ "204":
153
+ description: No Content
154
+ post:
155
+ tags: [Admin]
156
+ summary: Rebuild DB index from current logs
157
+ operationId: reindexLogs
158
+ description: Resets the DB, then performs full indexing from the configured logs directory.
159
+ security:
160
+ - apiBearerAuth: []
161
+ - basicAuth: []
162
+ responses:
163
+ "200":
164
+ description: Reindex completed
165
+ content:
166
+ application/json:
167
+ schema:
168
+ $ref: "#/components/schemas/ReindexResponse"
169
+ "401":
170
+ $ref: "#/components/responses/Unauthorized"
171
+ "500":
172
+ $ref: "#/components/responses/InternalError"
173
+
174
+ /api/logs:
175
+ options:
176
+ tags: [Logs]
177
+ summary: CORS preflight
178
+ operationId: preflightLogs
179
+ security: []
180
+ responses:
181
+ "204":
182
+ description: No Content
183
+ get:
184
+ tags: [Logs]
185
+ summary: Query paginated logs
186
+ operationId: queryLogs
187
+ security:
188
+ - apiBearerAuth: []
189
+ - basicAuth: []
190
+ parameters:
191
+ - $ref: "#/components/parameters/From"
192
+ - $ref: "#/components/parameters/To"
193
+ - $ref: "#/components/parameters/Level"
194
+ - $ref: "#/components/parameters/Audit"
195
+ - $ref: "#/components/parameters/Field"
196
+ - $ref: "#/components/parameters/Value"
197
+ - $ref: "#/components/parameters/Limit"
198
+ - $ref: "#/components/parameters/Cursor"
199
+ responses:
200
+ "200":
201
+ description: Page of indexed logs
202
+ content:
203
+ application/json:
204
+ schema:
205
+ $ref: "#/components/schemas/LogQueryPage"
206
+ "401":
207
+ $ref: "#/components/responses/Unauthorized"
208
+ "500":
209
+ $ref: "#/components/responses/InternalError"
210
+
211
+ /api/logs/aggregate:
212
+ options:
213
+ tags: [Logs]
214
+ summary: CORS preflight
215
+ operationId: preflightAggregateLogs
216
+ security: []
217
+ responses:
218
+ "204":
219
+ description: No Content
220
+ get:
221
+ tags: [Logs]
222
+ summary: Aggregate logs by level/event/field/correlation
223
+ operationId: aggregateLogs
224
+ security:
225
+ - apiBearerAuth: []
226
+ - basicAuth: []
227
+ parameters:
228
+ - $ref: "#/components/parameters/From"
229
+ - $ref: "#/components/parameters/To"
230
+ - $ref: "#/components/parameters/Level"
231
+ - $ref: "#/components/parameters/Audit"
232
+ - $ref: "#/components/parameters/Field"
233
+ - $ref: "#/components/parameters/Value"
234
+ - $ref: "#/components/parameters/Limit"
235
+ - $ref: "#/components/parameters/GroupBy"
236
+ - $ref: "#/components/parameters/GroupField"
237
+ responses:
238
+ "200":
239
+ description: Aggregation result
240
+ content:
241
+ application/json:
242
+ schema:
243
+ $ref: "#/components/schemas/AggregateResponse"
244
+ "400":
245
+ description: Invalid aggregation parameters
246
+ content:
247
+ application/json:
248
+ schema:
249
+ $ref: "#/components/schemas/ErrorResponse"
250
+ examples:
251
+ invalidGroupBy:
252
+ value:
253
+ error: "Invalid groupBy. Expected level, event, field, or correlation."
254
+ missingGroupField:
255
+ value:
256
+ error: "Missing required groupField when groupBy=field."
257
+ "401":
258
+ $ref: "#/components/responses/Unauthorized"
259
+ "500":
260
+ $ref: "#/components/responses/InternalError"
261
+
262
+ components:
263
+ securitySchemes:
264
+ apiBearerAuth:
265
+ type: http
266
+ scheme: bearer
267
+ bearerFormat: Token
268
+ description: Bearer API token for query/admin routes (`MIKROSCOPE_API_TOKEN`).
269
+ producerBearerAuth:
270
+ type: http
271
+ scheme: bearer
272
+ bearerFormat: Token
273
+ description: Bearer producer token mapped via ingest producer mapping (`token=producerId`).
274
+ basicAuth:
275
+ type: http
276
+ scheme: basic
277
+ description: Basic auth for API and ingest routes when username/password is configured.
278
+
279
+ parameters:
280
+ From:
281
+ name: from
282
+ in: query
283
+ required: false
284
+ description: Inclusive lower timestamp bound (ISO-8601).
285
+ schema:
286
+ type: string
287
+ format: date-time
288
+ To:
289
+ name: to
290
+ in: query
291
+ required: false
292
+ description: Inclusive upper timestamp bound (ISO-8601).
293
+ schema:
294
+ type: string
295
+ format: date-time
296
+ Level:
297
+ name: level
298
+ in: query
299
+ required: false
300
+ description: Log level filter (normalized to uppercase by server).
301
+ schema:
302
+ type: string
303
+ Audit:
304
+ name: audit
305
+ in: query
306
+ required: false
307
+ description: "Audit filter. Supported values: `true`, `false`, `1`, `0`."
308
+ schema:
309
+ type: string
310
+ enum: ["true", "false", "1", "0"]
311
+ Field:
312
+ name: field
313
+ in: query
314
+ required: false
315
+ description: Top-level field key filter (applies when `value` is also set).
316
+ schema:
317
+ type: string
318
+ Value:
319
+ name: value
320
+ in: query
321
+ required: false
322
+ description: Top-level field value filter (applies when `field` is also set).
323
+ schema:
324
+ type: string
325
+ Limit:
326
+ name: limit
327
+ in: query
328
+ required: false
329
+ description: Max rows/buckets. Default 100 for logs, 25 for aggregate. Hard cap 1000.
330
+ schema:
331
+ type: integer
332
+ minimum: 1
333
+ maximum: 1000
334
+ default: 100
335
+ Cursor:
336
+ name: cursor
337
+ in: query
338
+ required: false
339
+ description: Cursor token from a previous `/api/logs` response.
340
+ schema:
341
+ type: string
342
+ GroupBy:
343
+ name: groupBy
344
+ in: query
345
+ required: true
346
+ description: Aggregation dimension.
347
+ schema:
348
+ type: string
349
+ enum: [level, event, field, correlation]
350
+ GroupField:
351
+ name: groupField
352
+ in: query
353
+ required: false
354
+ description: Required when `groupBy=field`.
355
+ schema:
356
+ type: string
357
+
358
+ responses:
359
+ Unauthorized:
360
+ description: Unauthorized
361
+ content:
362
+ application/json:
363
+ schema:
364
+ $ref: "#/components/schemas/ErrorResponse"
365
+ example:
366
+ error: "Unauthorized"
367
+ InternalError:
368
+ description: Internal server error
369
+ content:
370
+ application/json:
371
+ schema:
372
+ $ref: "#/components/schemas/ErrorResponse"
373
+
374
+ schemas:
375
+ ErrorResponse:
376
+ type: object
377
+ additionalProperties: false
378
+ required: [error]
379
+ properties:
380
+ error:
381
+ type: string
382
+
383
+ IngestRequest:
384
+ oneOf:
385
+ - type: array
386
+ items: {}
387
+ - type: object
388
+ required: [logs]
389
+ properties:
390
+ logs:
391
+ type: array
392
+ items: {}
393
+ additionalProperties: true
394
+
395
+ IngestResponse:
396
+ type: object
397
+ additionalProperties: false
398
+ required: [accepted, queued, producerId, receivedAt, rejected]
399
+ properties:
400
+ accepted:
401
+ type: integer
402
+ minimum: 0
403
+ queued:
404
+ type: boolean
405
+ producerId:
406
+ type: string
407
+ receivedAt:
408
+ type: string
409
+ format: date-time
410
+ rejected:
411
+ type: integer
412
+ minimum: 0
413
+
414
+ ResetResult:
415
+ type: object
416
+ additionalProperties: false
417
+ required: [entriesDeleted, fieldsDeleted]
418
+ properties:
419
+ entriesDeleted:
420
+ type: integer
421
+ minimum: 0
422
+ fieldsDeleted:
423
+ type: integer
424
+ minimum: 0
425
+
426
+ IndexReport:
427
+ type: object
428
+ additionalProperties: false
429
+ required:
430
+ [
431
+ filesScanned,
432
+ linesScanned,
433
+ recordsInserted,
434
+ recordsSkipped,
435
+ parseErrors,
436
+ startedAt,
437
+ finishedAt,
438
+ ]
439
+ properties:
440
+ filesScanned:
441
+ type: integer
442
+ minimum: 0
443
+ linesScanned:
444
+ type: integer
445
+ minimum: 0
446
+ recordsInserted:
447
+ type: integer
448
+ minimum: 0
449
+ recordsSkipped:
450
+ type: integer
451
+ minimum: 0
452
+ parseErrors:
453
+ type: integer
454
+ minimum: 0
455
+ startedAt:
456
+ type: string
457
+ format: date-time
458
+ finishedAt:
459
+ type: string
460
+ format: date-time
461
+ mode:
462
+ type: string
463
+ enum: [full, incremental]
464
+
465
+ ReindexResponse:
466
+ type: object
467
+ additionalProperties: false
468
+ required: [report, reset]
469
+ properties:
470
+ report:
471
+ $ref: "#/components/schemas/IndexReport"
472
+ reset:
473
+ $ref: "#/components/schemas/ResetResult"
474
+
475
+ LogRecord:
476
+ type: object
477
+ description: Original JSON log object as indexed/ingested.
478
+ additionalProperties: true
479
+
480
+ LogEntry:
481
+ type: object
482
+ additionalProperties: false
483
+ required: [id, timestamp, level, event, message, data, sourceFile, lineNumber]
484
+ properties:
485
+ id:
486
+ type: integer
487
+ minimum: 1
488
+ timestamp:
489
+ type: string
490
+ format: date-time
491
+ level:
492
+ type: string
493
+ event:
494
+ type: string
495
+ message:
496
+ type: string
497
+ data:
498
+ $ref: "#/components/schemas/LogRecord"
499
+ sourceFile:
500
+ type: string
501
+ lineNumber:
502
+ type: integer
503
+ minimum: 1
504
+
505
+ LogQueryPage:
506
+ type: object
507
+ additionalProperties: false
508
+ required: [entries, hasMore, limit]
509
+ properties:
510
+ entries:
511
+ type: array
512
+ items:
513
+ $ref: "#/components/schemas/LogEntry"
514
+ hasMore:
515
+ type: boolean
516
+ limit:
517
+ type: integer
518
+ minimum: 1
519
+ maximum: 1000
520
+ nextCursor:
521
+ type: string
522
+
523
+ AggregateBucket:
524
+ type: object
525
+ additionalProperties: false
526
+ required: [key, count]
527
+ properties:
528
+ key:
529
+ type: string
530
+ count:
531
+ type: integer
532
+ minimum: 0
533
+
534
+ AggregateResponse:
535
+ type: object
536
+ additionalProperties: false
537
+ required: [buckets, groupBy]
538
+ properties:
539
+ buckets:
540
+ type: array
541
+ items:
542
+ $ref: "#/components/schemas/AggregateBucket"
543
+ groupBy:
544
+ type: string
545
+ enum: [level, event, field, correlation]
546
+ groupField:
547
+ type: string
548
+
549
+ IngestState:
550
+ type: object
551
+ additionalProperties: false
552
+ required:
553
+ [
554
+ running,
555
+ runs,
556
+ recordsInsertedLastRun,
557
+ recordsInsertedTotal,
558
+ recordsSkippedLastRun,
559
+ recordsSkippedTotal,
560
+ parseErrorsLastRun,
561
+ parseErrorsTotal,
562
+ linesScannedLastRun,
563
+ linesScannedTotal,
564
+ filesScannedLastRun,
565
+ filesScannedTotal,
566
+ ]
567
+ properties:
568
+ running:
569
+ type: boolean
570
+ runs:
571
+ type: integer
572
+ minimum: 0
573
+ lastRunAt:
574
+ type: string
575
+ format: date-time
576
+ lastSuccessAt:
577
+ type: string
578
+ format: date-time
579
+ lastDurationMs:
580
+ type: number
581
+ minimum: 0
582
+ lastError:
583
+ type: string
584
+ recordsInsertedLastRun:
585
+ type: integer
586
+ minimum: 0
587
+ recordsInsertedTotal:
588
+ type: integer
589
+ minimum: 0
590
+ recordsSkippedLastRun:
591
+ type: integer
592
+ minimum: 0
593
+ recordsSkippedTotal:
594
+ type: integer
595
+ minimum: 0
596
+ parseErrorsLastRun:
597
+ type: integer
598
+ minimum: 0
599
+ parseErrorsTotal:
600
+ type: integer
601
+ minimum: 0
602
+ linesScannedLastRun:
603
+ type: integer
604
+ minimum: 0
605
+ linesScannedTotal:
606
+ type: integer
607
+ minimum: 0
608
+ filesScannedLastRun:
609
+ type: integer
610
+ minimum: 0
611
+ filesScannedTotal:
612
+ type: integer
613
+ minimum: 0
614
+ lastMode:
615
+ type: string
616
+ enum: [full, incremental]
617
+
618
+ IngestPolicy:
619
+ type: object
620
+ additionalProperties: false
621
+ required: [enabled, intervalMs]
622
+ properties:
623
+ enabled:
624
+ type: boolean
625
+ intervalMs:
626
+ type: number
627
+ minimum: 0
628
+
629
+ IngestQueueHealth:
630
+ type: object
631
+ additionalProperties: false
632
+ required:
633
+ [
634
+ enabled,
635
+ flushMs,
636
+ draining,
637
+ pendingBatches,
638
+ pendingRecords,
639
+ recordsFlushed,
640
+ recordsQueued,
641
+ ]
642
+ properties:
643
+ enabled:
644
+ type: boolean
645
+ flushMs:
646
+ type: number
647
+ minimum: 0
648
+ draining:
649
+ type: boolean
650
+ pendingBatches:
651
+ type: integer
652
+ minimum: 0
653
+ pendingRecords:
654
+ type: integer
655
+ minimum: 0
656
+ recordsFlushed:
657
+ type: integer
658
+ minimum: 0
659
+ recordsQueued:
660
+ type: integer
661
+ minimum: 0
662
+ lastError:
663
+ type: string
664
+ lastFlushAt:
665
+ type: string
666
+ format: date-time
667
+
668
+ AlertState:
669
+ type: object
670
+ additionalProperties: false
671
+ required: [running, runs, sent, suppressed, lastTriggerAtByRule]
672
+ properties:
673
+ running:
674
+ type: boolean
675
+ runs:
676
+ type: integer
677
+ minimum: 0
678
+ sent:
679
+ type: integer
680
+ minimum: 0
681
+ suppressed:
682
+ type: integer
683
+ minimum: 0
684
+ lastRunAt:
685
+ type: string
686
+ format: date-time
687
+ lastSuccessAt:
688
+ type: string
689
+ format: date-time
690
+ lastDurationMs:
691
+ type: number
692
+ minimum: 0
693
+ lastError:
694
+ type: string
695
+ lastTriggerAtByRule:
696
+ type: object
697
+ additionalProperties:
698
+ type: string
699
+ format: date-time
700
+
701
+ AlertPolicy:
702
+ type: object
703
+ additionalProperties: false
704
+ required:
705
+ [
706
+ enabled,
707
+ intervalMs,
708
+ windowMinutes,
709
+ errorThreshold,
710
+ noLogsThresholdMinutes,
711
+ cooldownMs,
712
+ webhookTimeoutMs,
713
+ webhookRetryAttempts,
714
+ webhookBackoffMs,
715
+ ]
716
+ properties:
717
+ enabled:
718
+ type: boolean
719
+ webhookUrl:
720
+ type: string
721
+ description: "`[configured]` when configured, otherwise omitted."
722
+ intervalMs:
723
+ type: number
724
+ minimum: 0
725
+ windowMinutes:
726
+ type: number
727
+ minimum: 0
728
+ errorThreshold:
729
+ type: number
730
+ minimum: 0
731
+ noLogsThresholdMinutes:
732
+ type: number
733
+ minimum: 0
734
+ cooldownMs:
735
+ type: number
736
+ minimum: 0
737
+ webhookTimeoutMs:
738
+ type: number
739
+ minimum: 0
740
+ webhookRetryAttempts:
741
+ type: integer
742
+ minimum: 1
743
+ webhookBackoffMs:
744
+ type: number
745
+ minimum: 0
746
+
747
+ AuthStatus:
748
+ type: object
749
+ additionalProperties: false
750
+ required: [apiTokenEnabled, basicEnabled]
751
+ properties:
752
+ apiTokenEnabled:
753
+ type: boolean
754
+ basicEnabled:
755
+ type: boolean
756
+
757
+ RetentionDays:
758
+ type: object
759
+ additionalProperties: false
760
+ required: [db, dbAudit, logs, logsAudit]
761
+ properties:
762
+ db:
763
+ type: number
764
+ minimum: 0
765
+ dbAudit:
766
+ type: number
767
+ minimum: 0
768
+ logs:
769
+ type: number
770
+ minimum: 0
771
+ logsAudit:
772
+ type: number
773
+ minimum: 0
774
+
775
+ Backup:
776
+ type: object
777
+ additionalProperties: false
778
+ properties:
779
+ auditDirectory:
780
+ type: string
781
+
782
+ Storage:
783
+ type: object
784
+ additionalProperties: false
785
+ required: [dbApproximateSizeBytes, dbDirectoryFreeBytes, logsDirectoryFreeBytes, minFreeBytes]
786
+ properties:
787
+ dbApproximateSizeBytes:
788
+ type: number
789
+ minimum: 0
790
+ dbDirectoryFreeBytes:
791
+ type: number
792
+ minimum: 0
793
+ logsDirectoryFreeBytes:
794
+ type: number
795
+ minimum: 0
796
+ minFreeBytes:
797
+ type: number
798
+ minimum: 0
799
+
800
+ MaintenanceState:
801
+ type: object
802
+ additionalProperties: false
803
+ required:
804
+ [
805
+ running,
806
+ runs,
807
+ filesDeletedLastRun,
808
+ filesDeletedTotal,
809
+ normalFilesDeletedLastRun,
810
+ normalFilesDeletedTotal,
811
+ auditFilesDeletedLastRun,
812
+ auditFilesDeletedTotal,
813
+ entriesDeletedLastRun,
814
+ entriesDeletedTotal,
815
+ normalEntriesDeletedLastRun,
816
+ normalEntriesDeletedTotal,
817
+ auditEntriesDeletedLastRun,
818
+ auditEntriesDeletedTotal,
819
+ fieldsDeletedLastRun,
820
+ fieldsDeletedTotal,
821
+ vacuumRuns,
822
+ ]
823
+ properties:
824
+ running:
825
+ type: boolean
826
+ runs:
827
+ type: integer
828
+ minimum: 0
829
+ lastRunAt:
830
+ type: string
831
+ format: date-time
832
+ lastSuccessAt:
833
+ type: string
834
+ format: date-time
835
+ lastDurationMs:
836
+ type: number
837
+ minimum: 0
838
+ lastError:
839
+ type: string
840
+ filesDeletedLastRun:
841
+ type: integer
842
+ minimum: 0
843
+ filesDeletedTotal:
844
+ type: integer
845
+ minimum: 0
846
+ normalFilesDeletedLastRun:
847
+ type: integer
848
+ minimum: 0
849
+ normalFilesDeletedTotal:
850
+ type: integer
851
+ minimum: 0
852
+ auditFilesDeletedLastRun:
853
+ type: integer
854
+ minimum: 0
855
+ auditFilesDeletedTotal:
856
+ type: integer
857
+ minimum: 0
858
+ entriesDeletedLastRun:
859
+ type: integer
860
+ minimum: 0
861
+ entriesDeletedTotal:
862
+ type: integer
863
+ minimum: 0
864
+ normalEntriesDeletedLastRun:
865
+ type: integer
866
+ minimum: 0
867
+ normalEntriesDeletedTotal:
868
+ type: integer
869
+ minimum: 0
870
+ auditEntriesDeletedLastRun:
871
+ type: integer
872
+ minimum: 0
873
+ auditEntriesDeletedTotal:
874
+ type: integer
875
+ minimum: 0
876
+ fieldsDeletedLastRun:
877
+ type: integer
878
+ minimum: 0
879
+ fieldsDeletedTotal:
880
+ type: integer
881
+ minimum: 0
882
+ vacuumRuns:
883
+ type: integer
884
+ minimum: 0
885
+
886
+ IngestEndpointStatus:
887
+ type: object
888
+ additionalProperties: false
889
+ required: [enabled, maxBodyBytes, producerCount, queue]
890
+ properties:
891
+ enabled:
892
+ type: boolean
893
+ maxBodyBytes:
894
+ type: number
895
+ minimum: 0
896
+ producerCount:
897
+ type: integer
898
+ minimum: 0
899
+ queue:
900
+ $ref: "#/components/schemas/IngestQueueHealth"
901
+
902
+ HealthResponse:
903
+ type: object
904
+ additionalProperties: false
905
+ required:
906
+ [
907
+ ok,
908
+ service,
909
+ uptimeSec,
910
+ ingest,
911
+ auth,
912
+ ingestPolicy,
913
+ ingestEndpoint,
914
+ alerting,
915
+ alertPolicy,
916
+ maintenance,
917
+ retentionDays,
918
+ backup,
919
+ storage,
920
+ ]
921
+ properties:
922
+ ok:
923
+ type: boolean
924
+ service:
925
+ type: string
926
+ enum: [mikroscope]
927
+ uptimeSec:
928
+ type: number
929
+ minimum: 0
930
+ ingest:
931
+ $ref: "#/components/schemas/IngestState"
932
+ auth:
933
+ $ref: "#/components/schemas/AuthStatus"
934
+ ingestPolicy:
935
+ $ref: "#/components/schemas/IngestPolicy"
936
+ ingestEndpoint:
937
+ $ref: "#/components/schemas/IngestEndpointStatus"
938
+ alerting:
939
+ $ref: "#/components/schemas/AlertState"
940
+ alertPolicy:
941
+ $ref: "#/components/schemas/AlertPolicy"
942
+ maintenance:
943
+ $ref: "#/components/schemas/MaintenanceState"
944
+ retentionDays:
945
+ $ref: "#/components/schemas/RetentionDays"
946
+ backup:
947
+ $ref: "#/components/schemas/Backup"
948
+ storage:
949
+ $ref: "#/components/schemas/Storage"