forked from AnalogJ/scrutiny
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathopenapi.yaml
More file actions
3488 lines (3487 loc) · 94.5 KB
/
Copy pathopenapi.yaml
File metadata and controls
3488 lines (3487 loc) · 94.5 KB
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Scrutiny API
version: 1.0.0
description: |
Canonical API contract for the Starosdev Scrutiny fork.
This spec tracks the routes currently registered in `webapp/backend/pkg/web/server.go`.
servers:
- url: /
tags:
- name: Auth
- name: Health
- name: Devices
- name: Settings
- name: Reports
- name: Filesystems
- name: ZFS
- name: Btrfs
- name: MDADM
- name: Metrics
security:
- BearerAuth: []
paths:
/api/auth/status:
get:
tags: [Auth]
summary: Get authentication status
security: []
responses:
"200":
description: Authentication status
content:
application/json:
schema:
$ref: "#/components/schemas/AuthStatusResponse"
/api/auth/login:
post:
tags: [Auth]
summary: Authenticate and receive a JWT session token
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LoginRequest"
responses:
"200":
description: Login result
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/LoginResponse"
- $ref: "#/components/schemas/AuthDisabledResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"429":
description: Too many failed login attempts
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
/api/health:
get:
tags: [Health]
summary: Check backend and frontend health
security: []
responses:
"200":
description: Service is healthy
content:
application/json:
schema:
$ref: "#/components/schemas/HealthResponse"
"500":
description: One or more health checks failed
content:
application/json:
schema:
$ref: "#/components/schemas/HealthResponse"
head:
tags: [Health]
summary: HEAD health check
security: []
responses:
"200":
description: Service is healthy
"500":
description: One or more health checks failed
/api/health/notify:
post:
tags: [Health]
summary: Send a test notification through configured notify URLs
description: Routes through the same configured notification targets used by Scrutiny events, including Shoutrrr URLs, explicit apprise+ targets, script:// targets, and raw http(s) webhooks.
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/health/missed-ping-status:
get:
tags: [Health]
summary: Get missed-ping monitor diagnostic status
responses:
"200":
description: Missed-ping monitor status
content:
application/json:
schema:
$ref: "#/components/schemas/MissedPingStatusResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/health/uptime-kuma-test:
post:
tags: [Health]
summary: Send a test push to the configured Uptime Kuma endpoint
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
"502":
$ref: "#/components/responses/ErrorResponse"
/api/health/mqtt-sync:
post:
tags: [Health]
summary: Re-sync MQTT discovery and state with Home Assistant
responses:
"200":
description: MQTT sync summary
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
devices_published:
type: integer
topics_cleaned:
type: integer
required: [success, devices_published, topics_cleaned]
"400":
$ref: "#/components/responses/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/devices/register:
post:
tags: [Devices]
summary: Register devices discovered by the collector
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceWrapper"
responses:
"200":
description: Registered devices, including resolved `device_id` values
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceWrapper"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/summary:
get:
tags: [Devices]
summary: Get dashboard device summary
responses:
"200":
description: Device summary payload
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceSummaryWrapper"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/summary/temp:
get:
tags: [Devices]
summary: Get temperature history for the summary dashboard
parameters:
- $ref: "#/components/parameters/DurationKey"
responses:
"200":
description: Temperature history
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
temp_history:
type: array
items:
$ref: "#/components/schemas/SmartTemperature"
required: [success, data]
"500":
$ref: "#/components/responses/ErrorResponse"
/api/summary/workload:
get:
tags: [Devices]
summary: Get workload insights
parameters:
- $ref: "#/components/parameters/DurationKey"
responses:
"200":
description: Workload insight data
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
workload:
type: object
additionalProperties:
$ref: "#/components/schemas/WorkloadInsight"
required: [success, data]
"500":
$ref: "#/components/responses/ErrorResponse"
/api/filesystems/summary:
get:
tags: [Filesystems]
summary: Get filesystem capacity summary
responses:
"200":
description: Filesystem summary grouped by host
content:
application/json:
schema:
$ref: "#/components/schemas/FilesystemSummaryResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
post:
tags: [Filesystems]
summary: Upload filesystem capacity data from the filesystem collector
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/FilesystemSummaryUpload"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/collectors/run:
post:
tags: [Devices]
summary: Trigger local collectors in omnibus mode
description: Runs available local collector binaries sequentially in the background.
responses:
"202":
description: Collector run accepted
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
message:
type: string
required: [success, message]
"404":
$ref: "#/components/responses/ErrorResponse"
/api/metrics:
get:
tags: [Metrics]
summary: Export Prometheus metrics
security:
- BearerAuth: []
- MetricsBearerAuth: []
responses:
"200":
description: Prometheus metrics exposition format
content:
text/plain:
schema:
type: string
"401":
$ref: "#/components/responses/Unauthorized"
/api/device/{id}/smart:
post:
tags: [Devices]
summary: Upload SMART data for a device
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CollectorSmartInfo"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"422":
description: SMART payload rejected because `smartctl` exit status indicates unreliable data
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/selftest:
get:
tags: [Devices]
summary: Get ATA SMART self-test history for a device
description: Returns the ATA SMART self-test entries already recorded from normal SMART uploads for the resolved device identity.
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
description: ATA SMART self-test history
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceSelfTestsResponse"
"404":
$ref: "#/components/responses/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
post:
tags: [Devices]
summary: Upload self-test data for a device
description: Route is registered but the handler is currently a stub with no implemented behavior.
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: false
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
"200":
description: Reserved endpoint
/api/device/{id}/details:
get:
tags: [Devices]
summary: Get device details and SMART history
parameters:
- $ref: "#/components/parameters/DeviceId"
- $ref: "#/components/parameters/DurationKey"
responses:
"200":
description: Device details and SMART history
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceDetailsResponse"
"404":
$ref: "#/components/responses/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/archive:
post:
tags: [Devices]
summary: Archive a device
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/unarchive:
post:
tags: [Devices]
summary: Unarchive a device
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/mute:
post:
tags: [Devices]
summary: Mute notifications for a device
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/unmute:
post:
tags: [Devices]
summary: Unmute notifications for a device
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/reset-status:
post:
tags: [Devices]
summary: Reset a device status back to passed
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/label:
post:
tags: [Devices]
summary: Update device label
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
label:
type: string
required: [label]
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/max-tbw:
post:
tags: [Devices]
summary: Set the per-device rated TBW override
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
max_tbw:
type: number
format: double
required: [max_tbw]
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/smart-display-mode:
post:
tags: [Devices]
summary: Set SMART attribute display mode for a device
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
smart_display_mode:
type: string
required: [smart_display_mode]
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/missed-ping-timeout:
post:
tags: [Devices]
summary: Set the per-device missed-ping timeout override in minutes
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
missed_ping_timeout_override:
type: integer
required: [missed_ping_timeout_override]
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/merge_into:
post:
tags: [Devices]
summary: Merge one device into another device record
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
new_device_id:
type: string
required: [new_device_id]
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
/api/device/{id}:
delete:
tags: [Devices]
summary: Delete a device from tracking
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/performance:
post:
tags: [Devices]
summary: Upload performance benchmark results
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/PerformanceUploadRequest"
responses:
"200":
description: Benchmark accepted; may include degradation report
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/SuccessResponse"
- $ref: "#/components/schemas/PerformanceUploadResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
get:
tags: [Devices]
summary: Get performance benchmark history and baseline
parameters:
- $ref: "#/components/parameters/DeviceId"
- name: duration
in: query
schema:
type: string
default: week
responses:
"200":
description: Performance history and baseline
content:
application/json:
schema:
$ref: "#/components/schemas/PerformanceHistoryResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/replacement-risk:
get:
tags: [Devices]
summary: Get computed replacement risk for a device
description: |
Returns the current replacement-risk score, its per-attribute contributions,
and ATA-specific metadata indicating whether a bundled consumer-drive profile
override was enabled and applied for this score.
parameters:
- $ref: "#/components/parameters/DeviceId"
- name: trend_window
in: query
schema:
type: string
enum: [7d, 30d, 90d]
default: 30d
responses:
"200":
description: Replacement risk score and contributions
content:
application/json:
schema:
$ref: "#/components/schemas/ReplacementRiskResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/device/{id}/drive-profile:
get:
tags: [Devices]
summary: Inspect consumer drive profile matching for a device
description: |
Debug and inspection surface for the ATA consumer-drive profile system.
Reports which bundled catalog entry matched the device (if any), the match
method and confidence gate result, which overrides would be applied, and a
plain-language fallback reason when generic ATA rules are in effect.
The catalog match is computed even when the feature is globally disabled so
operators can inspect what would happen; the `applied` flag reflects the
effective state.
parameters:
- $ref: "#/components/parameters/DeviceId"
responses:
"200":
description: Drive profile match diagnostics
content:
application/json:
schema:
$ref: "#/components/schemas/DriveProfileInspectionResponse"
"404":
$ref: "#/components/responses/NotFound"
/api/device/{id}/collector-error:
post:
tags: [Devices]
summary: Upload a device-scoped collector error
parameters:
- $ref: "#/components/parameters/DeviceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CollectorErrorRequest"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
/api/collector/scan-error:
post:
tags: [Devices]
summary: Upload a scan-level collector error with no device context
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CollectorErrorRequest"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
/api/settings:
get:
tags: [Settings]
summary: Get application settings and server metadata
responses:
"200":
description: Current settings
content:
application/json:
schema:
$ref: "#/components/schemas/SettingsResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
post:
tags: [Settings]
summary: Save application settings
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Settings"
responses:
"200":
description: Saved settings
content:
application/json:
schema:
$ref: "#/components/schemas/SaveSettingsResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/settings/overrides:
get:
tags: [Settings]
summary: Get all SMART attribute overrides
responses:
"200":
description: Attribute overrides
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: array
items:
$ref: "#/components/schemas/AttributeOverride"
"500":
$ref: "#/components/responses/ErrorResponse"
post:
tags: [Settings]
summary: Create or update a SMART attribute override
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AttributeOverride"
responses:
"200":
description: Override saved
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
$ref: "#/components/schemas/AttributeOverride"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/settings/overrides/{id}:
delete:
tags: [Settings]
summary: Delete a SMART attribute override
parameters:
- $ref: "#/components/parameters/NumericId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/settings/notify-urls:
get:
tags: [Settings]
summary: Get merged notification URLs from config and UI storage
responses:
"200":
description: Notification URL list
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: array
items:
$ref: "#/components/schemas/NotifyUrl"
"500":
$ref: "#/components/responses/ErrorResponse"
post:
tags: [Settings]
summary: Create a UI-managed notification URL
requestBody:
required: true
content:
application/json:
schema:
type: object
description: URL may be a Shoutrrr target, an explicit Apprise target prefixed with apprise+, a script:// target, or a raw http(s) webhook.
properties:
url:
type: string
label:
type: string
required: [url]
responses:
"200":
description: Notification URL saved
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
$ref: "#/components/schemas/NotifyUrl"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/settings/notify-urls/{id}:
patch:
tags: [Settings]
summary: Toggle heartbeat notifications for a UI-managed notification URL
parameters:
- $ref: "#/components/parameters/NumericId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
enabled:
type: boolean
required: [enabled]
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "#/components/responses/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
delete:
tags: [Settings]
summary: Delete a UI-managed notification URL
parameters:
- $ref: "#/components/parameters/NumericId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/settings/notify-urls/{id}/test:
post:
tags: [Settings]
summary: Send a test notification to one UI-managed notification URL
description: Uses the same routing logic as normal notifications, including explicit apprise+ targets.
parameters:
- $ref: "#/components/parameters/NumericId"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "#/components/responses/ErrorResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/reports/generate:
get:
tags: [Reports]
summary: Generate an on-demand report
parameters:
- name: format
in: query
schema:
type: string
default: text
enum: [text, pdf]
- name: period
in: query
schema:
type: string
default: daily
enum: [daily, weekly, monthly]
- name: test
in: query
schema:
type: string
enum: ["true"]
responses:
"200":
description: Report content or PDF file
content:
application/json:
schema:
$ref: "#/components/schemas/GenerateReportResponse"
application/pdf:
schema:
type: string
format: binary
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/reports/history:
get:
tags: [Reports]
summary: List generated PDF reports
responses:
"200":
description: Report history
content:
application/json:
schema:
$ref: "#/components/schemas/ReportHistoryResponse"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/zfs/pools/register:
post:
tags: [ZFS]
summary: Register ZFS pools discovered by the collector
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ZFSPoolWrapper"
responses:
"200":
description: Registered ZFS pools
content:
application/json:
schema:
$ref: "#/components/schemas/ZFSPoolWrapper"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/zfs/summary:
get:
tags: [ZFS]
summary: Get ZFS pool summary
responses:
"200":
description: ZFS pools
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
pools:
type: array
items:
$ref: "#/components/schemas/ZFSPool"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/zfs/pool/{guid}/metrics:
post:
tags: [ZFS]
summary: Upload ZFS pool metrics
parameters:
- $ref: "#/components/parameters/Guid"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ZFSPool"
responses:
"200":
$ref: "#/components/responses/SuccessResponse"
"400":
$ref: "#/components/responses/BadRequest"
"500":
$ref: "#/components/responses/ErrorResponse"
/api/zfs/pool/{guid}/details:
get:
tags: [ZFS]
summary: Get ZFS pool details and metrics history
parameters:
- $ref: "#/components/parameters/Guid"
- $ref: "#/components/parameters/DurationKey"
responses:
"200":
description: ZFS pool details
content:
application/json:
schema:
$ref: "#/components/schemas/ZFSPoolDetailsResponse"
"400":
$ref: "#/components/responses/BadRequest"
"404":