Class TaskApi
java.lang.Object
io.camunda.tasklist.generated.invoker.BaseApi
io.camunda.tasklist.generated.api.TaskApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-10-29T10:52:23.981575172Z[Etc/UTC]",
comments="Generator version: 7.8.0")
public class TaskApi
extends BaseApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignTask(String taskId, TaskAssignRequest taskAssignRequest) Assign a task Assign a task with `taskId` to `assignee` or the active user.assignTask(String taskId, TaskAssignRequest taskAssignRequest, Map<String, String> additionalHeaders) Assign a task Assign a task with `taskId` to `assignee` or the active user.completeTask(String taskId, TaskCompleteRequest taskCompleteRequest) Complete a task Complete a task with `taskId` and optional `variables`.completeTask(String taskId, TaskCompleteRequest taskCompleteRequest, Map<String, String> additionalHeaders) Complete a task Complete a task with `taskId` and optional `variables`.getTaskById(String taskId) Get a task Get one task by id.getTaskById(String taskId, Map<String, String> additionalHeaders) Get a task Get one task by id.<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.voidsaveDraftTaskVariables(String taskId, SaveVariablesRequest saveVariablesRequest) Save draft variables This operation performs several actions: <br/><ol><li>Validates the task and draft variables.</li><li>Deletes existing draft variables for the task.</li><li>Checks for new draft variables.voidsaveDraftTaskVariables(String taskId, SaveVariablesRequest saveVariablesRequest, Map<String, String> additionalHeaders) Save draft variables This operation performs several actions: <br/><ol><li>Validates the task and draft variables.</li><li>Deletes existing draft variables for the task.</li><li>Checks for new draft variables.searchTasks(TaskSearchRequest taskSearchRequest) Search tasks Returns the list of tasks that satisfy search request params.<br><ul><li>If an empty body is provided, all tasks are returned.</li><li>Only one of `[searchAfter, searchAfterOrEqual, searchBefore, searchBeforeOrEqual]` search options must be present in request.</li></ul>searchTasks(TaskSearchRequest taskSearchRequest, Map<String, String> additionalHeaders) Search tasks Returns the list of tasks that satisfy search request params.<br><ul><li>If an empty body is provided, all tasks are returned.</li><li>Only one of `[searchAfter, searchAfterOrEqual, searchBefore, searchBeforeOrEqual]` search options must be present in request.</li></ul>searchTaskVariables(String taskId, VariablesSearchRequest variablesSearchRequest) Search task variables This method returns a list of task variables for the specified `taskId` and `variableName`.<br>If the request body is not provided or if the `variableNames` parameter in the request is empty, all variables associated with the task will be returned.searchTaskVariables(String taskId, VariablesSearchRequest variablesSearchRequest, Map<String, String> additionalHeaders) Search task variables This method returns a list of task variables for the specified `taskId` and `variableName`.<br>If the request body is not provided or if the `variableNames` parameter in the request is empty, all variables associated with the task will be returned.unassignTask(String taskId) Unassign a task Unassign a task with `taskId`.unassignTask(String taskId, Map<String, String> additionalHeaders) Unassign a task Unassign a task with `taskId`.Methods inherited from class io.camunda.tasklist.generated.invoker.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
TaskApi
public TaskApi() -
TaskApi
-
-
Method Details
-
assignTask
public TaskResponse assignTask(String taskId, TaskAssignRequest taskAssignRequest) throws ApiException Assign a task Assign a task with `taskId` to `assignee` or the active user. Returns the task.- Parameters:
taskId- The ID of the task. (required)taskAssignRequest- When using REST API with JWT authentication token following request body parameters may be used. (optional)- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
assignTask
public TaskResponse assignTask(String taskId, TaskAssignRequest taskAssignRequest, Map<String, String> additionalHeaders) throws ApiExceptionAssign a task Assign a task with `taskId` to `assignee` or the active user. Returns the task.- Parameters:
taskId- The ID of the task. (required)taskAssignRequest- When using REST API with JWT authentication token following request body parameters may be used. (optional)additionalHeaders- additionalHeaders for this call- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
completeTask
public TaskResponse completeTask(String taskId, TaskCompleteRequest taskCompleteRequest) throws ApiException Complete a task Complete a task with `taskId` and optional `variables`. Returns the task.- Parameters:
taskId- The ID of the task. (required)taskCompleteRequest- (optional)- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
completeTask
public TaskResponse completeTask(String taskId, TaskCompleteRequest taskCompleteRequest, Map<String, String> additionalHeaders) throws ApiExceptionComplete a task Complete a task with `taskId` and optional `variables`. Returns the task.- Parameters:
taskId- The ID of the task. (required)taskCompleteRequest- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
getTaskById
Get a task Get one task by id. Returns task or error when task does not exist.- Parameters:
taskId- The ID of the task. (required)- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
getTaskById
public TaskResponse getTaskById(String taskId, Map<String, String> additionalHeaders) throws ApiExceptionGet a task Get one task by id. Returns task or error when task does not exist.- Parameters:
taskId- The ID of the task. (required)additionalHeaders- additionalHeaders for this call- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
saveDraftTaskVariables
public void saveDraftTaskVariables(String taskId, SaveVariablesRequest saveVariablesRequest) throws ApiException Save draft variables This operation performs several actions: <br/><ol><li>Validates the task and draft variables.</li><li>Deletes existing draft variables for the task.</li><li>Checks for new draft variables. If a new variable's `name` matches an existing one but the `value` differs, it is saved. In case of duplicate draft variable names, the last variable's value is kept.</li></ol><b>NOTE:</b><ul><li>Invoking this method successively will overwrite all existing draft variables. Only draft variables submitted in the most recent request body will be persisted. Therefore, ensure you include all necessary variables in each request to maintain the intended variable set.</li><li>The UI does not currently display the values for draft variables that are created via this endpoint.</li></ul>- Parameters:
taskId- The ID of the task. (required)saveVariablesRequest- (required)- Throws:
ApiException- if fails to make API call
-
saveDraftTaskVariables
public void saveDraftTaskVariables(String taskId, SaveVariablesRequest saveVariablesRequest, Map<String, String> additionalHeaders) throws ApiExceptionSave draft variables This operation performs several actions: <br/><ol><li>Validates the task and draft variables.</li><li>Deletes existing draft variables for the task.</li><li>Checks for new draft variables. If a new variable's `name` matches an existing one but the `value` differs, it is saved. In case of duplicate draft variable names, the last variable's value is kept.</li></ol><b>NOTE:</b><ul><li>Invoking this method successively will overwrite all existing draft variables. Only draft variables submitted in the most recent request body will be persisted. Therefore, ensure you include all necessary variables in each request to maintain the intended variable set.</li><li>The UI does not currently display the values for draft variables that are created via this endpoint.</li></ul>- Parameters:
taskId- The ID of the task. (required)saveVariablesRequest- (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
searchTaskVariables
public List<VariableSearchResponse> searchTaskVariables(String taskId, VariablesSearchRequest variablesSearchRequest) throws ApiException Search task variables This method returns a list of task variables for the specified `taskId` and `variableName`.<br>If the request body is not provided or if the `variableNames` parameter in the request is empty, all variables associated with the task will be returned.- Parameters:
taskId- The ID of the task. (required)variablesSearchRequest- (optional)- Returns:
- List<VariableSearchResponse>
- Throws:
ApiException- if fails to make API call
-
searchTaskVariables
public List<VariableSearchResponse> searchTaskVariables(String taskId, VariablesSearchRequest variablesSearchRequest, Map<String, String> additionalHeaders) throws ApiExceptionSearch task variables This method returns a list of task variables for the specified `taskId` and `variableName`.<br>If the request body is not provided or if the `variableNames` parameter in the request is empty, all variables associated with the task will be returned.- Parameters:
taskId- The ID of the task. (required)variablesSearchRequest- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- List<VariableSearchResponse>
- Throws:
ApiException- if fails to make API call
-
searchTasks
public List<TaskSearchResponse> searchTasks(TaskSearchRequest taskSearchRequest) throws ApiException Search tasks Returns the list of tasks that satisfy search request params.<br><ul><li>If an empty body is provided, all tasks are returned.</li><li>Only one of `[searchAfter, searchAfterOrEqual, searchBefore, searchBeforeOrEqual]` search options must be present in request.</li></ul>- Parameters:
taskSearchRequest- (optional)- Returns:
- List<TaskSearchResponse>
- Throws:
ApiException- if fails to make API call
-
searchTasks
public List<TaskSearchResponse> searchTasks(TaskSearchRequest taskSearchRequest, Map<String, String> additionalHeaders) throws ApiExceptionSearch tasks Returns the list of tasks that satisfy search request params.<br><ul><li>If an empty body is provided, all tasks are returned.</li><li>Only one of `[searchAfter, searchAfterOrEqual, searchBefore, searchBeforeOrEqual]` search options must be present in request.</li></ul>- Parameters:
taskSearchRequest- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- List<TaskSearchResponse>
- Throws:
ApiException- if fails to make API call
-
unassignTask
Unassign a task Unassign a task with `taskId`. Returns the task.- Parameters:
taskId- The ID of the task. (required)- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
unassignTask
public TaskResponse unassignTask(String taskId, Map<String, String> additionalHeaders) throws ApiExceptionUnassign a task Unassign a task with `taskId`. Returns the task.- Parameters:
taskId- The ID of the task. (required)additionalHeaders- additionalHeaders for this call- Returns:
- TaskResponse
- Throws:
ApiException- if fails to make API call
-
invokeAPI
public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- Parameters:
url- The URL for the request, either full URL or only the path.method- The HTTP method for the request.request- The request object.returnType- The return type.additionalHeaders- Additional headers for the request.- Returns:
- The API response in the specified type.
- Throws:
ApiException- if fails to make API call.
-