Jump to >

Review Request Last Update Resource

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.

Details

Name last_update
URI /api/review-requests/{review_request_id}/last-update/
Token Policy ID review_request_last_update
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

summaryString A short summary of the update. This should be one of “Review request updated”, “Diff updated”, “New reply” or “New review”.
timestampString The timestamp of this most recent update (YYYY-MM-DD HH:MM:SS format).
typeOne 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.
userString The username for 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.

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

Examples

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

$ curl http://reviews.example.com/api/review-requests/8/last-update/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 6d65a45fd587c7114e1421d2ca58882b7e797129
Content-Type: application/vnd.reviewboard.org.last-update+json
X-Content-Type-Options: nosniff
{
  "last_update": {
    "summary": "Review request updated", 
    "timestamp": "2013-09-07T02:26:18Z", 
    "type": "review-request", 
    "user": {
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?d=mm", 
      "email": "admin@example.com", 
      "first_name": "Admin", 
      "fullname": "Admin User", 
      "id": 1, 
      "is_active": true, 
      "last_name": "User", 
      "links": {
        "api_tokens": {
          "href": "http://reviews.example.com/api/users/admin/api-tokens/", 
          "method": "GET"
        }, 
        "archived_review_requests": {
          "href": "http://reviews.example.com/api/users/admin/archived-review-requests/", 
          "method": "GET"
        }, 
        "muted_review_requests": {
          "href": "http://reviews.example.com/api/users/admin/muted-review-requests/", 
          "method": "GET"
        }, 
        "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"
}