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 |
|
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 |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
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_html": null,
"avatar_url": "https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=48&d=mm",
"avatar_urls": {
"1x": "https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=48&d=mm",
"2x": "https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=96&d=mm",
"3x": "https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=144&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"
},
"update": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "PUT"
},
"user_file_attachments": {
"href": "http://reviews.example.com/api/users/admin/user-file-attachments/",
"method": "GET"
},
"watched": {
"href": "http://reviews.example.com/api/users/admin/watched/",
"method": "GET"
}
},
"url": "/users/admin/",
"username": "admin"
}
},
"stat": "ok"
}