##// END OF EJS Templates
api doc fixes
marcink -
r1447:ebb90cfd beta
parent child Browse files
Show More
@@ -1,55 +1,56 b''
1 1 .. _api:
2 2
3 3
4 4 API
5 5 ===
6 6
7 7
8 8 Starting from RhodeCode version 1.2 a simple API was implemented.
9 9 There's one schema for calling all api methods. API is implemented
10 10 with JSON protocol both ways.
11 11
12 12
13 13 Clients need to send JSON data in such format::
14 14
15 15 {
16 16 "api_key":"<api_key>",
17 17 "method":"<method_name>",
18 18 "args":{"<arg_key>":"<arg_val>"}
19 19 }
20 20
21 21 Simply provide api_key for access and permission validation
22 22 method is name of method to call
23 23 and args is an key:value list of arguments to pass to method
24 24
25 25 .. note::
26 26
27 27 api_key can be found in your user account page
28 28
29 29
30 30 And will receive JSON formatted answer::
31 31
32 32 {
33 33 "result": "<result>",
34 34 "error": null
35 35 }
36 36
37 37 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while
38 38 calling api **error** key from response will contain failure description
39 39 and result will be null.
40 40
41 41 API METHODS
42 42 +++++++++++
43 43
44 44
45 45 pull
46 46 ----
47 47
48 Pulls given repo from remote location. Can be used to autmatically keep
49 remote repos upto date
48 Pulls given repo from remote location. Can be used to automatically keep
49 remote repos upto date. This command can be executed only using admin users
50 api_key
50 51
51 52 ::
52 53
53 54 method: "pull"
54 55 args: {"repo":<repo_name>}
55 56
General Comments 0
You need to be logged in to leave comments. Login now