##// END OF EJS Templates
docs: make 'API access for web views' less prominent - the official API should come first
Mads Kiilerich -
r5748:2824cb8b default
parent child Browse files
Show More
@@ -9,32 +9,6 b' methods. Everything is available by send'
9 ``<your_server>/_admin/api``.
9 ``<your_server>/_admin/api``.
10
10
11
11
12 API access for web views
13 ------------------------
14
15 API access can also be turned on for each web view in Kallithea that is
16 decorated with the ``@LoginRequired`` decorator. Some views use
17 ``@LoginRequired(api_access=True)`` and are always available. By default only
18 RSS/Atom feed views are enabled. Other views are
19 only available if they have been whitelisted. Edit the
20 ``api_access_controllers_whitelist`` option in your .ini file and define views
21 that should have API access enabled.
22
23 For example, to enable API access to patch/diff, raw file and archive::
24
25 api_access_controllers_whitelist =
26 ChangesetController:changeset_patch,
27 ChangesetController:changeset_raw,
28 FilesController:raw,
29 FilesController:archivefile
30
31 After this change, a Kallithea view can be accessed without login by adding a
32 GET parameter ``?api_key=<api_key>`` to the URL.
33
34 Exposing raw diffs is a good way to integrate with
35 third-party services like code review, or build farms that can download archives.
36
37
38 API access
12 API access
39 ----------
13 ----------
40
14
@@ -1024,3 +998,29 b' OUTPUT::'
1024 "success": true
998 "success": true
1025 }
999 }
1026 error: null
1000 error: null
1001
1002
1003 API access for web views
1004 ------------------------
1005
1006 API access can also be turned on for each web view in Kallithea that is
1007 decorated with the ``@LoginRequired`` decorator. Some views use
1008 ``@LoginRequired(api_access=True)`` and are always available. By default only
1009 RSS/Atom feed views are enabled. Other views are
1010 only available if they have been whitelisted. Edit the
1011 ``api_access_controllers_whitelist`` option in your .ini file and define views
1012 that should have API access enabled.
1013
1014 For example, to enable API access to patch/diff, raw file and archive::
1015
1016 api_access_controllers_whitelist =
1017 ChangesetController:changeset_patch,
1018 ChangesetController:changeset_raw,
1019 FilesController:raw,
1020 FilesController:archivefile
1021
1022 After this change, a Kallithea view can be accessed without login by adding a
1023 GET parameter ``?api_key=<api_key>`` to the URL.
1024
1025 Exposing raw diffs is a good way to integrate with
1026 third-party services like code review, or build farms that can download archives.
General Comments 0
You need to be logged in to leave comments. Login now