File Diff Comment List Resource

Name diff_comments
URI /api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/diff-comments/
Description

Provides information on comments made on a particular per-file diff.

The list of comments cannot be modified from this resource. It’s meant purely as a way to see existing comments that were made on a diff. These comments will span all public reviews.

HTTP Methods
  • GET - Returns the list of comments on a file in a diff.
Parent Resource File Diff Resource
Child Resources None
Anonymous Access Yes

HTTP GET

Returns the list of comments on a file in a diff.

This list can be filtered down by using the ?line= and ?interdiff-revision=.

To filter for comments that start on a particular line in the file, using ?line=.

To filter for comments that span revisions of diffs, you can specify the second revision in the range using ?interdiff-revision=.

Examples

application/vnd.reviewboard.org.file-diff-comments+json

{
  "diff_comments": [], 
  "links": {
    "self": {
      "href": "http://reviews.example.com/api/review-requests/8/diffs/1/files/31/diff-comments/", 
      "method": "GET"
    }
  }, 
  "stat": "ok", 
  "total_results": 0
}

application/vnd.reviewboard.org.file-diff-comments+xml

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <total_results>0</total_results>
 <stat>ok</stat>
 <diff_comments>
  <array>
  </array>
 </diff_comments>
 <links>
  <self>
   <href>http://reviews.example.com/api/review-requests/8/diffs/1/files/31/diff-comments/</href>
   <method>GET</method>
  </self>
 </links>
</rsp>