Repository navigation
Expand file tree
/
Copy pathopenapi.json
More file actions
7832 lines (7832 loc) · 315 KB
/
Copy pathopenapi.json
File metadata and controls
7832 lines (7832 loc) · 315 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.1.0",
"info": {
"title": "Hangang Management API",
"version": "0.3.2",
"description": "Authenticated configuration and observation API. Route mutations are atomic and require the quoted current revision in If-Match. Dynamic Docker references use this instance's administrator-managed Docker connection or an initial CLI socket.\n\nManagement accounts are local to each instance. Viewer sessions may read runtime and update status plus health and metrics; configuration and user operations require administrator role. The existing administrator bearer token remains available for break-glass access."
},
"servers": [
{
"url": "/"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/v1/pumgye/policy": {
"get": {
"summary": "Read independent Pumgye policy through Hangang",
"description": "Administrator-only fixed owning-domain operation. No client URL, credential, cookie or header forwarding. 503 if authority or local management credential is unavailable.",
"responses": {
"200": {
"description": "Owning Pumgye result; no-store, live administrator authority rechecked.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PumgyePolicyDocument"
}
}
},
"headers": {
"X-Hangang-Config-Revision": {
"schema": {
"type": "string"
},
"description": "Quoted Hangang authority configuration revision; bind publication to this scope."
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"409": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
},
"put": {
"summary": "Publish independent Pumgye policy with owning CAS and Hangang scope fence",
"description": "Does not rewrite Hangang configuration. Admission is fenced by live administrator role; admitted external publication may complete after cancellation. Re-read policy after an unconfirmed outcome. Requires both quoted revisions; owning Pumgye increments policy revision and audits its verified transport caller.",
"parameters": [
{
"name": "If-Match",
"in": "header",
"required": true,
"schema": {
"type": "string"
},
"description": "Quoted owning Pumgye policy revision."
},
{
"name": "X-Hangang-Config-Revision",
"in": "header",
"required": true,
"schema": {
"type": "string"
},
"description": "Quoted current Hangang authority connection configuration revision."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PumgyePolicyDocument"
}
}
}
},
"responses": {
"200": {
"description": "Owning Pumgye result; no-store, live administrator authority rechecked.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PumgyePolicyDocument"
}
}
},
"headers": {
"X-Hangang-Config-Revision": {
"schema": {
"type": "string"
},
"description": "Quoted Hangang authority configuration revision; bind publication to this scope."
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"409": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
},
"428": {
"$ref": "#/components/responses/Problem"
},
"422": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/pumgye/status": {
"get": {
"summary": "Read independent Pumgye status through Hangang",
"description": "Administrator-only fixed owning-domain operation. No client URL, credential, cookie or header forwarding. 503 if authority or local management credential is unavailable.",
"responses": {
"200": {
"description": "Owning Pumgye result; no-store, live administrator authority rechecked.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PumgyeStatus"
}
}
},
"headers": {
"X-Hangang-Config-Revision": {
"schema": {
"type": "string"
},
"description": "Quoted Hangang authority configuration revision; bind publication to this scope."
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"409": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/pumgye/audit": {
"get": {
"summary": "Read independent Pumgye audit through Hangang",
"description": "Administrator-only fixed owning-domain operation. No client URL, credential, cookie or header forwarding. 503 if authority or local management credential is unavailable.",
"responses": {
"200": {
"description": "Owning Pumgye result; no-store, live administrator authority rechecked.",
"content": {
"application/json": {
"schema": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "#/components/schemas/PumgyeAudit"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"409": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
},
"parameters": [
{
"name": "after_revision",
"in": "query",
"schema": {
"type": "integer",
"minimum": 0
},
"description": "Sole optional numeric cursor; at most 100 records."
}
]
}
},
"/v1/fleet/observations": {"get":{"summary":"Read local collector observations (administrator only)","description":"Returns a copied local, partial snapshot without waiting on peers. Available means the inventory is valid; fresh_nodes counts fresh responses regardless of peer readiness. Stale or failed samples never imply current readiness. Requires live administrator authority. Cache-Control: no-store.","responses":{"200":{"description":"Bounded local collector snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetObservations"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"405":{"$ref":"#/components/responses/Problem"}}}},
"/v1/fleet/observation": {"get":{"summary":"Read one local node observation with its dedicated observer bearer token","description":"Uses only the private observer credential, never an administrator session. No peer polling. Duplicate Authorization headers and query strings are rejected. Cache-Control: no-store.","security":[{"observerAuth":[]}],"responses":{"200":{"description":"Fixed redacted local observation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetObservation"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"405":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},
"/v1/fleet/observer-status": {"get":{"summary":"Read local observer credential readiness (administrator only)","description":"Requires live administrator authority. Disabled mode reports configured=false, available=false, node_id=null, generation=null. Cache-Control: no-store.","responses":{"200":{"description":"Local observer status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetObserverStatus"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"405":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},
"/v1/geoip/status": {"get":{"summary":"Read node-local country database readiness (administrator only)","description":"Instance-local observation; no filesystem paths or MMDB contents. Requires live administrator authority after reading. Responses use Cache-Control: no-store. Country is approximate address metadata, not authenticated identity.","responses":{"200":{"description":"Node-local status result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIpStatus"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"405":{"$ref":"#/components/responses/Problem"}}}},
"/v1/geoip/lookup": {"get":{"summary":"Look up a country using the node-local database (administrator only)","description":"Instance-local observation; no filesystem paths or MMDB contents. Requires live administrator authority after reading. Responses use Cache-Control: no-store. Country is approximate address metadata, not authenticated identity.","responses":{"200":{"description":"Node-local lookup result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeoIpLookup"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"405":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"parameters":[{"name":"ip","in":"query","required":true,"schema":{"type":"string","maxLength":45},"description":"Exactly one IPv4 or IPv6 address; mapped IPv4 canonicalizes. No other parameters accepted."}]}},
"/v1/config/commit-receipts-v2": {
"get": {
"summary": "Export retained V2 SQL receipts in bounded snapshot-prefix pages",
"description": "Administrator-only no-store per-authority sequence-ordered pages. First page pins a high-water and retention generation. New commits above that high-water do not change the exported prefix. Generation mismatch or high-water regression returns 409; restart export and discard partial data. Final empty probe with the same snapshot can recheck the retention fence. This is retained SQL commit evidence, not all accepted operations, archive durability, activation or fleet acknowledgement. Unknown and duplicate query parameters are rejected. Live authority is rechecked after storage I/O.",
"parameters": [
{
"name": "authority_id",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
}
},
{
"name": "after_seq",
"in": "query",
"required": false,
"description": "Exclusive cursor; defaults to zero. Nonzero requires both snapshot fields. Canonical decimal without sign or leading zeros.",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"default": 0
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "Page size; defaults to 100. Canonical decimal without sign or leading zeros.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
}
},
{
"name": "snapshot_high_water",
"in": "query",
"required": false,
"description": "Pinned prefix high-water; supply together with retention_generation. Canonical decimal without sign or leading zeros.",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
{
"name": "retention_generation",
"in": "query",
"required": false,
"description": "Pinned retention generation; supply together with snapshot_high_water. Canonical decimal without sign or leading zeros.",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
],
"responses": {
"200": {
"description": "Pinned retained receipt page or unsupported store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SequencedReceiptPageResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"409": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/config/commit-receipt-v2": {
"get": {
"summary": "Look up a sequenced V2 SQL commit receipt",
"description": "Administrator-only no-store historical receipt in the authority/acceptance-sequence namespace. Separate from legacy random-ID lookup. Reports committed sequence and bounded authority registry; absent receipt does not prove non-commit. No pruning or replay. Live authority rechecked after remote read.",
"parameters": [
{
"name": "authority_id",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
}
},
{
"name": "acceptance_seq",
"in": "query",
"required": true,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"description": "Canonical decimal without leading zero or sign."
}
],
"responses": {
"200": {
"description": "V2 receipt and replay-fence observation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SequencedReceiptResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/config/commit-receipt": {
"get": {
"summary": "Look up a retained SQL configuration commit receipt",
"description": "Administrator-only no-store historical commit evidence. Neither current configuration nor local activation nor fleet acknowledgement. Both identifiers are required exactly once; unknown query parameters rejected. File and Redis are unsupported. Absence is not non-commit evidence. Live account authority is rechecked after the external read. Ledger capacity is finite with no pruning in this phase; safe retention requires durable replay fencing.",
"parameters": [
{
"name": "authority_id",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
}
},
{
"name": "operation_id",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
}
}
],
"responses": {
"200": {
"description": "Historical receipt observation and capacity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CommitReceiptResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/config/operation-proof": {
"get": {
"summary": "Read current configuration authority operation proof",
"description": "Administrator-only current-row observation. SQLite and PostgreSQL support operation-aware CAS; File and Redis are unsupported. Null proof does not establish that an earlier operation never committed. This is neither local activation nor fleet acknowledgement nor historical audit. No query parameters. Live account authority is rechecked after the external read.",
"responses": {
"200": {
"description": "No-store current operation observation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigOperationProofResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/config/operations/release": {
"post": {
"summary": "Release one locally completed V2 SQL receipt pin",
"description": "Administrator-only explicit recovery. The local operation must be V2 and candidate_activated, and its exact retained SQL receipt must match authority, acceptance sequence, operation ID, candidate digest, epoch and revision. A durable release identity makes a lost acknowledgement recoverable. This does not delete a SQL receipt, archive it, or prove fleet activation. An unknown outcome must be refreshed and must not be automatically retried by the client.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ConfigOperationReleaseRequest" }
}
}
},
"responses": {
"200": {
"description": "Durable SQL release acknowledgement, no-store",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/ConfigOperationReleaseResult" }
}
}
},
"400": { "$ref": "#/components/responses/Problem" },
"401": { "$ref": "#/components/responses/Problem" },
"403": { "$ref": "#/components/responses/Problem" },
"405": { "$ref": "#/components/responses/Problem" },
"409": { "$ref": "#/components/responses/Problem" },
"413": { "$ref": "#/components/responses/Problem" },
"501": { "$ref": "#/components/responses/Problem" },
"503": { "$ref": "#/components/responses/Problem" }
}
}
},
"/v1/config/operations/prune": {
"post": {
"summary": "Prune archived terminal configuration-operation history",
"description": "Administrator-only irreversible retention change. Preserves accepted and indeterminate records. Exact latest sequence and history revision are required; acceptance, completion or another prune invalidates stale decisions. Deletion and an account-audit config_operations_prune receipt commit atomically; audit capacity/failure rolls back deletion. Caller must archive required evidence; the server does not verify an archive.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigOperationPruneRequest"
}
}
}
},
"responses": {
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"409": {
"$ref": "#/components/responses/Problem"
},
"413": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
},
"200": {
"description": "Pruned terminal records and durable retention audit receipt; no-store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigOperationPruneResult"
}
}
}
}
}
}
},
"/v1/config/operations": {
"get": {
"summary": "List locally accepted configuration operations",
"description": "Administrator-only durable acceptance and local outcome observations for HTTP configuration writes. Accepted operations may finish after logout. Candidate activation is an instance observation, not a unique remote writer proof or a fleet acknowledgement. Unresolved accepted/indeterminate rows are retained; no automatic replay. Explicit guarded pruning can remove archived terminal rows.",
"parameters": [
{
"name": "after",
"in": "query",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"default": 0
}
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
}
}
],
"responses": {
"200": {
"description": "Bounded operation page; Cache-Control: no-store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigOperationPage"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/openapi.json": {
"get": {
"summary": "Download this public API description",
"security": [],
"responses": {
"200": {
"description": "OpenAPI 3.1 document",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/healthz": {
"get": {
"summary": "Check the authenticated admin listener",
"responses": {
"200": {
"description": "Healthy",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "ok\n"
}
}
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedText"
}
}
}
},
"/metrics": {
"get": {
"summary": "Read Prometheus metrics",
"description": "Includes route Lua policy capacity, native JWT authentication, inbound TCP mutual-TLS, dedicated HTTP mutual-TLS, and workload route authorization counters. Listener handshake/generation rejection, listener lease termination, route identity denial, and route stream termination are separate counters.",
"responses": {
"200": {
"description": "Prometheus text exposition",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedText"
}
}
}
},
"/v1/cache": {
"get": {
"summary": "Read cache configuration, capacity and counters",
"responses": {
"200": {
"description": "Current cache state",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheStatus"
}
}
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedText"
},
"405": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/cache/purge": {
"post": {
"summary": "Purge memory and disk cache entries",
"description": "File and controller modes: advances the runtime cache epoch before clearing local storage so an older in-flight fill cannot republish an entry after the purge. Shared-store mode: raises `cache.generation` in the shared configuration through a compare-and-swap, so every instance purges when it activates the new revision; the response carries the new revision and `ETag`.",
"responses": {
"200": {
"description": "Cache purged, or caching is disabled",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CachePurged"
},
"example": {
"purged": true,
"scope": "fleet",
"generation": 3,
"revision": 42
}
}
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedText"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/events": {
"get": {
"summary": "Stream live aggregate status and bounded connection metadata",
"description": "Bearer-authenticated SSE. The first `event: status` frame arrives immediately and subsequent status frames about once per second; each `data:` line contains the same JSON object as GET /v1/status. Admins additionally receive bounded `event: traffic` frames containing TrafficBatch deltas and `event: tcp_connections` frames containing {active:TcpActiveBatch,recent:TcpRecentBatch} on every tick, including empty snapshots so the final active or untracked connection clears. Recent starts after the latest event ID at subscription. Viewers never receive IP-bearing traffic or TCP connection events. Account sessions are revalidated each tick; revocation yields `event: auth_expired` with `{}` and closes. Use a streaming fetch with the Authorization header; query-string tokens and all query parameters are rejected. At most 32 active event streams per instance. Frames are demand-driven and the stream permit is released on disconnect.",
"responses": {
"200": {
"description": "Server-sent events (status, admin-only traffic/TCP connections, or auth_expired)",
"content": {
"text/event-stream": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/connections/tcp/active": {
"get": {
"summary": "Read bounded active TCP connection metadata (administrator only)",
"description": "Instance-local, best-effort active inventory in accept-ID order. A record can start or end between pages. IDs and byte counts are decimal strings to retain JavaScript precision. Includes peer IP, selected route/member, country observation and completed write bytes; no payload, credentials, filesystem path or raw error. Live administrator authority is rechecked after reading. Cache-Control: no-store.",
"parameters": [
{"name":"after","in":"query","required":false,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$","maxLength":20},"description":"Return active connection IDs greater than this canonical unsigned decimal cursor. Omit or use 0 to start at the oldest tracked active record; server rejects values above u64."},
{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":128,"default":128},"description":"Canonical decimal 1..128; duplicate, unknown and malformed parameters are rejected."}
],
"responses": {
"200": {"description":"Bounded active TCP page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TcpActiveBatch"}}}},
"400": {"$ref":"#/components/responses/Problem"},
"401": {"$ref":"#/components/responses/Problem"},
"403": {"$ref":"#/components/responses/Problem"},
"405": {"$ref":"#/components/responses/Problem"},
"503": {"$ref":"#/components/responses/Problem"}
}
}
},
"/v1/connections/tcp/recent": {
"get": {
"summary": "Read bounded recently completed TCP connection metadata (administrator only)",
"description": "Instance-local completion-event history retained up to 60 seconds or 4096 records; gaps and dropped/omitted counts are explicit. Completion order is independent of accept order. IDs, cursors, byte and cumulative counts are decimal strings. No payload, credentials, filesystem path or raw error. Live administrator authority is rechecked after reading. Cache-Control: no-store.",
"parameters": [
{"name":"after","in":"query","required":false,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$","maxLength":20},"description":"Return completion event IDs greater than this canonical unsigned decimal cursor; omit for latest records. Server rejects values above u64."},
{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":128,"default":128},"description":"Canonical decimal 1..128; duplicate, unknown and malformed parameters are rejected."}
],
"responses": {
"200": {"description":"Bounded recent TCP page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TcpRecentBatch"}}}},
"400": {"$ref":"#/components/responses/Problem"},
"401": {"$ref":"#/components/responses/Problem"},
"403": {"$ref":"#/components/responses/Problem"},
"405": {"$ref":"#/components/responses/Problem"},
"503": {"$ref":"#/components/responses/Problem"}
}
}
},
"/v1/traffic": {
"get": {
"summary": "Read recent bounded HTTP request metadata (administrator only)",
"description": "Returns no request or response bodies, headers, cookies, authorization values, or query strings. Records describe response heads, not body completion. Ring retention is 60 seconds or 4096 records, whichever evicts first; `gap` and `dropped_total` expose retention loss. Cursor IDs are monotonic per process instance.",
"parameters": [
{
"name": "after",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0
},
"description": "Return records with IDs greater than this process-local cursor. Omit for the most recent records."
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 128,
"default": 128
}
}
],
"responses": {
"200": {
"description": "Recent request metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TrafficBatch"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem"
},
"401": {
"$ref": "#/components/responses/Problem"
},
"403": {
"$ref": "#/components/responses/Problem"
},
"405": {
"$ref": "#/components/responses/Problem"
},
"503": {
"$ref": "#/components/responses/Problem"
}
}
}
},
"/v1/certificates": {
"get": {
"summary": "Read this instance's configured public certificate metadata and observed ACME status (administrator only)",
"description": "Paginated public leaf-certificate metadata from configured files. Omitted listener_id or default selects the legacy public listener; a named ID selects only that listener, including disabled definitions. Named inventories never inherit in-process ACME status. No private keys, PEM, file paths, account identifiers or raw ACME errors are returned. A configured binding is not proof that the current file bytes are in the live TLS resolver; the watcher can retain a previous valid generation. Standalone ACME attribution requires an explicitly configured private issuer status manifest with matching domains, expiry and leaf DER SHA-256. This is instance-local and does not control another gateway's certificates. Manual CLI TLS and Kubernetes TLS are outside this file inventory.",
"parameters": [
{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},
{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":64,"default":32}},
{"name":"listener_id","in":"query","required":false,"description":"Named public listener ID, or default for the legacy public listener. Unknown IDs return 404.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","default":"default"}}
],
"responses": {
"200": {"description":"Bounded certificate inventory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateInventory"}}}},
"400": {"$ref":"#/components/responses/Problem"},
"401": {"$ref":"#/components/responses/Problem"},
"403": {"$ref":"#/components/responses/Problem"},
"404": {"$ref":"#/components/responses/Problem"},
"405": {"$ref":"#/components/responses/Problem"},
"503": {"$ref":"#/components/responses/Problem"}
}
}
},
"/v1/operations": {
"get": {
"summary": "Read this instance's configured backend targets and live selection state (administrator only)",
"description": "Paginated from the current configuration snapshot. Availability means eligible for selection, not proven reachable. Active probes show whether any result has been observed. HTTP active_requests counts per-backend in-flight request ownership in every balancing mode. TCP has route-wide active connections and, for named members only, an instance-local count of established streams. Docker addresses are configured references, not resolved network scans. Capabilities describe this process, not remote fleet members.",
"parameters": [
{ "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0 } },
{ "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 128, "default": 100 } }
],
"responses": {
"200": { "description": "Configured targets and observed state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OperationsPage" } } } },
"400": { "$ref": "#/components/responses/Problem" },
"401": { "$ref": "#/components/responses/Problem" },
"403": { "$ref": "#/components/responses/Problem" },
"405": { "$ref": "#/components/responses/Problem" },
"503": { "$ref": "#/components/responses/Problem" }
}
}
},
"/v1/retired-members": {
"get": {
"summary": "Read this instance's still-active retired backend generations (administrator only)",
"description": "Returns only displaced HTTP/TCP generations with active admission leases, up to the bounded local registry capacity. HTTP admissions include in-flight work; TCP admissions include pending dials and established streams. Completed generations are pruned. This observation is instance-local and never proves fleet or drain completion. It does not expose an operator drain control.",
"parameters": [
{ "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0 } },
{ "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 128, "default": 100 } }
],
"responses": {
"200": { "description": "Bounded active retired generations", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetiredMembersPage" } } } },
"400": { "$ref": "#/components/responses/Problem" },
"401": { "$ref": "#/components/responses/Problem" },
"403": { "$ref": "#/components/responses/Problem" },
"405": { "$ref": "#/components/responses/Problem" },
"503": { "$ref": "#/components/responses/Problem" }
}
}
},
"/v1/docker/connection": {
"get": {
"summary": "Read this instance's Docker connection (administrator only)",
"description": "Returns server-side file path references for the local administrator, never certificate or private-key contents. This is instance-local state, not a fleet-wide setting. By default the private sidecar path appends `.docker-connection.json` to the full configuration filename; use `--docker-connection-state` to give each process a distinct path when multiple instances share a configuration file. An exclusive writer lock prevents accidental cross-process overwrite and is transferred during a same-version supervised hot restart. The supervisor binary must understand the DockerLock descriptor role before a later hot restart from this version. ETag is the quoted Docker connection revision, independent of route configuration revision.",
"responses": {"200": {"description": "Current Docker connection", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DockerConnectionView"}}}}, "401": {"$ref": "#/components/responses/Problem"}, "403": {"$ref": "#/components/responses/Problem"}}
},
"put": {
"summary": "Set or disable this instance's Docker connection (administrator only)",
"description": "If-Match must equal the quoted Docker connection revision. A disabled config overrides any CLI socket. This accepts local Unix sockets or certificate-verified HTTPS origins with server-side CA, client certificate, and private-key file references. It validates and persists the candidate before publication; use the test endpoint to verify daemon reachability.",
"parameters": [{"$ref": "#/components/parameters/IfMatch"}],
"requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DockerConnectionConfig"}}}},
"responses": {"200": {"description": "Updated connection", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DockerConnectionView"}}}}, "409": {"$ref": "#/components/responses/Problem"}, "422": {"$ref": "#/components/responses/Problem"}, "428": {"$ref": "#/components/responses/Problem"}}
},
"delete": {
"summary": "Remove managed override and restore initial CLI socket fallback (administrator only)",
"parameters": [{"$ref": "#/components/parameters/IfMatch"}],
"responses": {"200": {"description": "Fallback connection", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DockerConnectionView"}}}}, "409": {"$ref": "#/components/responses/Problem"}, "428": {"$ref": "#/components/responses/Problem"}}
}
},
"/v1/docker/connection/test": {
"post": {
"summary": "Verify a candidate Docker connection without activating it (administrator only)",
"description": "Sends only GET /_ping to the Docker daemon with a three-second deadline and bounded response. Failure responses do not expose credential material.",
"requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DockerConnectionConfig"}}}},
"responses": {"200": {"description": "Docker daemon answered", "content": {"application/json": {"schema": {"type": "object", "properties": {"ok": {"type": "boolean", "const": true}}}}}}, "422": {"$ref": "#/components/responses/Problem"}}
}
},
"/v1/status": {
"get": {
"summary": "Read runtime status and current counters",
"responses": {
"200": {
"description": "Runtime status",
"headers": {
"ETag": {
"$ref": "#/components/headers/ETag"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
},
"example": {
"revision": 12,
"http_routes": 2,
"tcp_routes": 1,
"workload_materials": [
{ "kind": "http", "id": "private-edge", "ready": true },
{ "kind": "tcp", "id": "database", "ready": false }
],
"metrics": {
"requests_total": 1042,
"cache_hits_total": 24,
"cache_misses_total": 7,
"cache_bypasses_total": 3,
"errors_total": 3,
"active_connections": 8,
"rejected_connections_total": 0,
"rejected_requests_total": 2,
"policy_errors_total": 1,
"jwt_auth_rejections_total": 0,
"jwt_auth_unavailable_total": 0,
"jwt_lease_terminations_total": 0,
"jwt_auth_capacity_rejections_total": 0,
"tcp_mtls_rejections_total": 0,
"tcp_mtls_lease_terminations_total": 0,
"http_mtls_rejections_total": 0,
"http_mtls_lease_terminations_total": 0,
"workload_auth_rejections_total": 0,
"workload_route_terminations_total": 0,
"policy_capacity_rejections_total": 0,
"body_transform_errors_total": 0,
"config_updates_total": 12
},
"state": {
"draining": false,
"supervised": true
},
"process_id": 4217,
"version": "0.2.1",
"uptime_seconds": 3600,
"instance": {
"id": "9f3a1c77d2e04b58",
"config_digest": "4d1f0b9a7c3e2a10"
},
"store": {
"epoch": "3a921a445a0d2b783d1c3a444af8b174",
"revision": 12,
"ready": true,
"degraded": false,
"reason": null,
"detail": null,
"last_confirmed_seconds_ago": 0,
"grace_seconds": 30
},
"settings": {}
}
}