Jump to >

New in version 1.6.

File Attachment Comment List Resource

Name file_attachment_comments
URI /api/review-requests/{review_request_id}/file-attachments/{file_attachment_id}/file-attachment-comments/
Description

Provides information on filess comments made on a review request.

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 file. These comments will span all public reviews.

HTTP Methods
  • GET - Returns the list of screenshot comments on a file.
Parent Resource File Attachment Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

HTTP GET

Returns the list of screenshot comments on a file.

This list of comments will cover all comments made on this file from all reviews.

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.

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"
    }, 
    {
      "id": 2, 
      "issue_opened": false, 
      "issue_status": "", 
      "links": {
        "delete": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/", 
          "method": "DELETE"
        }, 
        "file_attachment": {
          "href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/", 
          "method": "GET", 
          "title": "Example Attachment"
        }, 
        "reply_to": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/", 
          "method": "GET", 
          "title": "A fantastic comment on a fantastic file!"
        }, 
        "self": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/", 
          "method": "GET"
        }, 
        "update": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/", 
          "method": "PUT"
        }, 
        "user": {
          "href": "http://reviews.example.com/api/users/admin/", 
          "method": "GET", 
          "title": "admin"
        }
      }, 
      "public": true, 
      "text": "A reply to a fantastic comment.", 
      "timestamp": "2011-08-26 02:52:57"
    }
  ], 
  "links": {
    "self": {
      "href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/file-attachment-comments/", 
      "method": "GET"
    }
  }, 
  "stat": "ok", 
  "total_results": 2
}

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

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <total_results>2</total_results>
 <stat>ok</stat>
 <links>
  <self>
   <href>http://reviews.example.com/api/review-requests/8/file-attachments/1/file-attachment-comments/</href>
   <method>GET</method>
  </self>
 </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>
   <item>
    <issue_opened>0</issue_opened>
    <links>
     <self>
      <href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/</href>
      <method>GET</method>
     </self>
     <update>
      <href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/</href>
      <method>PUT</method>
     </update>
     <user>
      <href>http://reviews.example.com/api/users/admin/</href>
      <method>GET</method>
      <title>admin</title>
     </user>
     <reply_to>
      <href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/</href>
      <method>GET</method>
      <title>A fantastic comment on a fantastic file!</title>
     </reply_to>
     <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/replies/10/file-attachment-comments/2/</href>
      <method>DELETE</method>
     </delete>
    </links>
    <timestamp>2011-08-26 02:52:57</timestamp>
    <id>2</id>
    <text>A reply to a fantastic comment.</text>
    <public>1</public>
    <issue_status></issue_status>
   </item>
  </array>
 </file_attachment_comments>
</rsp>