retrieving Code Review details from a work item (via curl)
"rtc_cm:com.ibm.team.filesystem.reviews.linktype.codereview.com.ibm.team.filesystem.reviews.link.codereview": [
{
"oslc_cm:label": "Code Review: task 15511-xxxxx",
"rdf:resource": https://xxxxx/ccm/resource/itemOid/com.ibm.team.filesystem.reviews.CodeReview/_jjS3IMaseq6q59XhV14xnw
}
]
curl -k -L -b %COOKIES% https://%HOST%/ccm/resource/itemOid/com.ibm.team.filesystem.reviews.CodeReview/_jjS3IMaseq6q59XhV14xnw -o codereview.txt
One answer
See the link below. These are the APIS for code review that are available. I can not comment David's remarks on which APIS are public. In general, APIS that are not listed in ELM API Landing Page or some other official location it is considered internal API and is not supported. Note you can do things wrong with internal APIs.
https://jazz.net/forum/questions/263396/is-there-a-specific-api-that-can-call-up-code-review-summary-data
Note that for some of the API's media types like JSON might not be supported or only partial supported. There are media types such as application/rdf+xml and others.
Comments
if i understand correctly what david suggested, was to use SCM CLI (1) to create a code review report. Then (2) rest service to query that report. And finally (3) is using SDK. My objective was to do everything via rest api if possible. Otherwise using the SDK would be the next only option left?
I am not aware of a public REST API for reviews. I have not yet tried the SDK for code review. I can only point out what is on this forum.
Thanks for replying. One last check, is there any known workable method that you know of to get the code review details? besides from the web. Even via the eclipse rtc client, it's just a link to open the web code review.
If I was aware of how this could be achieved, I would have told you. So the only options you have, as I see it, is to look into the APIs that are available and try to figure if there is a way. I doubt it.
Comments
Michael Rowe
FORUM ADMINISTRATOR / FORUM MODERATOR Apr 09, 1:19 p.m.How are you addressing Authentication? Also, I don't believe that is a Public Rest API. Please review the APIs supported by EWM via the ELM API Landing Page
ken teo
Apr 10, 11:05 a.m.its batch, so i am using the form based auth using curl.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 11, 2:01 a.m."its batch, so i am using the form based auth using curl."
JSON is not really supported by a lot of the EWM API.