Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do I get started with REST API?

Hi.. I'm trying to get a start with the REST API.  I found this question/answer useful for logging in and I can do that.  Now I'm trying to find out what services and URLs I need to use.  The wiki documentation seemed like it was really going to be helpful but my situation seemed to go off the rails at step 1 since in our installation, there is no "rootservices" URL.  I used our basic URL that worked for the login (which was https://ourhost/ccm2/service) and that is providing me with a catalog of services but it's in HTML format, even when I send an Accept header, e.g.:

curl -k -L -b $COOKIES -c $COOKIES -o services.xml -H "application/xml" $HOST 

So a couple of questions: 

1)  Is there a better way to force an output format from the service request?
2)  Am I using the most current reference for the REST API in the link above? I.e., the wiki documentation?
3)  For RTC, does anyone know of a compilation of snippets and samples?  I've done a lot of searching but there are a wide range of REST API topics out there and I haven't hit on something like this for RTC
4)  I currently use the Java API with success, is the REST API faster?  Can it do the same thing?  Oops - found this answered here.

Thanks for your comments and suggestions!

- Andy

1 vote



One answer

Permanent link
Your link is an old one.  This is more up to date:
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20
There's quite a few examples in there. 

It may help if you shared what you planned to accomplish by using the API.  For example, if you only need to read data, the Reportable REST API is worth investigating:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI

2 votes

Comments

Well, it's a good question but I can't really answer it.  I was hoping to get smart on it then compare the relative merits myself.  I am using the Java API currently and I wanted to find out if the REST API had some endearing qualities that would influence me to use it rather than the Java API.


Also, we were having socket timeout issues recently and I was curious to do a performance comparison of Java-based vs REST-based activities.  Since I was on that avenue of investigation I was hoping I would run into some simple status monitoring REST services that might be easier to implement than finding the similar functions in the Java API. 

It seems to be a matter of preference in choosing an API.  Perhaps if someone only had access to an HTTP client, that would influence the REST approach.

1 vote

 You might also get a lot of value from doing the OSLC Workshop. It's free and you can do it at your own pace.

1 vote

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941
× 480

Question asked: Mar 04 '14, 12:37 p.m.

Question was seen: 11,425 times

Last updated: Mar 05 '14, 2:16 p.m.

Confirmation Cancel Confirm