-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2267 lines (2263 loc) · 63 KB
/
Copy pathopenapi.yaml
File metadata and controls
2267 lines (2263 loc) · 63 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: TicketWave API
version: 1.0.1
summary: Public REST API for TicketWave events, orders, and the access-decision engine.
description: |
The TicketWave public API is a JSON-over-HTTPS REST surface in two namespaces:
- `/api/v1/*` reads tenant resources — events, ticket tiers, orders. Bearer
token, scope `plugin:read` (with optional `plugin:pii` to unmask buyer
identity). Rate-limited at 120 req/min/key.
- `/api/v2/*` is the access-decision API — register resources, write
rules, ask the engine for ALLOW / DENY / REVIEW, then replay, dispute,
and override. Rate-limited at 240 req/min/key. Scopes are
`plugin:read` for GETs and `plugin:write` for state-changing routes.
Key management lives at https://ticketwavehq.com/dashboard/settings/api-keys.
Tokens look like `tw_live_xxxxxxxxxxxxxxxx` and are passed in the
`Authorization: Bearer` header.
Tenant scoping is enforced on every row touched: a key can only ever
read/write resources that belong to its own `clientId`. Cross-tenant
probes resolve to `404` rather than `403` so the surface cannot be used
to enumerate other tenants' identifiers.
Schemas marked `# TODO` below are routes whose response is a passthrough
of an underlying Drizzle row or a third-party helper return value; the
handler ships the shape verbatim and the contract is "whatever the row
looked like at this point in time". Future versions of this spec will
pin those shapes once they harden.
contact:
name: TicketWave Developer Relations
email: developers@ticketwavehq.com
url: https://ticketwavehq.com/developers
license:
name: Proprietary — TicketWave Public API Terms
url: https://ticketwavehq.com/terms
servers:
- url: https://access.ticketwavehq.com
description: Production (public canonical)
- url: https://ticketwavehq.com
description: Production (dashboard alias — same deployment)
tags:
- name: meta
description: API index / surface discovery
- name: v1-events
description: Read events and their visible ticket tiers
- name: v1-orders
description: Read paid orders (PII gated by scope)
- name: v2-access
description: Access-decision engine — decide, log, replay
- name: v2-rules
description: Rule CRUD and stage management
- name: v2-resources
description: Resources the engine governs
- name: v2-actors
description: Actor identity claims
- name: v2-disputes
description: Disputes filed against a decision
- name: v2-overrides
description: Staff overrides on a prior decision
- name: v2-subscriptions
description: Outbound webhook subscriptions
- name: v2-tenants
description: Tenant projection
- name: v2-shadow
description: Shadow-mode disagreement triage (platform staff)
- name: v2-system
description: System-events feed (platform staff)
security:
- apiKey: []
paths:
/api/v1:
get:
tags: [meta]
operationId: getV1Index
summary: API v1 index
description: |
Returns a small index of available v1 endpoints plus the docs URL.
Deliberately unauthenticated — a curl with no Bearer header still
gets a 200 listing the surface, useful for surface discovery.
security: []
responses:
"200":
description: API index
content:
application/json:
schema:
$ref: "#/components/schemas/ApiIndex"
/api/v1/events:
get:
tags: [v1-events]
operationId: listEvents
summary: List events
description: |
Paginated list of the authenticated tenant's events. Pagination
is offset-based with a 50,000-row offset cap.
parameters:
- $ref: "#/components/parameters/EventStatusQuery"
- $ref: "#/components/parameters/PageQuery"
- $ref: "#/components/parameters/PageSizeQuery"
responses:
"200":
description: Page of events
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/Event"
pagination:
$ref: "#/components/schemas/OffsetPagination"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/RateLimited"
/api/v1/events/{slug}:
get:
tags: [v1-events]
operationId: getEventBySlug
summary: Get one event by slug
description: |
Returns the same projection as `/api/v1/events` plus a `tiers` array
of visible ticket tiers. Returns `404` for cross-tenant or missing
slugs (anti-enumeration).
parameters:
- name: slug
in: path
required: true
schema:
type: string
description: Tenant-side event slug
responses:
"200":
description: Event with visible tiers
content:
application/json:
schema:
$ref: "#/components/schemas/EventWithTiers"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"429":
$ref: "#/components/responses/RateLimited"
/api/v1/orders:
get:
tags: [v1-orders]
operationId: listOrders
summary: List orders
description: |
Paginated list of the authenticated tenant's orders. Customer name
and email are masked unless the key also carries the `plugin:pii`
scope.
parameters:
- name: eventId
in: query
schema:
type: string
format: uuid
description: Filter to a single event
- name: status
in: query
schema:
$ref: "#/components/schemas/OrderStatus"
- name: since
in: query
schema:
type: string
format: date-time
description: Created at or after this ISO 8601 timestamp
- name: until
in: query
schema:
type: string
format: date-time
description: Created before this ISO 8601 timestamp
- $ref: "#/components/parameters/PageQuery"
- $ref: "#/components/parameters/PageSizeQuery"
responses:
"200":
description: Page of orders
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/Order"
pagination:
$ref: "#/components/schemas/OffsetPagination"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"429":
$ref: "#/components/responses/RateLimited"
/api/v2:
get:
tags: [meta]
operationId: getV2Index
summary: API v2 index
description: |
Returns a small index of available v2 endpoints. Like `/api/v1`,
deliberately unauthenticated for surface discovery.
security: []
responses:
"200":
description: API index
content:
application/json:
schema:
$ref: "#/components/schemas/ApiIndex"
/api/v2/resources:
get:
tags: [v2-resources]
operationId: listAccessResources
summary: List access resources
parameters:
- name: kind
in: query
schema:
$ref: "#/components/schemas/ResourceKind"
- $ref: "#/components/parameters/LimitQuery"
responses:
"200":
description: Resources
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/AccessResource"
pagination:
$ref: "#/components/schemas/LimitPagination"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
post:
tags: [v2-resources]
operationId: createAccessResource
summary: Register a new access resource
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAccessResource"
responses:
"201":
description: Resource created
content:
application/json:
schema:
$ref: "#/components/schemas/AccessResource"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"409":
$ref: "#/components/responses/Conflict"
/api/v2/resources/{id}:
get:
tags: [v2-resources]
operationId: getAccessResource
summary: Get one access resource
parameters:
- $ref: "#/components/parameters/IdPath"
responses:
"200":
description: Resource
content:
application/json:
schema:
$ref: "#/components/schemas/AccessResource"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/resources/{id}/stats:
get:
tags: [v2-resources]
operationId: getAccessResourceStats
summary: Last-hour stats for one resource (platform staff only)
description: |
Auth model differs from the rest of `/api/v2/resources`: this stats
surface is consumed by the staff Ops Console and requires a
dashboard session with the `platform_admin` role, not a tenant API
key.
parameters:
- $ref: "#/components/parameters/IdPath"
responses:
"200":
description: Stats snapshot
content:
application/json:
schema:
$ref: "#/components/schemas/ResourceStats"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/disputes:
get:
tags: [v2-disputes]
operationId: listDisputes
summary: List disputes
parameters:
- name: status
in: query
schema:
$ref: "#/components/schemas/DisputeStatus"
- name: actorId
in: query
schema:
type: string
format: uuid
- name: resourceId
in: query
schema:
type: string
format: uuid
- $ref: "#/components/parameters/LimitQuery"
responses:
"200":
description: Disputes
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/Dispute"
pagination:
$ref: "#/components/schemas/LimitPagination"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
post:
tags: [v2-disputes]
operationId: createDispute
summary: Open a dispute
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateDispute"
responses:
"201":
description: Dispute created
content:
application/json:
schema:
$ref: "#/components/schemas/Dispute"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/disputes/{disputeId}/resolve:
post:
tags: [v2-disputes]
operationId: resolveDispute
summary: Resolve a dispute
description: |
Records the ground-truth label on the original decision. Emits a
`dispute.resolved` system event for the Learning Engine.
parameters:
- name: disputeId
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ResolveDispute"
responses:
"200":
description: Resolution recorded
content:
application/json:
schema:
$ref: "#/components/schemas/DisputeResolution"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/Conflict"
/api/v2/tenants:
get:
tags: [v2-tenants]
operationId: getCurrentTenant
summary: Get the authenticated tenant
responses:
"200":
description: Current tenant
content:
application/json:
schema:
type: object
required: [data]
properties:
data:
$ref: "#/components/schemas/Tenant"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
post:
tags: [v2-tenants]
operationId: createTenant
summary: Create a tenant (501 — not exposed)
description: |
Returns `501 Not Implemented`. Self-service tenant creation is not
exposed via the public API; tenant provisioning is platform-managed
(Stripe Connect onboarding, billing, KYC).
responses:
"501":
description: Not exposed
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/api/v2/tenants/{id}:
get:
tags: [v2-tenants]
operationId: getTenantById
summary: Get one tenant
description: |
Returns `404` unless `{id}` matches the authenticated key's own
`clientId`. By design, a Bearer key cannot read a sibling tenant.
parameters:
- $ref: "#/components/parameters/IdPath"
responses:
"200":
description: Tenant
content:
application/json:
schema:
$ref: "#/components/schemas/Tenant"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/event-subscriptions:
get:
tags: [v2-subscriptions]
operationId: listEventSubscriptions
summary: List outbound webhook subscriptions
responses:
"200":
description: Subscriptions
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/EventSubscription"
pagination:
$ref: "#/components/schemas/LimitPagination"
"401":
$ref: "#/components/responses/Unauthorized"
post:
tags: [v2-subscriptions]
operationId: createEventSubscription
summary: Create an outbound webhook subscription
description: |
The plaintext HMAC signing secret is returned ONCE in this response
and is never recoverable again — store it on receipt.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateEventSubscription"
responses:
"201":
description: Subscription created (signing secret surfaced once)
content:
application/json:
schema:
$ref: "#/components/schemas/EventSubscriptionCreated"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
/api/v2/event-subscriptions/{subscriptionId}:
get:
tags: [v2-subscriptions]
operationId: getEventSubscription
summary: Get one subscription
parameters:
- $ref: "#/components/parameters/SubscriptionIdPath"
responses:
"200":
description: Subscription
content:
application/json:
schema:
$ref: "#/components/schemas/EventSubscription"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
put:
tags: [v2-subscriptions]
operationId: updateEventSubscription
summary: Partial-update a subscription
parameters:
- $ref: "#/components/parameters/SubscriptionIdPath"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateEventSubscription"
responses:
"200":
description: Updated subscription
content:
application/json:
schema:
$ref: "#/components/schemas/EventSubscription"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
delete:
tags: [v2-subscriptions]
operationId: deleteEventSubscription
summary: Soft-delete a subscription
description: Flips `active = false`; the row and its deliveries are preserved.
parameters:
- $ref: "#/components/parameters/SubscriptionIdPath"
responses:
"200":
description: Soft-deleted subscription
content:
application/json:
schema:
$ref: "#/components/schemas/EventSubscription"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/access/decide:
post:
tags: [v2-access]
operationId: decideAccess
summary: Ask the engine for an ALLOW / DENY / REVIEW decision
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/DecideRequest"
responses:
"200":
description: Decision
content:
application/json:
schema:
$ref: "#/components/schemas/DecideResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
/api/v2/access/overrides:
get:
tags: [v2-overrides]
operationId: listOverridesForLog
summary: List overrides applied to one access log
parameters:
- name: accessLogId
in: query
required: true
schema:
type: string
format: uuid
responses:
"200":
description: Overrides
content:
application/json:
schema:
type: object
required: [accessLogId, overrides, count]
properties:
accessLogId:
type: string
format: uuid
overrides:
type: array
items:
$ref: "#/components/schemas/AccessOverride"
count:
type: integer
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
post:
tags: [v2-overrides]
operationId: createOverride
summary: Flip a prior decision with an override
description: |
Records the override AND writes a new `access_logs` row with the
flipped verdict. The original log is left untouched.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateOverride"
responses:
"201":
description: Override created
content:
application/json:
schema:
$ref: "#/components/schemas/CreateOverrideResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/Conflict"
/api/v2/access/rules:
get:
tags: [v2-rules]
operationId: listAccessRules
summary: List access rules
parameters:
- name: resourceKind
in: query
schema:
$ref: "#/components/schemas/ResourceKind"
- name: actorKind
in: query
schema:
$ref: "#/components/schemas/ActorKind"
- $ref: "#/components/parameters/LimitQuery"
responses:
"200":
description: Rules (tenant + platform-wide)
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/AccessRule"
pagination:
$ref: "#/components/schemas/LimitPagination"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
post:
tags: [v2-rules]
operationId: createAccessRule
summary: Create a tenant-scoped access rule
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAccessRule"
responses:
"201":
description: Rule created
content:
application/json:
schema:
$ref: "#/components/schemas/AccessRule"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
/api/v2/access/stage:
get:
tags: [v2-rules]
operationId: getAccessCoreStage
summary: Get current access-core stage and Stage 1 readiness
description: Dashboard session + `platform_admin` only, scoped to the user's own tenant.
responses:
"200":
description: Stage and readiness report
content:
application/json:
schema:
$ref: "#/components/schemas/AccessCoreStage"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
post:
tags: [v2-rules]
operationId: setAccessCoreStage
summary: Flip access-core stage (0 → 1 → 2)
description: |
Stage 1 → 2 is gated by `checkStage1Readiness`. Pass `{ force: true }`
to bypass; that path is recorded on the audit trail.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/SetAccessCoreStage"
responses:
"200":
description: Stage updated (or no-op)
content:
application/json:
schema:
$ref: "#/components/schemas/AccessCoreStageUpdated"
"400":
description: Readiness gate failed or bad body
content:
application/json:
schema:
$ref: "#/components/schemas/StageReadinessError"
"403":
$ref: "#/components/responses/Forbidden"
/api/v2/access/system-events:
get:
tags: [v2-system]
operationId: listSystemEvents
summary: System-events feed (platform staff only)
description: Dashboard session + `platform_admin`. Forward-keyset pagination via `since`.
parameters:
- name: since
in: query
schema:
type: string
format: date-time
description: createdAt > since. Server defaults to last 24h on omit.
- $ref: "#/components/parameters/LimitQuery"
- name: severity
in: query
schema:
$ref: "#/components/schemas/SystemEventSeverity"
- name: type
in: query
schema:
type: string
maxLength: 80
description: Exact match — for example `dispute.resolved`.
- name: tenantId
in: query
schema:
type: string
format: uuid
responses:
"200":
description: System events
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/SystemEvent"
pagination:
$ref: "#/components/schemas/SincePagination"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v2/access/logs:
get:
tags: [v2-access]
operationId: listAccessLogsLive
summary: Live access-logs tail (platform staff only)
description: |
Dashboard session + `platform_admin`. Powers the Live Access feed
UI. Bearer-authenticated SDKs use the by-actor sibling endpoint.
parameters:
- name: since
in: query
schema:
type: string
format: date-time
- $ref: "#/components/parameters/LimitQuery"
- name: tenantId
in: query
schema:
type: string
format: uuid
responses:
"200":
description: Access logs
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/AccessLog"
pagination:
$ref: "#/components/schemas/SincePagination"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v2/access/logs/{logId}/replay:
get:
tags: [v2-access]
operationId: replayAccessLog
summary: Decision replay — full snapshot for one log row
parameters:
- name: logId
in: path
required: true
schema:
type: string
format: uuid
responses:
"200":
description: Replay snapshot
content:
application/json:
schema:
$ref: "#/components/schemas/DecisionReplay"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/access/logs/by-actor/{actorId}:
get:
tags: [v2-access]
operationId: listAccessLogsByActor
summary: List recent decisions for one actor
description: Keyset pagination via `cursor` (createdAt < cursor).
parameters:
- name: actorId
in: path
required: true
schema:
type: string
format: uuid
- name: cursor
in: query
schema:
type: string
format: date-time
- $ref: "#/components/parameters/LimitQuery"
responses:
"200":
description: Access logs
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/AccessLogShort"
pagination:
$ref: "#/components/schemas/CursorPagination"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/api/v2/access/shadow-metrics:
get:
tags: [v2-shadow]
operationId: getShadowMetrics
summary: Shadow-mode telemetry snapshot (platform staff only)
responses:
"200":
description: Shadow metrics
content:
application/json:
schema:
$ref: "#/components/schemas/ShadowMetrics"
"403":
$ref: "#/components/responses/Forbidden"
/api/v2/access/shadow-disagreements:
get:
tags: [v2-shadow]
operationId: listShadowDisagreements
summary: List shadow.disagreement events (platform staff only)
parameters:
- name: cursor
in: query
schema:
type: string
format: date-time
- name: since
in: query
schema:
type: string
format: date-time
- $ref: "#/components/parameters/LimitQuery"
- name: tenantId
in: query
schema:
type: string
format: uuid
- name: surface
in: query
schema:
type: string
maxLength: 80
responses:
"200":
description: Disagreement rows
content:
application/json:
schema:
type: object
required: [data, pagination]
properties:
data:
type: array
items:
$ref: "#/components/schemas/ShadowDisagreement"
pagination:
$ref: "#/components/schemas/CursorPagination"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v2/access/shadow-disagreements/{eventId}:
get:
tags: [v2-shadow]
operationId: getShadowDisagreement