Review Screenshot Comment Resource¶
Added in 1.6
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.
Details¶
Name | screenshot_comment |
URI | /api/review-requests/{review_request_id}/reviews/{review_id}/screenshot-comments/{comment_id}/ |
Token Policy ID | review_screenshot_comment |
HTTP Methods | |
Parent Resource | Review Screenshot Comment List Resource |
Child Resources | None |
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 |
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 resolved , verifying-resolved , open , dropped , verifying-dropped |
The status of an issue. |
publicBoolean | Whether or not the comment is part of a public review. Added in 2.0 |
screenshotScreenshot Resource | The screenshot the comment was made on. |
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_urlString | The URL to an image showing what was commented on. Added in 1.7.10 |
timestampISO 8601 Date/Time | The date and time that the comment was made. Added in 2.0 |
userUser Resource | The user who made the comment. Added in 2.0 |
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. |
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.
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 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.
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 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.
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 |
hInteger | The height of the comment region. |
issue_openedBoolean | Whether or not the comment opens an issue. Added in 2.0 |
issue_statusOne of resolved , verifying-resolved , open , dropped , verifying-dropped |
The status of an open issue. Added in 2.0 |
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 |
wInteger | The width of the comment region. |
xInteger | The X location for the comment. |
yInteger | The Y location for the comment. |
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.screenshot-comment+json¶
$ curl https://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 1027
Content-Type: application/vnd.reviewboard.org.screenshot-comment+json
ETag: 8ee64fd1cb1337046ed321cf202b82de1955a6fc
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"screenshot_comment": {
"extra_data": {},
"h": 44,
"id": 1,
"issue_opened": false,
"issue_status": "",
"links": {
"delete": {
"href": "https://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/",
"method": "DELETE"
},
"screenshot": {
"href": "https://reviews.example.com/api/review-requests/8/screenshots/1/",
"method": "GET",
"title": "Example Screenshot (uploaded/images/2010/08/13/screenshot1.png)"
},
"self": {
"href": "https://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/",
"method": "GET"
},
"update": {
"href": "https://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/1/",
"method": "PUT"
},
"user": {
"href": "https://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
}
},
"public": true,
"text": "This comment makes an astute observation.",
"text_type": "plain",
"thumbnail_url": "/media/uploaded/images/2010/08/13/screenshot1_132_109_198_44.png",
"timestamp": "2010-08-28T02:24:31Z",
"w": 198,
"x": 132,
"y": 109
},
"stat": "ok"
}