-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathvippet.json
More file actions
4532 lines (4532 loc) · 212 KB
/
vippet.json
File metadata and controls
4532 lines (4532 loc) · 212 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": "Visual Pipeline and Platform Evaluation Tool API",
"description": "API for Visual Pipeline and Platform Evaluation Tool",
"version": "1.0.0"
},
"servers": [
{
"url": "/api/v1"
}
],
"paths": {
"/health": {
"get": {
"tags": [
"health"
],
"summary": "Health Check",
"description": "**Health check endpoint for Docker healthcheck.**\n\n## Operation\nReturns `healthy=true` as long as the application is not in shutdown state.\nThis allows the container to remain healthy during initialization.\n\n## Parameters\n- **Path/Query parameters:** None\n\n## Response Format\n\n### 200 OK\n**HealthResponse** with:\n- `healthy` - `true` if application is healthy (not shutdown)\n\n## Conditions\n\n### \u2705 Success\n- Application is running (not in shutdown state)\n\n## Example Response\n\n```json\n{\n \"healthy\": true\n}\n```",
"operationId": "get_health",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HealthResponse"
}
}
}
}
}
}
},
"/status": {
"get": {
"tags": [
"health"
],
"summary": "Application Status",
"description": "**Detailed status endpoint for monitoring initialization progress.**\n\n## Operation\nReturns the current application status, including initialization state,\nprogress messages, and readiness for serving API requests.\n\n## Parameters\n- **Path/Query parameters:** None\n\n## Response Format\n\n### 200 OK\n**StatusResponse** with:\n- `status` - Current application status (`starting`, `initializing`, `ready`, `shutdown`)\n- `message` - Optional message describing current activity\n- `ready` - `true` if application is ready to serve API requests\n\n## Conditions\n\n### \u2705 Success\n- Application is running and status can be retrieved\n\n## Examples\n\n### Response (During Initialization)\n```json\n{\n \"status\": \"initializing\",\n \"message\": \"Loading video metadata...\",\n \"ready\": false\n}\n```\n\n### Response (When Ready)\n```json\n{\n \"status\": \"ready\",\n \"message\": null,\n \"ready\": true\n}\n```",
"operationId": "get_status",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StatusResponse"
}
}
}
}
}
}
},
"/convert/to-graph": {
"post": {
"tags": [
"convert"
],
"summary": "Convert pipeline description to pipeline graphs (both views)",
"description": "**Convert GStreamer-like pipeline description into structured pipeline graphs.**\n\n## Operation\nParses the textual pipeline description, validates it, and builds both an advanced view\n(with all technical elements) and a simple view (with only meaningful elements).\n\n1. Parse pipeline description string\n2. Validate syntax and resolve references (models, videos)\n3. Build advanced graph with all elements including technical plumbing\n4. Generate simplified view with only visible elements (sources, inference, sinks)\n5. Return both graph representations\n\n## Request Body\n**`PipelineDescription`** with:\n- `pipeline_description` *(required)* - GStreamer-like pipeline string\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | `PipelineGraphResponse` with both `pipeline_graph` and `pipeline_graph_simple` |\n| 400 | `MessageResponse` - Invalid or unparsable pipeline description |\n| 500 | `MessageResponse` - Unexpected internal error |\n\n## Conditions\n\n### \u2705 Success\n- Pipeline description is syntactically correct\n- All referenced models and input videos can be resolved\n- Description maps to non-empty, acyclic graph with at least one start node\n- Simple view can be generated from advanced view\n\n### \u274c Failure\n- Invalid or unparsable pipeline description (syntax error, unsupported token) \u2192 400\n- Missing required data, unknown model/video \u2192 400\n- Unexpected internal error \u2192 500\n\n## Examples\n\n### Request\n```json\n{\n \"pipeline_description\": \"videotestsrc ! videoconvert ! autovideosink\"\n}\n```\n\n### Success Response (200)\n```json\n{\n \"pipeline_graph\": {\n \"nodes\": [\n {\"id\": \"0\", \"type\": \"videotestsrc\", \"data\": {}},\n {\"id\": \"1\", \"type\": \"videoconvert\", \"data\": {}},\n {\"id\": \"2\", \"type\": \"autovideosink\", \"data\": {}}\n ],\n \"edges\": [\n {\"id\": \"0\", \"source\": \"0\", \"target\": \"1\"},\n {\"id\": \"1\", \"source\": \"1\", \"target\": \"2\"}\n ]\n },\n \"pipeline_graph_simple\": {\n \"nodes\": [\n {\"id\": \"0\", \"type\": \"videotestsrc\", \"data\": {}},\n {\"id\": \"2\", \"type\": \"autovideosink\", \"data\": {}}\n ],\n \"edges\": [\n {\"id\": \"0\", \"source\": \"0\", \"target\": \"2\"}\n ]\n }\n}\n```\n\n### Error Response (400)\n```json\n{\n \"message\": \"Invalid pipeline description: Unrecognized token in pipeline description: '??'\"\n}\n```",
"operationId": "to_graph",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PipelineDescription"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Conversion successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PipelineGraphResponse"
}
}
}
},
"400": {
"description": "Invalid pipeline description",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/convert/to-description": {
"post": {
"tags": [
"convert"
],
"summary": "Convert pipeline graph to pipeline description",
"description": "**Convert structured pipeline graph into GStreamer-like pipeline description string.**\n\n## Operation\nValidates the input graph (advanced view) and serializes its nodes and edges\nback into a single pipeline description line.\n\n1. Validate input graph structure\n2. Check for start nodes and acyclic structure\n3. Map model and video display names back to real paths\n4. Serialize nodes and edges into pipeline description string\n\n> **Note:** The input should be an advanced view graph containing all technical elements.\n\n## Request Body\n**`PipelineGraph`** with:\n- `nodes` *(required)* - Array of pipeline nodes (advanced view expected)\n- `edges` *(required)* - Array of edges connecting the nodes\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | `PipelineDescription` with textual pipeline description |\n| 400 | `MessageResponse` - Invalid graph structure |\n| 500 | `MessageResponse` - Unexpected internal error |\n\n## Conditions\n\n### \u2705 Success\n- Graph is non-empty and contains at least one start node\n- Graph is a valid directed acyclic graph (no unresolved references, no circular graph)\n- All model and input video display names can be mapped back to real paths\n\n### \u274c Failure\n- Invalid graph structure (no start nodes, circular graph, missing nodes) \u2192 400\n- Unknown model/video or empty graph \u2192 400\n- Unexpected internal error \u2192 500\n\n## Examples\n\n### Request\n```json\n{\n \"nodes\": [\n {\"id\": \"0\", \"type\": \"videotestsrc\", \"data\": {}},\n {\"id\": \"1\", \"type\": \"videoconvert\", \"data\": {}},\n {\"id\": \"2\", \"type\": \"autovideosink\", \"data\": {}}\n ],\n \"edges\": [\n {\"id\": \"0\", \"source\": \"0\", \"target\": \"1\"},\n {\"id\": \"1\", \"source\": \"1\", \"target\": \"2\"}\n ]\n}\n```\n\n### Success Response (200)\n```json\n{\n \"pipeline_description\": \"videotestsrc ! videoconvert ! autovideosink\"\n}\n```\n\n### Error Response (400)\n```json\n{\n \"message\": \"Invalid graph: circular graph detected or no start nodes found\"\n}\n```",
"operationId": "to_description",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PipelineGraph"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Conversion successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PipelineDescription"
}
}
}
},
"400": {
"description": "Invalid graph",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/devices": {
"get": {
"tags": [
"devices"
],
"summary": "List available inference devices",
"description": "**Return all devices discovered by the OpenVINO runtime.**\n\n## Operation\nDiscovers CPU, GPU, and NPU devices available in the system and exposes\nthem in a simplified, API-friendly format.\n\n1. Initialize OpenVINO Core\n2. Discover all available inference devices\n3. Extract device properties and metadata\n4. Return formatted device list\n\n## Parameters\n- **Path/Query parameters:** None\n\n## Response Format\n\n### 200 OK\nJSON array of Device objects.\n\n**Each device includes:**\n- `device_name` - Short identifier used by runtime (e.g., `\"CPU\"`, `\"GPU\"`, `\"GPU.0\"`, `\"NPU\"`)\n- `full_device_name` - Human-readable name (e.g., CPU/GPU marketing name)\n- `device_type` - `INTEGRATED` or `DISCRETE`\n- `device_family` - `CPU`, `GPU`, or `NPU`\n- `gpu_id` - Integer index for GPU devices (when applicable), otherwise `null`\n\n## Conditions\n\n### \u2705 Success\n- OpenVINO Core initializes correctly\n- At least zero devices are returned (empty list is valid)\n\n### \u274c Failure\n- Unhandled exception during device discovery \u2192 500\n- OpenVINO cannot be initialized \u2192 500\n\n## Example Response\n\n```json\n[\n {\n \"device_name\": \"CPU\",\n \"full_device_name\": \"Intel(R) Core(TM) Ultra 7 155H\",\n \"device_type\": \"INTEGRATED\",\n \"device_family\": \"CPU\",\n \"gpu_id\": null\n },\n {\n \"device_name\": \"GPU.0\",\n \"full_device_name\": \"Intel(R) Arc(TM) Graphics (iGPU) (GPU.0)\",\n \"device_type\": \"INTEGRATED\",\n \"device_family\": \"GPU\",\n \"gpu_id\": 0\n }\n]\n```",
"operationId": "get_devices",
"responses": {
"200": {
"description": "List of devices successfully retrieved.",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/Device"
},
"type": "array",
"title": "Response 200 Get Devices"
}
}
}
},
"500": {
"description": "Unexpected error when discovering devices.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
}
}
}
},
"/jobs/tests/performance/status": {
"get": {
"tags": [
"jobs"
],
"summary": "List all performance test jobs",
"description": "**List statuses of all performance test jobs.**\n\n## Operation\n\nReads current state and metrics for every performance test job created via the performance test API.\n\n## Parameters\n\nNone\n\n## Response Format\n\n| Code | Description |\n|------|-------------|\n| 200 | JSON array of PerformanceJobStatus objects |\n| 500 | Unexpected internal error |\n\n## Conditions\n\n### \u2705 Success\n- TestsManager is initialized\n- Zero or more jobs may be present\n\n### \u274c Failure\n- Internal errors \u2192 500\n\n## Example Response\n\n```json\n[\n {\n \"id\": \"job123\",\n \"start_time\": 1715000000000,\n \"elapsed_time\": 120000,\n \"state\": \"RUNNING\",\n \"details\": [],\n \"total_fps\": 480.0,\n \"per_stream_fps\": 30.0,\n \"total_streams\": 16,\n \"streams_per_pipeline\": [\n {\"id\": \"pipeline-1\", \"streams\": 8},\n {\"id\": \"pipeline-2\", \"streams\": 8}\n ],\n \"video_output_paths\": {\n \"pipeline-1\": [\"/outputs/job123-p1-0.mp4\"]\n }\n }\n]\n```",
"operationId": "get_performance_statuses",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/PerformanceJobStatus"
},
"type": "array",
"title": "Response Get Performance Statuses"
}
}
}
}
}
}
},
"/jobs/tests/performance/{job_id}/status": {
"get": {
"tags": [
"jobs"
],
"summary": "Get performance test job status",
"description": "**Get detailed status of a single performance test job.**\n\n## Operation\n\nRetrieves current state, timings, FPS metrics, and output paths for a specific performance test job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the performance job to inspect\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | PerformanceJobStatus with current state, timings, FPS and output paths |\n| 404 | Job with given id does not exist |\n| 500 | Unexpected internal error |\n\n## Conditions\n\n### \u2705 Success\n- Job with given id exists in TestsManager\n\n### \u274c Failure\n- Unknown job id \u2192 404\n- Unexpected job status type \u2192 500\n\n## Examples\n\nSuccess (200):\n```json\n{\n \"id\": \"job123\",\n \"start_time\": 1715000000000,\n \"elapsed_time\": 60000,\n \"state\": \"COMPLETED\",\n \"details\": [\"Pipeline completed successfully\"],\n \"total_fps\": 480.0,\n \"per_stream_fps\": 30.0,\n \"total_streams\": 16,\n \"streams_per_pipeline\": [\n {\"id\": \"pipeline-1\", \"streams\": 8},\n {\"id\": \"pipeline-2\", \"streams\": 8}\n ],\n \"video_output_paths\": {\n \"pipeline-1\": [\"/outputs/job123-p1-0.mp4\"]\n }\n}\n```\n\nError (404):\n```json\n{\n \"message\": \"Performance job job123 not found\"\n}\n```\n\nError (500):\n```json\n{\n \"message\": \"Unexpected job status type for job job123\"\n}\n```",
"operationId": "get_performance_job_status",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PerformanceJobStatus"
}
}
}
},
"404": {
"description": "Job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"500": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/tests/performance/{job_id}": {
"get": {
"tags": [
"jobs"
],
"summary": "Get performance test job summary",
"description": "**Get a short summary of a performance test job.**\n\n## Operation\n\nRetrieves the job id and original PerformanceTestSpec for a specific job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the performance job created earlier\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | PerformanceJobSummary with job id and original request |\n| 404 | Job does not exist |\n\n## Conditions\n\n### \u2705 Success\n- Job exists in TestsManager\n\n### \u274c Failure\n- Unknown job id \u2192 404\n\n## Example Response\n\n```json\n{\n \"id\": \"job123\",\n \"request\": {\n \"pipeline_performance_specs\": [\n {\"id\": \"pipeline-1\", \"streams\": 8}\n ],\n \"video_output\": {\n \"enabled\": false,\n \"encoder_device\": {\"device_name\": \"GPU\", \"gpu_id\": 0}\n }\n }\n}\n```",
"operationId": "get_performance_job_summary",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PerformanceJobSummary"
}
}
}
},
"404": {
"description": "Job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"jobs"
],
"summary": "Stop a running performance test job",
"description": "**Stop a running performance test job.**\n\n## Operation\n\nRequests cancellation of a RUNNING performance test job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the performance test job to stop\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | Job was RUNNING and cancellation was successfully requested |\n| 404 | Job id is unknown or there is no active runner |\n| 409 | Job exists but is not in RUNNING state |\n| 500 | Unexpected error occurs while stopping |\n\n## Conditions\n\n### \u2705 Success\n- Job exists and state == RUNNING\n- TestsManager.stop_job() returns success\n\n### \u274c Failure\n- TestsManager.stop_job() returns \"not found\" / \"no active runner\" \u2192 404\n- TestsManager.stop_job() returns \"not running\" \u2192 409\n- Any other error from stop_job() \u2192 500\n\n## Examples\n\nSuccess (200):\n```json\n{\n \"message\": \"Job job123 stopped\"\n}\n```\n\nConflict (409):\n```json\n{\n \"message\": \"Job job123 is not running (state: COMPLETED)\"\n}\n```",
"operationId": "stop_performance_test_job",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"404": {
"description": "Performance test job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"409": {
"description": "Performance test job not running",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"500": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/tests/performance/{job_id}/metadata/{pipeline_id}/{file_index}": {
"get": {
"tags": [
"jobs"
],
"summary": "Get metadata snapshot for a specific pipeline stream",
"description": "**Return the most recent metadata records for a specific pipeline stream.**\n\n## Operation\n\nReturns a snapshot of up to ``limit`` JSON records read directly from disk,\nwritten by the ``gvametapublish`` element identified by *pipeline_id* and\nthe per-pipeline *file_index*. Records remain available after the job\ncompletes.\n\n## Path Parameters\n\n- `job_id`: Identifier of the performance job\n- `pipeline_id`: Pipeline identifier\n- `file_index`: Zero-based index of the metadata file within that pipeline\n\n## Query Parameters\n\n- `limit` *(optional, default 100, max 1000)*: Maximum number of records to return\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | JSON array of metadata records (may be empty) |\n| 404 | Job id, pipeline id, or file index is unknown |",
"operationId": "get_performance_job_metadata_snapshot",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
},
{
"name": "pipeline_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Pipeline Id"
}
},
{
"name": "file_index",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "File Index"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"default": 100,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "List of metadata records for the specified pipeline stream",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
},
"404": {
"description": "Job, pipeline, or file index not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/tests/performance/{job_id}/metadata/{pipeline_id}/{file_index}/stream": {
"get": {
"tags": [
"jobs"
],
"summary": "Stream metadata from a running performance test job via SSE",
"description": "**Stream live metadata records from gvametapublish via Server-Sent Events.**\n\n## Operation\n\nOpens a persistent HTTP connection and pushes each new JSON record emitted\nby the ``gvametapublish`` GStreamer element as an SSE ``data:`` event.\nThe stream terminates automatically when the pipeline finishes.\nA ``\": keepalive\"`` comment is sent every 30 s to prevent proxy timeouts.\n\n## Path Parameters\n\n- `job_id`: Identifier of the performance job to stream metadata from\n\n## Response Format\n\n``text/event-stream`` \u2014 each event is:\n```\ndata: {<json record>}\n\n\n```\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | SSE stream opened |\n| 404 | Job id is unknown or no metadata is available for this job |",
"operationId": "stream_performance_job_metadata",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
},
{
"name": "pipeline_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Pipeline Id"
}
},
{
"name": "file_index",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "File Index"
}
}
],
"responses": {
"200": {
"description": "SSE stream of metadata records",
"content": {
"application/json": {
"schema": {}
},
"text/event-stream": {}
}
},
"404": {
"description": "Job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/tests/density/status": {
"get": {
"tags": [
"jobs"
],
"summary": "List all density test jobs",
"description": "**List statuses of all density test jobs.**\n\n## Operation\n\nReads current state and metrics for every density test job.\n\n## Parameters\n\nNone\n\n## Response Format\n\n| Code | Description |\n|------|-------------|\n| 200 | JSON array of DensityJobStatus objects |\n\n## Conditions\n\n### \u2705 Success\n- TestsManager is initialized\n\n## Example Response\n\n```json\n[\n {\n \"id\": \"job456\",\n \"start_time\": 1715000000000,\n \"elapsed_time\": 45000,\n \"state\": \"RUNNING\",\n \"details\": [],\n \"total_fps\": null,\n \"per_stream_fps\": 28.5,\n \"total_streams\": 32,\n \"streams_per_pipeline\": [\n {\"id\": \"pipeline-1\", \"streams\": 16},\n {\"id\": \"pipeline-2\", \"streams\": 16}\n ],\n \"video_output_paths\": {\n \"pipeline-1\": [\"/outputs/job456-p1-0.mp4\"]\n }\n }\n]\n```",
"operationId": "get_density_statuses",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/DensityJobStatus"
},
"type": "array",
"title": "Response Get Density Statuses"
}
}
}
}
}
}
},
"/jobs/tests/density/{job_id}/status": {
"get": {
"tags": [
"jobs"
],
"summary": "Get density test job status",
"description": "**Get detailed status of a single density test job.**\n\n## Operation\n\nRetrieves current state, timings, and FPS metrics for a specific density test job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the density job to inspect\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | DensityJobStatus for the given job |\n| 404 | Job id is unknown |\n| 500 | Unexpected internal error |\n\n## Conditions\n\n### \u2705 Success\n- Job with given id exists in TestsManager\n\n### \u274c Failure\n- Unknown job id \u2192 404\n- Unexpected job status type \u2192 500\n\n## Examples\n\nError (404):\n```json\n{\n \"message\": \"Density job job456 not found\"\n}\n```\n\nError (500):\n```json\n{\n \"message\": \"Unexpected job status type for job job456\"\n}\n```",
"operationId": "get_density_job_status",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DensityJobStatus"
}
}
}
},
"404": {
"description": "Job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"500": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/tests/density/{job_id}": {
"get": {
"tags": [
"jobs"
],
"summary": "Get density test job summary",
"description": "**Get a short summary of a density test job.**\n\n## Operation\n\nRetrieves the job id and original DensityTestSpec for a specific job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the density job created earlier\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | DensityJobSummary with job id and original request |\n| 404 | Job does not exist |\n\n## Conditions\n\n### \u2705 Success\n- Job exists in TestsManager\n\n### \u274c Failure\n- Unknown job id \u2192 404\n\n## Example Response\n\n```json\n{\n \"id\": \"job456\",\n \"request\": {\n \"fps_floor\": 30,\n \"pipeline_density_specs\": [\n {\"id\": \"pipeline-1\", \"stream_rate\": 50},\n {\"id\": \"pipeline-2\", \"stream_rate\": 50}\n ],\n \"video_output\": {\n \"enabled\": false,\n \"encoder_device\": {\"device_name\": \"GPU\", \"gpu_id\": 0}\n }\n }\n}\n```",
"operationId": "get_density_job_summary",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DensityJobSummary"
}
}
}
},
"404": {
"description": "Job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"jobs"
],
"summary": "Stop a running density test job",
"description": "**Stop a running density test job.**\n\n## Operation\n\nRequests cancellation of a RUNNING density test job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the density test job to stop\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | Job was RUNNING and cancellation was successfully requested |\n| 404 | Job id is unknown or there is no active runner |\n| 409 | Job exists but is not RUNNING |\n| 500 | Unexpected error |\n\n## Conditions\n\nSame status mapping logic as stop_performance_test_job.",
"operationId": "stop_density_test_job",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"404": {
"description": "Density test job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"409": {
"description": "Density test job not running",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"500": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/optimization/status": {
"get": {
"tags": [
"jobs"
],
"summary": "List all optimization jobs",
"description": "**List statuses of all optimization jobs.**\n\n## Operation\n\nReads current state and results for every optimization job.\n\n## Parameters\n\nNone\n\n## Response Format\n\n| Code | Description |\n|------|-------------|\n| 200 | JSON array of OptimizationJobStatus objects |\n\n## Conditions\n\n### \u2705 Success\n- OptimizationManager is initialized\n\n## Example Response\n\n```json\n[\n {\n \"id\": \"opt789\",\n \"type\": \"OPTIMIZE\",\n \"start_time\": 1715000000000,\n \"elapsed_time\": 20000,\n \"state\": \"RUNNING\",\n \"details\": [],\n \"total_fps\": null,\n \"original_pipeline_graph\": {\"nodes\": [], \"edges\": []},\n \"optimized_pipeline_graph\": null,\n \"original_pipeline_description\": \"videotestsrc ! fakesink\",\n \"optimized_pipeline_description\": null\n }\n]\n```",
"operationId": "get_optimization_statuses",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/OptimizationJobStatus"
},
"type": "array",
"title": "Response Get Optimization Statuses"
}
}
}
}
}
}
},
"/jobs/optimization/{job_id}": {
"get": {
"tags": [
"jobs"
],
"summary": "Get optimization job summary",
"description": "**Get a short summary of an optimization job.**\n\n## Operation\n\nRetrieves the job id and original optimization request for a specific job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the optimization job created earlier\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | OptimizationJobSummary with job id and original request |\n| 404 | Job does not exist |\n\n## Conditions\n\n### \u2705 Success\n- Job exists in OptimizationManager\n\n### \u274c Failure\n- Unknown job id \u2192 404\n\n## Error Example\n\n```json\n{\n \"message\": \"Optimization job opt789 not found\"\n}\n```",
"operationId": "get_optimization_job_summary",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OptimizationJobSummary"
}
}
}
},
"404": {
"description": "Optimization job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/optimization/{job_id}/status": {
"get": {
"tags": [
"jobs"
],
"summary": "Get optimization job status",
"description": "**Get detailed status of a single optimization job.**\n\n## Operation\n\nRetrieves timings, state, graphs, descriptions and total_fps (for OPTIMIZE) for a specific optimization job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the optimization job to inspect\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | OptimizationJobStatus containing timings, state, graphs and descriptions |\n| 404 | Job does not exist |\n\n## Conditions\n\n### \u2705 Success\n- Job with given id exists in OptimizationManager\n\n### \u274c Failure\n- Unknown job id \u2192 404",
"operationId": "get_optimization_job_status",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OptimizationJobStatus"
}
}
}
},
"404": {
"description": "Optimization job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/jobs/validation/status": {
"get": {
"tags": [
"jobs"
],
"summary": "List all validation jobs",
"description": "**List statuses of all validation jobs.**\n\n## Operation\n\nReads current state and validation result for all validation jobs.\n\n## Parameters\n\nNone\n\n## Response Format\n\n| Code | Description |\n|------|-------------|\n| 200 | JSON array of ValidationJobStatus objects |\n\n## Conditions\n\n### \u2705 Success\n- ValidationManager is initialized\n\n## Example Response\n\n```json\n[\n {\n \"id\": \"val001\",\n \"start_time\": 1715000000000,\n \"elapsed_time\": 10000,\n \"state\": \"RUNNING\",\n \"details\": [],\n \"is_valid\": null\n }\n]\n```",
"operationId": "get_validation_statuses",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/ValidationJobStatus"
},
"type": "array",
"title": "Response Get Validation Statuses"
}
}
}
}
}
}
},
"/jobs/validation/{job_id}": {
"get": {
"tags": [
"jobs"
],
"summary": "Get validation job summary",
"description": "**Get a short summary of a validation job.**\n\n## Operation\n\nRetrieves the job id and original validation request for a specific job.\n\n## Path Parameters\n\n- `job_id`: Identifier of the validation job created earlier\n\n## Response Codes\n\n| Code | Description |\n|------|-------------|\n| 200 | ValidationJobSummary with job id and original request |\n| 404 | Job does not exist |\n\n## Conditions\n\n### \u2705 Success\n- Job exists in ValidationManager\n\n### \u274c Failure\n- Unknown job id \u2192 404",
"operationId": "get_validation_job_summary",
"parameters": [
{
"name": "job_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Job Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationJobSummary"
}
}
}
},
"404": {
"description": "Validation job not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {