How to get discussions/comments on a review through API?

I've been trying to use the getReviewSummaryDiscussions service but it seems to return an empty json list each time even though I have made sure there are discussions on the review itself when viewing through the web interface. I'm sending the project id and review id. If I change how the parameters being sent are structured it will show an error saying that it can't parse the parameters, so the parameters I'm sending seem to be formatted correctly. The discussion I'm interested in is right on the main page of the review.

I have also tried getRevisionDiscussions and getInlineDiscussionsInRevision sending the revisions on the review but same thing.

Can someone give me an example of how to retrieve discussions and/or comments on a review through the API?


Example curl:

curl -X POST --header "Content-Type: application/json; charset=UTF" -u '<user>:<password>' https://<url>/~rpc/getReviewSummaryDiscussions/ -d '{"reviewId":{"projectId":"utp","reviewId":"UTP-CR-1"}}' --insecure

response is: {"result":{}}


Thanks for taking a look.

Comment actions Permalink

So I have discovered that I can get the information I'm looking for through getFeed. It returns a list of everything shown in the review timeline. I'm still not really sure how to use the other calls, but this works so consider this taken care of unless there's another very simple way to do this.

Comment actions Permalink

For posterity, it appears that including the `revisions` parameter is required, despite it being marked as optional in the docs.  Just set `selectAll` to true.


Please sign in to leave a comment.