Review Reply List Resource¶
Name | replies |
URI | /api/review-requests/{review_request_id}/reviews/{review_id}/replies/ |
Description | Provides information on a reply to a review. A reply is much like a review, but is always tied to exactly one parent review. Every comment associated with a reply is also tied to a parent comment. |
HTTP Methods | |
Parent Resource | Review Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
create | POST | Review Reply List Resource |
reply_draft | GET | Review Reply Draft Resource |
self | GET | Review Reply List Resource |
HTTP GET¶
Returns the list of all public replies on a review.
Request Parameters¶
Field | Type | Description |
---|---|---|
counts-only (optional) | Boolean | If specified, a single count field is returned with the number of results, instead of the results themselves. |
max-results (optional) | Integer | The maximum number of results to return in this list. By default, this is 25. |
start (optional) | Integer | The 0-based index of the first result in the list. The start index is usually the previous start index plus the number of previous results. By default, this is 0. |
HTTP POST¶
Creates a reply to a review.
The new reply will start off as private. Only the author of the reply (the user who is logged in and issuing this API call) will be able to see and interact with the reply.
Initial data for the reply can be provided by passing data for any number of the fields. If nothing is provided, the reply will start off as blank.
If the user submitting this reply already has a pending draft reply on this review, then this will update the existing draft and return HTTP 303 See Other. Otherwise, this will create a new draft and return HTTP 201 Created. Either way, this request will return without a payload and with a Location header pointing to the location of the new draft reply.
Request Parameters¶
Field | Type | Description |
---|---|---|
body_bottom (optional) | String | The response to the review content below the comments. |
body_top (optional) | String | The response to the review content above the comments. |
public (optional) | Boolean | Whether or not to make the reply public. If a reply is public, it cannot be made private again. |
Examples¶
application/vnd.reviewboard.org.review-replies+json¶
{
"links": {
"create": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/",
"method": "POST"
},
"reply_draft": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/draft/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/",
"method": "GET"
}
},
"replies": [
{
"body_bottom": "",
"body_top": "Excellent point.",
"id": 10,
"links": {
"delete": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/",
"method": "DELETE"
},
"diff_comments": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/diff-comments/",
"method": "GET"
},
"file_attachment_comments": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/",
"method": "GET"
},
"screenshot_comments": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/screenshot-comments/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/",
"method": "PUT"
},
"user": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
}
},
"public": true,
"timestamp": "2010-08-28 02:26:47"
}
],
"stat": "ok",
"total_results": 1
}
application/vnd.reviewboard.org.review-replies+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<total_results>1</total_results>
<stat>ok</stat>
<links>
<self>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/</href>
<method>GET</method>
</self>
<reply_draft>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/draft/</href>
<method>GET</method>
</reply_draft>
<create>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/</href>
<method>POST</method>
</create>
</links>
<replies>
<array>
<item>
<body_top>Excellent point.</body_top>
<links>
<diff_comments>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/diff-comments/</href>
<method>GET</method>
</diff_comments>
<file_attachment_comments>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/file-attachment-comments/</href>
<method>GET</method>
</file_attachment_comments>
<self>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/</href>
<method>GET</method>
</self>
<update>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/</href>
<method>PUT</method>
</update>
<screenshot_comments>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/screenshot-comments/</href>
<method>GET</method>
</screenshot_comments>
<user>
<href>http://reviews.example.com/api/users/admin/</href>
<method>GET</method>
<title>admin</title>
</user>
<delete>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/10/</href>
<method>DELETE</method>
</delete>
</links>
<timestamp>2010-08-28 02:26:47</timestamp>
<public>1</public>
<body_bottom></body_bottom>
<id>10</id>
</item>
</array>
</replies>
</rsp>