Still getting a 404 - Rest API

WARNING TOTAL JAVA BEGINNER

I hope someone can help me out there.

I am trying to set up a Springboot project similar to the one in this video:
Bundle Your Beloved Camunda BPM Tools in a Production-Grade Uber-Jar

Trying to follow the Greenfield Stack methodology…

I thought it well to start off by using Start Camunda and using the latest version of Camunda 7.15 at the time.

However, when I run the application the BPM run server seems to function well, I can upload processes etc. The issue is in the Rest API, once I navigate to localhost:8080/engine-rest (I tried the localhost:8080/rest), instead of getting the default values back, I get a 404 message back. I can call a endpoint like /task, which returns a blank object.

I tried calling the endpoint from my local server, different ports and even one of my domains. No luck, all I get as a response is a pre-flight error where CORS are not allowed (this I suspect is a whole other issue)

I’ll attach my pom.xml file. I hope someone can tell me how do I just get the rest API to work? (Bonus question: Tell me how to configure my CORS?)

pom.xml (1.7 KB)

Hi @andrevdw
Welcome to the forum!

Can you also upload your application yaml file?
Also just to check that rest api is up and running correctly.
if you make this call http://localhost:8080/engine-rest/engine you should get back

[{"name":"default"}]

Can you confirm that?

Aha! Thanks Niall I am getting that result. Yaml is not supported to be uploaded here.

Here’s the extract:
spring.datasource:
type: org.postgresql.ds.PGSimpleDataSource
username: postgres
password: 1234
url: jdbc:postgresql://localhost:5432/postgres

Any tips on how best to expose the API so I can access it from outside my server?

Good stuff - any call you need to make should start with http://localhost:8080/engine-rest/ as it’s base URL.

This is less of a camunda problem and more about server configuration. I think you’d just need to make sure the server is accepting external traffic to port 8080.

Check you this post for more details on that.

1 Like

Awesome, thanks Niall, let’s see how far I get.