Java API vs REST API

2,348 views
Skip to first unread message

Klime

unread,
Apr 23, 2014, 6:22:50 AM4/23/14
to camunda-...@googlegroups.com
Hi,

what are the main difference between using the REST API and using the Java API?
What are the advantages of using the Java API?
What are the limitations of the REST API compared to the Java API?

I guess, one advantage of REST could be that it is possible to use other programming languages (.NET or PHP).
Does the REST API cover all functions available for the Java API?
What about transactions?

regards
Klime



Roman Smirnov

unread,
Apr 25, 2014, 5:23:21 AM4/25/14
to camunda-...@googlegroups.com
Hi Klime,

The camunda REST Api provide access to the Java Api methods. The transaction handling happens in the engine. But the REST Api does not cover all functions available in the Java Api.

For further information have a look into the documentation about the REST Api: http://docs.camunda.org/latest/api-references/rest/

Does it help you?

Cheers,
Roman

Klime

unread,
Apr 25, 2014, 7:27:07 AM4/25/14
to camunda-...@googlegroups.com
Yes, i know about the documentation but it's difficult to get an overview by comparing both API documentations in detail.

What do you think are the pros and cons of using one API over another?

Roman Smirnov

unread,
Apr 25, 2014, 8:13:32 AM4/25/14
to camunda-...@googlegroups.com
Hi Klime,

I think there is no pros and cons of using one API over another. I think it rather depends on what you want to do or which use case you have!

For example we use the REST Api together with our webapps (cockpit, tasklist etc.). So, for example the client makes a request against the REST Api to get the current running process instances. The REST Api uses the Java Api to retrieve the current process instances.

You can use the Java Api in the backend inside your process application to do some custom things.

What is your use case?

Cheers,
Roman

Klime

unread,
Apr 28, 2014, 2:46:13 AM4/28/14
to camunda-...@googlegroups.com
Hi,

i'm just writing a thesis about BPMN Frameworks and integration stuff.
So the REST API should be used when i run camunda BPM as standalone Server or when using other programming languages then Java.

I guess, you use the REST API in your webapps because of the simple processing of JSON with JavaScript (Ajax)?!

regards
Klime

Klime

unread,
Apr 28, 2014, 2:49:31 AM4/28/14
to camunda-...@googlegroups.com
Why does the REST API not cover all the functions available in the Java API and which areas are mainly affected?

Valentin Vago

unread,
Apr 28, 2014, 7:44:29 AM4/28/14
to camunda-...@googlegroups.com
Hi Klime,

The REST API is actually the only way to communicate from a browser (or an other programming language) to the platform (and back).
And yes, the webapps are using Ajax (XHR actually, Ajax being a buzzword ;) )
JSON is, indeed, way easier to handle than XML (but historically, Ajax/XHR were based on XML).

I do not know the complete APIs, but their roles and features are tightly bound to their common usage and/or environment.
For instance, REST API calls have to be restrained to the minimum because they are much slower and also require more resources.

Cheers,
Valentin
Reply all
Reply to author
Forward
0 new messages