-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathswagger.yaml
More file actions
2001 lines (2001 loc) · 53.1 KB
/
swagger.yaml
File metadata and controls
2001 lines (2001 loc) · 53.1 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
definitions:
api.APIReturnedUser:
properties:
email:
type: string
name:
type: string
projects:
items:
type: string
type: array
roles:
items:
type: string
type: array
username:
type: string
type: object
api.APITag:
properties:
name:
description: Tag Name
example: Testjob
type: string
scope:
description: Tag Scope for Frontend Display
example: global
type: string
type:
description: Tag Type
example: Debug
type: string
type: object
api.DefaultAPIResponse:
properties:
msg:
type: string
type: object
api.DeleteJobAPIRequest:
properties:
cluster:
description: Cluster of job
example: fritz
type: string
jobId:
description: Cluster Job ID of job
example: 123000
type: integer
startTime:
description: Start Time of job as epoch
example: 1649723812
type: integer
required:
- jobId
type: object
api.EditMetaRequest:
properties:
key:
example: jobScript
type: string
value:
example: bash script
type: string
type: object
api.ErrorResponse:
properties:
error:
description: Error Message
type: string
status:
description: Statustext of Errorcode
type: string
type: object
api.GetClustersAPIResponse:
properties:
clusters:
description: Array of clusters
items:
$ref: '#/definitions/schema.Cluster'
type: array
type: object
api.GetJobAPIResponse:
properties:
data:
items:
$ref: '#/definitions/api.JobMetricWithName'
type: array
meta:
$ref: '#/definitions/schema.Job'
type: object
api.GetJobsAPIResponse:
properties:
items:
description: Number of jobs returned
type: integer
jobs:
description: Array of jobs
items:
$ref: '#/definitions/schema.Job'
type: array
page:
description: Page id returned
type: integer
type: object
api.JobMetaRequest:
properties:
cluster:
description: Cluster of job
example: fritz
type: string
jobId:
description: Cluster Job ID of job
example: 123000
type: integer
payload:
allOf:
- $ref: '#/definitions/api.EditMetaRequest'
description: Content to Add to Job Meta_Data
startTime:
description: Start Time of job as epoch
example: 1649723812
type: integer
required:
- jobId
type: object
api.JobMetricWithName:
properties:
metric:
$ref: '#/definitions/schema.JobMetric'
name:
type: string
scope:
$ref: '#/definitions/schema.MetricScope'
type: object
api.StopJobAPIRequest:
properties:
cluster:
example: fritz
type: string
jobId:
example: 123000
type: integer
jobState:
allOf:
- $ref: '#/definitions/schema.JobState'
example: completed
startTime:
example: 1649723812
type: integer
stopTime:
example: 1649763839
type: integer
required:
- jobState
- stopTime
type: object
api.UpdateNodeStatesRequest:
properties:
cluster:
example: fritz
type: string
nodes:
items:
$ref: '#/definitions/schema.NodePayload'
type: array
type: object
schema.Accelerator:
properties:
id:
description: Unique identifier for the accelerator (e.g., "0", "1", "GPU-0")
type: string
model:
description: Specific model name (e.g., "A100", "MI100")
type: string
type:
description: Type of accelerator (e.g., "Nvidia GPU", "AMD GPU")
type: string
type: object
schema.Cluster:
properties:
metricConfig:
description: Cluster-wide metric configurations
items:
$ref: '#/definitions/schema.MetricConfig'
type: array
name:
description: Unique cluster name (e.g., "fritz", "alex")
type: string
subClusters:
description: Homogeneous partitions within the cluster
items:
$ref: '#/definitions/schema.SubCluster'
type: array
type: object
schema.Job:
description: Information of a HPC job.
properties:
arrayJobId:
example: 123000
type: integer
cluster:
example: fritz
type: string
concurrentJobs:
$ref: '#/definitions/schema.JobLinkResultList'
duration:
example: 43200
minimum: 1
type: integer
energy:
type: number
energyFootprint:
additionalProperties:
format: float64
type: number
type: object
exclusive:
description: for backwards compatibility
example: 1
maximum: 2
minimum: 0
type: integer
footprint:
additionalProperties:
format: float64
type: number
type: object
id:
type: integer
jobId:
example: 123000
type: integer
jobState:
allOf:
- $ref: '#/definitions/schema.JobState'
enum:
- boot_fail
- cancelled
- completed
- deadline
- failed
- node_fail
- out-of-memory
- pending
- preempted
- running
- suspended
- timeout
example: completed
metaData:
additionalProperties:
type: string
type: object
monitoringStatus:
example: 1
maximum: 3
minimum: 0
type: integer
numAcc:
example: 2
minimum: 1
type: integer
numHwthreads:
example: 20
minimum: 1
type: integer
numNodes:
example: 2
minimum: 1
type: integer
partition:
example: main
type: string
project:
example: abcd200
type: string
requestedMemory:
description: in MB
example: 128000
minimum: 1
type: integer
resources:
items:
$ref: '#/definitions/schema.Resource'
type: array
shared:
enum:
- none
- single_user
- multi_user
type: string
smt:
example: 4
type: integer
startTime:
example: 1649723812
type: integer
statistics:
additionalProperties:
$ref: '#/definitions/schema.JobStatistics'
type: object
subCluster:
example: main
type: string
submitTime:
example: 1649723812
type: integer
tags:
items:
$ref: '#/definitions/schema.Tag'
type: array
user:
example: abcd100h
type: string
walltime:
example: 86400
minimum: 1
type: integer
type: object
schema.JobLink:
properties:
id:
description: Internal database ID
type: integer
jobId:
description: The job's external job ID
type: integer
type: object
schema.JobLinkResultList:
properties:
count:
description: Total count of available items
type: integer
items:
description: List of job links
items:
$ref: '#/definitions/schema.JobLink'
type: array
type: object
schema.JobMetric:
properties:
series:
description: Individual time series data
items:
$ref: '#/definitions/schema.Series'
type: array
statisticsSeries:
allOf:
- $ref: '#/definitions/schema.StatsSeries'
description: Aggregated statistics over time
timestep:
description: Sampling interval in seconds
type: integer
unit:
allOf:
- $ref: '#/definitions/schema.Unit'
description: Unit of measurement
type: object
schema.JobState:
enum:
- boot_fail
- cancelled
- completed
- deadline
- failed
- node_fail
- out_of_memory
- pending
- preempted
- running
- suspended
- timeout
type: string
x-enum-varnames:
- JobStateBootFail
- JobStateCancelled
- JobStateCompleted
- JobStateDeadline
- JobStateFailed
- JobStateNodeFail
- JobStateOutOfMemory
- JobStatePending
- JobStatePreempted
- JobStateRunning
- JobStateSuspended
- JobStateTimeout
schema.JobStatistics:
description: Specification for job metric statistics.
properties:
avg:
description: Job metric average
example: 2500
minimum: 0
type: number
max:
description: Job metric maximum
example: 3000
minimum: 0
type: number
min:
description: Job metric minimum
example: 2000
minimum: 0
type: number
unit:
$ref: '#/definitions/schema.Unit'
type: object
schema.MetricConfig:
properties:
aggregation:
description: Aggregation function (avg, sum, min, max)
type: string
alert:
description: Alert threshold (requires attention)
type: number
caution:
description: Caution threshold (concerning but not critical)
type: number
energy:
description: Energy measurement method
type: string
footprint:
description: Footprint category
type: string
lowerIsBetter:
description: Whether lower values are better
type: boolean
name:
description: Metric name (e.g., "cpu_load", "mem_used")
type: string
normal:
description: Normal/typical value (good performance)
type: number
peak:
description: Peak/maximum expected value (best performance)
type: number
restrict:
description: Restrict visibility to non user roles
type: boolean
scope:
allOf:
- $ref: '#/definitions/schema.MetricScope'
description: Metric scope (node, socket, core, etc.)
subClusters:
description: Subcluster-specific overrides
items:
$ref: '#/definitions/schema.SubClusterConfig'
type: array
timestep:
description: Measurement interval in seconds
type: integer
unit:
allOf:
- $ref: '#/definitions/schema.Unit'
description: Unit of measurement
type: object
schema.MetricScope:
enum:
- invalid_scope
- node
- socket
- memoryDomain
- core
- hwthread
- accelerator
type: string
x-enum-varnames:
- MetricScopeInvalid
- MetricScopeNode
- MetricScopeSocket
- MetricScopeMemoryDomain
- MetricScopeCore
- MetricScopeHWThread
- MetricScopeAccelerator
schema.MetricStatistics:
properties:
avg:
description: Average/mean value
type: number
max:
description: Maximum value
type: number
min:
description: Minimum value
type: number
type: object
schema.MetricValue:
properties:
unit:
allOf:
- $ref: '#/definitions/schema.Unit'
description: Unit of measurement (e.g., FLOP/s, GB/s)
value:
description: Numeric value of the measurement
type: number
type: object
schema.NodePayload:
properties:
cpusAllocated:
description: Number of allocated CPUs
type: integer
gpusAllocated:
description: Number of allocated GPUs
type: integer
hostname:
description: Node hostname
type: string
jobsRunning:
description: Number of running jobs
type: integer
memoryAllocated:
description: Allocated memory in MB
type: integer
states:
description: State strings (flexible format)
items:
type: string
type: array
type: object
schema.Resource:
description: A resource used by a job
properties:
accelerators:
description: Allocated accelerator IDs (e.g., GPU IDs)
items:
type: string
type: array
configuration:
description: Optional configuration identifier
type: string
hostname:
description: Node hostname
type: string
hwthreads:
description: Allocated hardware thread IDs
items:
type: integer
type: array
type: object
schema.Series:
properties:
data:
description: Time series measurements
items:
type: number
type: array
hostname:
description: Source hostname
type: string
id:
description: Optional ID (e.g., core ID, GPU ID)
type: string
statistics:
allOf:
- $ref: '#/definitions/schema.MetricStatistics'
description: Statistical summary (min/avg/max)
type: object
schema.StatsSeries:
properties:
max:
description: Maximum values over time
items:
type: number
type: array
mean:
description: Mean values over time
items:
type: number
type: array
median:
description: Median values over time
items:
type: number
type: array
min:
description: Minimum values over time
items:
type: number
type: array
percentiles:
additionalProperties:
items:
format: float64
type: number
type: array
description: Percentile values over time (e.g., 10th, 50th, 90th)
type: object
type: object
schema.SubCluster:
properties:
coresPerSocket:
description: Number of cores per CPU socket
type: integer
energyFootprint:
description: Energy-related footprint metrics
items:
type: string
type: array
flopRateScalar:
allOf:
- $ref: '#/definitions/schema.MetricValue'
description: Theoretical scalar FLOP rate per node
flopRateSimd:
allOf:
- $ref: '#/definitions/schema.MetricValue'
description: Theoretical SIMD FLOP rate per node
footprint:
description: Default footprint metrics for jobs
items:
type: string
type: array
memoryBandwidth:
allOf:
- $ref: '#/definitions/schema.MetricValue'
description: Theoretical memory bandwidth per node
metricConfig:
description: Subcluster-specific metric configurations
items:
$ref: '#/definitions/schema.MetricConfig'
type: array
name:
description: Name of the subcluster (e.g., "main", "gpu", "bigmem")
type: string
nodes:
description: Node list in condensed format (e.g., "node[001-100]")
type: string
processorType:
description: CPU model (e.g., "Intel Xeon Gold 6148")
type: string
socketsPerNode:
description: Number of CPU sockets per node
type: integer
threadsPerCore:
description: Number of hardware threads per core (SMT level)
type: integer
topology:
allOf:
- $ref: '#/definitions/schema.Topology'
description: Hardware topology of nodes in this subcluster
type: object
schema.SubClusterConfig:
properties:
alert:
description: Alert threshold (requires attention)
type: number
caution:
description: Caution threshold (concerning but not critical)
type: number
energy:
description: Energy measurement configuration
type: string
footprint:
description: Footprint category for this metric
type: string
lowerIsBetter:
description: Whether lower values indicate better performance
type: boolean
name:
description: Metric name (e.g., "cpu_load", "mem_used")
type: string
normal:
description: Normal/typical value (good performance)
type: number
peak:
description: Peak/maximum expected value (best performance)
type: number
remove:
description: Whether to exclude this metric for this subcluster
type: boolean
restrict:
description: Restrict visibility to non user roles
type: boolean
unit:
allOf:
- $ref: '#/definitions/schema.Unit'
description: Unit of measurement
type: object
schema.Tag:
description: Defines a tag using name and type.
properties:
id:
type: integer
name:
example: Testjob
type: string
scope:
example: global
type: string
type:
example: Debug
type: string
type: object
schema.Topology:
properties:
accelerators:
description: Attached accelerators (GPUs, etc.)
items:
$ref: '#/definitions/schema.Accelerator'
type: array
core:
description: Hardware threads grouped by core
items:
items:
type: integer
type: array
type: array
die:
description: Hardware threads grouped by die (optional)
items:
items:
type: integer
type: array
type: array
memoryDomain:
description: Hardware threads grouped by NUMA domain
items:
items:
type: integer
type: array
type: array
node:
description: All hardware thread IDs on this node
items:
type: integer
type: array
socket:
description: Hardware threads grouped by socket
items:
items:
type: integer
type: array
type: array
type: object
schema.Unit:
properties:
base:
description: Base unit (e.g., "B/s", "F/s", "W")
type: string
prefix:
description: SI prefix (e.g., "G", "M", "K", "T")
type: string
type: object
host: localhost:8080
info:
contact:
email: support@clustercockpit.org
name: ClusterCockpit Project
url: https://github.com/ClusterCockpit
description: API for batch job control.
license:
name: MIT License
url: https://opensource.org/licenses/MIT
title: ClusterCockpit REST API
version: 1.0.0
paths:
/api/clusters/:
get:
description: Get a list of all cluster configs. Specific cluster can be requested
using query parameter.
parameters:
- description: Job Cluster
in: query
name: cluster
type: string
produces:
- application/json
responses:
"200":
description: Array of clusters
schema:
$ref: '#/definitions/api.GetClustersAPIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
security:
- ApiKeyAuth: []
summary: Lists all cluster configs
tags:
- Cluster query
/api/jobs/:
get:
description: |-
Get a list of all jobs. Filters can be applied using query parameters.
Number of results can be limited by page. Results are sorted by descending startTime.
parameters:
- description: Job State
enum:
- running
- completed
- failed
- cancelled
- stopped
- timeout
in: query
name: state
type: string
- description: Job Cluster
in: query
name: cluster
type: string
- description: 'Syntax: ''$from-$to'', as unix epoch timestamps in seconds'
in: query
name: start-time
type: string
- description: 'Items per page (Default: 25)'
in: query
name: items-per-page
type: integer
- description: 'Page Number (Default: 1)'
in: query
name: page
type: integer
- description: Include metadata (e.g. jobScript) in response
in: query
name: with-metadata
type: boolean
produces:
- application/json
responses:
"200":
description: Job array and page info
schema:
$ref: '#/definitions/api.GetJobsAPIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
security:
- ApiKeyAuth: []
summary: Lists all jobs
tags:
- Job query
/api/jobs/{id}:
get:
description: |-
Job to get is specified by database ID
Returns full job resource information according to 'Job' scheme and all metrics according to 'JobData'.
parameters:
- description: Database ID of Job
in: path
name: id
required: true
type: integer
- description: Include all available metrics
in: query
name: all-metrics
type: boolean
produces:
- application/json
responses:
"200":
description: Job resource
schema:
$ref: '#/definitions/api.GetJobAPIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"404":
description: Resource not found
schema:
$ref: '#/definitions/api.ErrorResponse'
"422":
description: 'Unprocessable Entity: finding job failed: sql: no rows in
result set'
schema:
$ref: '#/definitions/api.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
security:
- ApiKeyAuth: []
summary: Get job meta and optional all metric data
tags:
- Job query
post:
consumes:
- application/json
description: |-
Job to get is specified by database ID
Returns full job resource information according to 'Job' scheme and all metrics according to 'JobData'.
parameters:
- description: Database ID of Job
in: path
name: id
required: true
type: integer
- description: Array of metric names
in: body
name: request
required: true
schema:
items:
type: string
type: array
produces:
- application/json
responses:
"200":
description: Job resource
schema:
$ref: '#/definitions/api.GetJobAPIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"404":
description: Resource not found
schema:
$ref: '#/definitions/api.ErrorResponse'
"422":
description: 'Unprocessable Entity: finding job failed: sql: no rows in
result set'
schema:
$ref: '#/definitions/api.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
security:
- ApiKeyAuth: []
summary: Get job meta and configurable metric data
tags:
- Job query
/api/jobs/delete_job/:
delete:
consumes:
- application/json
description: Job to delete is specified by request body. All fields are required
in this case.
parameters:
- description: All fields required
in: body
name: request
required: true
schema:
$ref: '#/definitions/api.DeleteJobAPIRequest'
produces:
- application/json
responses:
"200":
description: Success message
schema:
$ref: '#/definitions/api.DefaultAPIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"404":
description: Resource not found