Jump to >

This documentation covers Review Board 2.0. You can see the latest Review Board documentation or all other versions.

Review List Resource

Provides information on reviews made on a review request.

Each review can contain zero or more comments on diffs, screenshots or file attachments. It may also have text preceding the comments (the body_top field), and text following the comments (body_bottom).

A review may have replies made. Replies are flat, not threaded. Like a review, there may be body text and there may be comments (which are replies to comments on the parent review).

If the ship_it field is true, then the reviewer has given their approval of the change, once all issues raised on comments have been addressed.

Details

Name reviews
URI /api/review-requests/{review_request_id}/reviews/
HTTP Methods
  • GET - Returns the list of all public reviews on a review request.
  • POST - Creates a new review.
Parent Resource Review Request Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

HTTP GET

Returns the list of all public reviews on a review request.

Request Parameters

counts-onlyBoolean If specified, a single count field is returned with the number of results, instead of the results themselves.
max-resultsInteger The maximum number of results to return in this list. By default, this is 25. There is a hard limit of 200; if you need more than 200 results, you will need to make more than one request, using the “next” pagination link.
startInteger 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.

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

HTTP POST

Creates a new review.

The new review will start off as private. Only the author of the review (the user who is logged in and issuing this API call) will be able to see and interact with the review.

Initial data for the review can be provided by passing data for any number of the fields. If nothing is provided, the review will start off as blank.

If the user submitting this review already has a pending draft review on this review request, 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 review.

Request Parameters

body_bottomRich Text The review content below the comments.
body_bottom_text_typeOne of plain, markdown

The text type used for the body_bottom field.

Added in 2.0.12

body_topRich Text The review content above the comments.
body_top_text_typeOne of plain, markdown

The text type used for the body_top field.

Added in 2.0.12

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.
publicBoolean Whether or not to make the review public. If a review is public, it cannot be made private again.
ship_itBoolean Whether or not to mark the review “Ship It!”
text_typeOne of plain, markdown Deprecated

The mode for the body_top and body_bottom text fields.

This is deprecated. Please use body_top_text_type and body_bottom_text_type instead.

Added in 2.0

Deprecated in 2.0.12

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

Examples

application/vnd.reviewboard.org.reviews+json

$ curl http://reviews.example.com/api/review-requests/8/reviews/ -H "Accept: application/json"
Vary: Accept, Cookie
Item-Content-Type: application/vnd.reviewboard.org.review+json
Content-Type: application/vnd.reviewboard.org.reviews+json
X-Content-Type-Options: nosniff
{
  "links": {
    "create": {
      "href": "http://reviews.example.com/api/review-requests/8/reviews/", 
      "method": "POST"
    }, 
    "review_draft": {
      "href": "http://reviews.example.com/api/review-requests/8/reviews/draft/", 
      "method": "GET"
    }, 
    "self": {
      "href": "http://reviews.example.com/api/review-requests/8/reviews/", 
      "method": "GET"
    }
  }, 
  "reviews": [
    {
      "body_bottom": "", 
      "body_bottom_text_type": "plain", 
      "body_top": "", 
      "body_top_text_type": "plain", 
      "extra_data": {}, 
      "id": 8, 
      "links": {
        "delete": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/", 
          "method": "DELETE"
        }, 
        "diff_comments": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/diff-comments/", 
          "method": "GET"
        }, 
        "file_attachment_comments": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/", 
          "method": "GET"
        }, 
        "replies": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/replies/", 
          "method": "GET"
        }, 
        "screenshot_comments": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/", 
          "method": "GET"
        }, 
        "self": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/", 
          "method": "GET"
        }, 
        "update": {
          "href": "http://reviews.example.com/api/review-requests/8/reviews/8/", 
          "method": "PUT"
        }, 
        "user": {
          "href": "http://reviews.example.com/api/users/admin/", 
          "method": "GET", 
          "title": "admin"
        }
      }, 
      "public": true, 
      "ship_it": false, 
      "text_type": null, 
      "timestamp": "2010-08-28T02:25:31Z"
    }
  ], 
  "stat": "ok", 
  "total_results": 1
}