New in version 1.6.
Review File Attachment Comment Resource¶
Name | file_attachment_comment |
URI | /api/review-requests/{review_request_id}/reviews/{review_id}/file-attachment-comments/{comment_id}/ |
Description | Provides information on file 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 File Attachment Comment List Resource |
Child Resources | None |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
Field | Type | Description |
---|---|---|
file_attachment | File Attachment Resource | The file the comment was made on. |
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. |
text | String | The comment text. |
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. |
Links¶
Name | Method | Resource |
---|---|---|
delete | DELETE | Review File Attachment Comment Resource |
self | GET | Review File Attachment Comment Resource |
update | PUT | Review File Attachment 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 file the comment was made on, amongst other information.
HTTP PUT¶
Updates a file 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 |
---|---|---|
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. |
Examples¶
application/vnd.reviewboard.org.file-attachment-comment+json¶
{
"file_attachment_comment": {
"id": 1,
"issue_opened": false,
"issue_status": "",
"links": {
"delete": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/",
"method": "DELETE"
},
"file_attachment": {
"href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/",
"method": "GET",
"title": "Example Attachment"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/",
"method": "PUT"
},
"user": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
}
},
"public": true,
"text": "A fantastic comment on a fantastic file!",
"timestamp": "2011-08-26 02:49:32"
},
"stat": "ok"
}
application/vnd.reviewboard.org.file-attachment-comment+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<file_attachment_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/file-attachment-comments/1/</href>
<method>GET</method>
</self>
<update>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/</href>
<method>PUT</method>
</update>
<file_attachment>
<href>http://reviews.example.com/api/review-requests/8/file-attachments/1/</href>
<method>GET</method>
<title>Example Attachment</title>
</file_attachment>
<delete>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/</href>
<method>DELETE</method>
</delete>
</links>
<timestamp>2011-08-26 02:49:32</timestamp>
<public>1</public>
<text>A fantastic comment on a fantastic file!</text>
<id>1</id>
<issue_status></issue_status>
</file_attachment_comment>
</rsp>