diff --git a/docs/api/api.rst b/docs/api/api.rst --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -32,7 +32,7 @@ Clients must send JSON encoded JSON-RPC For example, to pull to a local "CPython" mirror using curl:: curl https://kallithea.example.com/_admin/api -X POST -H 'content-type:text/plain' \ - --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' + --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repoid":"CPython"}}' In general, provide - *id*, a value of any type, can be used to match the response with the request that it is replying to. @@ -162,37 +162,6 @@ OUTPUT:: result : "Caches of repository ``" error : null -lock -^^^^ - -Set the locking state on the given repository by the given user. -If the param ``userid`` is skipped, it is set to the ID of the user who is calling this method. -If param ``locked`` is skipped, the current lock state of the repository is returned. -This command can only be executed using the api_key of a user with admin rights, or that of a regular user with admin or write access to the repository. - -INPUT:: - - id : - api_key : "" - method : "lock" - args : { - "repoid" : "" - "userid" : "", - "locked" : "" - } - -OUTPUT:: - - id : - result : { - "repo": "", - "locked": "", - "locked_since": "", - "locked_by": "", - "msg": "User `` set lock state for repo `` to ``" - } - error : null - get_ip ^^^^^^ @@ -601,7 +570,6 @@ OUTPUT:: "repo_type" : "", "clone_uri" : "", "enable_downloads": "", - "enable_locking": "", "enable_statistics": "", "private": "", "created_on" : "", @@ -755,7 +723,6 @@ OUTPUT:: "owner": "", "fork_of": "", "enable_downloads": "", - "enable_locking": "", "enable_statistics": "", }, … @@ -820,7 +787,6 @@ INPUT:: "clone_uri" : " = Optional(None)", "landing_rev" : " = Optional('tip')", "enable_downloads": " = Optional(False)", - "enable_locking": " = Optional(False)", "enable_statistics": " = Optional(False)", } @@ -841,7 +807,6 @@ OUTPUT:: "owner": "", "fork_of": "", "enable_downloads": "", - "enable_locking": "", "enable_statistics": "", }, } @@ -870,7 +835,6 @@ INPUT:: "clone_uri" : " = Optional(None)", "landing_rev" : " = Optional('tip')", "enable_downloads": " = Optional(False)", - "enable_locking": " = Optional(False)", "enable_statistics": " = Optional(False)", } @@ -891,7 +855,6 @@ OUTPUT:: "owner": "", "fork_of": "", "enable_downloads": "", - "enable_locking": "", "enable_statistics": "", "last_changeset": { "author": "", @@ -901,8 +864,6 @@ OUTPUT:: "revision": "", "short_id": "" } - "locked_by": "", - "locked_date": "", }, } error: null @@ -1277,24 +1238,8 @@ OUTPUT:: 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 using -bearer authentication, by including this header with the request:: +Kallithea HTTP entry points can also be accessed without login using bearer +authentication by including this header with the request:: Authentication: Bearer