Review Screenshot Comment Resource¶
Name | screenshot_comment |
URI | /api/review-requests/{review_request_id}/reviews/{review_id}/screenshot-comments/{comment_id}/ |
Description | Provides information on screenshots 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 | |
Parent Resource | Review Screenshot Comment List Resource |
Child Resources | None |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
Field | Type | Description |
---|---|---|
h | Integer | The height of the comment region on the screenshot. |
id | Integer | The numeric ID of the comment. |
issue_opened | Boolean | Whether or not a comment opens an issue. |
issue_status | One of dropped, open, resolved | The status of an issue. |
public | Boolean | Whether or not the comment is part of a public review. |
screenshot | Screenshot Resource | The screenshot the comment was made on. |
text | String | The comment text. |
thumbnail_url | String | The URL to an image showing what was commented on. |
timestamp | String | The date and time that the comment was made (in YYYY-MM-DD HH:MM:SS format). |
user | User Resource | The user who made the comment. |
w | Integer | The width of the comment region on the screenshot. |
x | Integer | The X location of the comment region on the screenshot. |
y | Integer | The Y location of the comment region on the screenshot. |
Links¶
Name | Method | Resource |
---|---|---|
delete | DELETE | Review Screenshot Comment Resource |
self | GET | Review Screenshot Comment Resource |
update | PUT | Review Screenshot Comment Resource |
HTTP DELETE¶
Deletes the comment.
This will remove the comment from the review. This cannot be undone.
Only comments on draft reviews can be deleted. Attempting to delete a published comment will return a Permission Denied error.
Instead of a payload response on success, this will return HTTP 204 No Content.
HTTP GET¶
Returns information on the comment.
This contains the comment text, time the comment was made, and the location of the comment region on the screenshot, amongst other information. It can be used to reconstruct the exact position of the comment for use as an overlay on the screenshot.
HTTP PUT¶
Updates a screenshot comment.
This can update the text or region of an existing comment. It can only be done for comments that are part of a draft review.
Request Parameters¶
Field | Type | Description |
---|---|---|
h (optional) | Integer | The height of the comment region. |
issue_opened (optional) | Boolean | Whether or not the comment opens an issue. |
issue_status (optional) | One of dropped, open, resolved | The status of an open issue. |
text (optional) | String | The comment text. |
w (optional) | Integer | The width of the comment region. |
x (optional) | Integer | The X location for the comment. |
y (optional) | Integer | The Y location for the comment. |
Examples¶
application/vnd.reviewboard.org.screenshot-comment+json¶
{
"screenshot_comment": {
"h": 44,
"id": 1,
"issue_opened": false,
"issue_status": "",
"links": {
"delete": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/",
"method": "DELETE"
},
"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/screenshot-comments/1/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/",
"method": "PUT"
},
"user": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
}
},
"public": true,
"text": "This comment makes an astute observation.",
"thumbnail_url": "/media/uploaded/images/2010/08/13/screenshot1_132_109_198_44.png",
"timestamp": "2010-08-28T02:24:31.087Z",
"w": 198,
"x": 132,
"y": 109
},
"stat": "ok"
}
application/vnd.reviewboard.org.screenshot-comment+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<screenshot_comment>
<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/screenshot-comments/1/</href>
<method>GET</method>
</self>
<update>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/</href>
<method>PUT</method>
</update>
<screenshot>
<href>http://reviews.example.com/api/review-requests/8/screenshots/1/</href>
<method>GET</method>
<title>Example Screenshot (uploaded/images/2010/08/13/screenshot1.png)</title>
</screenshot>
<delete>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/</href>
<method>DELETE</method>
</delete>
</links>
<timestamp>2010-08-28T02:24:31.087Z</timestamp>
<id>1</id>
<thumbnail_url>/media/uploaded/images/2010/08/13/screenshot1_132_109_198_44.png</thumbnail_url>
<w>198</w>
<text>This comment makes an astute observation.</text>
<y>109</y>
<x>132</x>
<h>44</h>
<public>1</public>
<issue_status></issue_status>
</screenshot_comment>
</rsp>