Jump to >

Review Reply Resource

Name reply
URI /api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/
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
  • DELETE - Deletes the draft review.
  • GET - Returns information on a particular reply.
  • PUT - Updates a reply.
Parent Resource Review Reply List Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

Fields

Field Type Description
body_bottom String The response to the review content below the comments.
body_top String The response to the review content above the comments.
id Integer The numeric ID of the reply.
public Boolean Whether or not the reply is currently visible to other users.
timestamp String The date and time that the reply was posted (in YYYY-MM-DD HH:MM:SS format).
user User Resource The user who wrote the reply.

HTTP DELETE

Deletes the draft review.

This only works for draft reviews, not public reviews. It will delete the review and all comments on it. This cannot be undone.

Only the user who owns the draft can delete it.

Upon deletion, this will return HTTP 204 No Content.

HTTP GET

Returns information on a particular reply.

If the reply is not public, then the client’s logged in user must either be the owner of the reply. Otherwise, an error will be returned.

HTTP PUT

Updates a reply.

This updates the fields of a draft reply. Published replies cannot be updated.

Only the owner of a reply can make changes. One or more fields can be updated at once.

The only special field is public, which, if set to 1, will publish the reply. The reply will then be made publicly visible. Once public, the reply cannot be modified or made private again.

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-reply+json

{
  "reply": {
    "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"
}

application/vnd.reviewboard.org.review-reply+xml

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <reply>
  <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>
 </reply>
 <stat>ok</stat>
</rsp>