New in version 1.6.
File Attachment Comment Resource¶
Name | file_attachment_comment |
URI | /api/review-requests/{review_request_id}/file-attachments/{file_attachment_id}/file-attachment-comments/{None}/ |
Description | Provides information on filess comments made on a review request. The list of comments cannot be modified from this resource. It’s meant purely as a way to see existing comments that were made on a file. These comments will span all public reviews. |
HTTP Methods |
|
Parent Resource | File Attachment Resource |
Child Resources | None |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
Field | Type | Description |
---|---|---|
extra_data | Dictionary | Extra data as part of the comment. This depends on the type of file being commented on. |
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. |
link_text | String | The text used to describe a link to the file. This may differ depending on the comment. |
public | Boolean | Whether or not the comment is part of a public review. |
review_url | String | The URL to the review UI for the comment on this file attachment. |
text | String | The comment text. |
thumbnail_html | String | The HTML representing a thumbnail, if any, for this comment. |
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 |
---|---|---|
self | GET | File Attachment Comment Resource |
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.
Examples¶
application/vnd.reviewboard.org.file-attachment-comment+json¶
{
"file_attachment_comments": [
{
"extra_data": {},
"id": 1,
"issue_opened": false,
"issue_status": "",
"link_text": "screenshot1.png",
"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,
"review_url": "/r/8/#fcomment1",
"text": "A fantastic comment on a fantastic file!",
"thumbnail_html": null,
"timestamp": "2011-08-26T02:49:32.639Z"
},
{
"extra_data": {},
"id": 2,
"issue_opened": false,
"issue_status": "",
"link_text": "screenshot1.png",
"links": {
"delete": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/",
"method": "DELETE"
},
"file_attachment": {
"href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/",
"method": "GET",
"title": "Example Attachment"
},
"reply_to": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/",
"method": "GET",
"title": "A fantastic comment on a fantastic file!"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/",
"method": "PUT"
},
"user": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
}
},
"public": true,
"review_url": "/r/8/#fcomment2",
"text": "A reply to a fantastic comment.",
"thumbnail_html": null,
"timestamp": "2011-08-26T02:52:57.636Z"
}
],
"links": {
"self": {
"href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/file-attachment-comments/",
"method": "GET"
}
},
"stat": "ok",
"total_results": 2
}
application/vnd.reviewboard.org.file-attachment-comment+xml¶
{"total_results": 2, "stat": "ok", "links": {"self": {"href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/file-attachment-comments/", "method": "GET"}}, "file_attachment_comments": [{"issue_opened": false, "links": {"user": {"href": "http://reviews.example.com/api/users/admin/", "method": "GET", "title": "admin"}, "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"}, "file_attachment": {"href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/", "method": "GET", "title": "Example Attachment"}, "delete": {"href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/", "method": "DELETE"}}, "timestamp": "2011-08-26T02:49:32.639Z", "link_text": "screenshot1.png", "public": true, "text": "A fantastic comment on a fantastic file!", "thumbnail_html": null, "extra_data": {}, "review_url": "/r/8/#fcomment1", "id": 1, "issue_status": ""}, {"issue_opened": false, "links": {"self": {"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/", "method": "GET"}, "update": {"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/", "method": "PUT"}, "user": {"href": "http://reviews.example.com/api/users/admin/", "method": "GET", "title": "admin"}, "reply_to": {"href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/1/", "method": "GET", "title": "A fantastic comment on a fantastic file!"}, "file_attachment": {"href": "http://reviews.example.com/api/review-requests/8/file-attachments/1/", "method": "GET", "title": "Example Attachment"}, "delete": {"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/2/", "method": "DELETE"}}, "timestamp": "2011-08-26T02:52:57.636Z", "link_text": "screenshot1.png", "id": 2, "text": "A reply to a fantastic comment.", "thumbnail_html": null, "extra_data": {}, "review_url": "/r/8/#fcomment2", "public": true, "issue_status": ""}]}