Changeset - 0bd97250cd36
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-01-17 22:13:19
marcin@python-works.com
docs update
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
docs/api/api.rst
Show inline comments
 
@@ -4,28 +4,29 @@
 
API
 
===
 

	
 

	
 
Starting from RhodeCode version 1.2 a simple API was implemented.
 
There's a single schema for calling all api methods. API is implemented
 
with JSON protocol both ways. An url to send API request in RhodeCode is
 
<your_server>/_admin/api
 

	
 
API ACCESS FOR WEB VIEWS
 
++++++++++++++++++++++++
 

	
 
API access can also be turned on for each view decorated with `@LoginRequired`
 
decorator. To enable API access simple change standard login decorator into
 
`@LoginRequired(api_access=True)`. After such a change view can be accessed
 
by adding a GET parameter to url `?api_key=<api_key>`. By default it's only
 
API access can also be turned on for each web view in RhodeCode that is 
 
decorated with `@LoginRequired` decorator. To enable API access simple change 
 
the standard login decorator to `@LoginRequired(api_access=True)`. 
 
After this change, a rhodecode view can be accessed without login by adding a 
 
GET parameter `?api_key=<api_key>` to url. By default this is only
 
enabled on RSS/ATOM feed views.
 

	
 

	
 
API ACCESS
 
++++++++++
 

	
 
All clients are required to send JSON-RPC spec JSON data::
 

	
 
    {   
 
        "id:<id>,
 
        "api_key":"<api_key>",
 
        "method":"<method_name>",
0 comments (0 inline, 0 general)