Get external task forms with REST

Hi,

I have a problem with getting external form (HTML forms that we save in \forms folder) with REST API.

I trace the Tasklist app and in there, used below address for getting form name and form path:
http://192.168.1.1:8085/camunda/api/engine/engine/default/task/{taskId}/form

but when I use this address in my side, error 401 (unauthorize) occurred.

How can I solve this problem?

Thanks in advanced.

Hi @Sadegh,

It’s not quite clear to me what the problem is. What I’ve understood is that you have Camunda on a server, where you trace the tasklist locally. Now you want to access the server, in particular camunda, from outside and you get the unauthroized error. Did I understand this correct? Maybe you can explain your setting more into detail.

Best
Johannes

Hi @JoHeinem,

Thanks for your reply.

I want to get the external form with REST API to show this in my frontend app. I can’t find anything about this in REST documentation. So I check the tasklist app to find that how this app access the external forms.

The tasklist app use /camunda/api/engine/engine/default/task/{taskId}/form URL to finding path of HTML form on the server, but when I call this api, error 404 occurred for me.

Now I want to know how I can use this api or any other way for getting external forms in my frontend application.

Regards
Sadegh

Unfortunately, there is no easy way to fetch the external task form. What you can do is to retrieve the form key, which contains the link to the external form. Then you need to somehow make sure that one can retrieve the form from that link with a request.

Best
Johannes