Review Request List Resource¶
Provides information on review requests.
Review requests are one of the central concepts in Review Board. They represent code or files that are being placed up for review.
A review request has a number of fields that can be filled out, indicating the summary, description of the change, testing that was done, affected bugs, and more. These must be filled out through the associated Review Request Draft resource.
When a review request is published, it can be reviewed by users. It can then be updated, again through the Review Request Draft resource, or closed as submitted or discarded.
Details¶
Name | review_requests |
URI | /api/review-requests/ |
Token Policy ID | review_request |
HTTP Methods | |
Parent Resource | Root List Resource |
Child Resources | |
Anonymous Access | Yes |
Links¶
Name | Method | Resource |
---|---|---|
create | POST | Review Request List Resource |
self | GET | Review Request List Resource |
HTTP GET¶
Returns all review requests that the user has read access to.
By default, this returns all published or formerly published review requests.
The resulting list can be filtered down through the many request parameters.
Request Parameters¶
changenumInteger | The change number the review requests must have set. This will only return one review request per repository, and only works for repository types that support server-side changesets. This is deprecated in favor of the commit_id field. |
commit-idString | The commit that review requests must have set. This will only return one review request per repository. This obsoletes the Added in 2.0 |
from-userString | The username that the review requests must be owned by. |
issue-dropped-countInteger | The review request must have exactly the provided number of dropped issues. Added in 2.0 |
issue-dropped-count-gtInteger | The review request must have more than the provided number of dropped issues. Added in 2.0 |
issue-dropped-count-gteInteger | The review request must have at least the provided number of dropped issues. Added in 2.0 |
issue-dropped-count-ltInteger | The review request must have less than the provided number of dropped issues. Added in 2.0 |
issue-dropped-count-lteInteger | The review request must have at most the provided number of dropped issues. Added in 2.0 |
issue-open-countInteger | The review request must have exactly the provided number of open issues. Added in 2.0 |
issue-open-count-gtInteger | The review request must have more than the provided number of open issues. Added in 2.0 |
issue-open-count-gteInteger | The review request must have at least the provided number of open issues. Added in 2.0 |
issue-open-count-ltInteger | The review request must have less than the provided number of open issues. Added in 2.0 |
issue-open-count-lteInteger | The review request must have at most the provided number of open issues. Added in 2.0 |
issue-resolved-countInteger | The review request must have exactly the provided number of resolved issues. Added in 2.0 |
issue-resolved-count-gtInteger | The review request must have more than the provided number of resolved issues. Added in 2.0 |
issue-resolved-count-gteInteger | The review request must have at least the provided number of resolved issues. Added in 2.0 |
issue-resolved-count-ltInteger | The review request must have less than the provided number of resolved issues. Added in 2.0 |
issue-resolved-count-lteInteger | The review request must have at most the provided number of resolved issues. Added in 2.0 |
last-updated-fromString | The earliest date/time the review request could be last updated. This is compared against the review request’s last_updated field. This must be a valid date/time format. |
last-updated-toString | The date/time that all review requests must be last updated before. This is compared against the review request’s last_updated field. This must be a valid date/time format. |
repositoryInteger | The ID of the repository that the review requests must be on. |
ship-itBoolean | Deprecated The review request must have at least one review with Ship It set, if this is 1. Otherwise, if 0, it must not have any marked Ship It. Added in 1.6 Deprecated in 2.0 |
ship-it-countInteger | The review request must have exactly the provided number of Ship Its. Added in 2.0 |
ship-it-count-gtInteger | The review request must have more than the provided number of Ship Its. Added in 2.0 |
ship-it-count-gteInteger | The review request must have at least the provided number of Ship Its. Added in 2.0 |
ship-it-count-ltInteger | The review request must have less than the provided number of Ship Its. Added in 2.0 |
ship-it-count-lteInteger | The review request must have at most the provided number of Ship Its. Added in 2.0 |
show-all-unpublishedBoolean | If set, and if the user is an admin, unpublished review requests will also be returned. |
statusOne of all , discarded , pending , submitted |
The status of the review requests. |
time-added-fromString | The earliest date/time the review request could be added. This is compared against the review request’s time_added field. This must be a valid date/time format. |
time-added-toString | The date/time that all review requests must be added before. This is compared against the review request’s time_added field. This must be a valid date/time format. |
to-groupsString | A comma-separated list of review group names that the review requests must have in the reviewer list. |
to-user-groupsString | A comma-separated list of usernames who are in groups that the review requests must have in the reviewer list. |
to-usersString | A comma-separated list of usernames that the review requests must either have in the reviewer list specifically or by way of a group. |
to-users-directlyString | A comma-separated list of usernames that the review requests must have in the reviewer list specifically. |
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 |
105 - Invalid Form DataHTTP 400 - Bad Request | One or more fields had errors |
HTTP POST¶
Creates a new review request.
The new review request will start off as private and pending, and
will normally be blank. However, if changenum
or both
commit_id
and create_from_commit_id=1
is passed and the given
repository both supports server-side changesets and has changeset
support in Review Board, some details (Summary, Description and
Testing Done sections, for instance) may be automatically filled in
from the server.
Any new review request will have an associated draft (reachable
through the draft
link). All the details of the review request
must be set through the draft. The new review request will be public
when that first draft is published.
A repository can be passed. This is required for diffs associated with a review request. A valid repository is in the form of a numeric repository ID, the name of a repository, or the path to a repository (matching exactly the registered repository’s Path or Mirror Path fields in the adminstration interface).
If a repository is not passed, this review request can only be used for attached files.
Clients can create review requests on behalf of another user by setting
the submit_as
parameter to the username of the desired user. This
requires that the client is currently logged in as a user that has the
reviews.can_submit_as_another_user
permission set. This capability
is useful when writing automation scripts, such as post-commit hooks,
that need to create review requests for another user.
Extra data can be stored on the review request for later lookup by
passing extra_data.key_name=value
. The key_name
and value
can be any valid strings. Passing a blank value
will remove the
key. The extra_data.
prefix is required.
Request Parameters¶
changenumInteger | Deprecated The optional change number to look up for the review request details. This only works with repositories that support server-side changesets. This is deprecated in favor of the Deprecated in 2.0 |
commit_idString | The optional commit to create the review request for. This should be used in place of the If Added in 2.0 |
create_from_commit_idBoolean | If true, and if Added in 2.0 |
force_text_typeOne of plain , markdown , html |
The text type, if any, to force for returned text fields. The contents will be converted to the requested type in the payload, but will not be saved as that type. Added in 2.0.9 |
repositoryString | The path or ID of the repository that the review request is for. |
submit_asString | The optional user to submit the review request as. This requires that the actual logged in user is either a superuser or has the reviews.can_submit_as_another_user permission. |
Errors¶
Examples¶
application/vnd.reviewboard.org.review-requests+json¶
$ curl http://reviews.example.com/api/review-requests/ -H "Accept: application/json"
Vary: Accept, Cookie
Item-Content-Type: application/vnd.reviewboard.org.review-request+json
Content-Type: application/vnd.reviewboard.org.review-requests+json
X-Content-Type-Options: nosniff
{
"links": {
"create": {
"href": "http://reviews.example.com/api/review-requests/",
"method": "POST"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/",
"method": "GET"
}
},
"review_requests": [
{
"absolute_url": "http://reviews.example.com/r/8/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "trunk",
"bugs_closed": [],
"changenum": null,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": null,
"depends_on": [],
"description": "This is a test designed for interdiffs.",
"description_text_type": "plain",
"extra_data": {},
"id": 8,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"last_updated": "2013-09-07T02:26:18Z",
"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"
},
"diff_context": {
"href": "http://reviews.example.com/api/review-requests/8/diff-context/",
"method": "GET"
},
"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"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/8/diffs/3/",
"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,
"ship_it_count": 0,
"status": "pending",
"summary": "Interdiff Revision Test",
"target_groups": [],
"target_people": [
{
"href": "http://reviews.example.com/api/users/grumpy/",
"method": "GET",
"title": "grumpy"
}
],
"testing_done": "",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2013-08-07T02:01:21Z",
"url": "/r/8/"
},
{
"absolute_url": "http://reviews.example.com/r/9/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "",
"bugs_closed": [],
"changenum": null,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": "",
"depends_on": [],
"description": "Just some tests for diff file attachments",
"description_text_type": "plain",
"extra_data": {},
"id": 9,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"last_updated": "2013-09-06T20:19:34Z",
"links": {
"changes": {
"href": "http://reviews.example.com/api/review-requests/9/changes/",
"method": "GET"
},
"delete": {
"href": "http://reviews.example.com/api/review-requests/9/",
"method": "DELETE"
},
"diff_context": {
"href": "http://reviews.example.com/api/review-requests/9/diff-context/",
"method": "GET"
},
"diffs": {
"href": "http://reviews.example.com/api/review-requests/9/diffs/",
"method": "GET"
},
"draft": {
"href": "http://reviews.example.com/api/review-requests/9/draft/",
"method": "GET"
},
"file_attachments": {
"href": "http://reviews.example.com/api/review-requests/9/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "http://reviews.example.com/api/review-requests/9/last-update/",
"method": "GET"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/9/diffs/1/",
"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/9/reviews/",
"method": "GET"
},
"screenshots": {
"href": "http://reviews.example.com/api/review-requests/9/screenshots/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/9/",
"method": "GET"
},
"submitter": {
"href": "http://reviews.example.com/api/users/doc/",
"method": "GET",
"title": "doc"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/9/",
"method": "PUT"
}
},
"public": true,
"ship_it_count": 0,
"status": "pending",
"summary": "Diff file attachments test",
"target_groups": [
{
"href": "http://reviews.example.com/api/groups/devgroup/",
"method": "GET",
"title": "devgroup"
}
],
"target_people": [],
"testing_done": "",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2013-09-06T19:38:35Z",
"url": "/r/9/"
},
{
"absolute_url": "http://reviews.example.com/r/4/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "",
"bugs_closed": [
"12345"
],
"changenum": 1234,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": "1234",
"depends_on": [],
"description": "Test description.",
"description_text_type": "plain",
"extra_data": {},
"id": 4,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"last_updated": "2007-06-24T01:11:24Z",
"links": {
"changes": {
"href": "http://reviews.example.com/api/review-requests/4/changes/",
"method": "GET"
},
"delete": {
"href": "http://reviews.example.com/api/review-requests/4/",
"method": "DELETE"
},
"diff_context": {
"href": "http://reviews.example.com/api/review-requests/4/diff-context/",
"method": "GET"
},
"diffs": {
"href": "http://reviews.example.com/api/review-requests/4/diffs/",
"method": "GET"
},
"draft": {
"href": "http://reviews.example.com/api/review-requests/4/draft/",
"method": "GET"
},
"file_attachments": {
"href": "http://reviews.example.com/api/review-requests/4/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "http://reviews.example.com/api/review-requests/4/last-update/",
"method": "GET"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/4/diffs/1/",
"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/4/reviews/",
"method": "GET"
},
"screenshots": {
"href": "http://reviews.example.com/api/review-requests/4/screenshots/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/4/",
"method": "GET"
},
"submitter": {
"href": "http://reviews.example.com/api/users/grumpy/",
"method": "GET",
"title": "grumpy"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/4/",
"method": "PUT"
}
},
"public": true,
"ship_it_count": 0,
"status": "pending",
"summary": "Made e-mail improvements",
"target_groups": [],
"target_people": [
{
"href": "http://reviews.example.com/api/users/doc/",
"method": "GET",
"title": "doc"
}
],
"testing_done": "Tested.",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2007-06-24T00:42:42Z",
"url": "/r/4/"
},
{
"absolute_url": "http://reviews.example.com/r/6/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "trunk",
"bugs_closed": [],
"changenum": null,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": null,
"depends_on": [],
"description": "Foo",
"description_text_type": "plain",
"extra_data": {},
"id": 6,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"last_updated": "2007-06-24T01:10:59Z",
"links": {
"changes": {
"href": "http://reviews.example.com/api/review-requests/6/changes/",
"method": "GET"
},
"delete": {
"href": "http://reviews.example.com/api/review-requests/6/",
"method": "DELETE"
},
"diff_context": {
"href": "http://reviews.example.com/api/review-requests/6/diff-context/",
"method": "GET"
},
"diffs": {
"href": "http://reviews.example.com/api/review-requests/6/diffs/",
"method": "GET"
},
"draft": {
"href": "http://reviews.example.com/api/review-requests/6/draft/",
"method": "GET"
},
"file_attachments": {
"href": "http://reviews.example.com/api/review-requests/6/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "http://reviews.example.com/api/review-requests/6/last-update/",
"method": "GET"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/6/diffs/1/",
"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/6/reviews/",
"method": "GET"
},
"screenshots": {
"href": "http://reviews.example.com/api/review-requests/6/screenshots/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/6/",
"method": "GET"
},
"submitter": {
"href": "http://reviews.example.com/api/users/dopey/",
"method": "GET",
"title": "dopey"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/6/",
"method": "PUT"
}
},
"public": true,
"ship_it_count": 0,
"status": "pending",
"summary": "Error dialog",
"target_groups": [
{
"href": "http://reviews.example.com/api/groups/emptygroup/",
"method": "GET",
"title": "emptygroup"
}
],
"target_people": [],
"testing_done": "Bar",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2007-06-24T00:47:14Z",
"url": "/r/6/"
},
{
"absolute_url": "http://reviews.example.com/r/2/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "trunk",
"bugs_closed": [
"123"
],
"changenum": null,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": null,
"depends_on": [],
"description": "Be compatible with cleaned_data changes in Django.",
"description_text_type": "plain",
"extra_data": {},
"id": 2,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"last_updated": "2007-06-24T00:34:17Z",
"links": {
"changes": {
"href": "http://reviews.example.com/api/review-requests/2/changes/",
"method": "GET"
},
"delete": {
"href": "http://reviews.example.com/api/review-requests/2/",
"method": "DELETE"
},
"diff_context": {
"href": "http://reviews.example.com/api/review-requests/2/diff-context/",
"method": "GET"
},
"diffs": {
"href": "http://reviews.example.com/api/review-requests/2/diffs/",
"method": "GET"
},
"draft": {
"href": "http://reviews.example.com/api/review-requests/2/draft/",
"method": "GET"
},
"file_attachments": {
"href": "http://reviews.example.com/api/review-requests/2/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "http://reviews.example.com/api/review-requests/2/last-update/",
"method": "GET"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/2/diffs/1/",
"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/2/reviews/",
"method": "GET"
},
"screenshots": {
"href": "http://reviews.example.com/api/review-requests/2/screenshots/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/2/",
"method": "GET"
},
"submitter": {
"href": "http://reviews.example.com/api/users/dopey/",
"method": "GET",
"title": "dopey"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/2/",
"method": "PUT"
}
},
"public": true,
"ship_it_count": 0,
"status": "pending",
"summary": "Update for cleaned_data changes",
"target_groups": [
{
"href": "http://reviews.example.com/api/groups/devgroup/",
"method": "GET",
"title": "devgroup"
}
],
"target_people": [],
"testing_done": "Works.",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2007-06-24T00:14:32Z",
"url": "/r/2/"
},
{
"absolute_url": "http://reviews.example.com/r/3/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "trunk",
"bugs_closed": [
"1234",
"4321",
"5678",
"8765"
],
"changenum": null,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": null,
"depends_on": [],
"description": "Added some user permissions checking for JSON API functions.",
"description_text_type": "plain",
"extra_data": {},
"id": 3,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"last_updated": "2007-06-24T00:28:33Z",
"links": {
"changes": {
"href": "http://reviews.example.com/api/review-requests/3/changes/",
"method": "GET"
},
"delete": {
"href": "http://reviews.example.com/api/review-requests/3/",
"method": "DELETE"
},
"diff_context": {
"href": "http://reviews.example.com/api/review-requests/3/diff-context/",
"method": "GET"
},
"diffs": {
"href": "http://reviews.example.com/api/review-requests/3/diffs/",
"method": "GET"
},
"draft": {
"href": "http://reviews.example.com/api/review-requests/3/draft/",
"method": "GET"
},
"file_attachments": {
"href": "http://reviews.example.com/api/review-requests/3/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "http://reviews.example.com/api/review-requests/3/last-update/",
"method": "GET"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/3/diffs/1/",
"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/3/reviews/",
"method": "GET"
},
"screenshots": {
"href": "http://reviews.example.com/api/review-requests/3/screenshots/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/3/",
"method": "GET"
},
"submitter": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/3/",
"method": "PUT"
}
},
"public": true,
"ship_it_count": 0,
"status": "pending",
"summary": "Add permission checking for JSON API",
"target_groups": [
{
"href": "http://reviews.example.com/api/groups/privgroup/",
"method": "GET",
"title": "privgroup"
}
],
"target_people": [
{
"href": "http://reviews.example.com/api/users/doc/",
"method": "GET",
"title": "doc"
},
{
"href": "http://reviews.example.com/api/users/dopey/",
"method": "GET",
"title": "dopey"
}
],
"testing_done": "Tested some functions.",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2007-06-24T00:17:33Z",
"url": "/r/3/"
}
],
"stat": "ok",
"total_results": 6
}