Jump to >

Review Request Resource

Name review_request
URI /api/review-requests/{review_request_id}/
Description Provides information on review requests.
HTTP Methods
  • DELETE - Deletes the review request permanently.
  • GET - Returns information on a particular review request.
  • PUT - Updates the status of the review request.
Parent Resource Review Request List Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

Fields

Field Type Description
branch String The branch that the code was changed on or that the code will be committed to. This is a free-form field that can store any text.
bugs_closed List of String The list of bugs closed or referenced by this change.
changenum Integer The change number that the review request is representing. These are server-side repository-specific change numbers, and are not supported by all types of repositories. This may be null.
description String The review request’s description.
id Integer The numeric ID of the review request.
last_updated String The date and time that the review request was last updated (in YYYY-MM-DD HH:MM:SS format).
public Boolean Whether or not the review request is currently visible to other users.
repository Repository Resource The repository that the review request’s code is stored on.
status One of discarded, pending, submitted The current status of the review request.
submitter User Resource The user who submitted the review request.
summary String The review request’s brief summary.
target_groups List of Review Group Resource The list of review groups who were requested to review this change.
target_people List of User Resource The list of users who were requested to review this change.
testing_done String The information on the testing that was done for the change.
time_added String The date and time that the review request was added (in YYYY-MM-DD HH:MM:SS format).

HTTP DELETE

Deletes the review request permanently.

This is a dangerous call to make, as it will delete the review request, associated screenshots, diffs, and reviews. There is no going back after this call is made.

Only users who have been granted the reviews.delete_reviewrequest permission (which includes administrators) can perform a delete on the review request.

After a successful delete, this will return HTTP 204 No Content.

HTTP GET

Returns information on a particular review request.

This contains full information on the latest published review request.

If the review request is not public, then the client’s logged in user must either be the owner of the review request or must have the reviews.can_edit_reviewrequest permission set. Otherwise, an error will be returned.

HTTP PUT

Updates the status of the review request.

The only supported update to a review request’s resource is to change the status, the associated server-side, change number, or to update information from the existing change number.

The status can be set in order to close the review request as discarded or submitted, or to reopen as pending.

The change number can either be changed to a new number, or the current change number can be passed. In either case, a new draft will be created or an existing one updated to include information from the server based on the change number.

Changes to a review request’s fields, such as the summary or the list of reviewers, is made on the Review Request Draft resource. This can be accessed through the draft link. Only when that draft is published will the changes end up back in this resource.

Request Parameters

Field Type Description
changenum (optional) Integer The optional changenumber to set or update. This can be used to re-associate with a new change number, or to create/update a draft with new information from the current change number. This only works with repositories that support server-side changesets.
description (optional) String The description of the update. Should only be used if the review request have been submitted or discarded.
status (optional) One of discarded, pending, submitted The status of the review request. This can be changed to close or reopen the review request

Examples

application/vnd.reviewboard.org.review-request+json

{
  "review_request": {
    "branch": "trunk", 
    "bugs_closed": [], 
    "changenum": null, 
    "description": "This is a test designed for interdiffs.", 
    "id": 8, 
    "last_updated": "2010-08-28 02:26:18", 
    "links": {
      "changes": {
        "href": "http://reviews.example.com/api/review-requests/8/changes/", 
        "method": "GET"
      }, 
      "delete": {
        "href": "http://reviews.example.com/api/review-requests/8/", 
        "method": "DELETE"
      }, 
      "diffs": {
        "href": "http://reviews.example.com/api/review-requests/8/diffs/", 
        "method": "GET"
      }, 
      "draft": {
        "href": "http://reviews.example.com/api/review-requests/8/draft/", 
        "method": "GET"
      }, 
      "file_attachments": {
        "href": "http://reviews.example.com/api/review-requests/8/file-attachments/", 
        "method": "GET"
      }, 
      "last_update": {
        "href": "http://reviews.example.com/api/review-requests/8/last-update/", 
        "method": "GET"
      }, 
      "repository": {
        "href": "http://reviews.example.com/api/repositories/1/", 
        "method": "GET", 
        "title": "Review Board SVN"
      }, 
      "reviews": {
        "href": "http://reviews.example.com/api/review-requests/8/reviews/", 
        "method": "GET"
      }, 
      "screenshots": {
        "href": "http://reviews.example.com/api/review-requests/8/screenshots/", 
        "method": "GET"
      }, 
      "self": {
        "href": "http://reviews.example.com/api/review-requests/8/", 
        "method": "GET"
      }, 
      "submitter": {
        "href": "http://reviews.example.com/api/users/admin/", 
        "method": "GET", 
        "title": "admin"
      }, 
      "update": {
        "href": "http://reviews.example.com/api/review-requests/8/", 
        "method": "PUT"
      }
    }, 
    "public": true, 
    "status": "pending", 
    "summary": "Interdiff Revision Test", 
    "target_groups": [], 
    "target_people": [
      {
        "href": "http://reviews.example.com/api/users/grumpy/", 
        "method": "GET", 
        "title": "grumpy"
      }
    ], 
    "testing_done": "", 
    "time_added": "2009-02-25 02:01:21"
  }, 
  "stat": "ok"
}

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

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <stat>ok</stat>
 <review_request>
  <status>pending</status>
  <last_updated>2010-08-28 02:26:18</last_updated>
  <description>This is a test designed for interdiffs.</description>
  <links>
   <diffs>
    <href>http://reviews.example.com/api/review-requests/8/diffs/</href>
    <method>GET</method>
   </diffs>
   <repository>
    <href>http://reviews.example.com/api/repositories/1/</href>
    <method>GET</method>
    <title>Review Board SVN</title>
   </repository>
   <screenshots>
    <href>http://reviews.example.com/api/review-requests/8/screenshots/</href>
    <method>GET</method>
   </screenshots>
   <self>
    <href>http://reviews.example.com/api/review-requests/8/</href>
    <method>GET</method>
   </self>
   <update>
    <href>http://reviews.example.com/api/review-requests/8/</href>
    <method>PUT</method>
   </update>
   <last_update>
    <href>http://reviews.example.com/api/review-requests/8/last-update/</href>
    <method>GET</method>
   </last_update>
   <reviews>
    <href>http://reviews.example.com/api/review-requests/8/reviews/</href>
    <method>GET</method>
   </reviews>
   <draft>
    <href>http://reviews.example.com/api/review-requests/8/draft/</href>
    <method>GET</method>
   </draft>
   <file_attachments>
    <href>http://reviews.example.com/api/review-requests/8/file-attachments/</href>
    <method>GET</method>
   </file_attachments>
   <submitter>
    <href>http://reviews.example.com/api/users/admin/</href>
    <method>GET</method>
    <title>admin</title>
   </submitter>
   <changes>
    <href>http://reviews.example.com/api/review-requests/8/changes/</href>
    <method>GET</method>
   </changes>
   <delete>
    <href>http://reviews.example.com/api/review-requests/8/</href>
    <method>DELETE</method>
   </delete>
  </links>
  <public>1</public>
  <target_groups>
   <array>
   </array>
  </target_groups>
  <bugs_closed>
   <array>
   </array>
  </bugs_closed>
  <changenum>
  </changenum>
  <target_people>
   <array>
    <item>
     <href>http://reviews.example.com/api/users/grumpy/</href>
     <method>GET</method>
     <title>grumpy</title>
    </item>
   </array>
  </target_people>
  <testing_done></testing_done>
  <branch>trunk</branch>
  <time_added>2009-02-25 02:01:21</time_added>
  <summary>Interdiff Revision Test</summary>
  <id>8</id>
 </review_request>
</rsp>