Draft Original File Resource¶
Added in 2.0.4
Provides the unpatched file corresponding to a file diff.
Details¶
Name | draft_original_file |
URI | /api/review-requests/{review_request_id}/draft/diffs/{diff_revision}/files/{filediff_id}/original-file/ |
Token Policy ID | draft_original_file |
HTTP Methods |
|
Parent Resource | |
Child Resources | None |
Links¶
Name |
Method |
Resource |
---|---|---|
self | GET |
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 https://reviews.example.com/api/review-requests/8/draft/diffs/2/files/35/original-file/ -H "Accept: text/plain"
HTTP 200 OK
Content-Disposition: inline; filename=/trunk/reviewboard/settings_local.py.tmpl
Content-Length: 1775
Content-Type: text/plain
ETag: 5ab9c202636417016379061749915006efac40a0
Last-Modified: Wed, 25 Feb 2009 02:03:05 GMT
Vary: Accept, Cookie
# Database backend. Any supported django database engine should work.
DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'reviewboard' # Or path to database file if using sqlite3.
DATABASE_USER = '********' # Not used with sqlite3.
DATABASE_PASSWORD = '********' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost.
DATABASE_PORT = '' # Set to empty string for default.
# Make this unique, and don't share it with anybody.
SECRET_KEY = '***********************************************'
# Cache backend. Unset this to turn off caching completely. As with most
# django installations, the best option is probably to use memcached.
CACHE_BACKEND = 'locmem:///'
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'US/Pacific'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'
# This should match the ID of the Site object in the database. This is used to
# figure out URLs to stick in e-mails and related pages.
SITE_ID = 1
# Set this to the place of your reviewboard if it does not reside
# at the root of your server. - Add the trailing slash.
# SITE_ROOT = "/reviewboard/"
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# TLS for LDAP. If you're using LDAP authentication and your LDAP server
# doesn't support ldaps://, you can enable start-TLS with this.
LDAP_TLS = False