Jump to >

New in version 1.6.

Review File Attachment Comment List Resource

Name file_attachment_comments
URI /api/review-requests/{review_request_id}/reviews/{review_id}/file-attachment-comments/
Description

Provides information on file comments made on a review.

If the review is a draft, then comments can be added, deleted, or changed on this list. However, if the review is already published, then no changes can be made.

HTTP Methods
  • GET - Returns the list of file comments made on a review.
  • POST - Creates a file comment on a review.
Parent Resource Review Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

HTTP GET

Returns the list of file comments made on a review.

Request Parameters

Field Type Description
counts-only (optional) Boolean If specified, a single count field is returned with the number of results, instead of the results themselves.
max-results (optional) Integer The maximum number of results to return in this list. By default, this is 25.
start (optional) Integer The 0-based index of the first result in the list. The start index is usually the previous start index plus the number of previous results. By default, this is 0.

HTTP POST

Creates a file comment on a review.

This will create a new comment on a file as part of a review. The comment contains text and dimensions for the area being commented on.

Request Parameters

Field Type Description
file_attachment_id (required) Integer The ID of the file attachment being commented on.
issue_opened (optional) Boolean Whether the comment opens an issue.
text (required) String The comment text.

Errors

Examples

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

{
  "file_attachment_comments": [
    {
      "id": 1, 
      "issue_opened": false, 
      "issue_status": "", 
      "links": {
        "delete": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/", 
          "method": "DELETE"
        }, 
        "file_attachment": {
          "href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/", 
          "method": "GET", 
          "title": "Example Attachment"
        }, 
        "self": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/", 
          "method": "GET"
        }, 
        "update": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/", 
          "method": "PUT"
        }, 
        "user": {
          "href": "http://reviews.example.com/api/users/admin/", 
          "method": "GET", 
          "title": "admin"
        }
      }, 
      "public": true, 
      "text": "A fantastic comment on a fantastic file!", 
      "timestamp": "2011-08-26 02:49:32"
    }
  ], 
  "links": {
    "create": {
      "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/", 
      "method": "POST"
    }, 
    "self": {
      "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/", 
      "method": "GET"
    }
  }, 
  "stat": "ok", 
  "total_results": 1
}

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

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <total_results>1</total_results>
 <stat>ok</stat>
 <links>
  <self>
   <href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/</href>
   <method>GET</method>
  </self>
  <create>
   <href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/</href>
   <method>POST</method>
  </create>
 </links>
 <file_attachment_comments>
  <array>
   <item>
    <issue_opened>0</issue_opened>
    <links>
     <user>
      <href>http://reviews.example.com/api/users/admin/</href>
      <method>GET</method>
      <title>admin</title>
     </user>
     <self>
      <href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/</href>
      <method>GET</method>
     </self>
     <update>
      <href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/</href>
      <method>PUT</method>
     </update>
     <file_attachment>
      <href>http://reviews.example.com/api/review-requests/8/file-attachments/1/</href>
      <method>GET</method>
      <title>Example Attachment</title>
     </file_attachment>
     <delete>
      <href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/</href>
      <method>DELETE</method>
     </delete>
    </links>
    <timestamp>2011-08-26 02:49:32</timestamp>
    <public>1</public>
    <text>A fantastic comment on a fantastic file!</text>
    <id>1</id>
    <issue_status></issue_status>
   </item>
  </array>
 </file_attachment_comments>
</rsp>