Jump to >

This documentation covers the in-development release of Review Board. You can see the latest stable docs or all previous versions.

Change Resource

Added in 1.6

Provides information on a change made to a public review request.

A change includes, optionally, text entered by the user describing the change, and also includes a list of fields that were changed on the review request.

The list of fields changed are in fields_changed. The keys are the names of the fields, and the values are details on that particular change to the field.

Details

Name change
URI /api/review-requests/{review_request_id}/changes/{change_id}/
Token Policy ID change
HTTP Methods
  • GET - Returns the information on a change to a review request.
Parent Resource Change List Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

Fields

fields_changedDictionary

The fields that were changed. Each key is the name of a changed field, and each value is a dictionary of details on that change.

For summary, description, testing_done and branch fields, the following detail keys will be available:

  • old: The old value of the field.
  • new: The new value of the field.

For diff fields:

  • added: The diff that was added.

For bugs_closed fields:

  • old: A list of old bugs.
  • new: A list of new bugs.
  • removed: A list of bugs that were removed, if any.
  • added: A list of bugs that were added, if any.

For file_attachments, screenshots, target_people and target_groups fields:

  • old: A list of old items.
  • new: A list of new items.
  • removed: A list of items that were removed, if any.
  • added: A list of items that were added, if any.

For screenshot_captions and file_captions fields:

  • old: The old caption.
  • new: The new caption.
  • screenshot: The screenshot that was updated.
idInteger The numeric ID of the change description.
textRich Text The description of the change written by the submitter.
text_typeOne of plain, markdown, html

The mode for the text field.

Added in 2.0

timestampISO 8601 Date/Time The date and time that the change was made.

HTTP GET

Returns the information on a change to a review request.

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.review-request-change+json

$ curl http://reviews.example.com/api10/4/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 12e9b6f4a7b95664fdd8b4d88a470f2905499014
Content-Type: application/vnd.reviewboard.org.review-request-change+json
X-Content-Type-Options: nosniff
{
  "change": {
    "fields_changed": {
      "diff": {
        "added": {
          "base_commit_id": "1baa5285167980271becd922acd77a20a20b916b", 
          "basedir": "", 
          "commit_count": 2, 
          "extra_data": {}, 
          "id": 14, 
          "links": {
            "commits": {
              "href": "http://reviews.example.com/api/review-requests/10/diffs/2/commits/", 
              "method": "GET"
            }, 
            "files": {
              "href": "http://reviews.example.com/api/review-requests/10/diffs/2/files/", 
              "method": "GET"
            }, 
            "repository": {
              "href": "http://reviews.example.com/api/repositories/3/", 
              "method": "GET", 
              "title": "Git Repo"
            }, 
            "self": {
              "href": "http://reviews.example.com/api/review-requests/10/diffs/2/", 
              "method": "GET"
            }, 
            "update": {
              "href": "http://reviews.example.com/api/review-requests/10/diffs/2/", 
              "method": "PUT"
            }
          }, 
          "name": "diff", 
          "revision": 2, 
          "timestamp": "2018-08-10T22:16:47Z"
        }
      }
    }, 
    "id": 4, 
    "links": {
      "self": {
        "href": "http://reviews.example.com/api/review-requests/10/changes/4/", 
        "method": "GET"
      }
    }, 
    "text": "", 
    "text_type": "plain", 
    "timestamp": "2018-08-10T22:16:47Z"
  }, 
  "stat": "ok"
}