Jump to >

Review Request Last Update Resource

Name last_update
URI /api/review-requests/{review_request_id}/last-update/
Description

Provides information on the last update made to a review request.

Clients can periodically poll this to see if any new updates have been made.

HTTP Methods
  • GET - Returns the last update made to the review request.
Parent Resource Review Request Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

Fields

Field Type Description
summary String A short summary of the update. This should be one of “Review request updated”, “Diff updated”, “New reply” or “New review”.
timestamp String The timestamp of this most recent update (YYYY-MM-DD HH:MM:SS format).
type One of review-request, diff, reply, review The type of the last update. review-request means the last update was an update of the review request’s information. diff means a new diff was uploaded. reply means a reply was made to an existing review. review means a new review was posted.
user String The user who made the last update.

HTTP GET

Returns the last update made to the review request.

This shows the type of update that was made, the user who made the update, and when the update was made. Clients can use this to inform the user that the review request was updated, or automatically update it in the background.

This does not take into account changes to a draft review request, as that’s generally not update information that the owner of the draft is interested in. Only public updates are represented.

Examples

application/vnd.reviewboard.org.last-update+json

{
  "last_update": {
    "summary": "New reply", 
    "timestamp": "2010-08-28 02:26:47", 
    "type": "reply", 
    "user": {
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61", 
      "email": "admin@example.com", 
      "first_name": "Admin", 
      "fullname": "Admin User", 
      "id": 1, 
      "last_name": "User", 
      "links": {
        "self": {
          "href": "http://reviews.example.com/api/users/admin/", 
          "method": "GET"
        }, 
        "watched": {
          "href": "http://reviews.example.com/api/users/admin/watched/", 
          "method": "GET"
        }
      }, 
      "url": "/users/admin/", 
      "username": "admin"
    }
  }, 
  "stat": "ok"
}

application/vnd.reviewboard.org.last-update+xml

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <stat>ok</stat>
 <last_update>
  <timestamp>2010-08-28 02:26:47</timestamp>
  <type>reply</type>
  <user>
   <username>admin</username>
   <first_name>Admin</first_name>
   <last_name>User</last_name>
   <links>
    <watched>
     <href>http://reviews.example.com/api/users/admin/watched/</href>
     <method>GET</method>
    </watched>
    <self>
     <href>http://reviews.example.com/api/users/admin/</href>
     <method>GET</method>
    </self>
   </links>
   <url>/users/admin/</url>
   <email>admin@example.com</email>
   <avatar_url>http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61</avatar_url>
   <fullname>Admin User</fullname>
   <id>1</id>
  </user>
  <summary>New reply</summary>
 </last_update>
</rsp>