forked from MapColonies/jobnik-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi3.yaml
More file actions
2629 lines (2454 loc) · 90.4 KB
/
openapi3.yaml
File metadata and controls
2629 lines (2454 loc) · 90.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Job Manager Service - API v1
description: Job Manager Service API version 1
version: 0.1.9
license:
name: MIT
url: https://opensource.org/licenses/MIT
security: []
paths:
/v1/jobs:
get:
operationId: findJobsV1
parameters:
- $ref: '#/components/parameters/jobNameQueryParam'
- $ref: '#/components/parameters/fromDate'
- $ref: '#/components/parameters/endDate'
- $ref: '#/components/parameters/priority'
- $ref: '#/components/parameters/includeStages'
summary: Retrieve jobs matching criteria
description: |
Filter jobs by name, date range, priority. Optional stage inclusion.
Returns empty array if no matches.
tags:
- jobs
responses:
'200':
description: Successfully retrieved matching jobs
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/job'
'400':
description: Invalid query parameters
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
post:
operationId: createJobV1
summary: Create job
description: |
Create job with config and metadata. Initial status: PENDING.
tags:
- jobs
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/createJobPayload'
examples:
simple_job:
summary: Simple job with minimal configuration
description: Basic job creation with default priority
value:
name: data_processing
data:
input_path: /data/raw/batch_001
output_path: /data/processed/batch_001
format: parquet
complex_job:
summary: Complex job with full configuration
description: Job with high priority and custom metadata
value:
name: critical_analysis
data:
input_sources:
- /data/source1/*.csv
- /data/source2/*.json
transformations:
- type: filter
conditions:
- status = 'active'
- created_date > '2024-01-01'
- type: aggregate
group_by:
- region
- category
metrics:
- sum(revenue)
- count(transactions)
output_config:
format: delta
partitions:
- year
- month
compression: snappy
priority: VERY_HIGH
userMetadata:
department: analytics
owner: data-team@company.com
deadline: '2025-08-01T00:00:00.000Z'
cost_center: CC-12345
job_with_tracing:
summary: Job with explicit tracing context
description: Job creation with provided distributed tracing context
value:
name: traced_processing
data:
input_path: /data/traced/batch_001
output_path: /data/output/batch_001
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
responses:
'201':
description: Job created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/job'
examples:
simple_job_response:
summary: Response for simple job creation
value:
id: 550e8400-e29b-41d4-a716-446655440000
name: data_processing
status: PENDING
percentage: 0
priority: MEDIUM
creationTime: '2025-07-27T10:30:00.000Z'
updateTime: '2025-07-27T10:30:00.000Z'
data:
input_path: /data/raw/batch_001
output_path: /data/processed/batch_001
format: parquet
userMetadata: {}
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
complex_job_response:
summary: Response for complex job creation
value:
id: 660f9511-f3ac-52e5-b827-557766551111
name: critical_analysis
status: PENDING
percentage: 0
priority: VERY_HIGH
creationTime: '2025-07-27T10:30:00.000Z'
updateTime: '2025-07-27T10:30:00.000Z'
data:
input_sources:
- /data/source1/*.csv
- /data/source2/*.json
transformations:
- type: filter
conditions:
- status = 'active'
- created_date > '2024-01-01'
- type: aggregate
group_by:
- region
- category
metrics:
- sum(revenue)
- count(transactions)
output_config:
format: delta
partitions:
- year
- month
compression: snappy
userMetadata:
department: analytics
owner: data-team@company.com
deadline: '2025-08-01T00:00:00.000Z'
cost_center: CC-12345
traceparent: 00-660f9511f3ac52e5b827557766551111-22b378cc5ca902b7-01
tracestate: analytics=dept123,priority=very_high
'400':
description: Invalid request, could not create job
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
examples:
validation_error:
summary: Validation error
description: Request failed due to missing required fields
value:
message: >-
Validation failed: 'name' is required and must be a
non-empty string. 'data' is required and must be an
object.
code: VALIDATION_ERROR
invalid_priority:
summary: Invalid priority value
value:
message: >-
Invalid priority value 'SUPER_HIGH'. Valid values are:
VERY_HIGH, HIGH, MEDIUM, LOW, VERY_LOW.
code: VALIDATION_ERROR
malformed_data:
summary: Malformed request data
value:
message: >-
Invalid JSON format in request body. Expected object but
received array at line 1, column 1.
code: VALIDATION_ERROR
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/jobs/{jobId}:
parameters:
- $ref: '#/components/parameters/jobId'
get:
operationId: getJobByIdV1
parameters:
- $ref: '#/components/parameters/includeStages'
summary: Retrieve a specific job by its ID
description: >
Fetches detailed information about a job using its unique identifier.
Includes job configuration, status, metadata, and completion percentage.
Optional inclusion of related stage data via the should_return_stages
parameter,
which allows clients to retrieve the complete job hierarchy in a single
request.
tags:
- jobs
responses:
'200':
description: Job data retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/job'
examples:
job_with_stages:
summary: Job with complete stage and task hierarchy
description: Full job details when should_return_stages=true
value:
id: 550e8400-e29b-41d4-a716-446655440000
name: ml_pipeline
status: IN_PROGRESS
percentage: 45
priority: HIGH
creationTime: '2025-07-27T08:00:00.000Z'
updateTime: '2025-07-27T10:30:00.000Z'
traceparent: 00-660f9511f3ac52e5b827557766551111-22b378cc5ca902b7-01
data:
model_type: random_forest
training_data: /data/ml/training_set.parquet
features:
- age
- income
- location
- purchase_history
target: churn_probability
hyperparameters:
n_estimators: 100
max_depth: 10
min_samples_split: 5
userMetadata:
experiment_id: EXP-2025-001
researcher: ml-team@company.com
budget: $5000
stages:
- id: dd301d64-69b2-4b49-ba26-fb2a87fa0150
type: data_preparation
status: COMPLETED
percentage: 100
jobId: 550e8400-e29b-41d4-a716-446655440000
order: 1
data:
validation_split: 0.2
preprocessing_steps:
- normalize
- encode_categorical
userMetadata: {}
summary:
pending: 0
inProgress: 0
completed: 5
failed: 0
created: 0
retried: 0
total: 5
traceparent: >-
00-550e8400e29b41d4a716446655440000-22b378cc5ca902b7-01
- id: 2d9b2481-ec1c-4efd-9350-f33bd79d51eb
type: model_training
status: IN_PROGRESS
percentage: 60
jobId: 550e8400-e29b-41d4-a716-446655440000
order: 2
data:
cross_validation_folds: 5
early_stopping: true
userMetadata: {}
summary:
pending: 1
inProgress: 2
completed: 2
failed: 0
created: 0
retried: 0
total: 5
traceparent: >-
00-550e8400e29b41d4a716446655440000-22b378cc5ca902b7-01
- id: 637c05f3-e0b0-4c26-a791-89308c58e316
type: model_evaluation
status: WAITING
percentage: 0
jobId: 550e8400-e29b-41d4-a716-446655440000
order: 3
data:
metrics:
- accuracy
- precision
- recall
- f1_score
validation_dataset: /data/ml/validation_set.parquet
userMetadata: {}
summary:
pending: 3
inProgress: 0
completed: 0
failed: 0
created: 0
retried: 0
total: 3
traceparent: >-
00-550e8400e29b41d4a716446655440000-22b378cc5ca902b7-01
simple_job:
summary: Simple job without stages
description: Basic job details when should_return_stages=false
value:
id: 660f9511-f3ac-52e5-b827-557766551111
name: data_backup
status: COMPLETED
percentage: 100
priority: LOW
creationTime: '2025-07-26T14:00:00.000Z'
updateTime: '2025-07-26T15:30:00.000Z'
traceparent: 00-660f9511f3ac52e5b827557766551111-22b378cc5ca902b7-01
data:
source_path: /data/production
destination: s3://backup-bucket/2025-07-26
compression: gzip
encryption: true
userMetadata:
backup_type: daily
retention_days: 30
'400':
description: Invalid request, could not get job
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
delete:
operationId: deleteJobV1
summary: Delete a job and all its associated resources (stages, tasks)
description: >
Permanently removes a job and all its associated stages and tasks from
the system.
This operation cascades to delete all child resources and cannot be
undone.
The job must exist in the system for this operation to succeed.
Jobs can only be deleted when they are in a finite state (COMPLETED,
FAILED, or ABORTED).
Attempting to delete a job in any other state will result in a 400
error.
Returns a success message with code JOB_DELETED_SUCCESSFULLY when
completed.
tags:
- jobs
responses:
'200':
description: Job deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/defaultOkMessage'
example:
code: JOB_DELETED_SUCCESSFULLY
'400':
description: Invalid parameters or validation error
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/baseErrorResponse'
- type: object
description: >
Error response structure for bad request errors, providing
a consistent
format for common-readable error codes and human-readable
messages.
required:
- code
properties:
code:
enum:
- VALIDATION_ERROR
- JOB_NOT_IN_FINITE_STATE
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/jobs/{jobId}/user-metadata:
patch:
operationId: updateUserMetadataV1
parameters:
- $ref: '#/components/parameters/jobId'
summary: Update job's custom metadata
description: >
Updates the user-defined metadata object for a specific job.
This endpoint allows clients to attach or modify arbitrary data related
to a job
without affecting the job's core properties or execution status.
User metadata is useful for storing application-specific context,
tracking information,
or any custom data needed by client applications.
tags:
- jobs
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/userMetadata'
responses:
'200':
description: User metadata successfully updated
content:
application/json:
schema:
$ref: '#/components/schemas/defaultOkMessage'
example:
code: JOB_MODIFIED_SUCCESSFULLY
'400':
description: Invalid metadata format or validation error
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/jobs/{jobId}/priority:
parameters:
- $ref: '#/components/parameters/jobId'
patch:
operationId: updateJobPriorityV1
summary: Modify job's priority level
description: >
Updates the priority level for a specific job.
This affects how the job is scheduled relative to other jobs in the
system.
Higher priority jobs will be processed before lower priority ones when
resources
are constrained. Priority changes take effect immediately and apply to
all
pending tasks associated with the job.
tags:
- jobs
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
priority:
$ref: '#/components/schemas/priority'
required:
- priority
responses:
'200':
description: Job priority successfully changed
content:
application/json:
schema:
$ref: '#/components/schemas/defaultOkMessage'
example:
code: JOB_MODIFIED_SUCCESSFULLY
'204':
description: No change made - requested priority equals current priority
headers:
Reason:
description: Won't change priority if equal to current
schema:
type: string
content: {}
'400':
description: Invalid priority value or other request error
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/jobs/{jobId}/status:
parameters:
- $ref: '#/components/parameters/jobId'
put:
operationId: updateStatusV1
summary: Update job status for workflow control
description: >
Updates the operational status of a job to control its workflow
execution. This endpoint
supports user-initiated operations including PENDING (resume), ABORTED
(cancel), and
PAUSED (suspend), which may cascade changes to related stages and tasks.
Internal status transitions (such as IN_PROGRESS, COMPLETED, FAILED,
CREATED) are managed
automatically by the system based on stage and task completion, and
cannot be set through
this endpoint.
Status changes follow a state machine that enforces valid transitions.
When a job's status
is changed, the system will automatically update timestamps and
completion percentages as
appropriate.
tags:
- jobs
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
status:
$ref: '#/components/schemas/jobOperationStatus'
required:
- status
responses:
'200':
description: Job status successfully changed
content:
application/json:
schema:
$ref: '#/components/schemas/defaultOkMessage'
example:
code: JOB_MODIFIED_SUCCESSFULLY
'400':
description: Invalid status or illegal state transition
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/baseErrorResponse'
- type: object
description: >
Error response structure for bad request errors, providing
a consistent
format for common-readable error codes and human-readable
messages.
properties:
code:
enum:
- VALIDATION_ERROR
- ILLEGAL_JOB_STATUS_TRANSITION
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/jobs/{jobId}/stages:
parameters:
- $ref: '#/components/parameters/jobId'
get:
operationId: getStagesByJobIdV1
parameters:
- $ref: '#/components/parameters/includeTasks'
summary: Retrieve all stages for a specific job in execution order
description: >
Fetches all stages associated with the specified job ID, automatically
ordered by
their execution sequence (order field). Provides complete information
about each
stage including type, status, progress, and sequential order number.
Stages are returned in ascending order based on their order field (1, 2,
3, etc.)
to maintain the correct workflow execution sequence defined when stages
were created.
Optional inclusion of related task data via the should_return_tasks
parameter,
allowing clients to retrieve the complete job hierarchy in a single
request.
tags:
- jobs
responses:
'200':
description: Successfully retrieved stages for the specified job
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/getStageResponse'
'400':
description: Invalid job ID format or other parameter error
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/jobs/{jobId}/stage:
post:
operationId: addStageV1
summary: Add a new stage as the last stage in the job workflow
description: >
Appends a new stage to an existing job with automatic order assignment.
The stage will be added after any existing stages in the job's workflow
sequence.
Each stage is automatically assigned an incremental order number (1, 2,
3, etc.)
within the scope of its parent job to maintain execution sequence.
This endpoint allows for extending job workflows at runtime by adding
new processing steps.
The order field ensures stages are processed in the correct sequence
when retrieved.
The job must exist and be in a valid state to accept new stages.
parameters:
- $ref: '#/components/parameters/jobId'
tags:
- jobs
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/createStagePayloadRequest'
examples:
processing_stage:
summary: Data processing stage
description: Stage for data transformation and validation
value:
type: data_processing
data:
processing_type: batch
chunk_size: 1000
validation_rules:
- 'not_null: [id, timestamp]'
- 'range: [amount, 0, 1000000]'
userMetadata:
estimated_duration: 2h
resource_requirements:
cpu: 4 cores
memory: 8GB
waiting_stage:
summary: Manual approval stage
description: Stage that waits for manual intervention
value:
type: manual_approval
startAsWaiting: true
data:
approval_type: quality_check
reviewers:
- senior-analyst@company.com
checklist:
- Data quality metrics within acceptable range
- No PII detected in output
- Performance benchmarks met
userMetadata:
priority: high
sla: 24h
stage_with_tracing:
summary: Stage with distributed tracing
description: Stage creation with provided tracing context
value:
type: data_validation
data:
validation_type: schema_check
strict_mode: true
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
tracestate: vendor=trace123,service=validation
responses:
'201':
description: Stage successfully created and added to the job
content:
application/json:
schema:
$ref: '#/components/schemas/stageResponse'
examples:
processing_stage_response:
summary: Response for data processing stage creation
value:
id: e9db7d16-a84c-4297-a45d-e59665760084
type: data_processing
status: CREATED
percentage: 0
jobId: 550e8400-e29b-41d4-a716-446655440000
order: 1
data:
processing_type: batch
chunk_size: 1000
validation_rules:
- 'not_null: [id, timestamp]'
- 'range: [amount, 0, 1000000]'
userMetadata:
estimated_duration: 2h
resource_requirements:
cpu: 4 cores
memory: 8GB
summary:
pending: 0
inProgress: 0
completed: 0
failed: 0
created: 0
retried: 0
total: 0
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-33c489dd6db902b7-01
tracestate: processing=batch001,stage=data_proc
waiting_stage_response:
summary: Response for manual approval stage creation
value:
id: 4f45bec6-08c4-4f7a-a3ea-be65eddc1235
type: manual_approval
status: WAITING
percentage: 0
jobId: 550e8400-e29b-41d4-a716-446655440000
order: 2
data:
approval_type: quality_check
reviewers:
- senior-analyst@company.com
checklist:
- Data quality metrics within acceptable range
- No PII detected in output
- Performance benchmarks met
userMetadata:
priority: high
sla: 24h
summary:
pending: 0
inProgress: 0
completed: 0
failed: 0
created: 0
retried: 0
total: 0
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-44d59aee7ec902b7-01
'400':
description: Invalid request format.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/baseErrorResponse'
- type: object
description: >
Error response structure for bad request errors, providing
a consistent
format for common-readable error codes and human-readable
messages.
properties:
code:
enum:
- VALIDATION_ERROR
- JOB_IN_FINITE_STATE
'404':
description: Job not found
content:
application/json:
schema:
$ref: '#/components/schemas/jobNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/stages:
get:
operationId: getStagesV1
parameters:
- $ref: '#/components/parameters/paramJobId'
- $ref: '#/components/parameters/paramStageType'
- $ref: '#/components/parameters/stageStatus'
- $ref: '#/components/parameters/includeTasks'
summary: Retrieve stages matching specified criteria
description: >
Returns a filtered list of stages based on the provided query
parameters.
Supports filtering by job ID, stage type, and status.
Optional inclusion of related task data via the should_return_tasks
parameter
allows clients to retrieve the complete stage hierarchy in a single
request.
tags:
- stages
responses:
'200':
description: Successfully retrieved matching stages
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/getStageResponse'
'400':
description: Invalid query parameters
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/stages/{stageId}:
parameters:
- $ref: '#/components/parameters/stageId'
get:
operationId: getStageByIdV1
parameters:
- $ref: '#/components/parameters/includeTasks'
summary: Retrieve a specific stage by its ID
description: >
Fetches detailed information about a stage using its unique identifier.
Includes stage configuration, status, metadata, and completion
information.
Optional inclusion of related task data via the should_return_tasks
parameter,
which allows clients to retrieve the complete stage hierarchy in a
single request.
tags:
- stages
responses:
'200':
description: Stage data retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/getStageResponse'
'400':
description: Invalid request format or parameters
content:
application/json:
schema:
$ref: '#/components/schemas/badRequestResponse'
'404':
description: Stage not found
content:
application/json:
schema:
$ref: '#/components/schemas/stageNotFoundResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/internalErrorsResponse'
/v1/stages/{stageId}/summary:
get:
operationId: getStageSummaryV1
parameters:
- $ref: '#/components/parameters/stageId'
summary: Get stage progress summary
description: >
Retrieves aggregated statistics about the tasks within a specific stage.
Provides counts of tasks by status (pending, in progress, completed,
etc.)
and a total task count for monitoring stage progress.
This endpoint is useful for displaying progress indicators or status
dashboards
without needing to retrieve and process all individual task details.
tags:
- stages
responses:
'200':
description: Stage summary retrieved successfully
content:
application/json:
schema: