Jump to >

This documentation covers Review Board 2.0. You can see the latest Review Board documentation or all other versions.

Review Reply Screenshot Comment Resource

Provides information on replies to screenshot 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 screenshot_comment
URI /api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/screenshot-comments/{comment_id}/
HTTP Methods
  • DELETE - Deletes a screenshot comment from a draft reply.
  • GET - Returns information on a reply to a screenshot comment.
  • PUT - Updates a reply to a screenshot comment.
Parent Resource Review Reply Screenshot 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.
hInteger The height of the comment region on the screenshot.
idInteger The numeric ID of the comment.
issue_openedBoolean Whether or not a comment opens an issue.
issue_statusOne of dropped, open, resolved The status of an issue.
publicBoolean Whether or not the comment is part of a public review.
reply_toReview Screenshot Comment Resource The comment being replied to.
screenshotScreenshot Resource The screenshot the comment was made on.
textRich Text The comment text.
text_typeOne of plain, markdown, html The mode for the comment text field.
thumbnail_urlString The URL to an image showing what was commented on.
timestampString The date and time that the comment was made (in YYYY-MM-DD HH:MM:SS format).
userUser Resource The user who made the comment.
wInteger The width of the comment region on the screenshot.
xInteger The X location of the comment region on the screenshot.
yInteger The Y location of the comment region on the screenshot.

HTTP DELETE

Deletes a screenshot 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

HTTP GET

Returns information on a reply to a screenshot comment.

Much of the information will be identical to that of the comment being replied to. For example, the region on the screenshot. This is because the reply to the comment is meant to cover the exact same section of the screenshot 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

HTTP PUT

Updates a reply to a screenshot comment.

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

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.
textRich Text The comment text.
text_typeOne of plain, markdown The new content type for the comment text field. The default is to leave the type unchanged.

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

Examples

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

$ curl http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/screenshot-comments/2/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 9e3fc49d15d0b95b39959e88bc6a4f429199d611
Content-Type: application/vnd.reviewboard.org.review-reply-screenshot-comment+json
X-Content-Type-Options: nosniff
{
  "screenshot_comment": {
    "extra_data": {}, 
    "h": 44, 
    "id": 2, 
    "issue_opened": false, 
    "issue_status": "", 
    "links": {
      "delete": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/screenshot-comments/2/", 
        "method": "DELETE"
      }, 
      "reply_to": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/", 
        "method": "GET", 
        "title": "This comment makes an astute observation."
      }, 
      "screenshot": {
        "href": "http://reviews.example.com/api/review-requests/8/screenshots/1/", 
        "method": "GET", 
        "title": "Example Screenshot (uploaded/images/2010/08/13/screenshot1.png)"
      }, 
      "self": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/screenshot-comments/2/", 
        "method": "GET"
      }, 
      "update": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/screenshot-comments/2/", 
        "method": "PUT"
      }, 
      "user": {
        "href": "http://reviews.example.com/api/users/admin/", 
        "method": "GET", 
        "title": "admin"
      }
    }, 
    "public": true, 
    "text": "A very witty comeback to an astute observation.", 
    "text_type": "plain", 
    "thumbnail_url": "/media/uploaded/images/2010/08/13/screenshot1_132_109_198_44.png", 
    "timestamp": "2010-08-28T02:26:16Z", 
    "w": 198, 
    "x": 132, 
    "y": 109
  }, 
  "stat": "ok"
}