Task definitions¶
Jobs are made up of a number of tasks that execute in a specific order.
Task definitions¶
Retrieve task definitions¶
- 
GET/task-definition¶
- Retrieves all tasks that have been defined in the system. - Query Parameters: - type (string) – Job type to retrieve task definitions for.
 - Produces: - application/xml, application/json – TaskDefinitionListDocument
 - Role: - _taskdefinition_read 
Retrieve task definitions by type¶
- 
GET/task-definition/jobtype/(type)¶
- Retrieves the tasks that have been defined for a specific job type. - Produces: - application/xml, application/json – TaskDefinitionListDocument
 - Role: - _taskdefinition_read 
Define new task¶
- 
POST/task-definition¶
- Defines one or more new tasks. - Query Parameters: - url (boolean) – - true- Return list of URLs.
- false(default) - Return list of ids.
 
 - Accepts: - application/xml, application/json – TaskDefinitionListDocument
 - Produces: - application/xml, application/json – URIListDocument
 - Role: - _taskdefinition_write 
- url (boolean) – 
Retrieve a task¶
- 
GET/task-definition/(task-id)¶
- 
GET/task-definition/jobtype/(type)/step/(step)¶
- Retrieves the definition document for a task with a specific id. - Produces: - application/xml, application/json – TaskDefinitionDocument
 - Role: - _taskdefinition_read 
Validate a task¶
- 
GET/task-definition/(task-id)/validate¶
- 
GET/task-definition/jobtype/(type)/step/(step)/validate¶
- Verifies that the bean referred to in the task can be resolved and that it contains the specified method. - Does nothing if the task is a script task. - Status Codes: - 200 – The bean and method exists.
- 400 – If the bean or method could not be found.
 - Produces: - text/plain – Informational status text.
 - Role: - _taskdefinition_read 
Delete a task¶
Update an existing task¶
- 
PUT/task-definition/(task-id)¶
- 
PUT/task-definition/jobtype/(type)/step/(step)¶
- Updates the task. - Accepts: - application/xml, application/json – TaskDefinitionDocument
 - Produces: - application/xml, application/json – TaskDefinitionDocument
 - Role: - _taskdefinition_write 
Custom job types¶
Create a new custom job type¶
- 
POST/task-definition/jobtype/(type)¶
- Creates a new job type with the specified name. The recommended format of the - typepath parameter is- {VENDOR_PREFIX}_{JOB_TYPE}.- Query Parameters: - id (integer) – Required. An integer between 20000 and 30000, must be unique among job types.
 - Status Codes: - 409 – Name or id already taken.
- 400 – If name or id was not specified.
 - Produces: - application/xml, application/json – TaskDefinitionListDocument
 - Role: - _taskdefinition_write 
Task definition scripts¶
Retrieve the script for a task definition¶
Job graphs¶
In order to easily see the dependencies between steps for a particular job type, there is functionality to render the job definition as a graph. In order to render the graph, the Graphviz package is required.