-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathanswer-engine.yaml
More file actions
1697 lines (1697 loc) · 63.4 KB
/
Copy pathanswer-engine.yaml
File metadata and controls
1697 lines (1697 loc) · 63.4 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: Answer Engine OSS API
version: 1.1.2
summary: Local-first memory, retrieval, and grounded answers for AI agents.
license:
name: Apache-2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://127.0.0.1:5050
description: Default local server
security:
- apiKey: []
- bearerKey: []
tags:
- name: System
- name: Content
- name: Memory
- name: Organization
- name: Workflows
- name: Operations
paths:
/health:
get:
tags: [System]
security: []
summary: Check local API health
responses:
'200':
description: API is healthy.
content:
application/json:
schema:
type: object
required: [status, uptime, channel]
properties:
status: { type: string, const: healthy }
uptime: { type: number }
channel: { type: string, enum: [stable, staging] }
/api/v1/content/import/preview:
post:
tags: [Content]
summary: Validate an import without writing it
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ImportRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/content/import:
post:
tags: [Content]
summary: Import or update local content
description: Reusing a source identifier updates the matching item.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ImportRequest' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/first-imports:
post:
tags: [Workflows]
summary: Register a metadata-only supported agent-history discovery
description: Registers paths, file statistics, fingerprints, privacy posture, and exclusions. This endpoint never imports content.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FirstImportDiscovery' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
/api/v1/first-imports/latest:
get:
tags: [Workflows]
summary: Read the latest first-import session and reconciliation inventory
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/first-imports/{sessionId}:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
get:
tags: [Workflows]
summary: Read a first-import session and its source-backed item manifest
responses:
'200': { $ref: '#/components/responses/Success' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/first-imports/{sessionId}/approve:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
post:
tags: [Workflows]
summary: Explicitly approve a subset of discovered history sources
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required: [sourceIds]
properties:
sourceIds:
type: array
minItems: 1
uniqueItems: true
items: { $ref: '#/components/schemas/FirstImportSourceId' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/first-imports/{sessionId}/start:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
post:
tags: [Workflows]
summary: Start an explicitly approved first import
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/first-imports/{sessionId}/events:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
post:
tags: [Workflows]
summary: Record a safe per-history import outcome
description: Imported outcomes are accepted only when all referenced chat rows have non-empty summaries and a matching raw-archive manifest path.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FirstImportEvent' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/first-imports/{sessionId}/cancel:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
post:
tags: [Workflows]
summary: Request safe cancellation at the next resumable boundary
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/first-imports/{sessionId}/retry:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
post:
tags: [Workflows]
summary: Reset failed or interrupted selected items for retry
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/first-imports/{sessionId}/complete:
parameters:
- { $ref: '#/components/parameters/FirstImportSessionId' }
post:
tags: [Workflows]
summary: Finalize only after every discovered item has an outcome
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources:
get:
tags: [Workflows]
summary: List explicitly selected local folder sources
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Workflows]
summary: Register a bounded local folder preview before full-file reads
description: Never imports file content. Every path, exclusion, warning, limit, and fixed no-follow symlink policy is recorded for approval.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FolderSourceDiscovery' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
/api/v1/folder-sources/latest:
get:
tags: [Workflows]
summary: Read the latest selected folder and inventory run
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/folder-sources/{sourceId}:
parameters:
- { in: path, name: sourceId, required: true, schema: { type: string, format: uuid } }
get:
tags: [Workflows]
summary: Inspect a folder source, all runs, and reconciled items
responses:
'200': { $ref: '#/components/responses/Success' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/folder-sources/{sourceId}/refresh:
parameters:
- { in: path, name: sourceId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Register an added/changed/unchanged/missing/excluded refresh preview
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FolderRefreshDiscovery' }
responses:
'201': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources/{sourceId}/remove:
parameters:
- { in: path, name: sourceId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Prepare source removal with explicit keep or delete retention
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FolderRemoval' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources/{sourceId}/remove/complete:
parameters:
- { in: path, name: sourceId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Reconcile content/archive retention and complete audited removal
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FolderRemovalComplete' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources/runs/{runId}/approve:
parameters:
- { in: path, name: runId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Approve one exact folder inventory before any full file read
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources/runs/{runId}/start:
parameters:
- { in: path, name: runId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Start an approved folder run
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources/runs/{runId}/events:
parameters:
- { in: path, name: runId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Reconcile one preview row with integrity-checked lineage
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/FolderIngestionEvent' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/folder-sources/runs/{runId}/cancel:
parameters:
- { in: path, name: runId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Request cancellation at the next file boundary
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/folder-sources/runs/{runId}/retry:
parameters:
- { in: path, name: runId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Reset failed or interrupted candidate rows
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/folder-sources/runs/{runId}/complete:
parameters:
- { in: path, name: runId, required: true, schema: { type: string, format: uuid } }
post:
tags: [Workflows]
summary: Complete only after every preview row has an explained outcome
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/content:
get:
tags: [Content]
summary: List, filter, sort, and paginate content
description: Returns lightweight rows with source, status, and assigned tags. Stable cursors follow the selected sort field and direction.
parameters:
- { in: query, name: limit, schema: { type: integer, minimum: 1, maximum: 100, default: 25 } }
- { in: query, name: cursor, schema: { type: string } }
- { in: query, name: libraryId, schema: { type: string } }
- { in: query, name: librarySlug, schema: { type: string } }
- { in: query, name: search, schema: { type: string, maxLength: 500 } }
- { in: query, name: contentType, schema: { $ref: '#/components/schemas/ContentType' } }
- { in: query, name: contentTypes, description: Comma-separated content types., schema: { type: string } }
- { in: query, name: source, schema: { type: string, maxLength: 120 } }
- { in: query, name: sources, description: Comma-separated neutral source identifiers such as claude-code, codex, and cowork., schema: { type: string } }
- { in: query, name: tag, schema: { type: string, maxLength: 120 } }
- { in: query, name: tags, description: Comma-separated tag slugs., schema: { type: string } }
- { in: query, name: status, schema: { enum: [active, archived] } }
- { in: query, name: dateFrom, schema: { type: string, format: date-time } }
- { in: query, name: dateTo, schema: { type: string, format: date-time } }
- { in: query, name: sortBy, schema: { enum: [createdAt, title, contentType, source, status], default: createdAt } }
- { in: query, name: sortDirection, schema: { enum: [asc, desc], default: desc } }
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/content/raw-archive-references:
get:
tags: [Content]
summary: List raw archive manifests still referenced by content
description: Returns tenant-scoped manifest paths, including references held by soft-deleted content, so local retention can preserve recoverable sources.
responses:
'200':
description: Referenced manifest paths.
content:
application/json:
schema:
allOf:
- { $ref: '#/components/schemas/SuccessEnvelope' }
- type: object
properties:
data: { $ref: '#/components/schemas/RawArchiveReferences' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/content/{id}:
parameters:
- { $ref: '#/components/parameters/ContentId' }
get:
tags: [Content]
summary: Get a content item
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
delete:
tags: [Content]
summary: Soft-delete a content item
responses:
'204': { description: Content deleted. }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/content/{id}/lineage:
parameters:
- { $ref: '#/components/parameters/ContentId' }
get:
tags: [Content]
summary: Inspect source provenance and artifact history
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/agent/schema:
get:
tags: [Memory]
summary: Discover available content and capabilities
parameters:
- { in: query, name: libraryId, schema: { type: string } }
- { in: query, name: librarySlug, schema: { type: string } }
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/agent/query:
post:
tags: [Memory]
summary: Search local memory
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/QueryRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/agent/retrieve:
post:
tags: [Memory]
summary: Retrieve known items or a conversation
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/RetrieveRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/agent/summarize:
post:
tags: [Memory]
summary: Summarize local evidence
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/SummarizeRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/agent/ask:
post:
tags: [Memory]
summary: Answer from local evidence with citations
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/AskRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/organization-plans:
get:
tags: [Organization]
summary: List recent organization proposals
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
post:
tags: [Organization]
summary: Create a non-mutating organization proposal
description: Samples bounded titles, summaries, source metadata, and existing taxonomy. Full content and raw archives are never sent to the proposal model.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/OrganizationProposalRequest' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/organization-plans/{planId}:
parameters:
- { $ref: '#/components/parameters/PlanId' }
get:
tags: [Organization]
summary: Inspect an organization proposal and its decisions
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/organization-plans/{planId}/apply:
parameters:
- { $ref: '#/components/parameters/PlanId' }
post:
tags: [Organization]
summary: Apply individually reviewed organization suggestions
description: Requires an accept or reject decision for every suggestion and refuses a stale source snapshot.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/OrganizationApplyRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/organization-plans/{planId}/undo:
parameters:
- { $ref: '#/components/parameters/PlanId' }
post:
tags: [Organization]
summary: Undo changes introduced by an applied organization plan
description: Restores taxonomy and memberships without deleting imported content.
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/recall-tutorials/capabilities:
get:
tags: [Onboarding]
summary: Preflight supported same-client and cross-client recall paths
parameters:
- in: query
name: environment
schema: { enum: [native, wsl], default: native }
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
/api/v1/recall-tutorials:
get:
tags: [Onboarding]
summary: List recent first-memory proof challenges
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
post:
tags: [Onboarding]
summary: Create a harmless remember and fresh-chat recall challenge
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/RecallTutorialCreateRequest' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
'409': { $ref: '#/components/responses/Conflict' }
/api/v1/recall-tutorials/{tutorialId}:
parameters:
- { $ref: '#/components/parameters/TutorialId' }
get:
tags: [Onboarding]
summary: Inspect tutorial progress and answer-free fresh-chat instructions
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/recall-tutorials/{tutorialId}/check:
parameters:
- { $ref: '#/components/parameters/TutorialId' }
post:
tags: [Onboarding]
summary: Verify ordered remember, recall citation, and lineage tool evidence
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/RecallTutorialCheckRequest' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
'401': { $ref: '#/components/responses/Unauthorized' }
'404': { $ref: '#/components/responses/NotFound' }
/api/v1/tags:
get:
tags: [Organization]
summary: List active tags
responses:
'200': { $ref: '#/components/responses/Success' }
'401': { $ref: '#/components/responses/Unauthorized' }
post:
tags: [Organization]
summary: Create a tag
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/TagInput' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
/api/v1/tags/{tagId}:
parameters:
- { $ref: '#/components/parameters/TagId' }
patch:
tags: [Organization]
summary: Update a tag
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/TagUpdate' }
responses:
'200': { $ref: '#/components/responses/Success' }
'404': { $ref: '#/components/responses/NotFound' }
delete:
tags: [Organization]
summary: Archive a tag
responses:
'204': { description: Tag archived. }
/api/v1/tags/{tagId}/content:
parameters:
- { $ref: '#/components/parameters/TagId' }
post:
tags: [Organization]
summary: Assign a tag to content in bulk
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/TagAssignment' }
responses:
'200': { $ref: '#/components/responses/Success' }
delete:
tags: [Organization]
summary: Remove a tag from content in bulk
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/TagAssignment' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries:
get:
tags: [Organization]
summary: List libraries with effective member counts
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Organization]
summary: Create a saved content library
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/LibraryInput' }
responses:
'201': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
/api/v1/libraries/{libraryId}:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
get:
tags: [Organization]
summary: Get a library
responses:
'200': { $ref: '#/components/responses/Success' }
'404': { $ref: '#/components/responses/NotFound' }
patch:
tags: [Organization]
summary: Update a user-defined library
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/LibraryUpdate' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { description: A system-library invariant was violated. }
delete:
tags: [Organization]
summary: Archive a user-defined library
responses:
'204': { description: Library archived. }
'409': { description: The system library cannot be archived. }
/api/v1/libraries/{libraryId}/members:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
get:
tags: [Organization]
summary: Page through effective library membership
description: Membership is `(saved filter OR manual include) AND NOT manual exclude`.
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/preview:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
post:
tags: [Organization]
summary: Preview a strict saved filter without changing the library
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/LibraryPreview' }
responses:
'200': { $ref: '#/components/responses/Success' }
'400': { $ref: '#/components/responses/ValidationError' }
/api/v1/libraries/{libraryId}/includes/{contentId}:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/MemberContentId' }
put:
tags: [Organization]
summary: Add a manual library include
responses:
'200': { $ref: '#/components/responses/Success' }
delete:
tags: [Organization]
summary: Remove a manual library include
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/excludes/{contentId}:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/MemberContentId' }
put:
tags: [Organization]
summary: Add a manual library exclusion
responses:
'200': { $ref: '#/components/responses/Success' }
delete:
tags: [Organization]
summary: Remove a manual library exclusion
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/recipes:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
get:
tags: [Workflows]
summary: List library recipes
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Workflows]
summary: Create a versioned library recipe
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/RecipeInput' }
responses:
'201': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/recipes/{recipeId}:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/RecipeId' }
patch:
tags: [Workflows]
summary: Save a new immutable recipe version
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/RecipeUpdate' }
responses:
'200': { $ref: '#/components/responses/Success' }
delete:
tags: [Workflows]
summary: Deactivate a recipe
responses:
'204': { description: Recipe deactivated. }
/api/v1/libraries/{libraryId}/recipes/{recipeId}/preview:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/RecipeId' }
post:
tags: [Workflows]
summary: Preview recipe outputs over effective members
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/RecipePreview' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/recipes/{recipeId}/runs:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/RecipeId' }
get:
tags: [Workflows]
summary: List durable recipe runs
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Workflows]
summary: Queue a recipe run
responses:
'202': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/runs/{runId}:
get:
tags: [Workflows]
summary: Get recipe-run progress and per-item results
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/RunId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/runs/{runId}/cancel:
post:
tags: [Workflows]
summary: Safely cancel queued or running recipe work
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/RunId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/runs/{runId}/retry:
post:
tags: [Workflows]
summary: Retry failed, partial, or canceled recipe work
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/RunId' }
responses:
'202': { $ref: '#/components/responses/Success' }
/api/v1/content/{id}/artifacts:
get:
tags: [Workflows]
summary: List artifact versions and lineage for content
parameters:
- { $ref: '#/components/parameters/ContentId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/artifacts/{artifactId}:
get:
tags: [Workflows]
summary: Get an artifact version
parameters:
- { $ref: '#/components/parameters/ArtifactId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/reports:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
get:
tags: [Workflows]
summary: List library report definitions
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Workflows]
summary: Create a library report definition
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ReportInput' }
responses:
'201': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/reports/{reportId}/generate:
post:
tags: [Workflows]
summary: Queue a grounded report generation
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/ReportId' }
responses:
'202': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/reports/{reportId}:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/ReportId' }
patch:
tags: [Workflows]
summary: Update a report definition
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/ReportUpdate' }
responses:
'200': { $ref: '#/components/responses/Success' }
delete:
tags: [Workflows]
summary: Delete a report definition and generated history
responses:
'204': { description: Report deleted. }
/api/v1/libraries/{libraryId}/reports/{reportId}/generated:
get:
tags: [Workflows]
summary: List generated report history
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/ReportId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/reports/{reportId}/generated/{generatedId}/cancel:
post:
tags: [Workflows]
summary: Safely cancel queued or running report work
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/ReportId' }
- { $ref: '#/components/parameters/GeneratedId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/reports/{reportId}/generated/{generatedId}/retry:
post:
tags: [Workflows]
summary: Retry failed or canceled report work
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/ReportId' }
- { $ref: '#/components/parameters/GeneratedId' }
responses:
'202': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/dashboards:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
get:
tags: [Workflows]
summary: List library dashboards
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Workflows]
summary: Create a library dashboard
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/DashboardInput' }
responses:
'201': { $ref: '#/components/responses/Success' }
/api/v1/libraries/{libraryId}/dashboards/{dashboardId}:
parameters:
- { $ref: '#/components/parameters/LibraryId' }
- { $ref: '#/components/parameters/DashboardId' }
patch:
tags: [Workflows]
summary: Update a library dashboard
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/DashboardUpdate' }
responses:
'200': { $ref: '#/components/responses/Success' }
delete:
tags: [Workflows]
summary: Delete a library dashboard
responses:
'204': { description: Dashboard deleted. }
/api/v1/batch-jobs:
get:
tags: [Operations]
summary: List local batch jobs
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Operations]
summary: Queue a provider-neutral local batch job
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/BatchJobInput' }
responses:
'202': { $ref: '#/components/responses/Success' }
/api/v1/batch-jobs/{jobId}:
get:
tags: [Operations]
summary: Get batch progress and per-item results
parameters:
- { $ref: '#/components/parameters/JobId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/batch-jobs/{jobId}/cancel:
post:
tags: [Operations]
summary: Safely cancel queued or running batch work
parameters:
- { $ref: '#/components/parameters/JobId' }
responses:
'200': { $ref: '#/components/responses/Success' }
/api/v1/batch-jobs/{jobId}/retry:
post:
tags: [Operations]
summary: Retry unfinished failed, partial, or canceled batch work
description: Creates a new job that excludes records already completed successfully by the source job.
parameters:
- { $ref: '#/components/parameters/JobId' }
responses:
'202': { $ref: '#/components/responses/Success' }
/api/v1/access-tokens:
get:
tags: [Operations]
summary: List access-token metadata without secrets
description: Marks the current and protected installer credentials so clients can omit unsafe mutation controls.
responses:
'200': { $ref: '#/components/responses/Success' }
post:
tags: [Operations]
summary: Mint a tenant- or library-scoped access token
description: The raw `ae_live_` token is returned only by this operation.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/AccessTokenInput' }
responses:
'201': { $ref: '#/components/responses/Success' }
/api/v1/access-tokens/{tokenId}:
patch:
tags: [Operations]
summary: Update access-token metadata or expiry
description: The protected local installer credential and the credential authenticating the request cannot be changed.
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/AccessTokenUpdate' }
parameters:
- { $ref: '#/components/parameters/TokenId' }
responses:
'200': { $ref: '#/components/responses/Success' }
'409': { $ref: '#/components/responses/Conflict' }
delete:
tags: [Operations]
summary: Revoke an access token
description: The protected local installer credential and the credential authenticating the request cannot be revoked.
parameters:
- { $ref: '#/components/parameters/TokenId' }