Could not access REST API while developing cockpit

Hi,

I am adding a custom view to a Cockpit application. I’ve set up my environment exactly as described here in Development tab: camunda-bpm-platform/webapps at master · camunda/camunda-bpm-platform · GitHub

I run a server by this command:

mvn jetty:run -Pdevelop

and it works fine - I can see my changes etc.

The problem occurs when I want to run some external scripts to deploy processes etc. I am accessing the REST API via e.g.:

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

and getting 404 error every time.

So the question is: how can I access engine’s REST API while developing some cockpit changes?

Hi @beatrixe
Cockpit uses an internal REST API deployment for communication with the engine. If you want to send REST calls from an external source you need to deploy the public rest api to whatever application server you’re running Camunda and Cockpit on.

Thanks for your quick reply @Niall . To be honest, I don’t know how to deploy the api. Can you give me a tip where I can start with it? Will be much obliged.

Sure, it depends on how you’re running the engine currently,
Can you give details of your setup?

@Niall I run Jetty webapp server with
jetty-maven-plugin:9.4.31
camunda-engine-7.15.0-SNAPSHOT

Is it enough information? I can provide more, but idk which are important

@Niall Basing on your reply I figured out that I probably should put an engine-rest war file somewhere in my project.
I downloaded this file: https://app.camunda.com/nexus/repository/camunda-bpm-snapshots/org/camunda/bpm/camunda-engine-rest/7.15.0-SNAPSHOT/camunda-engine-rest-7.15.0-20210303.112947-187.war

and put it in the webapps/target folder as engine-rest.war, but it still isn’t working

1 Like