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 |
|
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
For
For
For
For
|
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 |
timestampString | The date and time that the change was made (in YYYY-MM-DD HH:MM:SS format). |
Links¶
Name | Method | Resource |
---|---|---|
self | GET | Change Resource |
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/api/review-requests/8/changes/2/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 28bfa0f744f8e767cba3de1c2369545fe6f111c5
Content-Type: application/vnd.reviewboard.org.review-request-change+json
X-Content-Type-Options: nosniff
{
"change": {
"fields_changed": {
"diff": {
"added": {
"base_commit_id": null,
"basedir": "",
"extra_data": {},
"id": 11,
"links": {
"files": {
"href": "http://reviews.example.com/api/review-requests/8/diffs/3/files/",
"method": "GET"
},
"repository": {
"href": "http://reviews.example.com/api/repositories/1/",
"method": "GET",
"title": "Review Board SVN"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/diffs/3/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/8/diffs/3/",
"method": "PUT"
}
},
"name": "diff",
"revision": 3,
"timestamp": "2009-02-25T21:39:42Z"
}
}
},
"id": 2,
"links": {
"self": {
"href": "http://reviews.example.com/api/review-requests/8/changes/2/",
"method": "GET"
}
},
"text": "Added a diff containing a new file.",
"text_type": "plain",
"timestamp": "2013-08-07T22:32:13Z"
},
"stat": "ok"
}