Call the camunda history via REST Api

Hi at all,
I am currently trying to call the Camunda history via REST Api. I have a SpringBoot application and I started to try to call the engine.
However, my problem is: When I try to call http://localhost:8080/engine-rest/ via the browser I get {“type”:“NotFoundException”,“message”:“HTTP 404 Not Found”}.
When I try to call http://localhost:8080/rest/ I get a 404 Whitelabel error page.

My versions:

compile group: ‘org.camunda.bpm.identity’, name: ‘camunda-identity-ldap’, version: ‘7.13.0’
compile group: ‘org.camunda.bpm.springboot’, name: ‘camunda-bpm-spring-boot-starter’, version: ‘7.13.0’
compile group: ‘org.camunda.bpm.springboot’, name: ‘camunda-bpm-spring-boot-starter-rest’, version: ‘7.13.0’
testImplementation ‘org.springframework.boot:spring-boot-starter-test’
implementation ‘org.springframework.boot:spring-boot-starter-web’
implementation ‘org.springframework.boot:spring-boot-starter-data-jpa’

Does anybody know why this could happen?
Thank you :slight_smile:

@MarvinKern from the browser just try like:

http://localhost:8080

From postman you can try like this:

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

Did you enabled the authorization? Any error logs?

1 Like

Hi,
Thanks for the answer.
When I try in Browser just the http://localhost:8080, I am automatically led to the login for the cockpit.
In Postman I get the same not Found Exception when I enter http://localhost:8080/engine-rest/.

Authorization is enabled. No error logs.

The above one is expected behavior.

In postman, you need to send Authorization details in postman.

Thanks for the fast answer :slight_smile:

Okay I tried in Postman as you described. However I still get the error

{
“type”: “NotFoundException”,
“message”: “HTTP 404 Not Found”
}

Hi,

Can you try with http://localhost:8080/engine-rest/engine or http://localhost:8080/engine-rest/version.
For history you can follow the docs here:
https://docs.camunda.org/manual/7.13/reference/rest/history/

1 Like

Hi,
that is working fine, thank you :slight_smile:
When I type in http://localhost:8080/engine-rest/engine I get [{“name”:“default”}] as the response.
When I type in http://localhost:8080/engine-rest/version I get {“version”:“7.13.0”} as the response.
When I type in http://localhost:8080/engine-rest/history/activity-instance I get lots of history infos.