-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
7054 lines (7054 loc) · 222 KB
/
Copy pathopenapi.json
File metadata and controls
7054 lines (7054 loc) · 222 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": "pareto",
"description": "Semantic search and debugging over LeRobot robot-episode datasets: register and index datasets, search episodes by natural language with frame-level evidence, inspect and annotate episodes, run episode-level analytics, export selections as new LeRobot datasets, and follow every operation live on the global event stream.",
"license": {
"name": "Apache-2.0",
"identifier": "Apache-2.0"
},
"version": "0.0.0"
},
"paths": {
"/api/access": {
"get": {
"tags": [
"access"
],
"summary": "Effective capabilities of the request's principal.",
"operationId": "get_access",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Optional bearer credential",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "X-Pareto-Organization-Id",
"in": "header",
"description": "Optional organization selector for the legacy CLI operator",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Effective request capabilities",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessResponse"
}
}
}
},
"401": {
"description": "Invalid supplied credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/analytics/consistency": {
"get": {
"tags": [
"analytics"
],
"summary": "Rate how consistent a dataset's episodes are (visual pooled-embedding spread\nplus per-episode action-metric spread) and surface the least-consistent\nepisodes with preview evidence.",
"description": "The trajectory axis reads each episode's per-frame `action` (or\n`observation.state`) vectors from the dataset's data parquet; a dataset with\nneither feature reports `trajectory_available = false` and leans on the\nvisual axis alone.",
"operationId": "dataset_consistency_route",
"parameters": [
{
"name": "dataset",
"in": "query",
"description": "Dataset id from the catalog.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "outlier_limit",
"in": "query",
"description": "Least-consistent episodes returned, 1..=200 (default 20).",
"required": false,
"schema": {
"type": [
"integer",
"null"
],
"minimum": 0
}
},
{
"name": "iqr_k",
"in": "query",
"description": "IQR multiplier for the trajectory-metric fences (default 1.5); must be a\nfinite positive value.",
"required": false,
"schema": {
"type": [
"number",
"null"
],
"format": "float"
}
},
{
"name": "task_exact",
"in": "query",
"description": "Recompute consistency within episodes carrying this exact task.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Consistency report with ranked least-consistent episodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConsistencyReportDto"
}
}
}
},
"400": {
"description": "outlier_limit out of range, or a non-positive iqr_k",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset not indexed yet",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/analytics/contact-sheet": {
"get": {
"tags": [
"analytics"
],
"summary": "The endpoint contact sheet: every indexed episode's paired FIRST and LAST\nsampled frame, per camera, ranked by how unusual the episode's start/end\nframe looks for the dataset.",
"description": "Frame ids come from a cheap frames-table scan (no vectors), so this is an\nindex-only read that works on a stateless pod. The endpoint-deviation rank\nreuses the precomputed `endpoint_deviations` from the consistency report\nsidecar (recomputed here only when that sidecar is absent or stale).",
"operationId": "endpoint_contact_sheet_route",
"parameters": [
{
"name": "dataset",
"in": "query",
"description": "Dataset id from the catalog.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "task_exact",
"in": "query",
"description": "Recompute endpoint deviations within episodes carrying this exact task.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Endpoint contact sheet ranked by endpoint deviation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactSheetResponse"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset not indexed yet",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/analytics/coverage": {
"post": {
"tags": [
"analytics"
],
"summary": "Measure how well natural-language probes are covered by the dataset.",
"description": "POST because of the probe list. This endpoint EMBEDS every probe with the\nserver's embedding provider, so it costs provider calls (1 to 64 probes\nper call). An episode counts as covered when its best frame score reaches\n`relative_threshold * best episode score for that probe` (default 0.6);\nthe threshold is relative because absolute cosine magnitudes do not\ntransfer across models or probe phrasings.",
"operationId": "probe_coverage_route",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoverageRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "One coverage report per probe, in request order",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoverageResponse"
}
}
}
},
"400": {
"description": "Empty/blank/too-many probes, or relative_threshold outside (0, 1]",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset not indexed, or provider model differs from the index (model_mismatch)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"502": {
"description": "Embedding provider failure",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/analytics/dupes": {
"get": {
"tags": [
"analytics"
],
"summary": "Find groups of near-duplicate episodes (transitive pairwise similarity).",
"operationId": "duplicate_episodes_route",
"parameters": [
{
"name": "dataset",
"in": "query",
"description": "Dataset id from the catalog.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "threshold",
"in": "query",
"description": "Pairwise cosine threshold in `(0, 1]` (default 0.97).",
"required": false,
"schema": {
"type": [
"number",
"null"
],
"format": "float"
}
},
{
"name": "task_exact",
"in": "query",
"description": "Restrict the pairwise scan to episodes carrying this exact task.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Duplicate groups, largest first",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DuplicateGroupsResponse"
}
}
}
},
"400": {
"description": "Threshold outside (0, 1]",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset not indexed yet",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"413": {
"description": "Too many episodes for the O(n^2) pairwise scan",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/analytics/similar": {
"get": {
"tags": [
"analytics"
],
"summary": "Find the episodes most similar to one episode (pooled-vector cosine).",
"description": "Searching the episode's own dataset excludes the episode itself; with\n`against`, all target-dataset episodes are eligible.",
"operationId": "similar_episodes_route",
"parameters": [
{
"name": "dataset",
"in": "query",
"description": "Dataset id from the catalog.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "episode_index",
"in": "query",
"description": "The query episode.",
"required": true,
"schema": {
"type": "integer",
"format": "int32",
"minimum": 0
}
},
{
"name": "camera",
"in": "query",
"description": "Compare within one camera's pooled vectors (original `LeRobot` key);\nomitted compares the all-cameras pooled vectors.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "against",
"in": "query",
"description": "Search another dataset's episodes instead of `dataset`'s own (must be\nbuilt with the same embedding model).",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum neighbors returned, 1..=200 (default 10).",
"required": false,
"schema": {
"type": [
"integer",
"null"
],
"minimum": 0
}
},
{
"name": "task_exact",
"in": "query",
"description": "Restrict eligible neighbors to episodes carrying this exact task.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Neighbors sorted by descending score",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SimilarEpisodesResponse"
}
}
}
},
"400": {
"description": "Invalid limit or unknown camera for the episode",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id or episode index",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset not indexed, or embedding models differ (model_mismatch)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/annotations": {
"get": {
"tags": [
"annotations"
],
"summary": "List live annotations of a dataset, optionally filtered by episode and/or\nkey prefix.",
"operationId": "list_annotations",
"parameters": [
{
"name": "dataset",
"in": "query",
"description": "Dataset id from the catalog.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "episode_index",
"in": "query",
"description": "Restrict to one episode.",
"required": false,
"schema": {
"type": [
"integer",
"null"
],
"format": "int32",
"minimum": 0
}
},
{
"name": "key_prefix",
"in": "query",
"description": "Plain string prefix filter on the key, e.g. `quality/` selects one\nnamespace.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Live annotations in chronological order",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationsResponse"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset has no index directory yet",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
},
"post": {
"tags": [
"annotations"
],
"summary": "Add one annotation to an episode.",
"description": "The actor is taken from the `X-Pareto-Actor` header (default `api`).\nValues must be scalar JSON (string, number, or bool). Emits an\n`annotation_added` event. Mutating: in gated mode this requires the admin\nbearer token.",
"operationId": "create_annotation",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Bearer <legacy CLI operator credential>; required for curation in gated mode",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "X-Pareto-Actor",
"in": "header",
"description": "Acting agent/user recorded on the annotation and its event (default \"api\")",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAnnotationRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Annotation added",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationDto"
}
}
}
},
"400": {
"description": "Malformed key (must be namespace/key) or non-scalar value",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"401": {
"description": "Legacy CLI operator credential required or invalid (gated mode)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset has no index directory yet (the store lives in the index directory; a rebuild in progress is fine)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/annotations/{dataset_id}/{annotation_id}": {
"delete": {
"tags": [
"annotations"
],
"summary": "Remove one annotation by id.",
"description": "Removing an unknown (or already removed) id is a SUCCESS with\n`removed: false` — an outcome to branch on, not an error. Emits an\n`annotation_removed` event only when something was actually removed.\nMutating: in gated mode this requires the admin bearer token.",
"operationId": "remove_annotation",
"parameters": [
{
"name": "dataset_id",
"in": "path",
"description": "Dataset id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "annotation_id",
"in": "path",
"description": "Annotation id from POST/GET /api/annotations",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "Bearer <legacy CLI operator credential>; required for curation in gated mode",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "X-Pareto-Actor",
"in": "header",
"description": "Acting agent/user recorded on the removal event (default \"api\")",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "Removal outcome (removed: false when the id was not found)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RemoveAnnotationResponse"
}
}
}
},
"401": {
"description": "Legacy CLI operator credential required or invalid (gated mode)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset has no index directory yet",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/backfills": {
"post": {
"tags": [
"backfills"
],
"summary": "Queue one backfill against the dataset's currently active complete index.",
"description": "The request names one artifact. The server resolves request-level defaults\nand snapshots the active build before returning. Execution-host settings\nsuch as the RRD exporter command remain owned by the worker.",
"operationId": "create_backfill",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Bearer <legacy CLI operator credential>; required for dataset management in gated mode",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "X-Pareto-Actor",
"in": "header",
"description": "Acting agent/user recorded on the durable job (default \"api\")",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBackfillRequest"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "Backfill job queued",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBackfillResponse"
}
}
}
},
"400": {
"description": "Invalid artifact settings",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"401": {
"description": "Legacy CLI operator credential required or invalid (gated mode)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"404": {
"description": "Unknown dataset id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"409": {
"description": "Dataset has no complete active index, or a live backfill already covers overlapping episodes",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
}
}
}
},
"/api/datasets": {
"get": {
"tags": [
"datasets"
],
"summary": "List registered datasets with their index status.",
"operationId": "list_datasets",
"parameters": [
{
"name": "tag",
"in": "query",
"description": "Restrict the listing to datasets carrying this exact normalized tag.",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"responses": {
"200": {
"description": "All registered datasets",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatasetsResponse"
}
}
}
}
}
},
"post": {
"tags": [
"datasets"
],
"summary": "Register a dataset and start indexing it in the background.",
"description": "Re-registering the same dataset path reuses its id; re-indexing an\nalready-indexed dataset requires `overwrite=true`. Progress can be\nobserved via `GET /api/datasets/{id}/progress`. Mutating: in gated mode\nthis requires the admin bearer token.",
"operationId": "register_dataset",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Bearer <legacy CLI operator credential>; required for dataset management in gated mode",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "X-Pareto-Actor",
"in": "header",
"description": "Acting agent/user recorded on the registration/indexing events (default \"api\")",
"required": false,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterDatasetRequest"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "Dataset registered; indexing started",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterDatasetResponse"
}
}
}
},
"400": {
"description": "Not a readable LeRobot v3 dataset, or invalid options",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}
}
}
},
"401": {
"description": "Legacy CLI operator credential required or invalid (gated mode)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorBody"
}