It's all about the answers!

Ask a question

What is the difference between RTC Work Item JAVA API and REST API?

Clement Liu (1.5k54249) | asked Aug 19 '13, 10:26 a.m.
edited Aug 19 '13, 10:27 a.m.
Both APIs are listed here:

In what scenarios should I use one over the other? Thanks. 

Accepted answer

permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 19 '13, 11:15 a.m.
The "Rest API" is an HTTP API, while the "Java API" is (as you would expect) a Java API.
There are two flavors of HTTP API's ... those that are OSLC-based, and those that are not.
The OSLC-based HTTP API's have the advantage that you can use them to talk to a wider range of servers (any server that supports OSLC).
The advantage of the Java API's are that they cover the full product functionality, but some of the Java API's are not public, which means that there is a higher risk that they may change in a subsequent release.

So the general guidance would be use the OSLC-based HTTP API's when you can, but if the functionality you need is not available there, then use the non-OSLC-based HTTP API's when you want to use HTTP, and use the Java APIs when you want to use Java.

Clement Liu selected this answer as the correct answer

Clement Liu commented Aug 19 '13, 1:52 p.m.

Thank you. Can you explain a little bit about the non-OSLC-based HTTP API? I thought RTC only provides the OSLC-based HTTP API and Java API. Were you actually referring to the REST API? 

Geoffrey Clemm commented Aug 19 '13, 4:40 p.m.

There are RTC HTTP APIs that are not defined by OSLC.  For example, all of the RTC SCM APIs used by the RTC web client fall in this category, because there is not yet an approved OSLC API for the SCM domain.

Note: I personally am not a fan of the term "REST API".   It originally was a well defined term (as originally defined by Roy Fielding in his dissertation: ... I encourage everyone to read that chapter before using the term "REST" :-), but has since then has become more of a label that anyone feels free to use to say that their protocol is "good".   On the other hand, the terms "Java API", "HTTP API", and "OSLC API" are well defined, so I personally stick to those terms.  

Clement Liu commented Aug 19 '13, 4:50 p.m.

Thank you, Sir! 

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.