Jump to >

Review Reply File Attachment Comment Resource

Added in 1.6

Provides information on replies to file comments made on a review reply.

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

Details

Name file_attachment_comment
URI /api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/file-attachment-comments/{comment_id}/
Token Policy ID review_reply_file_attachment_comment
HTTP Methods
  • DELETE - Deletes a file comment from a draft reply.
  • GET - Returns information on a reply to a file comment.
  • PUT - Updates a reply to a file comment.
Parent Resource Review Reply File Attachment Comment List Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

Fields

diff_against_file_attachmentFile Attachment Resource

The file changes were made against in a diff.

Added in 2.0

extra_dataDictionary

Extra data as part of the comment. This depends on what is being commented on, and may be used in conjunction with an extension.

Added in 2.0

file_attachmentFile Attachment Resource The file the comment was made on.
idInteger The numeric ID of the comment.
issue_openedBoolean Whether or not a comment opens an issue.
issue_statusOne of resolved, verifying-resolved, open, dropped, verifying-dropped The status of an issue.
link_textString

The text used to describe a link to the file. This may differ depending on the comment.

Added in 1.7.10

publicBoolean

Whether or not the comment is part of a public review.

Added in 2.0

reply_toReview File Attachment Comment Resource The comment being replied to.
review_urlString

The URL to the review UI for the comment on this file attachment.

Added in 1.7.10

textRich Text

The comment text.

Added in 2.0

text_typeOne of plain, markdown, html

The mode for the comment text field.

Added in 2.0

thumbnail_htmlString

The HTML representing a thumbnail, if any, for this comment.

Added in 1.7.10

timestampString

The date and time that the comment was made (in YYYY-MM-DD HH:MM:SS format).

Added in 2.0

userUser Resource

The user who made the comment.

Added in 2.0

HTTP DELETE

Deletes a file comment from a draft reply.

This will remove the comment from the reply. This cannot be undone.

Only comments on draft replies can be deleted. Attempting to delete a published comment will return a Permission Denied error.

Instead of a payload response, this will return HTTP 204 No Content.

Errors

100 - Does Not ExistHTTP 404 - Not Found Object does not exist
101 - Permission DeniedHTTP 403 - Forbidden You don’t have permission for this
103 - Not Logged InHTTP 401 - Unauthorized You are not logged in
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden Your OAuth2 token lacks the necessary scopes for this request.
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden OAuth2 token access for this resource is prohibited.

HTTP GET

Returns information on a reply to a file comment.

Much of the information will be identical to that of the comment being replied to.

Errors

100 - Does Not ExistHTTP 404 - Not Found Object does not exist
101 - Permission DeniedHTTP 403 - Forbidden You don’t have permission for this
103 - Not Logged InHTTP 401 - Unauthorized You are not logged in
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden Your OAuth2 token lacks the necessary scopes for this request.
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden OAuth2 token access for this resource is prohibited.

HTTP PUT

Updates a reply to a file comment.

This can only update the text in the comment. The comment being replied to cannot change.

Extra data can be stored later lookup. See Storing/Accessing Extra Data for more information.

Request Parameters

force_text_typeOne of plain, markdown, html

The text type, if any, to force for returned text fields. The contents will be converted to the requested type in the payload, but will not be saved as that type.

Added in 2.0.9

textRich Text

The comment text.

Added in 2.0

text_typeOne of plain, markdown

The new content type for the comment text field. The default is to leave the type unchanged.

Added in 2.0

Errors

100 - Does Not ExistHTTP 404 - Not Found Object does not exist
101 - Permission DeniedHTTP 403 - Forbidden You don’t have permission for this
103 - Not Logged InHTTP 401 - Unauthorized You are not logged in
105 - Invalid Form DataHTTP 400 - Bad Request One or more fields had errors
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden Your OAuth2 token lacks the necessary scopes for this request.
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden OAuth2 token access for this resource is prohibited.

Examples

application/vnd.reviewboard.org.review-reply-file-attachment-comment+json

$ curl http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 56e7f86834752f37962689f0cb5b7240fcd308ce
Content-Type: application/vnd.reviewboard.org.review-reply-file-attachment-comment+json
X-Content-Type-Options: nosniff
{
  "file_attachment_comment": {
    "diff_against_file_attachment": null, 
    "extra_data": {}, 
    "id": 2, 
    "issue_opened": false, 
    "issue_status": "", 
    "link_text": "Example Attachment", 
    "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, 
    "review_url": "/r/8/#fcomment2", 
    "text": "A reply to a fantastic comment.", 
    "text_type": "plain", 
    "thumbnail_html": "", 
    "timestamp": "2011-08-26T02:52:57Z"
  }, 
  "stat": "ok"
}