It's all about the answers!

Ask a question

How consume jazz Reportable REST API programmatically using java

Rodrigo Gonzato (314) | asked Nov 16 '15, 7:32 a.m.


I need to do some queries in Jazz and load the results into my company data warehouse. Someone have a example of a call simple query?

Accepted answer

permanent link
Kohji Ohsawa (5951310) | answered Nov 18 '15, 5:44 a.m.
 Hi Rodrigo,

I think you can make use of OSLC Workshop materials.

I modified to call https://localhost:9443/ccm/rpt/repository/workitem?fields=workitem/workItem/id API like below. I hope this might help you. Cheers.

public static void main(String[] args) {

//============== Code to adapt to your own configuration =============//

String server = "https://localhost:9443/ccm"; // Set the Public URI of your RTC server

String login = "clmadmin"; // Set the user login 

String password = "clmadmin"; // Set the associated password

//============== -------------------------------------- =============//

String reportAPI = server + "/rpt/repository/workitem?fields=workitem/workItem/id";

// Setup the HttClient

HttpClient httpclient = new DefaultHttpClient();


// Setup the rootServices request

HttpGet reportDoc = new HttpGet(reportAPI);

reportDoc.addHeader("Accept", "application/rdf+xml");

try {

// Request the Root Services document

HttpResponse reportResponse = HttpUtils.sendGetForSecureDocument(

server, reportDoc, login, password, httpclient);



Rodrigo Gonzato selected this answer as the correct answer

Rodrigo Gonzato commented Nov 18 '15, 2:28 p.m.

Thanks  Kohji, Work!

Another question:

The Reportable REST API have a operator similar"oslc.searchTerms"?

I need to do a search based on the content of comments , Like This: https://localhost:9443/ccm/rpt/repository/workitem?fields=workitem/workItem//comments[content contains "pattern"]/comments/content
its possible?

Kohji Ohsawa commented Nov 20 '15, 1:21 a.m.

Hi Rodrigo,

I am not an expert of XPath, but I am guessing you might be able to use XPath syntax. 

I have been trying like below, however, it doesn't work.

Rodrigo Gonzato commented Nov 20 '15, 12:21 p.m.

Looking at the XPath specification is right. But, do not work for me too.

No problem...
I'll take the full content of comments and search programmatically

Thanks for the trouble.

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.