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

Retrieve comments for a requirement in RRC through OSLC

I've followed the sample in OSLC workshop and am able to create and retrieve requirements. How do we retrieve the comments created for an artifact? I looked at the url for fetching comments for a workitem in RTC and tried something along the same lines

https://<hostname>:9443/rm/resources/_cEhc6OeGEeGXNuXQNPzlnA?oslc.properties=oslc:discussion%7B%2A%7D&oslc.prefix=oslc=%3Chttp://open-services.net/ns/core%23%3E

However, this results in a parsing error. The detailed error message is as follows
java.lang.RuntimeException: Error when parsing:
1: select R1, R1.&lt;http://www.ibm.com/xmlns/rdm/types/ArtifactFormat&gt;, R1.&lt;http://open-services.net/ns/core#discussion&gt;.*
2: where R1 in &lt;<hostname>:9443/rm/resources/_cEhc6OeGEeGXNuXQNPzlnA&gt;

What is the right method to fetch comments?

0 votes


Accepted answer

Permanent link
Hi Sriram,
 As far a I know you can't retrieve comments via OSLC, you can try getting the comments using the Reportable Rest API https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI

You can do something like:
 https://<hostname>:9443/rm/publish/comments?resourceURI=<artifactUUID>
An example using your URL:
https://<hostname>:9443/rm/publish/comments?resourceURI=_cEhc6OeGEeGXNuXQNPzlnA
This will return an XML containing all the comments for that artifact
Sriram B selected this answer as the correct answer

0 votes

Comments

Thanks. That worked.

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
× 516

Question asked: Aug 16 '12, 6:44 a.m.

Question was seen: 4,803 times

Last updated: Aug 16 '12, 10:19 a.m.

Confirmation Cancel Confirm