Review Resource¶
Name | review |
URI | /api/review-requests/{review_request_id}/reviews/{review_id}/ |
Description | Provides information on reviews. |
HTTP Methods | |
Parent Resource | Review List Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
Field | Type | Description |
---|---|---|
body_bottom | String | The review content below the comments. |
body_top | String | The review content above the comments. |
id | Integer | The numeric ID of the review. |
public | Boolean | Whether or not the review is currently visible to other users. |
ship_it | Boolean | Whether or not the review has been marked “Ship It!” |
timestamp | String | The date and time that the review was posted (in YYYY-MM-DD HH:MM:SS format). |
user | User Resource | The user who wrote the review. |
Links¶
Name | Method | Resource |
---|---|---|
delete | DELETE | Review Resource |
diff_comments | GET | Review Diff Comment List Resource |
file_attachment_comments | GET | Review File Attachment Comment List Resource |
replies | GET | Review Reply List Resource |
screenshot_comments | GET | Review Screenshot Comment List Resource |
self | GET | Review Resource |
update | PUT | Review Resource |
HTTP DELETE¶
Deletes the draft review.
This only works for draft reviews, not public reviews. It will delete the review and all comments on it. This cannot be undone.
Only the user who owns the draft can delete it.
Upon deletion, this will return HTTP 204 No Content.
HTTP GET¶
Returns information on a particular review.
If the review is not public, then the client’s logged in user must either be the owner of the review. Otherwise, an error will be returned.
HTTP PUT¶
Updates a review.
This updates the fields of a draft review. Published reviews cannot be updated.
Only the owner of a review can make changes. One or more fields can be updated at once.
The only special field is public, which, if set to 1, will publish the review. The review will then be made publicly visible. Once public, the review cannot be modified or made private again.
Request Parameters¶
Field | Type | Description |
---|---|---|
body_bottom (optional) | String | The review content below the comments. |
body_top (optional) | String | The review content above the comments. |
public (optional) | Boolean | Whether or not to make the review public. If a review is public, it cannot be made private again. |
ship_it (optional) | Boolean | Whether or not to mark the review “Ship It!” |
Examples¶
application/vnd.reviewboard.org.review+json¶
{
"review": {
"body_bottom": "",
"body_top": "",
"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,
"timestamp": "2010-08-28T02:25:31.503Z"
},
"stat": "ok"
}
application/vnd.reviewboard.org.review+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<review>
<body_top></body_top>
<ship_it>0</ship_it>
<links>
<diff_comments>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/diff-comments/</href>
<method>GET</method>
</diff_comments>
<file_attachment_comments>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/file-attachment-comments/</href>
<method>GET</method>
</file_attachment_comments>
<self>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/</href>
<method>GET</method>
</self>
<update>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/</href>
<method>PUT</method>
</update>
<screenshot_comments>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/screenshot-comments/</href>
<method>GET</method>
</screenshot_comments>
<user>
<href>http://reviews.example.com/api/users/admin/</href>
<method>GET</method>
<title>admin</title>
</user>
<replies>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/replies/</href>
<method>GET</method>
</replies>
<delete>
<href>http://reviews.example.com/api/review-requests/8/reviews/8/</href>
<method>DELETE</method>
</delete>
</links>
<timestamp>2010-08-28T02:25:31.503Z</timestamp>
<id>8</id>
<body_bottom></body_bottom>
<public>1</public>
</review>
</rsp>