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
  • Constructor Details

    • TaskApi

      public TaskApi()
    • TaskApi

      public TaskApi(ApiClient apiClient)
  • 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 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)
      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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      TaskResponse
      Throws:
      ApiException - if fails to make API call
    • getTaskById

      public TaskResponse getTaskById(String taskId) throws ApiException
      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 ApiException
      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)
      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 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)
      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 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)
      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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<TaskSearchResponse>
      Throws:
      ApiException - if fails to make API call
    • unassignTask

      public TaskResponse unassignTask(String taskId) throws ApiException
      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 ApiException
      Unassign 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 ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      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.