Jump to >

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

Original File Resource

Added in 2.0

Provides the unpatched file corresponding to a file diff.

Details

Name original_file
URI /api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/original-file/
Token Policy ID original_file
HTTP Methods
  • GET - Returns the original file.
Parent Resource File Diff Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

HTTP GET

Returns the original file.

The file is returned as text/plain and is the original file before applying a patch.

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

text/plain

$ curl http://reviews.example.com/api10/1/44/ -H "Accept: text/plain"
Vary: Accept, Cookie
Content-Type: application/vnd.reviewboard.org.error+json
X-Content-Type-Options: nosniff
{"err": {"code": 100, "msg": "Object does not exist"}, "stat": "fail"}