Jump to >

Review Reply Diff Comment Resource

Added in 1.6

Provides information on replies to diff 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 diff_comment
URI /api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/diff-comments/{comment_id}/
Token Policy ID review_reply_diff_comment
HTTP Methods
  • DELETE - Deletes a comment from a draft reply.
  • GET - Returns information on a reply to a comment.
  • PUT - Updates a reply to a diff comment.
Parent Resource Review Reply Diff Comment List Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

Fields

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

filediffFile Diff Resource The per-file diff that the comment was made on.
first_lineInteger The line number that the comment starts at.
idInteger The numeric ID of the comment.
interfilediffFile Diff Resource The second per-file diff in an interdiff that the comment was made on. This will be null if the comment wasn’t made on an interdiff.
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.
num_linesInteger The number of lines the comment spans.
publicBoolean

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

Added in 2.0

reply_toReview Diff Comment Resource The comment being replied to.
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

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 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 comment.

Much of the information will be identical to that of the comment being replied to. For example, the range of lines. This is because the reply to the comment is meant to cover the exact same code that the original comment covers.

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 diff 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-diff-comment+json

$ curl http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/diff-comments/9/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 4a22adbfab3dc09841d4dbe846a247eb4d4d8ac0
Content-Type: application/vnd.reviewboard.org.review-reply-diff-comment+json
X-Content-Type-Options: nosniff
{
  "diff_comment": {
    "extra_data": {}, 
    "first_line": 12, 
    "id": 9, 
    "interfilediff": null, 
    "issue_opened": false, 
    "issue_status": "", 
    "links": {
      "delete": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/diff-comments/9/", 
        "method": "DELETE"
      }, 
      "filediff": {
        "href": "http://reviews.example.com/api/review-requests/8/diffs/3/files/41/", 
        "method": "GET", 
        "title": "/trunk/reviewboard/settings_local.py.tmpl (1797) -> /trunk/reviewboard/settings_local.py.tmpl ((working copy))"
      }, 
      "reply_to": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/diff-comments/5/", 
        "method": "GET", 
        "title": "This is just a sample comment."
      }, 
      "self": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/diff-comments/9/", 
        "method": "GET"
      }, 
      "update": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/diff-comments/9/", 
        "method": "PUT"
      }, 
      "user": {
        "href": "http://reviews.example.com/api/users/admin/", 
        "method": "GET", 
        "title": "admin"
      }
    }, 
    "num_lines": 3, 
    "public": true, 
    "text": "I completely agree.", 
    "text_type": "plain", 
    "timestamp": "2010-08-25T03:00:22Z"
  }, 
  "stat": "ok"
}