-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
1689 lines (1617 loc) · 57.5 KB
/
Copy pathopenapi.yaml
File metadata and controls
1689 lines (1617 loc) · 57.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
# ---------------------------------------------------------------------------
# cronstable HTTP control API.
#
# This is the machine-readable contract for the aiohttp control API cronstable
# serves when a `web:` section is configured (see the Web Dashboard and the
# HTTP-API wiki page). It is the source a generated client (e.g. the iOS app,
# via swift-openapi-generator) is built from. Two checks keep it honest:
# .github/scripts/check_openapi.py (structure: schema validity, refs,
# path/parameter agreement, duplicate path keys) and tests/test_openapi.py
# (drift: every path+method here must match cronstable.cron.WEB_ROUTES, the
# table the aiohttp app is built from, in both directions).
#
# It documents the *shape* of every endpoint: its path, method, parameters,
# auth, and the top-level fields of each response. Rich nested payloads that
# move quickly with the code (resource series, DAG run documents, cluster
# views) are typed at the top level and left open (additionalProperties) below
# that, so the contract stays a brake on breaking changes without becoming a
# second copy of the code that rots. The prose reference for every field lives
# on the wiki HTTP-API page.
# ---------------------------------------------------------------------------
info:
title: cronstable HTTP control API
description: >-
The optional REST + SSE control API a cronstable daemon serves when a
`web:` section is configured. Every route is documented in prose on the
HTTP-API wiki page; this spec is the generated-client contract.
version: "1.2.x"
contact:
name: cronstable
url: https://github.com/ptweezy/cronstable
license:
name: MIT
url: https://github.com/ptweezy/cronstable/blob/main/LICENSE
servers:
- url: "{scheme}://{host}:{port}"
description: >-
A self-hosted cronstable daemon. There is no vendor endpoint: the
operator supplies the address of their own `web.listen` listener (LAN,
Tailscale, or a reverse proxy). `unix://` listeners are not addressable
here.
variables:
scheme:
default: http
enum: [http, https]
host:
default: 127.0.0.1
port:
default: "8080"
# Bearer-token auth applies to every route when `web.authToken` is configured;
# an unauthenticated daemon ignores it. The `.ics` calendar routes also
# accept the same token as a `?token=` query parameter (declared per-operation),
# because calendar clients cannot send a bearer header.
security:
- bearerAuth: []
- {} # an unauthenticated daemon (no web.authToken) accepts calls with no token
tags:
- name: meta
description: Version, identity, and the batched fleet summary.
- name: jobs
description: Job status, history, resources, and run/cancel/pause control.
- name: dags
description: DAG introspection and control (orchestration).
- name: schedule
description: Schedule intelligence (preview, pressure, duplicates, why).
- name: cluster
description: Cluster, fleet, and node views.
- name: calendar
description: iCalendar feeds.
- name: state
description: Durable-state inspector (metadata only).
- name: push
description: End-to-end encrypted push alerts and device pairing.
- name: daemon
description: Daemon lifecycle (the authenticated graceful stop).
- name: metrics
description: Prometheus exposition.
paths:
/version:
get:
tags: [meta]
summary: Daemon version
operationId: getVersion
responses:
"200":
description: The cronstable version as plain text.
content:
text/plain:
schema: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
/job-set-id:
get:
tags: [meta]
summary: Job-set identity
operationId: getJobSetId
description: >-
The fingerprint of the configured job set. Returns plain text, or a
JSON object when the `Accept` header lists `application/json` among
its media ranges (compound headers and `;q=` parameters included;
the `*/*` and `application/*` wildcards keep the text default).
responses:
"200":
description: The job-set id.
content:
text/plain:
schema: { type: string }
application/json:
schema:
type: object
properties:
job_set_id: { type: string }
jobs: { type: integer }
"401": { $ref: "#/components/responses/Unauthorized" }
/status:
get:
tags: [jobs]
summary: Per-job status
operationId: getStatus
description: >-
Every job's status (running / disabled / scheduled). Returns one line
per job as plain text, or a JSON array when the `Accept` header lists
`application/json` among its media ranges (compound headers and `;q=`
parameters included; wildcards keep the text default).
responses:
"200":
description: Job status rows.
content:
text/plain:
schema: { type: string }
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/StatusRow" }
"401": { $ref: "#/components/responses/Unauthorized" }
/summary:
get:
tags: [meta]
summary: Batched fleet overview
operationId: getSummary
description: >-
Everything a widget or status tile needs in one call: fleet job counts,
the soonest upcoming fire, this node's identity, and its cluster role.
responses:
"200":
description: The fleet summary.
content:
application/json:
schema: { $ref: "#/components/schemas/Summary" }
"401": { $ref: "#/components/responses/Unauthorized" }
/jobs:
get:
tags: [jobs]
summary: List all jobs
operationId: listJobs
description: >-
Every job with its schedule, running state, next fire, last run, and a
compact recent-outcome tail. Supports `ETag` / `If-None-Match` (304).
parameters:
- $ref: "#/components/parameters/IfNoneMatch"
responses:
"200":
description: The job list.
headers:
ETag: { $ref: "#/components/headers/ETag" }
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/Job" }
"304": { description: Not modified (matching `If-None-Match`). }
"401": { $ref: "#/components/responses/Unauthorized" }
/jobs/{name}:
get:
tags: [jobs]
summary: One job's detail
operationId: getJob
description: One job, in the same shape as an entry of `GET /jobs`.
parameters:
- $ref: "#/components/parameters/JobName"
responses:
"200":
description: The job detail.
content:
application/json:
schema: { $ref: "#/components/schemas/Job" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/jobs/{name}/runs:
get:
tags: [jobs]
summary: Job run history + stats
operationId: getJobRuns
parameters:
- $ref: "#/components/parameters/JobName"
- name: limit
in: query
description: >-
Max runs to return, newest kept (clamped to the retained
history; default serves the whole retained window). `stats`
always covers the whole retained window.
schema: { type: integer }
responses:
"200":
description: Retained run history and aggregate statistics.
content:
application/json:
schema: { $ref: "#/components/schemas/JobRuns" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/activity:
get:
tags: [jobs]
summary: Batched recent run outcomes for every job
operationId: getActivity
description: >-
The activity heatmap's feed: the same records as
`GET /jobs/{name}/runs`, for every job at once, without the per-job
fan-out. `jobs` maps each job name to its retained runs, oldest
first, each reduced to the three plotted fields; a job that has
never run maps to an empty array. Supports `ETag` / `If-None-Match`
(304).
parameters:
- $ref: "#/components/parameters/IfNoneMatch"
- name: limit
in: query
description: >-
Max runs per job, newest kept (clamped to the retained
history; default serves the whole retained window).
schema: { type: integer }
responses:
"200":
description: Recent run outcomes, per job.
headers:
ETag: { $ref: "#/components/headers/ETag" }
content:
application/json:
schema:
type: object
properties:
jobs:
type: object
additionalProperties:
type: array
items: { $ref: "#/components/schemas/ActivityRun" }
"304": { description: Not modified (matching `If-None-Match`). }
"401": { $ref: "#/components/responses/Unauthorized" }
/jobs/{name}/trends:
get:
tags: [jobs]
summary: Job stats per time window
operationId: getJobTrends
description: The `GET /jobs/{name}/runs` stats object, per time window, over the durable ledger.
parameters:
- $ref: "#/components/parameters/JobName"
responses:
"200":
description: Windowed trend statistics.
content:
application/json:
schema:
type: object
properties:
name: { type: string }
source:
# Open enum (enum + bare string under anyOf, like
# JobRun.outcome): a newer daemon may compute trends
# from a source this list has not heard of yet, and
# clients must keep decoding.
description: >-
Where the trend windows were computed from. Known
values: durable, memory. The list is open: a newer
daemon may send a value that is not on it, and
clients must keep decoding and render the unknown
value neutrally.
anyOf:
- type: string
enum: [durable, memory]
- type: string
generated_at: { type: string, format: date-time }
windows:
type: object
additionalProperties: { $ref: "#/components/schemas/RunStats" }
additionalProperties: true
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/jobs/{name}/resources:
get:
tags: [jobs]
summary: Job CPU/RSS time series
operationId: getJobResources
parameters:
- $ref: "#/components/parameters/JobName"
- name: limit
in: query
description: Number of recent monitored runs to include (clamped).
schema: { type: integer }
- name: runs
in: query
description: Legacy alias of `limit` (read when `limit` is absent).
schema: { type: integer }
responses:
"200":
description: Chart-grade CPU/RSS series for the job.
content:
application/json:
schema:
type: object
properties:
name: { type: string }
monitored: { type: boolean }
interval: { type: number, nullable: true }
live: { type: array, items: { type: object, additionalProperties: true } }
runs: { type: array, items: { type: object, additionalProperties: true } }
additionalProperties: true
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/jobs/{name}/logs:
get:
tags: [jobs]
summary: Live job output (SSE)
operationId: streamJobLogs
description: >-
A Server-Sent Events stream of the job's captured output: buffered
lines first, then live lines, then an `end` event. See the HTTP-API
wiki for the event grammar.
parameters:
- $ref: "#/components/parameters/JobName"
responses:
"200":
description: An SSE stream (`text/event-stream`).
content:
text/event-stream:
schema: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/jobs/{name}/start:
post:
tags: [jobs]
summary: Run a job now
operationId: startJob
x-required-scope: control
parameters:
- $ref: "#/components/parameters/JobName"
responses:
"200":
description: Launched.
content:
application/json:
schema:
type: object
properties:
started: { type: string }
required: [started]
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"404": { $ref: "#/components/responses/NotFound" }
"409":
description: The job is disabled (JSON error envelope).
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/jobs/{name}/cancel:
post:
tags: [jobs]
summary: Cancel a running job
operationId: cancelJob
x-required-scope: control
parameters:
- $ref: "#/components/parameters/JobName"
responses:
"200":
description: All running instances cancelled.
content:
application/json:
schema:
type: object
properties:
cancelled: { type: string }
instances: { type: integer }
required: [cancelled, instances]
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"404": { $ref: "#/components/responses/NotFound" }
"409":
description: The job is not running (JSON error envelope).
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/jobs/{name}/pause:
post:
tags: [jobs]
summary: Pause a job's scheduled fires
operationId: pauseJob
x-required-scope: control
parameters:
- $ref: "#/components/parameters/JobName"
requestBody:
required: false
content:
application/json:
schema: { $ref: "#/components/schemas/PauseRequest" }
responses:
"200":
description: The active pause window.
content:
application/json:
schema:
type: object
properties:
paused: { $ref: "#/components/schemas/Pause" }
"400": { description: A malformed or out-of-range pause request. }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"404": { $ref: "#/components/responses/NotFound" }
/jobs/{name}/resume:
post:
tags: [jobs]
summary: End a job's pause
operationId: resumeJob
x-required-scope: control
parameters:
- $ref: "#/components/parameters/JobName"
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
by: { type: string }
responses:
"200":
description: Pause cleared.
content:
application/json:
schema:
type: object
properties:
paused:
type: object
nullable: true
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"404": { $ref: "#/components/responses/NotFound" }
/dags:
get:
tags: [dags]
summary: List DAGs
operationId: listDags
description: >-
Supports `ETag` / `If-None-Match` (304) and gzip, like `GET /jobs`.
parameters:
- $ref: "#/components/parameters/IfNoneMatch"
responses:
"200":
description: Configured DAGs and their tasks.
headers:
ETag: { $ref: "#/components/headers/ETag" }
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/Dag" }
"304": { description: Not modified (matching `If-None-Match`). }
"401": { $ref: "#/components/responses/Unauthorized" }
/dags/{name}/runs:
get:
tags: [dags]
summary: List a DAG's runs
operationId: listDagRuns
parameters:
- $ref: "#/components/parameters/DagName"
- name: limit
in: query
description: Max runs to return (default 50, max 500).
schema: { type: integer }
responses:
"200":
description: Recent dag_runs (newest first).
content:
application/json:
schema:
type: object
properties:
dag: { type: string }
name:
type: string
description: Same as `dag` (the generic subject key).
runs:
type: array
items: { $ref: "#/components/schemas/DagRunSummary" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: >-
No such DAG, or no `state:` store is configured (run documents
only exist in a durable store).
/dags/{name}/runs/{run_key}:
get:
tags: [dags]
summary: One DAG run's document
operationId: getDagRun
parameters:
- $ref: "#/components/parameters/DagName"
- $ref: "#/components/parameters/RunKey"
responses:
"200":
description: The full durable run document.
content:
application/json:
schema: { $ref: "#/components/schemas/DagRunDocument" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/dags/{name}/runs/{run_key}/xcom:
get:
tags: [dags]
summary: A DAG run's XCom outputs
operationId: getDagRunXcom
parameters:
- $ref: "#/components/parameters/DagName"
- $ref: "#/components/parameters/RunKey"
responses:
"200":
description: The XCom entries the run's tasks published.
content:
application/json:
schema: { type: object, additionalProperties: true }
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: >-
No such DAG or run, or no `state:` store is configured (XCom only
exists in a durable store).
/dags/{name}/runs/{run_key}/tasks/{taskkey}/logs:
get:
tags: [dags]
summary: Live DAG task output (SSE)
operationId: streamDagTaskLogs
parameters:
- $ref: "#/components/parameters/DagName"
- $ref: "#/components/parameters/RunKey"
- $ref: "#/components/parameters/TaskKey"
responses:
"200":
description: An SSE stream (`text/event-stream`) of a running task instance.
content:
text/event-stream:
schema: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/dags/{name}/trigger:
post:
tags: [dags]
summary: Trigger a manual DAG run
operationId: triggerDag
x-required-scope: control
parameters:
- $ref: "#/components/parameters/DagName"
responses:
"200":
description: The created run.
content:
application/json:
schema:
type: object
properties:
dag: { type: string }
name:
type: string
description: Same as `dag` (the generic subject key).
runKey: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"404": { $ref: "#/components/responses/NotFound" }
"500": { description: The run could not be durably recorded. }
/dags/{name}/backfill:
post:
tags: [dags]
summary: Backfill a DAG across a range
operationId: backfillDag
x-required-scope: control
parameters:
- $ref: "#/components/parameters/DagName"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
from: { type: string, format: date-time }
to: { type: string, format: date-time }
required: [from, to]
responses:
"200":
description: The backfill result.
content:
application/json:
schema:
type: object
properties:
ok: { type: boolean }
created: { type: integer }
"400":
description: >-
A bad range or an unknown/unscheduled DAG (every refused backfill
is 400 with a `reason`; this route never returns 404).
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/dags/{name}/runs/{run_key}/tasks/{taskkey}/decision:
post:
tags: [dags]
summary: Approve or reject an approval gate
operationId: decideDagTask
x-required-scope: approve
parameters:
- $ref: "#/components/parameters/DagName"
- $ref: "#/components/parameters/RunKey"
- $ref: "#/components/parameters/TaskKey"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
decision: { type: string, enum: [approve, reject] }
by: { type: string }
required: [decision]
responses:
"200": { description: The decision was recorded. }
"400": { description: A bad decision value. }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"409": { description: The task is not awaiting a decision. }
/cluster:
get:
tags: [cluster]
summary: This node's cluster view
operationId: getCluster
responses:
"200":
description: "The cluster/leadership view (`enabled: false` when unclustered)."
content:
application/json:
schema: { $ref: "#/components/schemas/ClusterView" }
"401": { $ref: "#/components/responses/Unauthorized" }
/fleet:
get:
tags: [cluster]
summary: Fleet-wide per-node job view
operationId: getFleet
description: >-
Supports `ETag` / `If-None-Match` (304) and gzip, like `GET /jobs`.
parameters:
- $ref: "#/components/parameters/IfNoneMatch"
responses:
"200":
description: Each node's per-job run summaries.
headers:
ETag: { $ref: "#/components/headers/ETag" }
content:
application/json:
schema: { type: object, additionalProperties: true }
"304": { description: Not modified (matching `If-None-Match`). }
"401": { $ref: "#/components/responses/Unauthorized" }
/node:
get:
tags: [cluster]
summary: This node's live CPU/memory
operationId: getNode
responses:
"200":
description: The node's identity and live resources.
content:
application/json:
schema: { $ref: "#/components/schemas/NodeView" }
"401": { $ref: "#/components/responses/Unauthorized" }
/node/history:
get:
tags: [cluster]
summary: This node's CPU/memory history
operationId: getNodeHistory
responses:
"200":
description: Oldest-first `[t, cpu%, mem%]` points.
content:
application/json:
schema:
type: object
properties:
node_name: { type: string }
enabled: { type: boolean }
interval: { type: number, nullable: true }
points:
type: array
items:
type: array
items: { type: number }
additionalProperties: true
"401": { $ref: "#/components/responses/Unauthorized" }
/schedule/preview:
get:
tags: [schedule]
summary: Decode and lint one cron expression
operationId: schedulePreview
parameters:
- name: expr
in: query
required: true
schema: { type: string }
- name: tz
in: query
schema: { type: string }
- name: limit
in: query
description: Number of fire instants to preview (clamped).
schema: { type: integer }
- name: count
in: query
description: Legacy alias of `limit` (read when `limit` is absent).
schema: { type: integer }
- name: seed
in: query
schema: { type: string }
responses:
"200":
description: The decoded, described, previewed, and linted expression.
content:
application/json:
schema: { type: object, additionalProperties: true }
"400": { description: A missing `expr` or unknown `tz`. }
"401": { $ref: "#/components/responses/Unauthorized" }
/schedule/pressure:
get:
tags: [schedule]
summary: Forward-looking collision heatmap
operationId: schedulePressure
parameters:
- name: hours
in: query
schema: { type: integer }
- name: tz
in: query
schema: { type: string }
responses:
"200":
description: The fleet's fire density over the window.
content:
application/json:
schema: { type: object, additionalProperties: true }
"400": { description: An unknown `tz`. }
"401": { $ref: "#/components/responses/Unauthorized" }
/schedule/duplicates:
get:
tags: [schedule]
summary: Jobs whose schedules coincide
operationId: scheduleDuplicates
responses:
"200":
description: Groups of jobs firing on identical instants.
content:
application/json:
schema: { type: object, additionalProperties: true }
"401": { $ref: "#/components/responses/Unauthorized" }
/schedule/suggest:
get:
tags: [schedule]
summary: Suggest the least-loaded slot
operationId: scheduleSuggest
parameters:
- name: period
in: query
schema: { type: string, enum: [hourly, daily] }
- name: tz
in: query
schema: { type: string }
responses:
"200":
description: The winning slot and alternatives.
content:
application/json:
schema: { type: object, additionalProperties: true }
"400": { description: A bad `period` or unknown `tz`. }
"401": { $ref: "#/components/responses/Unauthorized" }
/schedule/why:
get:
tags: [schedule]
summary: Explain why a job did/didn't fire at an instant
operationId: scheduleWhy
parameters:
- name: job
in: query
required: true
schema: { type: string }
- name: at
in: query
required: true
schema: { type: string, format: date-time }
responses:
"200":
description: A field-by-field match explanation.
content:
application/json:
schema: { type: object, additionalProperties: true }
"400": { description: A missing `job`/`at` or unparseable `at`. }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/calendar.ics:
get:
tags: [calendar]
summary: Fleet-wide iCalendar feed
operationId: getCalendar
security:
- bearerAuth: []
- icsToken: []
- {}
parameters:
- name: days
in: query
schema: { type: integer }
- name: limit
in: query
description: Max fire entries per job (clamped).
schema: { type: integer }
- name: per_job
in: query
description: Legacy alias of `limit` (read when `limit` is absent).
schema: { type: integer }
- $ref: "#/components/parameters/IcsToken"
responses:
"200":
description: An RFC 5545 calendar feed.
content:
text/calendar:
schema: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
/jobs/{name}/calendar.ics:
get:
tags: [calendar]
summary: One job's iCalendar feed
operationId: getJobCalendar
security:
- bearerAuth: []
- icsToken: []
- {}
parameters:
- $ref: "#/components/parameters/JobName"
- name: days
in: query
schema: { type: integer }
- name: limit
in: query
description: Max fire entries per job (clamped).
schema: { type: integer }
- name: per_job
in: query
description: Legacy alias of `limit` (read when `limit` is absent).
schema: { type: integer }
- $ref: "#/components/parameters/IcsToken"
responses:
"200":
description: An RFC 5545 calendar feed for one job.
content:
text/calendar:
schema: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
"404": { $ref: "#/components/responses/NotFound" }
/state:
get:
tags: [state]
summary: Durable-state health + inventory (metadata only)
operationId: getState
responses:
"200":
description: "Store health and topology (`enabled: false` when stateless)."
content:
application/json:
schema: { type: object, additionalProperties: true }
"401": { $ref: "#/components/responses/Unauthorized" }
/state/documents:
get:
tags: [state]
summary: State documents (metadata only)
operationId: getStateDocuments
parameters:
- name: ns
in: query
required: true
description: >-
The namespace to inspect. Must start with `kv/`, `cursor/`, or
`idem/`; anything else (or an absent `ns`) is 400.
schema: { type: string }
responses:
"200":
description: >-
`{namespace, documents}`; KV values are redacted to a
`valueSize`/`valueType` summary.
content:
application/json:
schema: { type: object, additionalProperties: true }
"400":
description: "`ns` missing or not a `kv/`/`cursor/`/`idem/` namespace."
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: No `state:` store is configured.
/state/records:
get:
tags: [state]
summary: State records (metadata only)
operationId: getStateRecords
parameters:
- name: stream
in: query
required: true
description: The stream to inspect; an absent or empty value is 400.
schema: { type: string }
- name: limit
in: query
required: false
description: Newest records returned, clamped to 1-500.
schema: { type: integer, default: 100, minimum: 1, maximum: 500 }
responses:
"200":
description: "`{stream, records}` (payloads never crossed here)."
content:
application/json:
schema: { type: object, additionalProperties: true }
"400":
description: "`stream` missing or empty."
"401": { $ref: "#/components/responses/Unauthorized" }
"403":
description: >-
`logs/` streams carry raw job output and are refused by the
metadata-only inspector.
"404":
description: No `state:` store is configured.
/whoami:
get:
tags: [meta]
summary: Describe the presented bearer token
operationId: getWhoami
description: >-
The label and scopes of the token that authenticated this request,
so a client can tell what it may do (and the dashboard can warn
when its pairing QR would hand a phone the all-scopes token). With
no token configured there is no auth middleware: `authenticated`
is false and every scope is effectively granted.
responses:
"200":
description: The matched token's identity.
content:
application/json:
schema: { $ref: "#/components/schemas/WhoAmI" }
"401": { $ref: "#/components/responses/Unauthorized" }
/push/devices:
get:
tags: [push]