-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2196 lines (2126 loc) · 61.6 KB
/
Copy pathopenapi.yaml
File metadata and controls
2196 lines (2126 loc) · 61.6 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: Waylog API
version: 0.2.0
description: |
HTTP API for the Waylog ingest server.
The primary product path is schema-2.0 ingest plus the v2 read APIs used by
the operator CLI and embedded dashboard: recent traces, error families,
trace story, blast radius, incidents, event search, and direct trace/event
lookup. `/v1/insight` is a compatibility endpoint; new clients should use
`/v1/incidents/*`.
Write endpoints require write-scope auth when auth is configured. Read
endpoints require read-scope auth when read keys are configured.
servers:
- url: /
tags:
- name: Ingest
description: Schema-2.0 event ingest and validation.
- name: OTLP
description: OTLP trace ingest converted into schema-2.0 events. HTTP is documented here; gRPC uses OTLP TraceService on the configured OTLP_GRPC_ADDR.
- name: Signals
description: Production-context facts used by incident triage.
- name: Deployments
description: Deployment registration (with optional commit/PR provenance) and query.
- name: Events
description: Direct event lookup and search.
- name: Traces
description: Trace lookup, recent trace summaries, and trace stories.
- name: Triage
description: Error-family rollups and blast-radius analysis.
- name: Capabilities
description: Runtime capability discovery for CLI and UI clients.
- name: Operational
description: Secondary operational graph, tool, and agent endpoints.
- name: Health
description: Process health, readiness, and metrics endpoints.
paths:
/v1/events:
post:
tags: [Ingest]
operationId: ingestEvents
summary: Ingest schema-2.0 WideEvents
description: |
Accepts one schema-2.0 WideEvent as JSON or a batch as NDJSON. Accepted
events are written to the schema-2.0 WAL before projection into the v2
read models. Per-event schema failures are returned inside the ingest
envelope; infrastructure failures return 503.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WideEvent'
application/x-ndjson:
schema:
type: string
description: Newline-delimited schema-2.0 WideEvent JSON objects.
responses:
'200':
description: Ingest envelope
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'400':
description: Malformed body, missing content type, unsupported encoding, or invalid cursor/body framing
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'401':
description: Unauthorized
'405':
description: Method Not Allowed
'413':
description: Body or batch too large
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'415':
description: Unsupported content type
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'503':
description: Durability or projection unavailable
/v1/events/validate:
post:
tags: [Ingest]
operationId: validateEvents
summary: Dry-run schema-2.0 event validation
description: |
Parses and validates JSON or NDJSON with the same contract as
/v1/events, but does not dedupe, write to WAL, or project events.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WideEvent'
application/x-ndjson:
schema:
type: string
responses:
'200':
description: Dry-run ingest envelope
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'400':
description: Malformed body or unsupported encoding
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'405':
description: Method Not Allowed
'413':
description: Body or batch too large
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
'415':
description: Unsupported content type
content:
application/json:
schema:
$ref: '#/components/schemas/IngestEnvelope'
/v1/signals:
post:
tags: [Signals]
operationId: ingestSignal
summary: Ingest one production-context signal
description: |
Accepts one low-volume production-context signal, such as a deploy,
dependency, runtime, healthcheck, config, or alert fact. Signals require
SQLite persistence and are used by the v2.1 incident engine.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Signal'
responses:
'201':
description: Signal accepted and persisted
content:
application/json:
schema:
$ref: '#/components/schemas/SignalAccepted'
'400':
description: Invalid signal JSON or fields
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
'401':
description: Unauthorized
'405':
description: Method Not Allowed
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
'413':
description: Request body too large
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
'503':
description: Signal storage unavailable; set SQLITE_PATH
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
'500':
description: Internal signal storage error
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
/v1/alerts:
post:
tags: [Signals]
operationId: ingestAlert
summary: Ingest an external alert and correlate it with an active incident
description: |
Accepts Waylog-normalized alerts plus Alertmanager, Grafana, and
PagerDuty webhook payloads. Accepted alerts are stored as `type=alert`
signals and correlated with active incidents when possible. Alerts do
not create incidents — the spike detector owns incident lifecycle.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'201':
description: Alert accepted and stored as a signal
content:
application/json:
schema:
type: object
required: [signal, match]
properties:
signal:
$ref: '#/components/schemas/Signal'
match:
type: object
required: [matched, strategy]
properties:
matched: {type: boolean}
incident_id: {type: string}
strategy:
type: string
enum: [incident_id, trace_id, family, none]
'400':
description: Invalid JSON, unsupported alert shape, or missing required fields
'401':
description: Unauthorized
'405':
description: Method Not Allowed
'503':
description: Signal store unavailable
/v1/deployments:
post:
tags: [Deployments]
operationId: registerDeployment
summary: Register a deployment
description: |
Registers a deployment so the incident engine can correlate it to error
spikes. CI should include the optional commit/PR provenance
(`commit_sha`, `pr_url`, `commit_author`) at deploy time; these are
opaque, vendor-neutral strings surfaced later in the triage report's
Suspect Change section and the `suspect_change` tool. Requires SQLite.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DeploymentRequest'
responses:
'201':
description: Deployment registered
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: string}
'400':
description: Invalid JSON or missing required fields (id, service, env)
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
'401':
description: Unauthorized
'409':
description: Deployment env conflict (id already registered to a different env)
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
'503':
description: Cold store unavailable; set SQLITE_PATH
content:
application/json:
schema:
$ref: '#/components/schemas/ReadError'
get:
tags: [Deployments]
operationId: listDeployments
summary: List recent deployments with error-rate enrichment
description: |
Returns deployments whose first_seen falls within the window, each
enriched with the before/after error-rate comparison around the deploy.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- name: window
in: query
description: Lookback duration (Go duration, e.g. 1h). Capped at 24h.
schema: {type: string, default: 1h}
- name: service
in: query
description: Optional service filter.
schema: {type: string}
responses:
'200':
description: Deployments in the window
content:
application/json:
schema:
type: object
required: [deployments]
properties:
deployments:
type: array
items:
$ref: '#/components/schemas/Deployment'
'401':
description: Unauthorized
'503':
description: Cold store unavailable; set SQLITE_PATH
/v1/otlp/v1/traces:
post:
tags: [OTLP]
operationId: ingestOTLPTraces
summary: Ingest OTLP/HTTP traces
description: |
Accepts OTLP ExportTraceServiceRequest protobuf bodies. HTTP spans are
converted into schema-2.0 WideEvents and ingested through the same WAL
and projector as SDK events. Unsupported spans and validation rejects
are reported via OTLP partial_success. The same trace conversion path
is available over OTLP/gRPC TraceService when the gRPC receiver is
enabled.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/x-protobuf:
schema:
type: string
format: binary
responses:
'200':
description: OTLP ExportTraceServiceResponse protobuf
content:
application/x-protobuf:
schema:
type: string
format: binary
'400':
description: Invalid gzip body, unreadable body, or invalid protobuf
'401':
description: Unauthorized
'405':
description: Method Not Allowed
'413':
description: Request body too large
'415':
description: Unsupported content type or content encoding
'503':
description: v2 ingest infrastructure unavailable
/v1/events/{event_id}:
get:
tags: [Events]
operationId: getEvent
summary: Get one schema-2.0 event
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/EventID'
responses:
'200':
description: Event wrapper
content:
application/json:
schema:
$ref: '#/components/schemas/EventGetResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
'404':
$ref: '#/components/responses/ReadNotFound'
/v1/events/search:
get:
tags: [Events]
operationId: searchEvents
summary: Search schema-2.0 events
description: Searches the v2 recent index with cursor pagination.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/Service'
- $ref: '#/components/parameters/StatusCSV'
- $ref: '#/components/parameters/ErrorCode'
- $ref: '#/components/parameters/TraceIDQuery'
- $ref: '#/components/parameters/Since'
- $ref: '#/components/parameters/Until'
- $ref: '#/components/parameters/Window'
- $ref: '#/components/parameters/IncludeSuppressed'
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Event search results
content:
application/json:
schema:
$ref: '#/components/schemas/EventSearchResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
/v1/traces/{trace_id}:
get:
tags: [Traces]
operationId: getTraceEvents
summary: Get all events for a trace
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/TraceIDPath'
responses:
'200':
description: Trace events
content:
application/json:
schema:
$ref: '#/components/schemas/TraceGetResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
'404':
$ref: '#/components/responses/ReadNotFound'
/v1/traces/recent:
get:
tags: [Traces]
operationId: listRecentTraces
summary: Recent traces
description: Returns recent trace summaries ordered by time descending with cursor pagination.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/Service'
- $ref: '#/components/parameters/StatusCSV'
- $ref: '#/components/parameters/Since'
- $ref: '#/components/parameters/Until'
- $ref: '#/components/parameters/Window'
- $ref: '#/components/parameters/IncludeSuppressed'
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Recent trace summaries
content:
application/json:
schema:
$ref: '#/components/schemas/RecentTracesResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
/v1/traces/story:
get:
tags: [Traces]
operationId: getTraceStory
summary: Explain a trace as an execution story
description: Returns the service, route, first failing step, contributing path, logs, downstream calls, and linkage mode for one trace or event.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- in: query
name: event_id
schema:
type: string
description: Event ID to explain. Exactly one of event_id or trace_id is required.
- in: query
name: trace_id
schema:
type: string
description: Trace ID to explain. Exactly one of event_id or trace_id is required.
responses:
'200':
description: Trace story
content:
application/json:
schema:
$ref: '#/components/schemas/StoryResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
'404':
$ref: '#/components/responses/ReadNotFound'
/v1/errors:
get:
tags: [Triage]
operationId: listErrorFamilies
summary: Error family rollups
description: Groups failures by service, step, and error code. Suppressed events are excluded from error rollups.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/Service'
- $ref: '#/components/parameters/ErrorStatusCSV'
- $ref: '#/components/parameters/Since'
- $ref: '#/components/parameters/Until'
- $ref: '#/components/parameters/Window'
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: Error family rows
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorsResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
/v1/blast_radius:
get:
tags: [Triage]
operationId: getBlastRadius
summary: Blast radius for an error family or error code
description: |
Computes affected requests, users, and services for one error family or
for all families with the same error code.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/Service'
- in: query
name: step
schema:
type: string
description: Step name. Use with service and error_code for single-family mode.
- $ref: '#/components/parameters/ErrorCode'
- in: query
name: error_family
schema:
type: string
description: Display form service:step:error_code.
- $ref: '#/components/parameters/Since'
- $ref: '#/components/parameters/Until'
- $ref: '#/components/parameters/Window'
responses:
'200':
description: Blast radius
content:
application/json:
schema:
$ref: '#/components/schemas/BlastRadiusResponse'
'400':
$ref: '#/components/responses/ReadBadRequest'
/v1/incidents/active:
get:
tags: [Triage]
operationId: listActiveIncidents
summary: Active v2.1 incidents
description: Returns active and recovering incidents derived from v2 error-family spikes, signals, and deployment context.
security:
- ApiKeyHeader: []
- BearerAuth: []
responses:
'200':
description: Active incidents
content:
application/json:
schema:
$ref: '#/components/schemas/IncidentListResponse'
'401':
description: Unauthorized
'405':
description: Method Not Allowed
/v1/incidents/{id}:
get:
tags: [Triage]
operationId: getIncident
summary: Get one incident
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/IncidentID'
responses:
'200':
description: Incident detail
content:
application/json:
schema:
$ref: '#/components/schemas/IncidentDetailResponse'
'401':
description: Unauthorized
'404':
$ref: '#/components/responses/ReadNotFound'
'405':
description: Method Not Allowed
/v1/incidents/{id}/snapshot:
get:
tags: [Triage]
operationId: getIncidentSnapshot
summary: Render an incident snapshot
description: |
Defaults to text/plain. Send Accept: application/json to receive the
snapshot text plus the incident object.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- $ref: '#/components/parameters/IncidentID'
responses:
'200':
description: Incident snapshot
content:
text/plain:
schema:
type: string
application/json:
schema:
$ref: '#/components/schemas/IncidentSnapshotResponse'
'401':
description: Unauthorized
'404':
$ref: '#/components/responses/ReadNotFound'
'405':
description: Method Not Allowed
/v1/triage/{incident_id}:
get:
tags: [Triage]
operationId: getTriageReport
summary: Build a deterministic TriageReport for an open incident
description: |
Returns a structured TriageReport v1 (incident_ref, blast_snapshot,
first_failure, sample_traces, signals, next_checks, confidence,
report_hash). Same builder backs `POST /v1/tools/triage_incident`;
both surfaces produce identical `report_hash` for the same input.
Read-scope auth.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- name: incident_id
in: path
required: true
schema: {type: string}
- name: window
in: query
required: false
schema: {type: string, default: "15m"}
description: Go duration string (e.g. 15m, 1h). Default 15m.
- name: snapshot
in: query
required: false
schema: {type: boolean, default: false}
description: |
When true, freeze evaluation bounds to the incident's started_at
and updated_at instead of using wall-clock now.
responses:
'200':
description: TriageReport v1
content:
application/json:
schema:
$ref: '#/components/schemas/TriageReport'
'400':
description: Missing or invalid parameters
'401':
description: Unauthorized
'500':
description: Triage build failed
/v1/triage/{incident_id}/report:
get:
tags: [Triage]
operationId: renderTriageReport
summary: Render a cited operator report from a TriageReport
description: |
Builds the same deterministic TriageReport as `/v1/triage/{incident_id}`
and renders it as Markdown, Slack Block Kit JSON, or PagerDuty note text.
This endpoint does not deliver messages to Slack or PagerDuty.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- name: incident_id
in: path
required: true
schema: {type: string}
- name: format
in: query
required: false
schema:
type: string
enum: [markdown, slack, pagerduty]
default: markdown
- name: window
in: query
required: false
schema: {type: string, default: "15m"}
- name: snapshot
in: query
required: false
schema: {type: boolean, default: false}
responses:
'200':
description: Rendered operator report
content:
text/markdown:
schema: {type: string}
text/plain:
schema: {type: string}
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Missing or invalid parameters
'401':
description: Unauthorized
'404':
$ref: '#/components/responses/ReadNotFound'
'500':
description: Triage build or render failed
/v1/insight:
get:
tags: [Operational]
operationId: getCompatibilityInsight
summary: Compatibility anomaly insight
deprecated: true
description: |
Compatibility endpoint for older dashboard/tool consumers. When the
v2.1 incident engine is running, this projects the top active incident
into the legacy insight shape. Otherwise it falls back to the legacy
detector. New clients should use `/v1/incidents/active` and
`/v1/incidents/{id}`.
security:
- ApiKeyHeader: []
- BearerAuth: []
responses:
'200':
description: Compatibility insight object
content:
application/json:
schema:
type: object
additionalProperties: true
'204':
description: No active insight
'401':
description: Unauthorized
'405':
description: Method Not Allowed
/v1/capabilities:
get:
tags: [Capabilities]
operationId: getCapabilities
summary: Runtime capabilities
description: Returns runtime feature/configuration flags used by CLI and UI clients.
security:
- ApiKeyHeader: []
- BearerAuth: []
responses:
'200':
description: Capabilities
content:
application/json:
schema:
$ref: '#/components/schemas/CapabilitiesResponse'
'405':
description: Method Not Allowed
/v1/ask:
post:
tags: [Operational]
operationId: askWaylog
summary: Ask Waylog
description: Executes a natural-language query through the configured LLM provider and tool registry.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [prompt]
properties:
prompt:
type: string
max_steps:
type: integer
minimum: 1
maximum: 8
responses:
'200':
description: Query answered
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Invalid request
'413':
description: Request Entity Too Large
'502':
description: Provider or tool execution failure
'503':
description: LLM provider unavailable
/v1/plans/execute:
post:
tags: [Operational]
operationId: executePlan
summary: Execute a deterministic tool plan
description: |
Executes explicit plan steps or a built-in template shorthand. The
`triage` template expands to one `triage_incident` tool step; the
resulting TriageReport is returned at `steps[0].result`.
security:
- ApiKeyHeader: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- type: object
required: [steps]
properties:
steps:
type: array
minItems: 1
maxItems: 10
items:
type: object
required: [id, tool]
properties:
id: {type: string}
tool: {type: string}
params:
type: object
additionalProperties: true
- type: object
required: [template, params]
properties:
template:
type: string
enum: [triage]
params:
type: object
required: [incident_id]
properties:
incident_id: {type: string}
window: {type: string, default: 15m}
snapshot: {type: boolean, default: false}
responses:
'200':
description: Plan execution result
headers:
X-Plan-ID:
schema: {type: string}
description: Plan ID for `/v1/stream/plans/{id}`.
content:
application/json:
schema:
$ref: '#/components/schemas/PlanResult'
'400':
description: Invalid plan or template parameters
'503':
description: Tool registry unavailable
/v1/tools/{name}:
post:
tags: [Operational]
operationId: executeTool
summary: Direct tool call
description: |
Executes a registered structured tool by name. `triage_incident`
returns a TriageReport; `render_triage_report` renders that report as
Markdown, Slack Block Kit JSON, or PagerDuty note text without delivery.
security:
- ApiKeyHeader: []
- BearerAuth: []
parameters:
- name: name
in: path
required: true
schema:
type: string
requestBody:
required: false
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: Tool output
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Invalid params
'404':
description: Tool not found
'422':
description: Tool execution failed
'503':
description: Store unavailable
/healthz:
get:
tags: [Health]
operationId: getHealth
summary: Health check
responses:
'200':
description: Health status
content:
application/json:
schema:
type: object
additionalProperties: true
/livez:
get:
tags: [Health]
operationId: getLiveness
summary: Liveness probe
responses:
'200':
description: OK
content:
text/plain:
schema:
type: string
example: ok
/readyz:
get:
tags: [Health]
operationId: getReadiness
summary: Readiness probe
responses:
'200':
description: Ready
content:
text/plain:
schema:
type: string
example: ok
'503':
description: Not ready
/metrics:
get:
tags: [Health]
operationId: getMetrics
summary: Prometheus metrics
responses:
'200':
description: Prometheus exposition
content: