-
Notifications
You must be signed in to change notification settings - Fork 296
Expand file tree
/
Copy pathautorag.yaml
More file actions
1937 lines (1888 loc) · 70.3 KB
/
autorag.yaml
File metadata and controls
1937 lines (1888 loc) · 70.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: AutoRAG REST API
version: 1.0.0
description: REST API AutoRAG BFF
license:
name: Apache 2.0
url: "https://www.apache.org/licenses/LICENSE-2.0"
servers:
- url: "https://localhost:8080"
- url: "http://localhost:8080"
paths:
/healthcheck:
summary: Path targeted for healthcheck purposes.
description: >-
The REST endpoint/path used to allow a healthcheck update.
get:
tags:
- K8SOperation
responses:
"200":
description: "Ok"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: healthcheck
summary: HealthCheck
description: HealthCheck endpoint.
/api/v1/namespaces:
summary: Path used to get available namespaces.
description: >-
The REST endpoint/path used to list available namespaces.
get:
tags:
- K8SOperation
responses:
"200":
description: "Ok"
content:
application/json:
schema:
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
type: object
properties:
name:
type: string
example: default-namespace
"500":
$ref: "#/components/responses/InternalServerError"
operationId: getNamespaces
summary: Get Available Namespaces
description: Returns available namespaces in the cluster.
/api/v1/user:
summary: Path used to Retrieve a user based on the header.
description: >-
The REST endpoint/path used pass all the config information needed for the UI.
get:
tags:
- K8SOperation
parameters:
- $ref: "#/components/parameters/kubeflowUserId"
responses:
"200":
$ref: "#/components/responses/ConfigResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: getConfig
summary: Get configuration info
description: Gets the configuration information needed for the UI [TBD]
/api/v1/secrets:
summary: Path used to retrieve and filter secrets from a namespace.
description: >-
The REST endpoint/path used to list and filter Kubernetes secrets based on type and namespace.
get:
tags:
- K8SOperation
parameters:
- name: namespace
in: query
required: true
description: The namespace name to query secrets from
schema:
type: string
example: default
- name: type
in: query
required: false
description: >-
Secret type filter (key matching is case-sensitive, keys must be uppercase):
- 'storage': Filters for storage secrets (e.g., S3 secrets with classification keys: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_S3_ENDPOINT)
- 'lls': Filters for Llama Stack secrets (classification keys: LLAMA_STACK_CLIENT_API_KEY, LLAMA_STACK_CLIENT_BASE_URL)
- Omit for all secrets
Type Classification Precedence:
When determining if a secret matches the requested type filter, the following precedence is applied:
1. Annotation-based type (highest priority): If the secret has the 'opendatahub.io/connection-type' annotation, that annotated type takes precedence for inclusion in ?type= filter results
2. Key-based classification (fallback): If no connection-type annotation is present, the type is determined by key-based classification rules (e.g., storage keys like AWS_ACCESS_KEY_ID for ?type=storage, LLS keys like LLAMA_STACK_CLIENT_API_KEY for ?type=lls)
Note: Classification keys are used to identify the secret type. Additional optional keys (like AWS_S3_BUCKET, AWS_DEFAULT_REGION for S3 secrets)
may be present but are not required for type classification. The data field in the response lists all keys
present in each secret, allowing clients to validate additional requirements for their specific use cases.
schema:
type: string
enum:
- storage
- lls
example: storage
responses:
"200":
$ref: "#/components/responses/SecretsResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: getSecrets
summary: Get filtered secrets
description: >-
Retrieves secrets from a specified namespace with optional filtering by type.
Key matching is case-sensitive; keys must be uppercase.
Secret Type Classification Precedence:
The type of each secret is determined using the following precedence:
1. Annotation-based type (highest priority): If the secret has the 'opendatahub.io/connection-type' annotation with a non-empty value, that annotated type is used
2. Key-based classification (fallback): If no connection-type annotation is present, type is determined by the presence of specific classification keys:
- 's3': S3 storage secrets (classification keys: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_S3_ENDPOINT)
- 'lls': Llama Stack secrets (classification keys: LLAMA_STACK_CLIENT_API_KEY, LLAMA_STACK_CLIENT_BASE_URL)
Optional Keys:
Secrets may contain additional optional keys beyond classification requirements (e.g., AWS_S3_BUCKET, AWS_DEFAULT_REGION for S3 secrets).
The data field lists all keys present, allowing clients to validate additional use-case-specific requirements.
Type filtering with ?type= parameter:
When filtering by type, the annotated type (if present) takes precedence over key-based classification for determining inclusion in results.
- 'storage': Returns only secrets classified as storage types (currently: s3 via key-based classification, or any secret with connection-type annotation matching 'storage')
- 'lls': Returns only secrets classified as LLS type (via key-based classification or connection-type annotation)
- No type: Returns all secrets with their detected type classification
# =============================================================================
# S3 Endpoints
# =============================================================================
/api/v1/s3/files/{key}:
summary: Endpoints for working with a specific file from an S3-compatible connection.
description: >-
The REST endpoint/path used to retrieve or upload files in S3 storage.
Uses the credentials from a specified Kubernetes secret to access the S3 bucket.
GET returns the file with transfer-encoding: chunked for efficient streaming.
POST accepts a multipart form file and uploads it to the given bucket and key.
get:
tags:
- S3Operation
parameters:
- name: namespace
in: query
required: true
description: The Kubernetes namespace containing the secret
schema:
type: string
example: default
- name: secretName
in: query
required: false
description: >-
Override: name of the Kubernetes secret containing S3 credentials.
When supplied, the secret must use the conventional AWS_* field names
(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, AWS_S3_ENDPOINT).
When omitted, connection details (endpoint, credentials field names, region, bucket)
are resolved from the DSPipelineApplication spec discovered in the namespace.
schema:
type: string
maxLength: 253
pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
example: aws-secret-1
- name: bucket
in: query
required: false
description: The S3 bucket name. Leading and trailing whitespace is trimmed.
schema:
type: string
pattern: '^\S(.*\S)?$'
example: my-bucket
- name: key
in: path
required: true
description: The S3 object key to retrieve
schema:
type: string
example: documents/myfile.pdf
responses:
"200":
description: File retrieved successfully
content:
"*/*":
schema:
type: string
format: binary
description: The binary content of the requested file
headers:
Transfer-Encoding:
description: Set to 'chunked' for streaming large files
schema:
type: string
example: chunked
Content-Type:
description: The MIME type of the file
schema:
type: string
example: application/pdf
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
operationId: getS3File
summary: Get file from S3
description: >-
Retrieves an arbitrary file from S3 storage. The file is streamed with
transfer-encoding: chunked to efficiently handle large files.
Two credential resolution modes are supported:
**DSPA mode (default in production)** — when secretName is omitted, the endpoint,
region, bucket, and credential field names are read from the DSPipelineApplication
(DSPA) spec discovered in the namespace. This works for both external S3 and managed
MinIO without requiring the caller to know which secret is in use.
**Explicit mode (override)** — when secretName is supplied, the specified Kubernetes
secret must contain AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION,
and AWS_S3_ENDPOINT using those exact field names.
post:
tags:
- S3Operation
parameters:
- name: namespace
in: query
required: true
description: The Kubernetes namespace containing the secret
schema:
type: string
example: default
- name: secretName
in: query
required: true
description: The name of the Kubernetes secret containing S3 credentials
schema:
type: string
maxLength: 253
pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
example: aws-secret-1
- name: bucket
in: query
required: false
description: The S3 bucket name. Leading and trailing whitespace is trimmed.
schema:
type: string
pattern: '^\S(.*\S)?$'
example: my-bucket
- name: key
in: path
required: true
description: The S3 object key where the file will be uploaded
schema:
type: string
example: documents/myfile.pdf
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
description: The file to upload to S3
responses:
"201":
description: File uploaded successfully
content:
application/json:
schema:
$ref: "#/components/schemas/S3UploadSuccess"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"413":
description: >-
Declared Content-Length too large, or file part exceeds 32 MiB (http.MaxBytesReader).
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorEnvelope"
"409":
$ref: "#/components/responses/Conflict"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: uploadS3File
summary: Upload file to S3
description: >-
Uploads a file to S3 storage using credentials from a Kubernetes secret.
The request must include a multipart form with a file part (e.g. "file").
The secret must contain valid S3 credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,
AWS_DEFAULT_REGION, AWS_S3_ENDPOINT).
Chunked transfer encoding is supported. When Content-Length is set, it must not exceed
32 MiB plus allowance for multipart framing (~64 MiB) or the request is rejected with 413.
The file part is streamed via http.MaxBytesReader (32 MiB max); larger file parts fail with 413.
On success, returns JSON with `uploaded: true` and the resolved `key` (which may differ
from the requested key if a collision was avoided by probing existing keys).
Returns 409 if the object key chosen after collision resolution still conflicts at upload time
(e.g. concurrent writer); the client should retry the upload.
/api/v1/s3/files:
summary: Endpoints for working with files from an S3-compatible connection.
get:
operationId: getS3Files
summary: Get files from S3
description: >-
Retrieves a list of files from an S3-compatible storage.
Returns the files in a list, plus any additional metadata that ListObjectsV2 returns.
Two credential resolution modes are supported:
(1) **DSPA mode (default in production)** — when secretName is omitted, the endpoint,
region, bucket, and credential field names are read from the DSPipelineApplication
(DSPA) spec discovered in the namespace.
(2) **Explicit mode (override)** — when secretName is supplied, the specified Kubernetes
secret must contain AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION,
and AWS_S3_ENDPOINT using those exact field names.
tags:
- S3Operation
security:
- Bearer: []
parameters:
- name: namespace
in: query
required: true
description: The Kubernetes namespace containing the secret
schema:
type: string
example: default
- name: secretName
in: query
required: false
description: >-
Override: name of the Kubernetes secret containing S3 credentials.
When supplied, the secret must use the conventional AWS_* field names
(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, AWS_S3_ENDPOINT).
When omitted, the endpoint falls back to DSPA mode and reads credentials from
the DSPipelineApplication spec discovered in the namespace.
schema:
type: string
maxLength: 253
pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
example: aws-secret-1
- name: bucket
in: query
required: false
description: >-
The S3 bucket name. Only honored when secretName is supplied (explicit mode).
In DSPA mode (secretName omitted), this parameter is ignored and the bucket
configured in the DSPipelineApplication spec is used instead; if the DSPA
does not specify a bucket the request is rejected with 400.
schema:
type: string
pattern: '^\S(.*\S)?$'
example: my-bucket
- name: path
in: query
required: false
description: (Optional) S3-like folder path to search within (if omitted, lists bucket root). When provided, must be non-empty and not exceed 1024 characters.
schema:
type: string
minLength: 1
maxLength: 1024
example: folder1/folder2/folder3
- name: search
in: query
required: false
description: The search term to filter results by. S3 only allows searching by leading values. Must not contain '/' characters. Maximum 1024 characters.
schema:
type: string
maxLength: 1024
pattern: "^[^/]*$"
example: my-search-query
- name: next
in: query
required: false
description: The token value to use for the next page
schema:
type: string
minLength: 1
example: /continuationtokenexample
- name: limit
in: query
required: false
description: The limit for the number of items to return per page
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
example: 20
responses:
"200":
$ref: "#/components/responses/S3GetFilesResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
# =============================================================================
# LSD ENDPOINTS
# =============================================================================
/api/v1/lsd/models:
summary: List available LSD models
description: >-
Lists all available models from LlamaStack Distribution (LSD).
Returns a flat list of models with their identifiers, types, provider information, and resource paths.
Requires namespace and secretName parameters. The secretName identifies a Kubernetes secret
containing LLAMA_STACK_CLIENT_BASE_URL and LLAMA_STACK_CLIENT_API_KEY credentials.
get:
tags:
- Models
security:
- Bearer: []
parameters:
- name: namespace
in: query
description: Kubernetes namespace containing the LlamaStack credentials secret
required: true
schema:
type: string
example: 'default'
- name: secretName
in: query
description: Name of the Kubernetes secret containing LlamaStack credentials (LLAMA_STACK_CLIENT_BASE_URL and LLAMA_STACK_CLIENT_API_KEY)
required: true
schema:
type: string
maxLength: 253
pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
example: 'my-lls-secret'
responses:
"200":
$ref: "#/components/responses/LSDModelsResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"502":
$ref: "#/components/responses/BadGateway"
operationId: getLSDModels
summary: Get LSD Models
description: Returns available models from LlamaStack Distribution using credentials from a Kubernetes secret
/api/v1/lsd/vector-stores:
summary: List available LSD vector store providers
description: >-
Lists available vector store providers from LlamaStack Distribution (LSD).
Calls the native /v1/providers endpoint and filters for vector_io API type.
Returns provider identifiers and types (e.g., remote::milvus).
Requires namespace and secretName parameters. The secretName identifies a Kubernetes secret
containing LLAMA_STACK_CLIENT_BASE_URL and LLAMA_STACK_CLIENT_API_KEY credentials.
get:
tags:
- VectorStores
security:
- Bearer: []
parameters:
- name: namespace
in: query
description: Kubernetes namespace containing the LlamaStack credentials secret
required: true
schema:
type: string
example: 'default'
- name: secretName
in: query
description: Name of the Kubernetes secret containing LlamaStack credentials (LLAMA_STACK_CLIENT_BASE_URL and LLAMA_STACK_CLIENT_API_KEY)
required: true
schema:
type: string
example: 'my-lls-secret'
responses:
"200":
$ref: "#/components/responses/LSDVectorStoresResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"502":
$ref: "#/components/responses/BadGateway"
operationId: getLSDVectorStoreProviders
summary: Get LSD Vector Store Providers
description: Returns available vector store providers from LlamaStack Distribution using credentials from a Kubernetes secret
# =============================================================================
# PIPELINE RUNS ENDPOINTS
# =============================================================================
/api/v1/pipeline-runs:
summary: Pipeline run operations
description: >-
Endpoints for listing and creating pipeline runs from the Pipeline Server
in the specified namespace. The Pipeline Server (DSPipelineApplication)
is automatically discovered.
get:
tags:
- PipelineOperation
security:
- Bearer: []
parameters:
- $ref: "#/components/parameters/namespace"
- $ref: "#/components/parameters/pageSize"
- $ref: "#/components/parameters/nextPageToken"
responses:
"200":
$ref: "#/components/responses/PipelineRunsResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
operationId: getPipelineRuns
summary: Get Pipeline Runs
description: >-
Returns pipeline runs filtered to the auto-discovered AutoRAG managed pipeline version.
The AutoRAG pipeline is automatically discovered in the namespace by name prefix.
Returns 500 if no managed AutoRAG pipeline is found in the namespace.
post:
tags:
- PipelineOperation
security:
- Bearer: []
parameters:
- $ref: "#/components/parameters/namespace"
- name: pipelineType
in: query
required: false
schema:
type: string
enum:
- autorag
default: autorag
description: >-
Selects which discovered AutoRAG pipeline to use for this run.
Currently only "autorag" is supported. Defaults to "autorag" when omitted.
example: "autorag"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAutoRAGRunRequest"
responses:
"200":
$ref: "#/components/responses/CreatePipelineRunResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
operationId: createPipelineRun
summary: Create Pipeline Run
description: >-
Creates a new AutoRAG pipeline run. The BFF automatically discovers the managed
AutoRAG pipeline in the namespace and injects the pipeline ID and version ID.
The optional pipelineType parameter selects which discovered pipeline to use
(currently only "autorag" is supported). If no matching AutoRAG pipeline is found,
returns a 500 error. The Pipeline Server (DSPipelineApplication) is also
auto-discovered. The BFF maps AutoRAG-specific parameters to KFP v2beta1 runtime
config and submits the run.
/api/v1/pipeline-runs/{runId}:
summary: Get a single pipeline run by ID
description: >-
Retrieves a single pipeline run by its unique identifier from the
Pipeline Server in the specified namespace. The Pipeline Server
(DSPipelineApplication) and AutoRAG managed pipeline are automatically discovered.
The run is validated to ensure it belongs to the discovered AutoRAG pipeline before
being returned. Returns 404 if the run doesn't exist or belongs to a different pipeline.
Returns 500 if no AutoRAG pipeline is found in the namespace.
get:
tags:
- PipelineOperation
security:
- Bearer: []
parameters:
- $ref: "#/components/parameters/namespace"
- name: runId
in: path
required: true
schema:
type: string
description: Unique identifier of the pipeline run
example: "abc123-def456-ghi789"
responses:
"200":
$ref: "#/components/responses/PipelineRunResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
operationId: getPipelineRunById
summary: Get Pipeline Run by ID
description: >-
Returns a single pipeline run by its unique identifier, but only if it belongs to the
discovered AutoRAG managed pipeline in the namespace. This ensures users can only access
runs from the AutoRAG pipeline and not runs from other pipelines in the same namespace.
/api/v1/pipeline-runs/{runId}/terminate:
summary: Terminate an active pipeline run
description: >-
Terminates an active pipeline run, cancelling all running tasks and transitioning the run
to CANCELING and then CANCELED state. The run must be in an active state (PENDING, RUNNING,
PAUSED, or CANCELING) and belong to the discovered AutoRAG pipeline in the namespace.
Returns 400 if the run is not in a terminatable state, or 404 if the run doesn't exist or
belongs to a different pipeline.
post:
tags:
- PipelineOperation
security:
- Bearer: []
parameters:
- $ref: "#/components/parameters/namespace"
- name: runId
in: path
required: true
schema:
type: string
description: Unique identifier of the pipeline run to terminate
example: "abc123-def456-ghi789"
responses:
"200":
description: Run terminated successfully
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
operationId: terminatePipelineRun
summary: Terminate Pipeline Run
description: >-
Terminates an active AutoRAG pipeline run by transitioning it to CANCELING and then
CANCELED state. The run must be in an active state (PENDING, RUNNING, PAUSED, or
CANCELING). The BFF validates that the run belongs to the discovered AutoRAG managed
pipeline in the namespace and that it is in a terminatable state before proceeding.
Returns 400 if the run is not in a terminatable state.
/api/v1/pipeline-runs/{runId}/retry:
summary: Retry a failed or canceled pipeline run
description: >-
Re-initiates a failed or canceled pipeline run from the point of failure. The run must
belong to the discovered AutoRAG pipeline in the namespace and must be in FAILED or
CANCELED state. Returns 400 if the run is not in a retryable state, or 404 if the run
doesn't exist or belongs to a different pipeline.
post:
tags:
- PipelineOperation
security:
- Bearer: []
parameters:
- $ref: "#/components/parameters/namespace"
- name: runId
in: path
required: true
schema:
type: string
description: Unique identifier of the pipeline run to retry
example: "abc123-def456-ghi789"
responses:
"200":
description: Run retry initiated successfully
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
"503":
$ref: "#/components/responses/ServiceUnavailable"
operationId: retryPipelineRun
summary: Retry Pipeline Run
description: >-
Re-initiates a failed or canceled AutoRAG pipeline run. The BFF validates that the run
belongs to the discovered AutoRAG managed pipeline in the namespace and that it is in a
retryable state (FAILED or CANCELED) before retrying it. This prevents users from
retrying runs from other pipelines in the same namespace.
components:
schemas:
Config:
required:
- userId
- clusterAdmin
type: object
properties:
userId:
type: string
example: user@example.com
clusterAdmin:
type: boolean
example: true
# LSD Model Schemas
LSDModel:
type: object
description: Model from LlamaStack Distribution
required:
- id
- type
- provider
properties:
id:
type: string
description: Unique model identifier
example: "llama3.2:3b"
type:
type: string
enum: ["llm", "embedding"]
description: Model type (llm or embedding)
example: "llm"
provider:
type: string
description: Provider identifier
example: "ollama"
resource_path:
type: string
description: Full provider resource path
example: "ollama://models/llama3.2:3b"
LSDModelsData:
type: object
description: List of all available models from LlamaStack Distribution
required:
- models
properties:
models:
type: array
description: Complete list of all available models
items:
$ref: '#/components/schemas/LSDModel'
LSDVectorStoreProvider:
type: object
description: Vector store provider from LlamaStack Distribution
required:
- provider_id
- provider_type
properties:
provider_id:
type: string
description: Provider identifier
example: "milvus"
provider_type:
type: string
description: Provider implementation type
example: "remote::milvus"
LSDVectorStoreProvidersData:
type: object
description: List of vector store providers from LlamaStack Distribution
required:
- vector_store_providers
properties:
vector_store_providers:
type: array
description: List of vector_io providers
items:
$ref: '#/components/schemas/LSDVectorStoreProvider'
SecretTypeSchema:
description: >-
Schema defining the classification and optional keys for a secret type.
Classification keys are used to identify the secret type.
Optional keys are commonly used but not required for type classification.
type: object
properties:
classificationKeys:
type: array
items:
type: string
description: Keys required for BFF to classify a secret as this type (case-sensitive, uppercase)
commonOptionalKeys:
type: array
items:
type: string
description: Common optional keys that may be required for specific use cases but not for type classification
SecretTypeSchemas:
description: Reference documentation for secret type schemas
type: object
properties:
s3:
allOf:
- $ref: '#/components/schemas/SecretTypeSchema'
- type: object
properties:
classificationKeys:
example: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_S3_ENDPOINT"]
commonOptionalKeys:
example: ["AWS_S3_BUCKET", "AWS_DEFAULT_REGION"]
lls:
allOf:
- $ref: '#/components/schemas/SecretTypeSchema'
- type: object
properties:
classificationKeys:
example: ["LLAMA_STACK_CLIENT_API_KEY", "LLAMA_STACK_CLIENT_BASE_URL"]
commonOptionalKeys:
example: []
SecretListItem:
description: A Kubernetes secret with its UUID, name, type classification, and available keys
required:
- uuid
- name
- data
type: object
properties:
uuid:
type: string
description: The Kubernetes UID of the secret
example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
name:
type: string
description: The name of the secret
example: aws-secret-1
type:
type: string
description: >-
Optional type of the secret determined by the following precedence:
1. First priority: The 'opendatahub.io/connection-type' annotation if present and non-empty
2. Fallback: Key-based type detection (see SecretTypeSchemas):
- 's3': S3 storage secret (has all required S3 classification keys)
- 'lls': Llama Stack secret (has all required LLS classification keys)
When filtering with the ?type= parameter, the annotated type (if present) takes precedence over key-based classification
for determining inclusion in results. This means a secret with connection-type='storage' will be included in ?type=storage
results even if it lacks the typical storage classification keys.
This field is omitted from the response if the secret doesn't match any recognized type and has no connection-type annotation.
example: s3
data:
type: object
additionalProperties:
type: string
description: >-
Object mapping all keys available in the secret to their values.
Keys are case-preserved. Most values are sanitized as "[REDACTED]" for security.
Only specific allowed keys (currently: AWS_S3_BUCKET) return their actual values.
Use this field to validate that additional optional keys required for your use case are present (via Object.keys()).
example: {"AWS_ACCESS_KEY_ID": "[REDACTED]", "AWS_DEFAULT_REGION": "[REDACTED]", "AWS_S3_ENDPOINT": "[REDACTED]", "AWS_SECRET_ACCESS_KEY": "[REDACTED]", "AWS_S3_BUCKET": "my-bucket-name"}
displayName:
type: string
description: >-
Optional human-readable display name from the 'openshift.io/display-name' annotation.
This field is only included in the response if the annotation exists on the secret.
example: Production S3 Bucket
description:
type: string
description: >-
Optional human-readable description from the 'openshift.io/description' annotation.
This field is only included in the response if the annotation exists on the secret.
example: Main S3 bucket for production data storage and backups
# Pipeline Run Schemas
PipelineRun:
type: object
description: Kubeflow Pipeline Run information
required:
- run_id
- display_name
- state
- created_at
properties:
run_id:
type: string
description: Unique pipeline run identifier
example: "abc123-def456-ghi789"
display_name:
type: string
description: Human-readable run name
example: "AutoRAG Optimization Run 1"
description:
type: string
description: Run description
example: "Optimizing RAG parameters for dataset X"
experiment_id:
type: string
description: ID of the experiment this run belongs to
example: "1858af57-f990-4aee-a03e-c93bdfd02eb3"
pipeline_version_reference:
type: object
description: Reference to pipeline and version
properties:
pipeline_id:
type: string
description: ID of the pipeline
example: "9e3940d5-b275-4b64-be10-b914cd06c58e"
pipeline_version_id:
type: string
description: ID of the pipeline version
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
runtime_config:
type: object
description: Runtime configuration used for this run, including pipeline parameters
nullable: true
properties:
parameters:
type: object
description: Key-value map of pipeline parameters
additionalProperties: true
example:
optimization_metric: "faithfulness"
test_data_secret_name: "minio-secret"
test_data_bucket_name: "autorag"
pipeline_root:
type: string
description: Root output directory for pipeline artifacts
state:
type: string
enum: [UNKNOWN, PENDING, RUNNING, SUCCEEDED, SKIPPED, FAILED, ERROR, CANCELED, CANCELING, PAUSED]
description: Current run state
example: "SUCCEEDED"
storage_state:
type: string
description: Storage state of the run
example: "AVAILABLE"
service_account: