Show More
@@ -16,9 +16,24 b' API ACCESS FOR WEB VIEWS' | |||
|
16 | 16 | API access can also be turned on for each web view in RhodeCode that is |
|
17 | 17 | decorated with `@LoginRequired` decorator. To enable API access simple change |
|
18 | 18 | the standard login decorator to `@LoginRequired(api_access=True)`. |
|
19 | ||
|
20 | To make this operation easier, starting from version 1.7.0 there's a white list | |
|
21 | of views that will have API access enabled. Simply edit `api_access_controllers_whitelist` | |
|
22 | option in your .ini file, and define views that should have API access enabled. | |
|
23 | Following example shows how to enable API access to patch/diff raw file and archive | |
|
24 | in RhodeCode:: | |
|
25 | ||
|
26 | api_access_controllers_whitelist = | |
|
27 | ChangesetController:changeset_patch, | |
|
28 | ChangesetController:changeset_raw, | |
|
29 | FilesController:raw, | |
|
30 | FilesController:archivefile | |
|
31 | ||
|
32 | ||
|
19 | 33 | After this change, a rhodecode view can be accessed without login by adding a |
|
20 | 34 | GET parameter `?api_key=<api_key>` to url. By default this is only |
|
21 | enabled on RSS/ATOM feed views. | |
|
35 | enabled on RSS/ATOM feed views. Exposing raw diffs is a good way to integrate with | |
|
36 | 3rd party services like code review, or build farms that could download archives. | |
|
22 | 37 | |
|
23 | 38 | |
|
24 | 39 | API ACCESS |
General Comments 0
You need to be logged in to leave comments.
Login now