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.<http://www.ibm.com/xmlns/rdm/types/ArtifactFormat>, R1.<http://open-services.net/ns/core#discussion>.*
2: where R1 in <<hostname>:9443/rm/resources/_cEhc6OeGEeGXNuXQNPzlnA>
What is the right method to fetch comments?
Accepted answer
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:
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=_cEhc6OeGEeGXNuXQNPzlnAThis will return an XML containing all the comments for that artifact