Cluster API job’s definitions

Cluster API documentation for job’s definitions

Jobsdefs

GET /jobsdefs

Get the job’s definitions

Response JSON Object:
 
  • [key].autostart (boolean) –
  • [key].byCluster (boolean) – If the job is run by each cluster.
  • [key].clusterCategories[] (string) – List of cluster categories for which the job must start.
  • [key].dependencies[] (string) –
  • [key].template (string) –

Example response:

{
  "myJob": {
    "autostart": true,
    "dependencies": [
      "serviceDependency"
    ],
    "byCluster": false,
    "clusterCategories": "cluster",
    "template": "My template"
  }
}
POST /jobsdefs

Set the job’s definitions

Request JSON Object:
 
  • [key].autostart (boolean) –
  • [key].byCluster (boolean) – If the job is run by each cluster.
  • [key].clusterCategories[] (string) – List of cluster categories for which the job must start.
  • [key].dependencies[] (string) –
  • [key].template (string) –
Query Parameters:
 
  • force – Skip the service running check

Example query:

{
  "myJob": {
    "autostart": true,
    "dependencies": [
      "serviceDependency"
    ],
    "byCluster": false,
    "clusterCategories": "cluster",
    "template": "My template"
  }
}
DELETE /jobsdefs

Delete all job’s definitions

Query Parameters:
 
  • force – Skip the service running check
POST /jobsdef/{jobID}

Create a job’s definition

Parameters:
  • jobID – The job ID
Request JSON Object:
 
  • autostart (boolean) –
  • byCluster (boolean) – If the job is run by each cluster.
  • clusterCategories[] (string) – List of cluster categories for which the job must start.
  • dependencies[] (string) –
  • template (string) –
Query Parameters:
 
  • force – Skip the service running check

Example query:

{
  "autostart": true,
  "dependencies": [
    "serviceDependency"
  ],
  "byCluster": false,
  "clusterCategories": "cluster",
  "template": "My template"
}
PUT /jobsdef/{jobID}

Update a job’s definition

Parameters:
  • jobID – The job ID
Request JSON Object:
 
  • autostart (boolean) –
  • byCluster (boolean) – If the job is run by each cluster.
  • clusterCategories[] (string) – List of cluster categories for which the job must start.
  • dependencies[] (string) –
  • template (string) –
Query Parameters:
 
  • force – Skip the service running check

Example query:

{
  "autostart": true,
  "dependencies": [
    "serviceDependency"
  ],
  "byCluster": false,
  "clusterCategories": "cluster",
  "template": "My template"
}
DELETE /jobsdef/{jobID}

Delete a job definition

Parameters:
  • jobID – The job ID