2022-09-15 12:37:44 +02:00
|
|
|
basePath: /api
|
|
|
|
definitions:
|
2023-08-21 12:12:28 +02:00
|
|
|
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
|
2022-11-11 15:26:27 +01:00
|
|
|
api.ApiTag:
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: Tag Name
|
|
|
|
example: Testjob
|
|
|
|
type: string
|
|
|
|
type:
|
|
|
|
description: Tag Type
|
|
|
|
example: Debug
|
|
|
|
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.DeleteJobApiResponse:
|
|
|
|
properties:
|
|
|
|
msg:
|
|
|
|
type: string
|
|
|
|
type: object
|
2024-03-08 08:51:05 +01:00
|
|
|
api.EditMetaRequest:
|
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
example: jobScript
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
example: bash script
|
|
|
|
type: string
|
|
|
|
type: object
|
2022-09-15 12:37:44 +02:00
|
|
|
api.ErrorResponse:
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
description: Error Message
|
|
|
|
type: string
|
|
|
|
status:
|
|
|
|
description: Statustext of Errorcode
|
|
|
|
type: string
|
|
|
|
type: object
|
2023-06-14 15:03:01 +02:00
|
|
|
api.GetJobApiResponse:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/api.JobMetricWithName'
|
|
|
|
type: array
|
|
|
|
meta:
|
|
|
|
$ref: '#/definitions/schema.Job'
|
|
|
|
type: object
|
2023-02-27 07:49:37 +01:00
|
|
|
api.GetJobsApiResponse:
|
|
|
|
properties:
|
|
|
|
items:
|
|
|
|
description: Number of jobs returned
|
|
|
|
type: integer
|
|
|
|
jobs:
|
|
|
|
description: Array of jobs
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.JobMeta'
|
|
|
|
type: array
|
|
|
|
page:
|
|
|
|
description: Page id returned
|
|
|
|
type: integer
|
|
|
|
type: object
|
2023-06-14 15:03:01 +02:00
|
|
|
api.JobMetricWithName:
|
|
|
|
properties:
|
|
|
|
metric:
|
|
|
|
$ref: '#/definitions/schema.JobMetric'
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
scope:
|
|
|
|
$ref: '#/definitions/schema.MetricScope'
|
|
|
|
type: object
|
2022-09-15 12:37:44 +02:00
|
|
|
api.StartJobApiResponse:
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: Database ID of new job
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
api.StopJobApiRequest:
|
|
|
|
properties:
|
|
|
|
cluster:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Cluster of job
|
|
|
|
example: fritz
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
jobId:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Cluster Job ID of job
|
|
|
|
example: 123000
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
jobState:
|
2023-02-21 18:13:16 +01:00
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/schema.JobState'
|
|
|
|
description: Final job state
|
2022-09-21 11:54:19 +02:00
|
|
|
example: completed
|
2022-09-15 12:37:44 +02:00
|
|
|
startTime:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Start Time of job as epoch
|
|
|
|
example: 1649723812
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
stopTime:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Stop Time of job as epoch
|
|
|
|
example: 1649763839
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
2022-09-21 11:54:19 +02:00
|
|
|
required:
|
|
|
|
- jobState
|
|
|
|
- stopTime
|
2022-09-15 12:37:44 +02:00
|
|
|
type: object
|
|
|
|
schema.Job:
|
2022-09-21 14:12:24 +02:00
|
|
|
description: Information of a HPC job.
|
2022-09-15 12:37:44 +02:00
|
|
|
properties:
|
|
|
|
arrayJobId:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of an array job
|
|
|
|
example: 123000
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
cluster:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a cluster
|
|
|
|
example: fritz
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
2023-06-14 14:33:36 +02:00
|
|
|
concurrentJobs:
|
|
|
|
$ref: '#/definitions/schema.JobLinkResultList'
|
2022-09-15 12:37:44 +02:00
|
|
|
duration:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Duration of job in seconds (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 43200
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
exclusive:
|
2022-09-21 14:12:24 +02:00
|
|
|
description: 'Specifies how nodes are shared: 0 - Shared among multiple jobs
|
|
|
|
of multiple users, 1 - Job exclusive (Default), 2 - Shared among multiple
|
|
|
|
jobs of same user'
|
|
|
|
example: 1
|
2022-09-21 11:54:19 +02:00
|
|
|
maximum: 2
|
|
|
|
minimum: 0
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
2024-03-08 08:51:05 +01:00
|
|
|
flopsAnyAvg:
|
|
|
|
description: FlopsAnyAvg as Float64
|
|
|
|
type: number
|
2022-09-15 12:37:44 +02:00
|
|
|
id:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a job in the database
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
jobId:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a job
|
|
|
|
example: 123000
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
jobState:
|
2023-02-21 18:13:16 +01:00
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/schema.JobState'
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Final state of job
|
2023-06-14 14:33:36 +02:00
|
|
|
enum:
|
|
|
|
- completed
|
|
|
|
- failed
|
|
|
|
- cancelled
|
|
|
|
- stopped
|
|
|
|
- timeout
|
|
|
|
- out_of_memory
|
2022-09-21 11:54:19 +02:00
|
|
|
example: completed
|
2024-03-08 08:51:05 +01:00
|
|
|
loadAvg:
|
|
|
|
description: LoadAvg as Float64
|
|
|
|
type: number
|
|
|
|
memBwAvg:
|
|
|
|
description: MemBwAvg as Float64
|
|
|
|
type: number
|
|
|
|
memUsedMax:
|
|
|
|
description: MemUsedMax as Float64
|
|
|
|
type: number
|
2022-09-15 12:37:44 +02:00
|
|
|
metaData:
|
|
|
|
additionalProperties:
|
|
|
|
type: string
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Additional information about the job
|
2022-09-15 12:37:44 +02:00
|
|
|
type: object
|
|
|
|
monitoringStatus:
|
2022-09-21 14:12:24 +02:00
|
|
|
description: 'State of monitoring system during job run: 0 - Disabled, 1 -
|
|
|
|
Running or Archiving (Default), 2 - Archiving Failed, 3 - Archiving Successfull'
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 1
|
2022-09-21 14:12:24 +02:00
|
|
|
maximum: 3
|
|
|
|
minimum: 0
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
numAcc:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Number of accelerators used (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 2
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
numHwthreads:
|
2023-06-14 14:33:36 +02:00
|
|
|
description: NumCores int32 `json:"numCores" db:"num_cores"
|
|
|
|
example:"20" minimum:"1"` //
|
|
|
|
Number of HWThreads used (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 20
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
numNodes:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Number of nodes used (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 2
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
partition:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The Slurm partition to which the job was submitted
|
|
|
|
example: main
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
project:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a project
|
|
|
|
example: abcd200
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
resources:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Resources used by job
|
2022-09-15 12:37:44 +02:00
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.Resource'
|
|
|
|
type: array
|
|
|
|
smt:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: SMT threads used by job
|
|
|
|
example: 4
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
startTime:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Start time as 'time.Time' data type
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
subCluster:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a sub cluster
|
|
|
|
example: main
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
tags:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: List of tags
|
2022-09-15 12:37:44 +02:00
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.Tag'
|
|
|
|
type: array
|
|
|
|
user:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a user
|
|
|
|
example: abcd100h
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
walltime:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Requested walltime of job in seconds (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 86400
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
type: object
|
2023-06-14 14:33:36 +02:00
|
|
|
schema.JobLink:
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
jobId:
|
|
|
|
type: integer
|
|
|
|
type: object
|
|
|
|
schema.JobLinkResultList:
|
|
|
|
properties:
|
|
|
|
count:
|
|
|
|
type: integer
|
|
|
|
items:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.JobLink'
|
|
|
|
type: array
|
|
|
|
type: object
|
2022-09-15 17:38:11 +02:00
|
|
|
schema.JobMeta:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Meta data information of a HPC job.
|
2022-09-15 17:38:11 +02:00
|
|
|
properties:
|
|
|
|
arrayJobId:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of an array job
|
|
|
|
example: 123000
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
cluster:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a cluster
|
|
|
|
example: fritz
|
2022-09-15 17:38:11 +02:00
|
|
|
type: string
|
2023-06-14 14:33:36 +02:00
|
|
|
concurrentJobs:
|
|
|
|
$ref: '#/definitions/schema.JobLinkResultList'
|
2022-09-15 17:38:11 +02:00
|
|
|
duration:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Duration of job in seconds (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 43200
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
exclusive:
|
2022-09-21 14:12:24 +02:00
|
|
|
description: 'Specifies how nodes are shared: 0 - Shared among multiple jobs
|
|
|
|
of multiple users, 1 - Job exclusive (Default), 2 - Shared among multiple
|
|
|
|
jobs of same user'
|
|
|
|
example: 1
|
2022-09-21 11:54:19 +02:00
|
|
|
maximum: 2
|
|
|
|
minimum: 0
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
id:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a job in the database
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
jobId:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a job
|
|
|
|
example: 123000
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
jobState:
|
2023-02-21 18:13:16 +01:00
|
|
|
allOf:
|
|
|
|
- $ref: '#/definitions/schema.JobState'
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Final state of job
|
2023-06-14 14:33:36 +02:00
|
|
|
enum:
|
|
|
|
- completed
|
|
|
|
- failed
|
|
|
|
- cancelled
|
|
|
|
- stopped
|
|
|
|
- timeout
|
|
|
|
- out_of_memory
|
2022-09-21 11:54:19 +02:00
|
|
|
example: completed
|
2022-09-15 17:38:11 +02:00
|
|
|
metaData:
|
|
|
|
additionalProperties:
|
|
|
|
type: string
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Additional information about the job
|
2022-09-15 17:38:11 +02:00
|
|
|
type: object
|
|
|
|
monitoringStatus:
|
2022-09-21 14:12:24 +02:00
|
|
|
description: 'State of monitoring system during job run: 0 - Disabled, 1 -
|
|
|
|
Running or Archiving (Default), 2 - Archiving Failed, 3 - Archiving Successfull'
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 1
|
2022-09-21 14:12:24 +02:00
|
|
|
maximum: 3
|
|
|
|
minimum: 0
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
numAcc:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Number of accelerators used (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 2
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
numHwthreads:
|
2023-06-14 14:33:36 +02:00
|
|
|
description: NumCores int32 `json:"numCores" db:"num_cores"
|
|
|
|
example:"20" minimum:"1"` //
|
|
|
|
Number of HWThreads used (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 20
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
numNodes:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Number of nodes used (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 2
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
partition:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The Slurm partition to which the job was submitted
|
|
|
|
example: main
|
2022-09-15 17:38:11 +02:00
|
|
|
type: string
|
|
|
|
project:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a project
|
|
|
|
example: abcd200
|
2022-09-15 17:38:11 +02:00
|
|
|
type: string
|
|
|
|
resources:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Resources used by job
|
2022-09-15 17:38:11 +02:00
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.Resource'
|
|
|
|
type: array
|
|
|
|
smt:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: SMT threads used by job
|
|
|
|
example: 4
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
startTime:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Start epoch time stamp in seconds (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 1649723812
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
statistics:
|
|
|
|
additionalProperties:
|
|
|
|
$ref: '#/definitions/schema.JobStatistics'
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Metric statistics of job
|
2022-09-15 17:38:11 +02:00
|
|
|
type: object
|
|
|
|
subCluster:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a sub cluster
|
|
|
|
example: main
|
2022-09-15 17:38:11 +02:00
|
|
|
type: string
|
|
|
|
tags:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: List of tags
|
2022-09-15 17:38:11 +02:00
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.Tag'
|
|
|
|
type: array
|
|
|
|
user:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The unique identifier of a user
|
|
|
|
example: abcd100h
|
2022-09-15 17:38:11 +02:00
|
|
|
type: string
|
|
|
|
walltime:
|
2022-09-21 14:21:13 +02:00
|
|
|
description: Requested walltime of job in seconds (Min > 0)
|
2022-09-21 11:54:19 +02:00
|
|
|
example: 86400
|
2022-09-21 14:21:13 +02:00
|
|
|
minimum: 1
|
2022-09-15 17:38:11 +02:00
|
|
|
type: integer
|
|
|
|
type: object
|
2023-06-14 15:03:01 +02:00
|
|
|
schema.JobMetric:
|
|
|
|
properties:
|
|
|
|
series:
|
|
|
|
items:
|
|
|
|
$ref: '#/definitions/schema.Series'
|
|
|
|
type: array
|
|
|
|
statisticsSeries:
|
|
|
|
$ref: '#/definitions/schema.StatsSeries'
|
|
|
|
timestep:
|
|
|
|
type: integer
|
|
|
|
unit:
|
|
|
|
$ref: '#/definitions/schema.Unit'
|
|
|
|
type: object
|
2023-02-21 18:13:16 +01:00
|
|
|
schema.JobState:
|
|
|
|
enum:
|
|
|
|
- running
|
|
|
|
- completed
|
|
|
|
- failed
|
|
|
|
- cancelled
|
|
|
|
- stopped
|
|
|
|
- timeout
|
|
|
|
- preempted
|
|
|
|
- out_of_memory
|
|
|
|
type: string
|
|
|
|
x-enum-varnames:
|
|
|
|
- JobStateRunning
|
|
|
|
- JobStateCompleted
|
|
|
|
- JobStateFailed
|
|
|
|
- JobStateCancelled
|
|
|
|
- JobStateStopped
|
|
|
|
- JobStateTimeout
|
|
|
|
- JobStatePreempted
|
|
|
|
- JobStateOutOfMemory
|
2022-09-15 17:38:11 +02:00
|
|
|
schema.JobStatistics:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Specification for job metric statistics.
|
2022-09-15 17:38:11 +02:00
|
|
|
properties:
|
|
|
|
avg:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Job metric average
|
|
|
|
example: 2500
|
|
|
|
minimum: 0
|
2022-09-15 17:38:11 +02:00
|
|
|
type: number
|
|
|
|
max:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Job metric maximum
|
|
|
|
example: 3000
|
|
|
|
minimum: 0
|
2022-09-15 17:38:11 +02:00
|
|
|
type: number
|
|
|
|
min:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Job metric minimum
|
|
|
|
example: 2000
|
|
|
|
minimum: 0
|
2022-09-15 17:38:11 +02:00
|
|
|
type: number
|
|
|
|
unit:
|
2023-06-14 14:33:36 +02:00
|
|
|
$ref: '#/definitions/schema.Unit'
|
2022-09-15 17:38:11 +02:00
|
|
|
type: object
|
2023-06-14 15:03:01 +02:00
|
|
|
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:
|
|
|
|
type: number
|
|
|
|
max:
|
|
|
|
type: number
|
|
|
|
min:
|
|
|
|
type: number
|
|
|
|
type: object
|
2022-09-15 12:37:44 +02:00
|
|
|
schema.Resource:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: A resource used by a job
|
2022-09-15 12:37:44 +02:00
|
|
|
properties:
|
|
|
|
accelerators:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: List of of accelerator device ids
|
2022-09-15 12:37:44 +02:00
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
type: array
|
|
|
|
configuration:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: The configuration options of the node
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
hostname:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Name of the host (= node)
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
hwthreads:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: List of OS processor ids
|
2022-09-15 12:37:44 +02:00
|
|
|
items:
|
|
|
|
type: integer
|
|
|
|
type: array
|
|
|
|
type: object
|
2023-06-14 15:03:01 +02:00
|
|
|
schema.Series:
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
items:
|
|
|
|
type: number
|
|
|
|
type: array
|
|
|
|
hostname:
|
|
|
|
type: string
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
statistics:
|
|
|
|
$ref: '#/definitions/schema.MetricStatistics'
|
|
|
|
type: object
|
|
|
|
schema.StatsSeries:
|
|
|
|
properties:
|
|
|
|
max:
|
|
|
|
items:
|
|
|
|
type: number
|
|
|
|
type: array
|
|
|
|
mean:
|
|
|
|
items:
|
|
|
|
type: number
|
|
|
|
type: array
|
|
|
|
min:
|
|
|
|
items:
|
|
|
|
type: number
|
|
|
|
type: array
|
|
|
|
percentiles:
|
|
|
|
additionalProperties:
|
|
|
|
items:
|
|
|
|
type: number
|
|
|
|
type: array
|
|
|
|
type: object
|
|
|
|
type: object
|
2022-09-15 12:37:44 +02:00
|
|
|
schema.Tag:
|
2022-11-30 12:40:07 +01:00
|
|
|
description: Defines a tag using name and type.
|
2022-09-15 12:37:44 +02:00
|
|
|
properties:
|
|
|
|
id:
|
2023-08-18 17:18:31 +02:00
|
|
|
description: The unique DB identifier of a tag
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
|
|
|
name:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Tag Name
|
|
|
|
example: Testjob
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
type:
|
2022-09-21 11:54:19 +02:00
|
|
|
description: Tag Type
|
|
|
|
example: Debug
|
2022-09-15 12:37:44 +02:00
|
|
|
type: string
|
|
|
|
type: object
|
2023-06-14 14:33:36 +02:00
|
|
|
schema.Unit:
|
|
|
|
properties:
|
|
|
|
base:
|
|
|
|
type: string
|
|
|
|
prefix:
|
|
|
|
type: string
|
|
|
|
type: object
|
2022-11-11 15:26:27 +01:00
|
|
|
host: localhost:8080
|
2022-09-15 12:37:44 +02:00
|
|
|
info:
|
|
|
|
contact:
|
2022-09-16 06:09:55 +02:00
|
|
|
email: support@clustercockpit.org
|
2022-09-21 11:54:19 +02:00
|
|
|
name: ClusterCockpit Project
|
|
|
|
url: https://github.com/ClusterCockpit
|
2022-11-11 15:26:27 +01:00
|
|
|
description: API for batch job control.
|
2022-09-15 12:37:44 +02:00
|
|
|
license:
|
|
|
|
name: MIT License
|
|
|
|
url: https://opensource.org/licenses/MIT
|
|
|
|
title: ClusterCockpit REST API
|
2023-08-18 17:18:31 +02:00
|
|
|
version: 1.0.0
|
2022-09-15 12:37:44 +02:00
|
|
|
paths:
|
|
|
|
/jobs/:
|
|
|
|
get:
|
2022-09-22 13:32:40 +02:00
|
|
|
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.
|
2022-09-15 12:37:44 +02:00
|
|
|
parameters:
|
|
|
|
- description: Job State
|
|
|
|
enum:
|
|
|
|
- running
|
|
|
|
- completed
|
|
|
|
- failed
|
2022-09-21 11:54:19 +02:00
|
|
|
- cancelled
|
2022-09-15 12:37:44 +02:00
|
|
|
- stopped
|
|
|
|
- timeout
|
|
|
|
in: query
|
|
|
|
name: state
|
|
|
|
type: string
|
|
|
|
- description: Job Cluster
|
|
|
|
in: query
|
|
|
|
name: cluster
|
|
|
|
type: string
|
2022-09-21 11:54:19 +02:00
|
|
|
- description: 'Syntax: ''$from-$to'', as unix epoch timestamps in seconds'
|
2022-09-15 12:37:44 +02:00
|
|
|
in: query
|
|
|
|
name: start-time
|
|
|
|
type: string
|
2022-11-11 15:26:27 +01:00
|
|
|
- description: 'Items per page (Default: 25)'
|
2022-09-15 12:37:44 +02:00
|
|
|
in: query
|
2022-09-22 13:32:40 +02:00
|
|
|
name: items-per-page
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
2022-11-11 15:26:27 +01:00
|
|
|
- description: 'Page Number (Default: 1)'
|
2022-09-15 12:37:44 +02:00
|
|
|
in: query
|
2022-09-22 13:32:40 +02:00
|
|
|
name: page
|
2022-09-15 12:37:44 +02:00
|
|
|
type: integer
|
2022-09-22 13:32:40 +02:00
|
|
|
- description: Include metadata (e.g. jobScript) in response
|
2022-09-15 12:37:44 +02:00
|
|
|
in: query
|
|
|
|
name: with-metadata
|
|
|
|
type: boolean
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-02-27 07:49:37 +01:00
|
|
|
description: Job array and page info
|
2022-09-15 12:37:44 +02:00
|
|
|
schema:
|
2023-02-27 07:49:37 +01:00
|
|
|
$ref: '#/definitions/api.GetJobsApiResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:13:55 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2023-03-01 10:49:08 +01:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
2022-09-21 11:54:19 +02:00
|
|
|
summary: Lists all jobs
|
2022-11-11 15:26:27 +01:00
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job query
|
2023-06-14 14:33:36 +02:00
|
|
|
/jobs/{id}:
|
2023-06-14 15:03:01 +02:00
|
|
|
post:
|
2023-06-14 14:33:36 +02:00
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: |-
|
|
|
|
Job to get is specified by database ID
|
|
|
|
Returns full job resource information according to 'JobMeta' 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:
|
2023-06-14 15:03:01 +02:00
|
|
|
$ref: '#/definitions/api.GetJobApiResponse'
|
2023-06-14 14:33:36 +02:00
|
|
|
"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 complete job meta and metric data
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job query
|
2022-11-11 15:26:27 +01:00
|
|
|
/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.DeleteJobApiResponse'
|
|
|
|
"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: Remove a job from the sql database
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job remove
|
2022-11-11 15:26:27 +01:00
|
|
|
/jobs/delete_job/{id}:
|
|
|
|
delete:
|
|
|
|
description: Job to remove is specified by database ID. This will not remove
|
|
|
|
the job from the job archive.
|
|
|
|
parameters:
|
|
|
|
- description: Database ID of Job
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: Success message
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.DeleteJobApiResponse'
|
|
|
|
"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: Remove a job from the sql database
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job remove
|
2022-11-11 15:26:27 +01:00
|
|
|
/jobs/delete_job_before/{ts}:
|
|
|
|
delete:
|
2022-11-30 12:40:07 +01:00
|
|
|
description: Remove all jobs with start time before timestamp. The jobs will
|
|
|
|
not be removed from the job archive.
|
2022-11-11 15:26:27 +01:00
|
|
|
parameters:
|
|
|
|
- description: Unix epoch timestamp
|
|
|
|
in: path
|
|
|
|
name: ts
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: Success message
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.DeleteJobApiResponse'
|
|
|
|
"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: Remove a job from the sql database
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job remove
|
2024-03-08 08:51:05 +01:00
|
|
|
/jobs/edit_meta/{id}:
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: |-
|
|
|
|
Edit key value pairs in job metadata json
|
|
|
|
If a key already exists its content will be overwritten
|
|
|
|
parameters:
|
|
|
|
- description: Job Database ID
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
- description: Kay value pair to add
|
|
|
|
in: body
|
|
|
|
name: request
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.EditMetaRequest'
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: Updated job resource
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/schema.Job'
|
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
|
|
|
"404":
|
|
|
|
description: Job does not exist
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Edit meta-data json
|
|
|
|
tags:
|
|
|
|
- Job add and modify
|
2022-09-15 12:37:44 +02:00
|
|
|
/jobs/start_job/:
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: |-
|
2022-09-21 11:54:19 +02:00
|
|
|
Job specified in request body will be saved to database as "running" with new DB ID.
|
|
|
|
Job specifications follow the 'JobMeta' scheme, API will fail to execute if requirements are not met.
|
2022-09-15 12:37:44 +02:00
|
|
|
parameters:
|
|
|
|
- description: Job to add
|
|
|
|
in: body
|
|
|
|
name: request
|
|
|
|
required: true
|
|
|
|
schema:
|
2022-09-15 17:38:11 +02:00
|
|
|
$ref: '#/definitions/schema.JobMeta'
|
2022-09-15 12:37:44 +02:00
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: Job added successfully
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.StartJobApiResponse'
|
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:13:55 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
"422":
|
2022-09-21 17:03:01 +02:00
|
|
|
description: 'Unprocessable Entity: The combination of jobId, clusterId
|
|
|
|
and startTime does already exist'
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
2022-09-15 12:37:44 +02:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
2022-09-21 11:54:19 +02:00
|
|
|
summary: Adds a new job as "running"
|
2022-11-11 15:26:27 +01:00
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job add and modify
|
2022-09-15 12:37:44 +02:00
|
|
|
/jobs/stop_job/:
|
|
|
|
post:
|
|
|
|
description: |-
|
2022-09-21 11:54:19 +02:00
|
|
|
Job to stop is specified by request body. All fields are required in this case.
|
|
|
|
Returns full job resource information according to 'JobMeta' scheme.
|
2022-09-15 12:37:44 +02:00
|
|
|
parameters:
|
|
|
|
- description: All fields required
|
|
|
|
in: body
|
|
|
|
name: request
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.StopJobApiRequest'
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
2022-09-21 17:03:01 +02:00
|
|
|
"200":
|
2022-11-11 15:26:27 +01:00
|
|
|
description: Success message
|
2022-09-15 12:37:44 +02:00
|
|
|
schema:
|
2022-09-16 11:21:27 +02:00
|
|
|
$ref: '#/definitions/schema.JobMeta'
|
2022-09-15 12:37:44 +02:00
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:13:55 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
"404":
|
|
|
|
description: Resource not found
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"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'
|
2022-09-15 12:37:44 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
2022-09-21 11:54:19 +02:00
|
|
|
summary: Marks job as completed and triggers archiving
|
2022-11-11 15:26:27 +01:00
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job add and modify
|
2022-09-15 12:37:44 +02:00
|
|
|
/jobs/stop_job/{id}:
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
|
|
|
description: |-
|
2022-09-21 11:54:19 +02:00
|
|
|
Job to stop is specified by database ID. Only stopTime and final state are required in request body.
|
|
|
|
Returns full job resource information according to 'JobMeta' scheme.
|
2022-09-15 12:37:44 +02:00
|
|
|
parameters:
|
|
|
|
- description: Database ID of Job
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
2022-09-21 11:54:19 +02:00
|
|
|
- description: stopTime and final state in request body
|
2022-09-15 12:37:44 +02:00
|
|
|
in: body
|
|
|
|
name: request
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.StopJobApiRequest'
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
2022-09-21 17:03:01 +02:00
|
|
|
"200":
|
2022-09-15 12:37:44 +02:00
|
|
|
description: Job resource
|
|
|
|
schema:
|
2022-09-21 11:54:19 +02:00
|
|
|
$ref: '#/definitions/schema.JobMeta'
|
2022-09-15 12:37:44 +02:00
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:13:55 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
"404":
|
|
|
|
description: Resource not found
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"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'
|
2022-09-15 12:37:44 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
2022-09-21 11:54:19 +02:00
|
|
|
summary: Marks job as completed and triggers archiving
|
2022-11-11 15:26:27 +01:00
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job add and modify
|
2022-09-15 12:37:44 +02:00
|
|
|
/jobs/tag_job/{id}:
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- application/json
|
2022-09-21 11:54:19 +02:00
|
|
|
description: |-
|
|
|
|
Adds tag(s) to a job specified by DB ID. Name and Type of Tag(s) can be chosen freely.
|
|
|
|
If tagged job is already finished: Tag will be written directly to respective archive files.
|
2022-09-15 12:37:44 +02:00
|
|
|
parameters:
|
|
|
|
- description: Job Database ID
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: integer
|
|
|
|
- description: Array of tag-objects to add
|
|
|
|
in: body
|
|
|
|
name: request
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
items:
|
2022-11-11 15:26:27 +01:00
|
|
|
$ref: '#/definitions/api.ApiTag'
|
2022-09-15 12:37:44 +02:00
|
|
|
type: array
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2022-09-22 13:32:40 +02:00
|
|
|
description: Updated job resource
|
2022-09-15 12:37:44 +02:00
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/schema.Job'
|
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:13:55 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
"404":
|
|
|
|
description: Job or tag does not exist
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-21 17:03:01 +02:00
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
|
|
|
$ref: '#/definitions/api.ErrorResponse'
|
2022-09-15 12:37:44 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
2022-09-21 11:54:19 +02:00
|
|
|
summary: Adds one or more tags to a job
|
2022-11-11 15:26:27 +01:00
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- Job add and modify
|
2023-08-18 17:18:31 +02:00
|
|
|
/user/{id}:
|
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- multipart/form-data
|
|
|
|
description: |-
|
|
|
|
Modifies user defined by username (id) in one of four possible ways.
|
|
|
|
If more than one formValue is set then only the highest priority field is used.
|
2023-09-07 14:33:22 +02:00
|
|
|
Only accessible from IPs registered with apiAllowedIPs configuration option.
|
2023-08-18 17:18:31 +02:00
|
|
|
parameters:
|
|
|
|
- description: Database ID of User
|
|
|
|
in: path
|
|
|
|
name: id
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-08-21 12:12:28 +02:00
|
|
|
- description: 'Priority 1: Role to add'
|
|
|
|
enum:
|
|
|
|
- admin
|
|
|
|
- support
|
|
|
|
- manager
|
|
|
|
- user
|
|
|
|
- api
|
2023-08-18 17:18:31 +02:00
|
|
|
in: formData
|
|
|
|
name: add-role
|
|
|
|
type: string
|
2023-08-21 12:12:28 +02:00
|
|
|
- description: 'Priority 2: Role to remove'
|
|
|
|
enum:
|
|
|
|
- admin
|
|
|
|
- support
|
|
|
|
- manager
|
|
|
|
- user
|
|
|
|
- api
|
2023-08-18 17:18:31 +02:00
|
|
|
in: formData
|
|
|
|
name: remove-role
|
|
|
|
type: string
|
|
|
|
- description: 'Priority 3: Project to add'
|
|
|
|
in: formData
|
|
|
|
name: add-project
|
|
|
|
type: string
|
|
|
|
- description: 'Priority 4: Project to remove'
|
|
|
|
in: formData
|
|
|
|
name: remove-project
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- text/plain
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-08-21 12:12:28 +02:00
|
|
|
description: Success Response Message
|
2023-08-18 17:18:31 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"422":
|
|
|
|
description: 'Unprocessable Entity: The user could not be updated'
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Updates an existing user
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- User
|
2023-08-18 17:18:31 +02:00
|
|
|
/users/:
|
|
|
|
delete:
|
|
|
|
consumes:
|
|
|
|
- multipart/form-data
|
2023-09-07 14:33:22 +02:00
|
|
|
description: |-
|
|
|
|
User defined by username in form data will be deleted from database.
|
|
|
|
Only accessible from IPs registered with apiAllowedIPs configuration option.
|
2023-08-18 17:18:31 +02:00
|
|
|
parameters:
|
|
|
|
- description: User ID to delete
|
|
|
|
in: formData
|
|
|
|
name: username
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-08-21 12:12:28 +02:00
|
|
|
produces:
|
|
|
|
- text/plain
|
2023-08-18 17:18:31 +02:00
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: User deleted successfully
|
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"422":
|
|
|
|
description: 'Unprocessable Entity: deleting user failed'
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Deletes a user
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- User
|
2023-08-18 17:18:31 +02:00
|
|
|
get:
|
|
|
|
description: |-
|
|
|
|
Returns a JSON-encoded list of users.
|
|
|
|
Required query-parameter defines if all users or only users with additional special roles are returned.
|
2023-09-07 14:33:22 +02:00
|
|
|
Only accessible from IPs registered with apiAllowedIPs configuration option.
|
2023-08-18 17:18:31 +02:00
|
|
|
parameters:
|
|
|
|
- description: If returned list should contain all users or only users with
|
|
|
|
additional special roles
|
|
|
|
in: query
|
|
|
|
name: not-just-user
|
|
|
|
required: true
|
|
|
|
type: boolean
|
|
|
|
produces:
|
|
|
|
- application/json
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-08-21 12:12:28 +02:00
|
|
|
description: List of users returned successfully
|
2023-08-18 17:18:31 +02:00
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
items:
|
|
|
|
$ref: '#/definitions/api.ApiReturnedUser'
|
|
|
|
type: array
|
2023-08-18 17:18:31 +02:00
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Returns a list of users
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- User
|
2023-08-18 17:18:31 +02:00
|
|
|
post:
|
|
|
|
consumes:
|
|
|
|
- multipart/form-data
|
2023-09-07 14:33:22 +02:00
|
|
|
description: |-
|
|
|
|
User specified in form data will be saved to database.
|
|
|
|
Only accessible from IPs registered with apiAllowedIPs configuration option.
|
2023-08-18 17:18:31 +02:00
|
|
|
parameters:
|
|
|
|
- description: Unique user ID
|
|
|
|
in: formData
|
|
|
|
name: username
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: User password
|
|
|
|
in: formData
|
|
|
|
name: password
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-08-21 12:12:28 +02:00
|
|
|
- description: User role
|
|
|
|
enum:
|
|
|
|
- admin
|
|
|
|
- support
|
|
|
|
- manager
|
|
|
|
- user
|
|
|
|
- api
|
2023-08-18 17:18:31 +02:00
|
|
|
in: formData
|
|
|
|
name: role
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Managed project, required for new manager role user
|
|
|
|
in: formData
|
|
|
|
name: project
|
|
|
|
type: string
|
|
|
|
- description: Users name
|
|
|
|
in: formData
|
|
|
|
name: name
|
|
|
|
type: string
|
|
|
|
- description: Users email
|
|
|
|
in: formData
|
|
|
|
name: email
|
|
|
|
type: string
|
|
|
|
produces:
|
|
|
|
- text/plain
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-08-21 12:12:28 +02:00
|
|
|
description: Success Response
|
2023-08-18 17:18:31 +02:00
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
"400":
|
|
|
|
description: Bad Request
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"401":
|
|
|
|
description: Unauthorized
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"403":
|
|
|
|
description: Forbidden
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"422":
|
|
|
|
description: 'Unprocessable Entity: creating user failed'
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
"500":
|
|
|
|
description: Internal Server Error
|
|
|
|
schema:
|
2023-08-21 12:12:28 +02:00
|
|
|
type: string
|
2023-08-18 17:18:31 +02:00
|
|
|
security:
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
summary: Adds a new user
|
|
|
|
tags:
|
2023-09-07 15:14:09 +02:00
|
|
|
- User
|
2022-09-15 12:37:44 +02:00
|
|
|
securityDefinitions:
|
|
|
|
ApiKeyAuth:
|
|
|
|
in: header
|
|
|
|
name: X-Auth-Token
|
|
|
|
type: apiKey
|
|
|
|
swagger: "2.0"
|