##// END OF EJS Templates
API docs improvement....
marcink -
r2143:c1f1f066 beta
parent child Browse files
Show More
@@ -27,7 +27,7 b' API ACCESS'
27 All clients are required to send JSON-RPC spec JSON data::
27 All clients are required to send JSON-RPC spec JSON data::
28
28
29 {
29 {
30 "id:<id>,
30 "id:"<id>",
31 "api_key":"<api_key>",
31 "api_key":"<api_key>",
32 "method":"<method_name>",
32 "method":"<method_name>",
33 "args":{"<arg_key>":"<arg_val>"}
33 "args":{"<arg_key>":"<arg_val>"}
@@ -50,9 +50,9 b' Simply provide'
50 RhodeCode API will return always a JSON-RPC response::
50 RhodeCode API will return always a JSON-RPC response::
51
51
52 {
52 {
53 "id":<id>,
53 "id":<id>, # matching id sent by request
54 "result": "<result>",
54 "result": "<result>"|null, # JSON formatted result, null if any errors
55 "error": null
55 "error": "null"|<error_message> # JSON formatted error (if any)
56 }
56 }
57
57
58 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while
58 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while
@@ -72,6 +72,7 b' belonging to user with admin rights'
72
72
73 INPUT::
73 INPUT::
74
74
75 id : <id_for_response>
75 api_key : "<api_key>"
76 api_key : "<api_key>"
76 method : "pull"
77 method : "pull"
77 args : {
78 args : {
@@ -94,6 +95,7 b' rights.'
94
95
95 INPUT::
96 INPUT::
96
97
98 id : <id_for_response>
97 api_key : "<api_key>"
99 api_key : "<api_key>"
98 method : "get_user"
100 method : "get_user"
99 args : {
101 args : {
@@ -126,6 +128,7 b' belonging to user with admin rights.'
126
128
127 INPUT::
129 INPUT::
128
130
131 id : <id_for_response>
129 api_key : "<api_key>"
132 api_key : "<api_key>"
130 method : "get_users"
133 method : "get_users"
131 args : { }
134 args : { }
@@ -157,6 +160,7 b' be executed only using api_key belonging'
157
160
158 INPUT::
161 INPUT::
159
162
163 id : <id_for_response>
160 api_key : "<api_key>"
164 api_key : "<api_key>"
161 method : "create_user"
165 method : "create_user"
162 args : {
166 args : {
@@ -188,6 +192,7 b' be executed only using api_key belonging'
188
192
189 INPUT::
193 INPUT::
190
194
195 id : <id_for_response>
191 api_key : "<api_key>"
196 api_key : "<api_key>"
192 method : "update_user"
197 method : "update_user"
193 args : {
198 args : {
@@ -220,6 +225,7 b' belonging to user with admin rights.'
220
225
221 INPUT::
226 INPUT::
222
227
228 id : <id_for_response>
223 api_key : "<api_key>"
229 api_key : "<api_key>"
224 method : "get_users_group"
230 method : "get_users_group"
225 args : {
231 args : {
@@ -258,6 +264,7 b' api_key belonging to user with admin rig'
258
264
259 INPUT::
265 INPUT::
260
266
267 id : <id_for_response>
261 api_key : "<api_key>"
268 api_key : "<api_key>"
262 method : "get_users_groups"
269 method : "get_users_groups"
263 args : { }
270 args : { }
@@ -296,6 +303,7 b' belonging to user with admin rights'
296
303
297 INPUT::
304 INPUT::
298
305
306 id : <id_for_response>
299 api_key : "<api_key>"
307 api_key : "<api_key>"
300 method : "create_users_group"
308 method : "create_users_group"
301 args: {
309 args: {
@@ -322,6 +330,7 b' belonging to user with admin rights'
322
330
323 INPUT::
331 INPUT::
324
332
333 id : <id_for_response>
325 api_key : "<api_key>"
334 api_key : "<api_key>"
326 method : "add_user_users_group"
335 method : "add_user_users_group"
327 args: {
336 args: {
@@ -350,6 +359,7 b' using api_key belonging to user with adm'
350
359
351 INPUT::
360 INPUT::
352
361
362 id : <id_for_response>
353 api_key : "<api_key>"
363 api_key : "<api_key>"
354 method : "remove_user_from_users_group"
364 method : "remove_user_from_users_group"
355 args: {
365 args: {
@@ -376,6 +386,7 b' be executed only using api_key belonging'
376
386
377 INPUT::
387 INPUT::
378
388
389 id : <id_for_response>
379 api_key : "<api_key>"
390 api_key : "<api_key>"
380 method : "get_repo"
391 method : "get_repo"
381 args: {
392 args: {
@@ -423,6 +434,7 b' belonging to user with admin rights'
423
434
424 INPUT::
435 INPUT::
425
436
437 id : <id_for_response>
426 api_key : "<api_key>"
438 api_key : "<api_key>"
427 method : "get_repos"
439 method : "get_repos"
428 args: { }
440 args: { }
@@ -452,6 +464,7 b' with admin rights'
452
464
453 INPUT::
465 INPUT::
454
466
467 id : <id_for_response>
455 api_key : "<api_key>"
468 api_key : "<api_key>"
456 method : "get_repo_nodes"
469 method : "get_repo_nodes"
457 args: {
470 args: {
@@ -485,6 +498,7 b' and create "baz" repository with "bar" a'
485
498
486 INPUT::
499 INPUT::
487
500
501 id : <id_for_response>
488 api_key : "<api_key>"
502 api_key : "<api_key>"
489 method : "create_repo"
503 method : "create_repo"
490 args: {
504 args: {
@@ -514,6 +528,7 b' belonging to user with admin rights.'
514
528
515 INPUT::
529 INPUT::
516
530
531 id : <id_for_response>
517 api_key : "<api_key>"
532 api_key : "<api_key>"
518 method : "delete_repo"
533 method : "delete_repo"
519 args: {
534 args: {
@@ -538,6 +553,7 b' with admin rights.'
538
553
539 INPUT::
554 INPUT::
540
555
556 id : <id_for_response>
541 api_key : "<api_key>"
557 api_key : "<api_key>"
542 method : "grant_user_permission"
558 method : "grant_user_permission"
543 args: {
559 args: {
@@ -563,6 +579,7 b' only using api_key belonging to user wit'
563
579
564 INPUT::
580 INPUT::
565
581
582 id : <id_for_response>
566 api_key : "<api_key>"
583 api_key : "<api_key>"
567 method : "revoke_user_permission"
584 method : "revoke_user_permission"
568 args: {
585 args: {
@@ -588,6 +605,7 b' api_key belonging to user with admin rig'
588
605
589 INPUT::
606 INPUT::
590
607
608 id : <id_for_response>
591 api_key : "<api_key>"
609 api_key : "<api_key>"
592 method : "grant_users_group_permission"
610 method : "grant_users_group_permission"
593 args: {
611 args: {
@@ -612,6 +630,7 b' executed only using api_key belonging to'
612
630
613 INPUT::
631 INPUT::
614
632
633 id : <id_for_response>
615 api_key : "<api_key>"
634 api_key : "<api_key>"
616 method : "revoke_users_group_permission"
635 method : "revoke_users_group_permission"
617 args: {
636 args: {
General Comments 0
You need to be logged in to leave comments. Login now