comparison docs/api/api.rst @ 4493:88b9cc4ba52f

Corrected method names in documentation, to match API
author Rasmus Selsmark <rasmuss@unity3d.com>
date Thu, 21 Aug 2014 23:05:23 +0200
parents e73a69cb98dc
children 599fba9967a4
comparison
equal deleted inserted replaced
4492:b82e782d6824 4493:88b9cc4ba52f
220 "msg": "User `<username>` set lock state for repo `<reponame>` to `<false|true>`" 220 "msg": "User `<username>` set lock state for repo `<reponame>` to `<false|true>`"
221 } 221 }
222 error : null 222 error : null
223 223
224 224
225 show_ip 225 get_ip
226 ------- 226 ------
227 227
228 Shows IP address as seen from Kallithea server, together with all 228 Shows IP address as seen from Kallithea server, together with all
229 defined IP addresses for given user. 229 defined IP addresses for given user.
230 This command can be executed only using api_key belonging to user with admin 230 This command can be executed only using api_key belonging to user with admin
231 rights. 231 rights.
232 232
233 INPUT:: 233 INPUT::
234 234
235 id : <id_for_response> 235 id : <id_for_response>
236 api_key : "<api_key>" 236 api_key : "<api_key>"
237 method : "show_ip" 237 method : "get_ip"
238 args : { 238 args : {
239 "userid" : "<user_id or username>", 239 "userid" : "<user_id or username>",
240 } 240 }
241 241
242 OUTPUT:: 242 OUTPUT::
455 "user": null 455 "user": null
456 } 456 }
457 error: null 457 error: null
458 458
459 459
460 get_users_group 460 get_user_group
461 --------------- 461 --------------
462 462
463 Gets an existing user group. This command can be executed only using api_key 463 Gets an existing user group. This command can be executed only using api_key
464 belonging to user with admin rights. 464 belonging to user with admin rights.
465 465
466 466
467 INPUT:: 467 INPUT::
468 468
469 id : <id_for_response> 469 id : <id_for_response>
470 api_key : "<api_key>" 470 api_key : "<api_key>"
471 method : "get_users_group" 471 method : "get_user_group"
472 args : { 472 args : {
473 "usersgroupid" : "<user group id or name>" 473 "usergroupid" : "<user group id or name>"
474 } 474 }
475 475
476 OUTPUT:: 476 OUTPUT::
477 477
478 id : <id_given_in_input> 478 id : <id_given_in_input>
499 ] 499 ]
500 } 500 }
501 error : null 501 error : null
502 502
503 503
504 get_users_groups 504 get_user_groups
505 ---------------- 505 ---------------
506 506
507 Lists all existing user groups. This command can be executed only using 507 Lists all existing user groups. This command can be executed only using
508 api_key belonging to user with admin rights. 508 api_key belonging to user with admin rights.
509 509
510 510
511 INPUT:: 511 INPUT::
512 512
513 id : <id_for_response> 513 id : <id_for_response>
514 api_key : "<api_key>" 514 api_key : "<api_key>"
515 method : "get_users_groups" 515 method : "get_user_groups"
516 args : { } 516 args : { }
517 517
518 OUTPUT:: 518 OUTPUT::
519 519
520 id : <id_given_in_input> 520 id : <id_given_in_input>
527 527
528 ] 528 ]
529 error : null 529 error : null
530 530
531 531
532 create_users_group 532 create_user_group
533 ------------------ 533 -----------------
534 534
535 Creates new user group. This command can be executed only using api_key 535 Creates new user group. This command can be executed only using api_key
536 belonging to user with admin rights 536 belonging to user with admin rights
537 537
538 538
539 INPUT:: 539 INPUT::
540 540
541 id : <id_for_response> 541 id : <id_for_response>
542 api_key : "<api_key>" 542 api_key : "<api_key>"
543 method : "create_users_group" 543 method : "create_user_group"
544 args: { 544 args: {
545 "group_name": "<groupname>", 545 "group_name": "<groupname>",
546 "owner" : "<onwer_name_or_id = Optional(=apiuser)>", 546 "owner" : "<onwer_name_or_id = Optional(=apiuser)>",
547 "active": "<bool> = Optional(True)" 547 "active": "<bool> = Optional(True)"
548 } 548 }
559 }, 559 },
560 } 560 }
561 error: null 561 error: null
562 562
563 563
564 add_user_to_users_group 564 add_user_to_user_group
565 ----------------------- 565 ----------------------
566 566
567 Adds a user to a user group. If user exists in that group success will be 567 Adds a user to a user group. If user exists in that group success will be
568 `false`. This command can be executed only using api_key 568 `false`. This command can be executed only using api_key
569 belonging to user with admin rights 569 belonging to user with admin rights
570 570
571 571
572 INPUT:: 572 INPUT::
573 573
574 id : <id_for_response> 574 id : <id_for_response>
575 api_key : "<api_key>" 575 api_key : "<api_key>"
576 method : "add_user_users_group" 576 method : "add_user_user_group"
577 args: { 577 args: {
578 "usersgroupid" : "<user group id or name>", 578 "usersgroupid" : "<user group id or name>",
579 "userid" : "<user_id or username>", 579 "userid" : "<user_id or username>",
580 } 580 }
581 581
588 User is already in that group" 588 User is already in that group"
589 } 589 }
590 error: null 590 error: null
591 591
592 592
593 remove_user_from_users_group 593 remove_user_from_user_group
594 ---------------------------- 594 ---------------------------
595 595
596 Removes a user from a user group. If user is not in given group success will 596 Removes a user from a user group. If user is not in given group success will
597 be `false`. This command can be executed only 597 be `false`. This command can be executed only
598 using api_key belonging to user with admin rights 598 using api_key belonging to user with admin rights
599 599
600 600
601 INPUT:: 601 INPUT::
602 602
603 id : <id_for_response> 603 id : <id_for_response>
604 api_key : "<api_key>" 604 api_key : "<api_key>"
605 method : "remove_user_from_users_group" 605 method : "remove_user_from_user_group"
606 args: { 606 args: {
607 "usersgroupid" : "<user group id or name>", 607 "usersgroupid" : "<user group id or name>",
608 "userid" : "<user_id or username>", 608 "userid" : "<user_id or username>",
609 } 609 }
610 610
955 "success": true 955 "success": true
956 } 956 }
957 error: null 957 error: null
958 958
959 959
960 grant_users_group_permission 960 grant_user_group_permission
961 ---------------------------- 961 ---------------------------
962 962
963 Grant permission for user group on given repository, or update 963 Grant permission for user group on given repository, or update
964 existing one if found. This command can be executed only using 964 existing one if found. This command can be executed only using
965 api_key belonging to user with admin rights. 965 api_key belonging to user with admin rights.
966 966
967 967
968 INPUT:: 968 INPUT::
969 969
970 id : <id_for_response> 970 id : <id_for_response>
971 api_key : "<api_key>" 971 api_key : "<api_key>"
972 method : "grant_users_group_permission" 972 method : "grant_user_group_permission"
973 args: { 973 args: {
974 "repoid" : "<reponame or repo_id>" 974 "repoid" : "<reponame or repo_id>"
975 "usersgroupid" : "<user group id or name>" 975 "usersgroupid" : "<user group id or name>"
976 "perm" : "(repository.(none|read|write|admin))", 976 "perm" : "(repository.(none|read|write|admin))",
977 } 977 }
984 "success": true 984 "success": true
985 } 985 }
986 error: null 986 error: null
987 987
988 988
989 revoke_users_group_permission 989 revoke_user_group_permission
990 ----------------------------- 990 ----------------------------
991 991
992 Revoke permission for user group on given repository.This command can be 992 Revoke permission for user group on given repository.This command can be
993 executed only using api_key belonging to user with admin rights. 993 executed only using api_key belonging to user with admin rights.
994 994
995 INPUT:: 995 INPUT::
996 996
997 id : <id_for_response> 997 id : <id_for_response>
998 api_key : "<api_key>" 998 api_key : "<api_key>"
999 method : "revoke_users_group_permission" 999 method : "revoke_user_group_permission"
1000 args: { 1000 args: {
1001 "repoid" : "<reponame or repo_id>" 1001 "repoid" : "<reponame or repo_id>"
1002 "usersgroupid" : "<user group id or name>" 1002 "usersgroupid" : "<user group id or name>"
1003 } 1003 }
1004 1004