User task with restApi

Hi, I am trying to expose a rest service that completes user tasks for that I have only a process instance ID.

Hi @pavan, welcome to the forums! Do you have any more details to share? I’m not quite sure what you’re asking for assistance with!

hi @nathan.loding in my case i want to expose an rest API to complete the user task that will be used by front end to complete .

Hi @pavan - there is already a REST API to do that. There are some possible security concerns with allowing your front-end to talk directly with your cluster; some users set up their own API between the front-end and Camunda’s API to forward the calls and enhance the security. But either way, you just need to call that API!

HI @nathan.loding in my case I am starting my camunda bpmn using a zeebe from the java rest API. here I will have only a process ID to execute the above API i need a task id but by using the zeebe i am unable to retrieve the task ID. I have 2 approcahes in mind now.

  1. query the operate API for the task details using the process id and the complete user task with task list ( for this for every API call i need a session token to authenticate task list and operate API).
  2. query the elastic search with process id and get the id so i can run this with zebee client . for elastic search we can sue simple basic authentication).
    I am confused to choose which one is better or is there any other way which is straight forward and simple.

Hi @pavan - I’m still a bit confused on your setup. Are you using SaaS or do you have a Self-Managed instance? Are you using Tasklist? If you are using Operate, why not use Tasklist? You don’t have to use the UI, you can use the API to build your own frontend if you want.

hi @nathan.loding I’m using self-managed.after looking into the documentation I can get the task ID from the task list components thanks for the support. but do you have an idea how I can handle authentication for the task list APIs (I don’t want to use cookies I want something like an authorization token .note: I am using keycloack)

Hi @pavan - if you are using Keycloak, I assume you also using Identity. You can authenticate to all of Camunda’s APIs with Identity. Here’s the documentation for Tasklist specifically:

hi @nathan.loding thanks for the support. now I can wrap this one.