Is there a specific API that can call up Code Review Summary Data?
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
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).
Comments
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).