It's all about the answers!

Ask a question

Is there a specific API that can call up Code Review Summary Data?


Jay Penerian (131) | asked Jun 11, 4:31 p.m.

Is there a specific API that can call up Code review summary data? I am particularly interested in the issue summary data that defines how many total issues there are and the the state in which the issue reside such as Total Must Fix Issues and Total Other issues as well as their resolution status?



Accepted answer


permanent link
David Lafreniere (4.1k7) | answered Jun 12, 1:21 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 13, 9:01 a.m.
1)
We have a SCM command-line (CLI) option for outputting a code review report: 'scm export code-review'.
You would need a work item query that is designed to query for only the work items you care about.

2)
There is also a REST based service you could call. It's not official API, but probably could still be used (but subject to change). See:
IFilesystemWorkItemRestService.getCodeReviewReport(ParmsGetCodeReviewReport parms)
If you can't manage to call it using Java, because it's REST based you could get the JSON response back from calling:

https://<YOUR_SEVER_NAME>9443/jazz/service/com.ibm.team.filesystem.common.workitems.internal.rest.IFilesystemWorkItemRestService/CodeReviewReport?queryId=_d1jTkD9-EemgIuIeu-3rqA&includeCsDeliveryInfo=true&includeFileNameInfo=true


Then you can write a script to parse it and get the data you need. This is similar to the CLI though where you need an existing work item query to get the list of work items you want code review data for.

3)
We have official API in ICodeReviewService. You can use API such as ICodeReviewService.findReviewByWorkItem to get back an ICodeReview. From there you can get a bunch of data related to a code review, such as their issues (along with the fill event history of each issue).
Jay Penerian selected this answer as the correct answer

Comments
David Lafreniere commented Jun 13, 9:02 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Sorry, I forgot to mention some other official API that we do have.. this can be used to retrieve all the data you want. I revised the original post to include this,
but the relevant information is:

We have official API in ICodeReviewService. You can use API such as ICodeReviewService.findReviewByWorkItem to get back an ICodeReview. From there you can get a bunch of data related to a code review, such as their issues (along with the fill event history of each issue).

Your answer


Register or to post your answer.