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