Camunda REST engine

Hello fellas,

I have an issue with Camunda deployment. Everything work fine but REST engine. By some reason, I cannot access it (having 404 HTTP error “not found”), please see an image attached.

Can you suggest what could possibly be wrong?
I have installed Camunda from Pre-Packaged distribution, latest version.

Hi,

check your URL. From the REST docs reference;

The default process engine is available out of the box by accessing /engine-rest/engine/default/{rest-methods} or simply /engine-rest/{rest-methods}. Any other shared (i.e., it is globally visible) process engine that is created later is available through /engine-rest/engine/{name}/{rest-methods} without any further configuration.

Hence you may want to use ‘/engine-rest/engine/default/’ or ‘/engine-rest/’

regards

Rob

Neither of these way works. I actually tried all this before.

Hi
Can you post the URL you are trying and the operation you want to perform?

Rob

Right now I’m trying to see if it works at all by accessing it by http://localhost:8080/engine-rest/engine/default/

Ok,

Your URL will give a 404 as this is just the base URL and it is missing a ‘command’. You can get a list of defined process engines with this URL;

http://localhost:8080/engine-rest/engine/

With this you should get an http 200 and a json structure listing engine names…

regards

Rob

1 Like

It does not work. Please see the screenshot from my initial question. Using this address (or any other from documentation) gives 404 (Not found). I assume there is something wrong with the service as such. Any ideas where I can see log data for REST engine?

1 Like

@Commandor, does the server log show that the REST API was successfully deployed? Did you rename any files or folders or change any configuration settings of the default distribution?

Cheers,
Mat

From Tomcat App Manager I can see /engine-rest is deployed and running. Tried to re-deploy it - the result is the same. I use Pre-Packaged distribution, so everything I change was connection data for SQL Server db, that’s it.

Re-deployed everything from scratch. Now, if I call http://localhost:8080/engine-rest/engine/ it gives “[{“name”:“default”}]” json response. Does it mean it works ok?

Yes!
Thait’s what you get by default.

@Commandor,
as @langfr mentioned, yes, that’s what you get by default. The call http://localhost:8080/engine-rest/engine/ returns a list of all process engines available on your platform. See the documentation for details: https://docs.camunda.org/manual/7.7/reference/rest/engine/get-names/

Cheers,
Mat

This one is the correct war to download

1 Like

Hi,
not sure if it’s right to bump this topic up, however, Google pointed me to this topic as the top result on my question on what is the base URL of the Camunda REST API. So… like others in this thread I’ve spent some time (I’m a beginner with Camunda) to find the reason why http://localhost:8080/engine-rest/engine/ didn’t work for me. As of today (Camunda 7.12) this URL seems no longer to be the standard.

The right URL for the Camunda REST API (the one that worked for me) in a Spring Boot project (does that matter?) is
http://localhost:8080/rest/engine

I just thought to share this insight with others. Or did I miss something?

1 Like

Hi @phloxy,

for spring-boot based Camunda applications the default context path for the REST API is indeed different than for the other distros. (we intend to change this with CAM-11428)

For now:

  • spring-boot -> /engine
  • non-spring-boot -> /engine-rest

From 7.13 onwards:

  • only /engine-rest
1 Like

What does -
[{“name”:“default”}]
mean?

Also how can i start the process/task using rest?
What are the endpoints available?
I am using camunda-…-starter-rest version 7.19

Hitting this endpoint -
http://localhost:8080/engine-rest/process-definition/key/{process-name}
returns all the process with the name {process-name}

but when i try to start this process like this -
http://localhost:8080/engine-rest/process-definition/key/{process-name}/start

I am getting this error -
{“type”:“NotAllowedException”,“message”:“HTTP 405 Method Not Allowed”,“code”:null}

Please help

Camunda has the worst of documentation. There is no structure. For a simple issue I am just spending days. Utterly disappointed.

[

What does -
[{“name”:“default”}]
mean?

It is an array of an object that have one property name with the value default

Also how can i start the process/task using rest?
What are the endpoints available?
I am using camunda-…-starter-rest version 7.19

Hitting this endpoint -
http://localhost:8080/engine-rest/process-definition/key/{process-name}
returns all the process with the name {process-name}

but when i try to start this process like this -
http://localhost:8080/engine-rest/process-definition/key/{process-name}/start

I am getting this error -
{“type”:“NotAllowedException”,“message”:“HTTP 405 Method Not Allowed”,“code”:null}

pretty sure you try to do a get html methode . You Start the process with an Post message, because you inject variables declared in the body .

Thanks Marcin, I figured out yesterday what i was doing wrong while starting the process.

Also I understand that -
[{“name”:“default”}]
is an array of an object.

But i am interested in understanding what does this information mean?

Hi! You really shouldn’t re-open really old threads. If you think you have the same issue, starting a new thread and referencing the threads you consulted helps the community understand where you are at.

Every BPMN Engine has a distinct name that is set up in the configuration files. If you don’t name your BPMN engine, its name will be default (yes, the word default not just any default). the response above tells you that your REST interface is working, and is connected to a BPMN engine that has not been configured with a unique name.