How can I consume the camunda rest API?

Hi guys,

I need to consume the rest api of camunda. I’m running the link (localhost:8080/engine-rest/task) from postman, but I don’t get any reponse.
Can you provide me some helpful tips?

Do you have Camunda running?
What version, distribution and application server are you using?

I’m Using camunda-bpm-tomcat-7.12.0 distribution and yes my camunda is running using start-camunda.bat command

What exactly is the response?
Is there any error that is returned?
Do you have any tasks running?

I running this URL(localhost:8080/engine-rest/task) with GET method in Postman and as a result I get this response:
{
“timestamp”: “2020-02-11T06:59:34.665+0000”,
“status”: 404,
“error”: “Not Found”,
“message”: “No message available”,
“path”: “/engine-rest/task”
}

Are you able to log into the webapps?
localhost:8080/camunda

I’m following your Rest API Link(https://www.youtube.com/watch?v=ypX90aQScOQ&list=PLJG25HlmvsOUnCziyJBWzcNh7RM5quTmv&index=4) from youtube. where I first running start-camunda.bat command from distribution folder. then I created a BPMN file and try to consume the rest api.

No, I’m unable to open this link(localhost:8080/camunda).

Then maybe camunda has failed to start. Take a look in the logs for errors

Do I need to setup any prerequisite things for running the camunda?

You need to have java installed thats about it.
You can find an installer here.

I already have java 8 installed in my system. Do I need to configure databases or need to add any other files ?

Nope, it uses a H2 by default. If it’s not starting the logs should clearly let you know why.

Can you attach the latest server logs present in /server/apache-tomcat-9.0.24/logs/.
It should work with url http://localhost:8080/engine-rest/task without any configuration changes.

try http://localhost:8080/rest/task - that’s where mine came up by default - I think :slight_smile: