"description":"Array of tag-objects for request payload",
"title":"ClusterCockpit REST API",
"termsOfService":"TODO",
"contact":{
"name":"HPC-Support",
"url":"TODO",
"email":"hpc-support@fau.de"
},
"license":{
"name":"MIT License",
"url":"https://opensource.org/licenses/MIT"
},
"version":"0.1.0"
},
"host":"clustercockpit.localhost:8082",
"basePath":"/api",
"paths":{
"/jobs/":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Get a list of all jobs. Filters can be applied using query parameters.",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"jobs"
],
"summary":"List all jobs",
"parameters":[
{
"enum":[
"running",
"completed",
"failed",
"canceled",
"stopped",
"timeout"
],
"type":"string",
"description":"Job State",
"name":"state",
"in":"query"
},
{
"type":"string",
"description":"Job Cluster",
"name":"cluster",
"in":"query"
},
{
"type":"string",
"description":"Syntax: \u003cfrom\u003e-\u003cto\u003e, where \u003cfrom\u003e and \u003cto\u003e are unix timestamps in seconds",
"name":"start-time",
"in":"query"
},
{
"type":"integer",
"description":"Page Number",
"name":"page",
"in":"query"
},
{
"type":"integer",
"description":"Items per page",
"name":"items-per-page",
"in":"query"
},
{
"type":"boolean",
"description":"Include metadata in response",
"name":"with-metadata",
"in":"query"
}
],
"responses":{
"200":{
"description":"Array of jobs",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/schema.Job"
}
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.ErrorResponse"
}
}
}
}
},
"/jobs/start_job/":{
"post":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"A new job started. The body should be in the `meta.json` format\nbut some fields required there are optional here (e.g. `jobState` defaults to \"running\").",
"description":"Add one or more tags as array in request body to job specified by DB ID.",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"jobs"
],
"summary":"Add one or more tags to a job",
"parameters":[
{
"type":"integer",
"description":"Job Database ID",
"name":"id",
"in":"path",
"required":true
},
{
"description":"Array of tag-objects to add",
"name":"request",
"in":"body",
"required":true,
"schema":{
"description":"Array of tag-objects for request payload",
"type":"array",
"items":{
"type":"object",
"properties":{
"name":{
"description":"Tag Name",
"type":"string"
},
"type":{
"description":"Tag Type",
"type":"string"
}
}
}
}
}
],
"responses":{
"200":{
"description":"Job resource",
"schema":{
"$ref":"#/definitions/schema.Job"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.ErrorResponse"
}
},
"404":{
"description":"Job or tag does not exist",
"schema":{
"$ref":"#/definitions/api.ErrorResponse"
}
}
}
}
}
},
"definitions":{
"api.ErrorResponse":{
"description":"Error Response when using API.",
"type":"object",
"properties":{
"error":{
"description":"Error Message",
"type":"string"
},
"status":{
"description":"Statustext of Errorcode",
"type":"string"
}
}
},
"api.StartJobApiResponse":{
"description":"Successful job start response with database id of new job.",
"type":"object",
"properties":{
"id":{
"description":"Database ID of new job",
"type":"integer"
}
}
},
"api.StopJobApiRequest":{
"description":"Request to stop running job using stop time and state. Optional fields: JobId, ClusterId and StartTime. They are only used if no database id was provided.",