@@ -618,202 +618,237 @@ OUTPUT::
{
"repo_id" : "<repo_id>",
"repo_name" : "<reponame>"
"repo_type" : "<repo_type>",
"clone_uri" : "<clone_uri>",
"private": : "<bool>",
"created_on" : "<datetimecreated>",
"description" : "<description>",
"landing_rev": "<landing_rev>",
"owner": "<repo_owner>",
"fork_of": "<name_of_fork_parent>",
"enable_downloads": "<bool>",
"enable_locking": "<bool>",
"enable_statistics": "<bool>",
},
…
]
error: null
get_repo_nodes
--------------
returns a list of nodes and it's children in a flat list for a given path
at given revision. It's possible to specify ret_type to show only `files` or
`dirs`. This command can be executed only using api_key belonging to user
with admin rights
INPUT::
id : <id_for_response>
api_key : "<api_key>"
method : "get_repo_nodes"
args: {
"repoid" : "<reponame or repo_id>"
"revision" : "<revision>",
"root_path" : "<root_path>",
"ret_type" : "<ret_type> = Optional('all')"
}
OUTPUT::
id : <id_given_in_input>
result: [
"name" : "<name>"
"type" : "<type>",
create_repo
-----------
Creates a repository. This command can be executed only using api_key
belonging to user with admin rights.
If repository name contains "/", all needed repository groups will be created.
For example "foo/bar/baz" will create groups "foo", "bar" (with "foo" as parent),
and create "baz" repository with "bar" as group.
method : "create_repo"
"repo_name" : "<reponame>",
"owner" : "<onwer_name_or_id>",
"repo_type" : "<repo_type> = Optional('hg')",
"description" : "<description> = Optional('')",
"private" : "<bool> = Optional(False)",
"clone_uri" : "<clone_uri> = Optional(None)",
"landing_rev" : "<landing_rev> = Optional('tip')",
"enable_downloads": "<bool> = Optional(False)",
"enable_locking": "<bool> = Optional(False)",
"enable_statistics": "<bool> = Optional(False)",
result: {
"msg": "Created new repository `<reponame>`",
"repo": {
"owner": "<username or user_id>",
fork_repo
---------
Creates a fork of given repo. This command can be executed only using api_key
belonging to user with admin rights. In case of using celery this will
immidiatelly return success message, while fork is going to be created
asynchronous
method : "fork_repo"
"repoid" : "<reponame or repo_id>",
"fork_name": "<forkname>",
"description": "<description>",
"copy_permissions": "<bool>",
"private": "<bool>",
"landing_rev": "<landing_rev>"
"msg": "Created fork of `<reponame>` as `<forkname>`",
"success": true
delete_repo
Deletes a repository. This command can be executed only using api_key
method : "delete_repo"
"msg": "Deleted repository `<reponame>`",
grant_user_permission
---------------------
Grant permission for user on given repository, or update existing one
if found. This command can be executed only using api_key belonging to user
with admin rights.
method : "grant_user_permission"
"userid" : "<username or user_id>"
"perm" : "(repository.(none|read|write|admin))",
"msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
revoke_user_permission
----------------------
Revoke permission for user on given repository. This command can be executed
only using api_key belonging to user with admin rights.
method : "revoke_user_permission"
"msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
grant_users_group_permission
----------------------------
Grant permission for users group on given repository, or update
existing one if found. This command can be executed only using
api_key belonging to user with admin rights.
method : "grant_users_group_permission"
Status change: