# HG changeset patch # User Mads Kiilerich # Date 1458754065 -3600 # Node ID 2824cb8bcc0ec2ecd333038f206417e0ba3a5174 # Parent 4d59003461442483f5a1c91e9cc9caf00ea863ab docs: make 'API access for web views' less prominent - the official API should come first diff -r 4d5900346144 -r 2824cb8bcc0e docs/api/api.rst --- a/docs/api/api.rst Wed Mar 23 18:27:45 2016 +0100 +++ b/docs/api/api.rst Wed Mar 23 18:27:45 2016 +0100 @@ -9,32 +9,6 @@ ``/_admin/api``. -API access for web views ------------------------- - -API access can also be turned on for each web view in Kallithea that is -decorated with the ``@LoginRequired`` decorator. Some views use -``@LoginRequired(api_access=True)`` and are always available. By default only -RSS/Atom feed views are enabled. Other views are -only available if they have been whitelisted. Edit the -``api_access_controllers_whitelist`` option in your .ini file and define views -that should have API access enabled. - -For example, to enable API access to patch/diff, raw file and archive:: - - api_access_controllers_whitelist = - ChangesetController:changeset_patch, - ChangesetController:changeset_raw, - FilesController:raw, - FilesController:archivefile - -After this change, a Kallithea view can be accessed without login by adding a -GET parameter ``?api_key=`` to the URL. - -Exposing raw diffs is a good way to integrate with -third-party services like code review, or build farms that can download archives. - - API access ---------- @@ -1024,3 +998,29 @@ "success": true } error: null + + +API access for web views +------------------------ + +API access can also be turned on for each web view in Kallithea that is +decorated with the ``@LoginRequired`` decorator. Some views use +``@LoginRequired(api_access=True)`` and are always available. By default only +RSS/Atom feed views are enabled. Other views are +only available if they have been whitelisted. Edit the +``api_access_controllers_whitelist`` option in your .ini file and define views +that should have API access enabled. + +For example, to enable API access to patch/diff, raw file and archive:: + + api_access_controllers_whitelist = + ChangesetController:changeset_patch, + ChangesetController:changeset_raw, + FilesController:raw, + FilesController:archivefile + +After this change, a Kallithea view can be accessed without login by adding a +GET parameter ``?api_key=`` to the URL. + +Exposing raw diffs is a good way to integrate with +third-party services like code review, or build farms that can download archives.