Changeset - 3c55f6f179fb
[Not reviewed]
stable
0 3 0
Louis Bertrand - 3 years ago 2022-12-27 20:22:14
louis.bertrand@durhamcollege.ca
Grafted from: 9974da7ec8a6
docs: first pass of introducing documentation of repo groups API
3 files changed with 163 insertions and 0 deletions:
0 comments (0 inline, 0 general)
CONTRIBUTORS
Show inline comments
 
List of contributors to Kallithea project:
 

	
 
    Mads Kiilerich <mads@kiilerich.com> 2016-2022
 
    Asterios Dimitriou <steve@pci.gr> 2016-2017 2020 2022
 
    Manuel Jacob <me@manueljacob.de> 2019-2020 2022
 
    Jaime Marquínez Ferrándiz <weblate@jregistros.fastmail.net> 2022
 
    Louis Bertrand <louis.bertrand@durhamcollege.ca> 2022
 
    toras9000 <toras9000@gmail.com> 2022
 
    yzqzss <yzqzss@othing.xyz> 2022
 
    МАН69К <weblate@mah69k.net> 2022
 
    Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> 2014-2021
 
    ssantos <ssantos@web.de> 2018-2021
 
    Private <adamantine.sword@gmail.com> 2019-2021
docs/api/api.rst
Show inline comments
 
@@ -537,12 +537,173 @@ OUTPUT::
 
              "success" : True|False,  # depends on if member is in group
 
              "msg" : "removed member <username> from user group <groupname> |
 
                       User wasn't in group"
 
             }
 
    error : null
 

	
 
get_repo_group
 
^^^^^^^^^^^^^^
 

	
 
Get an existing repository group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repo_group"
 
    args :    {
 
                "repogroupid" : "<repo group id or name>"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result :
 
               {
 
               "group_id" :          "<id>",
 
               "group_name" :        "<groupname>",
 
               "group_description" : "<groupdescription>",
 
               "parent_group" :      "<groupid>"|null,
 
               "repositories" :      "<list_of_all_repo_names_in_group>",
 
               "owner" :             "<owner>",
 
               "members" :           [
 
                                       {
 
                                         "name" : "<name>",
 
                                         "type" : "user",
 
                                         "permission" : "group.(none|read|write|admin)"
 
                                       },
 
                                       {
 
                                         "name" : "<name>",
 
                                         "type" : "user_group",
 
                                         "permission" : "group.(none|read|write|admin)"
 
                                       },
 
 
                                     ]
 

	
 
               },
 
    error : null
 

	
 
get_repo_groups
 
^^^^^^^^^^^^^^^
 

	
 
List all existing repository groups.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repo_groups"
 
    args :    { }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : [
 
               {
 
               "group_id" :          "<id>",
 
               "group_name" :        "<groupname>",
 
               "group_description" : "<groupdescription>",
 
               "parent_group" :      "<groupid>"|null,
 
               "repositories" :      "<list_of_all_repo_names_in_group>",
 
               "owner" :             "<owner>"
 
               },
 
 
              ]
 
    error : null
 

	
 
create_repo_group
 
^^^^^^^^^^^^^^^^^
 

	
 
Create a new repository group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "create_repo_group"
 
    args :    {
 
                "group_name" :       "<group_name>",
 
                "description" :      "<description> = Optional("")",
 
                "owner" :            "<username or user_id> = Optional(None)",
 
                "parent" :           "<reponame or id> = Optional(None)",
 
                "copy_permissions" : "<bool> = Optional(False)"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : {
 
                "msg" : "created new repo group `<group_name>`",
 
                "repo_group" : {
 
                                 "group_id" :          <id>,
 
                                 "group_name" :        "<parent_group>/<group_name>",
 
                                 "group_description" : "<description>",
 
                                 "parent_group" :      <id>|null,
 
                                 "repositories" :      <list of repositories>,
 
                                 "owner" :             "<user_name>"
 
                                }
 

	
 
update_repo_group
 
^^^^^^^^^^^^^^^^^
 

	
 
Update a repository group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "update_repo_group"
 
    args :    {
 
                "repogroupid" :         "<id>",
 
                "group_name" :       "<group_name> = Optional(None)",
 
                "description" :      "<description> = Optional(None)",
 
                "owner" :            "<username or user_id> = Optional(None)",
 
                "parent" :           "<reponame or id> = Optional(None)"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : {
 
                "msg" : "updated repository group ID:<id> <group_name>",
 
                "repo_group" : {
 
                                 "group_id" :          <id>,
 
                                 "group_name" :        "<parent_group>/<group_name>",
 
                                 "group_description" : "<description>",
 
                                 "parent_group" :      <id>|null,
 
                                 "repositories" :      <list of repositories>,
 
                                 "owner" :             "<user_name>"
 
                                }
 

	
 
delete_repo_group
 
^^^^^^^^^^^^^^^^^
 

	
 
Delete a repository group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "delete_repo_group"
 
    args :    {
 
                "repogroupid" : "<id>"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : {
 
                "msg" : "deleted repo group ID:<id> <group_name>",
 
                "repo_group" : null
 
              }
 

	
 
get_repo
 
^^^^^^^^
 

	
 
Get an existing repository by its name or repository_id. Members will contain
 
either users_group or users associated to that repository.
 
This command can only be executed using the api_key of a user with admin rights,
kallithea/templates/about.html
Show inline comments
 
@@ -25,12 +25,13 @@
 
  <ul>
 

	
 
  <li>Copyright &copy; 2012&ndash;2022, Mads Kiilerich</li>
 
  <li>Copyright &copy; 2016&ndash;2017, 2020, 2022, Asterios Dimitriou</li>
 
  <li>Copyright &copy; 2019&ndash;2020, 2022, Manuel Jacob</li>
 
  <li>Copyright &copy; 2022, Jaime Marquínez Ferrándiz</li>
 
  <li>Copyright &copy; 2022, Louis Bertrand</li>
 
  <li>Copyright &copy; 2022, toras9000</li>
 
  <li>Copyright &copy; 2022, yzqzss</li>
 
  <li>Copyright &copy; 2022, МАН69К</li>
 
  <li>Copyright &copy; 2014&ndash;2021, Thomas De Schampheleire</li>
 
  <li>Copyright &copy; 2015&ndash;2017, 2019&ndash;2021, Étienne Gilli</li>
 
  <li>Copyright &copy; 2018&ndash;2021, ssantos</li>
0 comments (0 inline, 0 general)