##// END OF EJS Templates
docs: updated api docs.
marcink -
r1169:66ac4b2d default
parent child Browse files
Show More
@@ -38,7 +38,7 b' changeset_comment'
38
38
39 Example error output:
39 Example error output:
40
40
41 .. code-block:: bash
41 .. code-block:: json
42
42
43 {
43 {
44 "id" : <id_given_in_input>,
44 "id" : <id_given_in_input>,
@@ -169,8 +169,14 b' get_pull_request'
169 "commit_id": "<commit_id>",
169 "commit_id": "<commit_id>",
170 }
170 }
171 },
171 },
172 "shadow": {
172 "merge": {
173 "clone_url": "<clone_url>",
173 "clone_url": "<clone_url>",
174 "reference":
175 {
176 "name": "<name>",
177 "type": "<type>",
178 "commit_id": "<commit_id>",
179 }
174 },
180 },
175 "author": <user_obj>,
181 "author": <user_obj>,
176 "reviewers": [
182 "reviewers": [
@@ -248,8 +254,14 b' get_pull_requests'
248 "commit_id": "<commit_id>",
254 "commit_id": "<commit_id>",
249 }
255 }
250 },
256 },
251 "shadow": {
257 "merge": {
252 "clone_url": "<clone_url>",
258 "clone_url": "<clone_url>",
259 "reference":
260 {
261 "name": "<name>",
262 "type": "<type>",
263 "commit_id": "<commit_id>",
264 }
253 },
265 },
254 "author": <user_obj>,
266 "author": <user_obj>,
255 "reviewers": [
267 "reviewers": [
@@ -294,7 +306,12 b' merge_pull_request'
294 "executed": "<bool>",
306 "executed": "<bool>",
295 "failure_reason": "<int>",
307 "failure_reason": "<int>",
296 "merge_commit_id": "<merge_commit_id>",
308 "merge_commit_id": "<merge_commit_id>",
297 "possible": "<bool>"
309 "possible": "<bool>",
310 "merge_ref": {
311 "commit_id": "<commit_id>",
312 "type": "<type>",
313 "name": "<name>"
314 }
298 },
315 },
299 "error": null
316 "error": null
300
317
@@ -6,19 +6,20 b' repo_group methods'
6 create_repo_group
6 create_repo_group
7 -----------------
7 -----------------
8
8
9 .. py:function:: create_repo_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, copy_permissions=<Optional:False>)
9 .. py:function:: create_repo_group(apiuser, group_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, copy_permissions=<Optional:False>)
10
10
11 Creates a repository group.
11 Creates a repository group.
12
12
13 * If the repository group name contains "/", all the required repository
13 * If the repository group name contains "/", repository group will be
14 groups will be created.
14 created inside a repository group or nested repository groups
15
15
16 For example "foo/bar/baz" will create |repo| groups "foo" and "bar"
16 For example "foo/bar/group1" will create repository group called "group1"
17 (with "foo" as parent). It will also create the "baz" repository
17 inside group "foo/bar". You have to have permissions to access and
18 with "bar" as |repo| group.
18 write to the last repository group ("bar" in this example)
19
19
20 This command can only be run using an |authtoken| with admin
20 This command can only be run using an |authtoken| with at least
21 permissions.
21 permissions to create repository groups, or admin permissions to
22 parent repository groups.
22
23
23 :param apiuser: This is filled automatically from the |authtoken|.
24 :param apiuser: This is filled automatically from the |authtoken|.
24 :type apiuser: AuthUser
25 :type apiuser: AuthUser
@@ -325,13 +326,22 b' revoke_user_permission_from_repo_group'
325 update_repo_group
326 update_repo_group
326 -----------------
327 -----------------
327
328
328 .. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, parent=<Optional:None>, enable_locking=<Optional:False>)
329 .. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, enable_locking=<Optional:False>)
329
330
330 Updates repository group with the details given.
331 Updates repository group with the details given.
331
332
332 This command can only be run using an |authtoken| with admin
333 This command can only be run using an |authtoken| with admin
333 permissions.
334 permissions.
334
335
336 * If the group_name name contains "/", repository group will be updated
337 accordingly with a repository group or nested repository groups
338
339 For example repogroupid=group-test group_name="foo/bar/group-test"
340 will update repository group called "group-test" and place it
341 inside group "foo/bar".
342 You have to have permissions to access and write to the last repository
343 group ("bar" in this example)
344
335 :param apiuser: This is filled automatically from the |authtoken|.
345 :param apiuser: This is filled automatically from the |authtoken|.
336 :type apiuser: AuthUser
346 :type apiuser: AuthUser
337 :param repogroupid: Set the ID of repository group.
347 :param repogroupid: Set the ID of repository group.
@@ -342,8 +352,6 b' update_repo_group'
342 :type description: str
352 :type description: str
343 :param owner: Set the |repo| group owner.
353 :param owner: Set the |repo| group owner.
344 :type owner: str
354 :type owner: str
345 :param parent: Set the |repo| group parent.
346 :type parent: str or int
347 :param enable_locking: Enable |repo| locking. The default is false.
355 :param enable_locking: Enable |repo| locking. The default is false.
348 :type enable_locking: bool
356 :type enable_locking: bool
349
357
@@ -48,7 +48,7 b' comment_commit'
48
48
49 Example error output:
49 Example error output:
50
50
51 .. code-block:: bash
51 .. code-block:: json
52
52
53 {
53 {
54 "id" : <id_given_in_input>,
54 "id" : <id_given_in_input>,
@@ -68,15 +68,16 b' create_repo'
68
68
69 Creates a repository.
69 Creates a repository.
70
70
71 * If the repository name contains "/", all the required repository
71 * If the repository name contains "/", repository will be created inside
72 groups will be created.
72 a repository group or nested repository groups
73
73
74 For example "foo/bar/baz" will create |repo| groups "foo" and "bar"
74 For example "foo/bar/repo1" will create |repo| called "repo1" inside
75 (with "foo" as parent). It will also create the "baz" repository
75 group "foo/bar". You have to have permissions to access and write to
76 with "bar" as |repo| group.
76 the last repository group ("bar" in this example)
77
77
78 This command can only be run using an |authtoken| with at least
78 This command can only be run using an |authtoken| with at least
79 write permissions to the |repo|.
79 permissions to create repositories, or write permissions to
80 parent repository groups.
80
81
81 :param apiuser: This is filled automatically from the |authtoken|.
82 :param apiuser: This is filled automatically from the |authtoken|.
82 :type apiuser: AuthUser
83 :type apiuser: AuthUser
@@ -88,9 +89,9 b' create_repo'
88 :type owner: Optional(str)
89 :type owner: Optional(str)
89 :param description: Set the repository description.
90 :param description: Set the repository description.
90 :type description: Optional(str)
91 :type description: Optional(str)
91 :param private:
92 :param private: set repository as private
92 :type private: bool
93 :type private: bool
93 :param clone_uri:
94 :param clone_uri: set clone_uri
94 :type clone_uri: str
95 :type clone_uri: str
95 :param landing_rev: <rev_type>:<rev>
96 :param landing_rev: <rev_type>:<rev>
96 :type landing_rev: str
97 :type landing_rev: str
@@ -164,25 +165,29 b' delete_repo'
164 fork_repo
165 fork_repo
165 ---------
166 ---------
166
167
167 .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, copy_permissions=<Optional:False>, private=<Optional:False>, landing_rev=<Optional:'rev:tip'>)
168 .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, copy_permissions=<Optional:False>)
168
169
169 Creates a fork of the specified |repo|.
170 Creates a fork of the specified |repo|.
170
171
171 * If using |RCE| with Celery this will immediately return a success
172 * If the fork_name contains "/", fork will be created inside
172 message, even though the fork will be created asynchronously.
173 a repository group or nested repository groups
173
174
174 This command can only be run using an |authtoken| with fork
175 For example "foo/bar/fork-repo" will create fork called "fork-repo"
175 permissions on the |repo|.
176 inside group "foo/bar". You have to have permissions to access and
177 write to the last repository group ("bar" in this example)
178
179 This command can only be run using an |authtoken| with minimum
180 read permissions of the forked repo, create fork permissions for an user.
176
181
177 :param apiuser: This is filled automatically from the |authtoken|.
182 :param apiuser: This is filled automatically from the |authtoken|.
178 :type apiuser: AuthUser
183 :type apiuser: AuthUser
179 :param repoid: Set repository name or repository ID.
184 :param repoid: Set repository name or repository ID.
180 :type repoid: str or int
185 :type repoid: str or int
181 :param fork_name: Set the fork name.
186 :param fork_name: Set the fork name, including it's repository group membership.
182 :type fork_name: str
187 :type fork_name: str
183 :param owner: Set the fork owner.
188 :param owner: Set the fork owner.
184 :type owner: str
189 :type owner: str
185 :param description: Set the fork descripton.
190 :param description: Set the fork description.
186 :type description: str
191 :type description: str
187 :param copy_permissions: Copy permissions from parent |repo|. The
192 :param copy_permissions: Copy permissions from parent |repo|. The
188 default is False.
193 default is False.
@@ -923,24 +928,31 b' strip'
923 update_repo
928 update_repo
924 -----------
929 -----------
925
930
926 .. py:function:: update_repo(apiuser, repoid, name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, group=<Optional:None>, fork_of=<Optional:None>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>)
931 .. py:function:: update_repo(apiuser, repoid, repo_name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, fork_of=<Optional:None>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>)
927
932
928 Updates a repository with the given information.
933 Updates a repository with the given information.
929
934
930 This command can only be run using an |authtoken| with at least
935 This command can only be run using an |authtoken| with at least
931 write permissions to the |repo|.
936 admin permissions to the |repo|.
937
938 * If the repository name contains "/", repository will be updated
939 accordingly with a repository group or nested repository groups
940
941 For example repoid=repo-test name="foo/bar/repo-test" will update |repo|
942 called "repo-test" and place it inside group "foo/bar".
943 You have to have permissions to access and write to the last repository
944 group ("bar" in this example)
932
945
933 :param apiuser: This is filled automatically from the |authtoken|.
946 :param apiuser: This is filled automatically from the |authtoken|.
934 :type apiuser: AuthUser
947 :type apiuser: AuthUser
935 :param repoid: repository name or repository ID.
948 :param repoid: repository name or repository ID.
936 :type repoid: str or int
949 :type repoid: str or int
937 :param name: Update the |repo| name.
950 :param repo_name: Update the |repo| name, including the
938 :type name: str
951 repository group it's in.
952 :type repo_name: str
939 :param owner: Set the |repo| owner.
953 :param owner: Set the |repo| owner.
940 :type owner: str
954 :type owner: str
941 :param group: Set the |repo| group the |repo| belongs to.
955 :param fork_of: Set the |repo| as fork of another |repo|.
942 :type group: str
943 :param fork_of: Set the master |repo| name.
944 :type fork_of: str
956 :type fork_of: str
945 :param description: Update the |repo| description.
957 :param description: Update the |repo| description.
946 :type description: str
958 :type description: str
@@ -948,16 +960,13 b' update_repo'
948 :type private: bool
960 :type private: bool
949 :param clone_uri: Update the |repo| clone URI.
961 :param clone_uri: Update the |repo| clone URI.
950 :type clone_uri: str
962 :type clone_uri: str
951 :param landing_rev: Set the |repo| landing revision. Default is
963 :param landing_rev: Set the |repo| landing revision. Default is ``rev:tip``.
952 ``tip``.
953 :type landing_rev: str
964 :type landing_rev: str
954 :param enable_statistics: Enable statistics on the |repo|,
965 :param enable_statistics: Enable statistics on the |repo|, (True | False).
955 (True | False).
956 :type enable_statistics: bool
966 :type enable_statistics: bool
957 :param enable_locking: Enable |repo| locking.
967 :param enable_locking: Enable |repo| locking.
958 :type enable_locking: bool
968 :type enable_locking: bool
959 :param enable_downloads: Enable downloads from the |repo|,
969 :param enable_downloads: Enable downloads from the |repo|, (True | False).
960 (True | False).
961 :type enable_downloads: bool
970 :type enable_downloads: bool
962 :param fields: Add extra fields to the |repo|. Use the following
971 :param fields: Add extra fields to the |repo|. Use the following
963 example format: ``field_key=field_val,field_key2=fieldval2``.
972 example format: ``field_key=field_val,field_key2=fieldval2``.
@@ -6,7 +6,7 b' user methods'
6 create_user
6 create_user
7 -----------
7 -----------
8
8
9 .. py:function:: create_user(apiuser, username, email, password=<Optional:''>, firstname=<Optional:''>, lastname=<Optional:''>, active=<Optional:True>, admin=<Optional:False>, extern_name=<Optional:'rhodecode'>, extern_type=<Optional:'rhodecode'>, force_password_change=<Optional:False>)
9 .. py:function:: create_user(apiuser, username, email, password=<Optional:''>, firstname=<Optional:''>, lastname=<Optional:''>, active=<Optional:True>, admin=<Optional:False>, extern_name=<Optional:'rhodecode'>, extern_type=<Optional:'rhodecode'>, force_password_change=<Optional:False>, create_personal_repo_group=<Optional:None>)
10
10
11 Creates a new user and returns the new user object.
11 Creates a new user and returns the new user object.
12
12
@@ -39,7 +39,8 b' create_user'
39 :param force_password_change: Force the new user to change password
39 :param force_password_change: Force the new user to change password
40 on next login.
40 on next login.
41 :type force_password_change: Optional(``True`` | ``False``)
41 :type force_password_change: Optional(``True`` | ``False``)
42
42 :param create_personal_repo_group: Create personal repo group for this user
43 :type create_personal_repo_group: Optional(``True`` | ``False``)
43 Example output:
44 Example output:
44
45
45 .. code-block:: bash
46 .. code-block:: bash
@@ -163,6 +164,7 b' get_user'
163 "usergroup.read",
164 "usergroup.read",
164 "hg.repogroup.create.false",
165 "hg.repogroup.create.false",
165 "hg.create.none",
166 "hg.create.none",
167 "hg.password_reset.enabled",
166 "hg.extern_activate.manual",
168 "hg.extern_activate.manual",
167 "hg.create.write_on_repogroup.false",
169 "hg.create.write_on_repogroup.false",
168 "hg.usergroup.create.false",
170 "hg.usergroup.create.false",
General Comments 0
You need to be logged in to leave comments. Login now