##// END OF EJS Templates
docs: regenerated api docs with new fixed automation script....
marcink -
r989:51ecbd66 default
parent child Browse files
Show More
@@ -1,77 +1,77 b''
1 .. _deprecated-methods-ref:
1 .. _deprecated-methods-ref:
2
2
3 deprecated methods
3 deprecated methods
4 =================
4 ==================
5
5
6 changeset_comment
6 changeset_comment
7 -----------------
7 -----------------
8
8
9 .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
9 .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
10
10
11 .. deprecated:: 3.4.0
11 .. deprecated:: 3.4.0
12
12
13 Please use method `comment_commit` instead.
13 Please use method `comment_commit` instead.
14
14
15
15
16 Set a changeset comment, and optionally change the status of the
16 Set a changeset comment, and optionally change the status of the
17 changeset.
17 changeset.
18
18
19 This command can only be run using an |authtoken| with admin
19 This command can only be run using an |authtoken| with admin
20 permissions on the |repo|.
20 permissions on the |repo|.
21
21
22 :param apiuser: This is filled automatically from the |authtoken|.
22 :param apiuser: This is filled automatically from the |authtoken|.
23 :type apiuser: AuthUser
23 :type apiuser: AuthUser
24 :param repoid: Set the repository name or repository ID.
24 :param repoid: Set the repository name or repository ID.
25 :type repoid: str or int
25 :type repoid: str or int
26 :param revision: Specify the revision for which to set a comment.
26 :param revision: Specify the revision for which to set a comment.
27 :type revision: str
27 :type revision: str
28 :param message: The comment text.
28 :param message: The comment text.
29 :type message: str
29 :type message: str
30 :param userid: Set the user name of the comment creator.
30 :param userid: Set the user name of the comment creator.
31 :type userid: Optional(str or int)
31 :type userid: Optional(str or int)
32 :param status: Set the comment status. The following are valid options:
32 :param status: Set the comment status. The following are valid options:
33 * not_reviewed
33 * not_reviewed
34 * approved
34 * approved
35 * rejected
35 * rejected
36 * under_review
36 * under_review
37 :type status: str
37 :type status: str
38
38
39 Example error output:
39 Example error output:
40
40
41 .. code-block:: json
41 .. code-block:: json
42
42
43 {
43 {
44 "id" : <id_given_in_input>,
44 "id" : <id_given_in_input>,
45 "result" : {
45 "result" : {
46 "msg": "Commented on commit `<revision>` for repository `<repoid>`",
46 "msg": "Commented on commit `<revision>` for repository `<repoid>`",
47 "status_change": null or <status>,
47 "status_change": null or <status>,
48 "success": true
48 "success": true
49 },
49 },
50 "error" : null
50 "error" : null
51 }
51 }
52
52
53
53
54 get_locks
54 get_locks
55 ---------
55 ---------
56
56
57 .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
57 .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
58
58
59 .. deprecated:: 4.0.0
59 .. deprecated:: 4.0.0
60
60
61 Please use method `get_user_locks` instead.
61 Please use method `get_user_locks` instead.
62
62
63 None
63 None
64
64
65
65
66 show_ip
66 show_ip
67 -------
67 -------
68
68
69 .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
69 .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
70
70
71 .. deprecated:: 4.0.0
71 .. deprecated:: 4.0.0
72
72
73 Please use method `get_ip` instead.
73 Please use method `get_ip` instead.
74
74
75 None
75 None
76
76
77
77
@@ -1,121 +1,121 b''
1 .. _gist-methods-ref:
1 .. _gist-methods-ref:
2
2
3 gist methods
3 gist methods
4 =================
4 ============
5
5
6 create_gist
6 create_gist
7 -----------
7 -----------
8
8
9 .. py:function:: create_gist(apiuser, files, gistid=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, gist_type=<Optional:u'public'>, lifetime=<Optional:-1>, acl_level=<Optional:u'acl_public'>, description=<Optional:''>)
9 .. py:function:: create_gist(apiuser, files, gistid=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, gist_type=<Optional:u'public'>, lifetime=<Optional:-1>, acl_level=<Optional:u'acl_public'>, description=<Optional:''>)
10
10
11 Creates a new Gist.
11 Creates a new Gist.
12
12
13 :param apiuser: This is filled automatically from the |authtoken|.
13 :param apiuser: This is filled automatically from the |authtoken|.
14 :type apiuser: AuthUser
14 :type apiuser: AuthUser
15 :param files: files to be added to the gist. The data structure has
15 :param files: files to be added to the gist. The data structure has
16 to match the following example::
16 to match the following example::
17
17
18 {'filename1': {'content':'...'}, 'filename2': {'content':'...'}}
18 {'filename1': {'content':'...'}, 'filename2': {'content':'...'}}
19
19
20 :type files: dict
20 :type files: dict
21 :param gistid: Set a custom id for the gist
21 :param gistid: Set a custom id for the gist
22 :type gistid: Optional(str)
22 :type gistid: Optional(str)
23 :param owner: Set the gist owner, defaults to api method caller
23 :param owner: Set the gist owner, defaults to api method caller
24 :type owner: Optional(str or int)
24 :type owner: Optional(str or int)
25 :param gist_type: type of gist ``public`` or ``private``
25 :param gist_type: type of gist ``public`` or ``private``
26 :type gist_type: Optional(str)
26 :type gist_type: Optional(str)
27 :param lifetime: time in minutes of gist lifetime
27 :param lifetime: time in minutes of gist lifetime
28 :type lifetime: Optional(int)
28 :type lifetime: Optional(int)
29 :param acl_level: acl level for this gist, can be
29 :param acl_level: acl level for this gist, can be
30 ``acl_public`` or ``acl_private`` If the value is set to
30 ``acl_public`` or ``acl_private`` If the value is set to
31 ``acl_private`` only logged in users are able to access this gist.
31 ``acl_private`` only logged in users are able to access this gist.
32 If not set it defaults to ``acl_public``.
32 If not set it defaults to ``acl_public``.
33 :type acl_level: Optional(str)
33 :type acl_level: Optional(str)
34 :param description: gist description
34 :param description: gist description
35 :type description: Optional(str)
35 :type description: Optional(str)
36
36
37 Example output:
37 Example output:
38
38
39 .. code-block:: bash
39 .. code-block:: bash
40
40
41 id : <id_given_in_input>
41 id : <id_given_in_input>
42 result : {
42 result : {
43 "msg": "created new gist",
43 "msg": "created new gist",
44 "gist": {}
44 "gist": {}
45 }
45 }
46 error : null
46 error : null
47
47
48 Example error output:
48 Example error output:
49
49
50 .. code-block:: bash
50 .. code-block:: bash
51
51
52 id : <id_given_in_input>
52 id : <id_given_in_input>
53 result : null
53 result : null
54 error : {
54 error : {
55 "failed to create gist"
55 "failed to create gist"
56 }
56 }
57
57
58
58
59 delete_gist
59 delete_gist
60 -----------
60 -----------
61
61
62 .. py:function:: delete_gist(apiuser, gistid)
62 .. py:function:: delete_gist(apiuser, gistid)
63
63
64 Deletes existing gist
64 Deletes existing gist
65
65
66 :param apiuser: filled automatically from apikey
66 :param apiuser: filled automatically from apikey
67 :type apiuser: AuthUser
67 :type apiuser: AuthUser
68 :param gistid: id of gist to delete
68 :param gistid: id of gist to delete
69 :type gistid: str
69 :type gistid: str
70
70
71 Example output:
71 Example output:
72
72
73 .. code-block:: bash
73 .. code-block:: bash
74
74
75 id : <id_given_in_input>
75 id : <id_given_in_input>
76 result : {
76 result : {
77 "deleted gist ID: <gist_id>",
77 "deleted gist ID: <gist_id>",
78 "gist": null
78 "gist": null
79 }
79 }
80 error : null
80 error : null
81
81
82 Example error output:
82 Example error output:
83
83
84 .. code-block:: bash
84 .. code-block:: bash
85
85
86 id : <id_given_in_input>
86 id : <id_given_in_input>
87 result : null
87 result : null
88 error : {
88 error : {
89 "failed to delete gist ID:<gist_id>"
89 "failed to delete gist ID:<gist_id>"
90 }
90 }
91
91
92
92
93 get_gist
93 get_gist
94 --------
94 --------
95
95
96 .. py:function:: get_gist(apiuser, gistid, content=<Optional:False>)
96 .. py:function:: get_gist(apiuser, gistid, content=<Optional:False>)
97
97
98 Get the specified gist, based on the gist ID.
98 Get the specified gist, based on the gist ID.
99
99
100 :param apiuser: This is filled automatically from the |authtoken|.
100 :param apiuser: This is filled automatically from the |authtoken|.
101 :type apiuser: AuthUser
101 :type apiuser: AuthUser
102 :param gistid: Set the id of the private or public gist
102 :param gistid: Set the id of the private or public gist
103 :type gistid: str
103 :type gistid: str
104 :param content: Return the gist content. Default is false.
104 :param content: Return the gist content. Default is false.
105 :type content: Optional(bool)
105 :type content: Optional(bool)
106
106
107
107
108 get_gists
108 get_gists
109 ---------
109 ---------
110
110
111 .. py:function:: get_gists(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
111 .. py:function:: get_gists(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
112
112
113 Get all gists for given user. If userid is empty returned gists
113 Get all gists for given user. If userid is empty returned gists
114 are for user who called the api
114 are for user who called the api
115
115
116 :param apiuser: This is filled automatically from the |authtoken|.
116 :param apiuser: This is filled automatically from the |authtoken|.
117 :type apiuser: AuthUser
117 :type apiuser: AuthUser
118 :param userid: user to get gists for
118 :param userid: user to get gists for
119 :type userid: Optional(str or int)
119 :type userid: Optional(str or int)
120
120
121
121
@@ -1,71 +1,71 b''
1 .. _license-methods-ref:
1 .. _license-methods-ref:
2
2
3 license methods
3 license methods
4 =================
4 ===============
5
5
6 get_license_info (EE only)
6 get_license_info (EE only)
7 ----------------
7 ----------------
8
8
9 .. py:function:: get_license_info(apiuser)
9 .. py:function:: get_license_info(apiuser)
10
10
11 Returns the |RCE| license information.
11 Returns the |RCE| license information.
12
12
13 :param apiuser: This is filled automatically from the |authtoken|.
13 :param apiuser: This is filled automatically from the |authtoken|.
14 :type apiuser: AuthUser
14 :type apiuser: AuthUser
15
15
16 Example output:
16 Example output:
17
17
18 .. code-block:: bash
18 .. code-block:: bash
19
19
20 id : <id_given_in_input>
20 id : <id_given_in_input>
21 result : {
21 result : {
22 'rhodecode_version': <rhodecode version>,
22 'rhodecode_version': <rhodecode version>,
23 'token': <license token>,
23 'token': <license token>,
24 'issued_to': <license owner>,
24 'issued_to': <license owner>,
25 'issued_on': <license issue date>,
25 'issued_on': <license issue date>,
26 'expires_on': <license expiration date>,
26 'expires_on': <license expiration date>,
27 'type': <license type>,
27 'type': <license type>,
28 'users_limit': <license users limit>,
28 'users_limit': <license users limit>,
29 'key': <license key>
29 'key': <license key>
30 }
30 }
31 error : null
31 error : null
32
32
33
33
34 set_license_key (EE only)
34 set_license_key (EE only)
35 ---------------
35 ---------------
36
36
37 .. py:function:: set_license_key(apiuser, key)
37 .. py:function:: set_license_key(apiuser, key)
38
38
39 Sets the |RCE| license key.
39 Sets the |RCE| license key.
40
40
41 :param apiuser: This is filled automatically from the |authtoken|.
41 :param apiuser: This is filled automatically from the |authtoken|.
42 :type apiuser: AuthUser
42 :type apiuser: AuthUser
43 :param key: This is the license key to be set.
43 :param key: This is the license key to be set.
44 :type key: str
44 :type key: str
45
45
46 Example output:
46 Example output:
47
47
48 .. code-block:: bash
48 .. code-block:: bash
49
49
50 id : <id_given_in_input>
50 id : <id_given_in_input>
51 result: {
51 result: {
52 "msg" : "updated license information",
52 "msg" : "updated license information",
53 "key": <key>
53 "key": <key>
54 }
54 }
55 error: null
55 error: null
56
56
57 Example error output:
57 Example error output:
58
58
59 .. code-block:: bash
59 .. code-block:: bash
60
60
61 id : <id_given_in_input>
61 id : <id_given_in_input>
62 result : null
62 result : null
63 error : {
63 error : {
64 "license key is not valid"
64 "license key is not valid"
65 or
65 or
66 "trial licenses cannot be uploaded"
66 "trial licenses cannot be uploaded"
67 or
67 or
68 "error occurred while updating license"
68 "error occurred while updating license"
69 }
69 }
70
70
71
71
@@ -1,344 +1,354 b''
1 .. _pull-request-methods-ref:
1 .. _pull-request-methods-ref:
2
2
3 pull_request methods
3 pull_request methods
4 =================
4 ====================
5
5
6 close_pull_request
6 close_pull_request
7 ------------------
7 ------------------
8
8
9 .. py:function:: close_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>)
9 .. py:function:: close_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>)
10
10
11 Close the pull request specified by `pullrequestid`.
11 Close the pull request specified by `pullrequestid`.
12
12
13 :param apiuser: This is filled automatically from the |authtoken|.
13 :param apiuser: This is filled automatically from the |authtoken|.
14 :type apiuser: AuthUser
14 :type apiuser: AuthUser
15 :param repoid: Repository name or repository ID to which the pull
15 :param repoid: Repository name or repository ID to which the pull
16 request belongs.
16 request belongs.
17 :type repoid: str or int
17 :type repoid: str or int
18 :param pullrequestid: ID of the pull request to be closed.
18 :param pullrequestid: ID of the pull request to be closed.
19 :type pullrequestid: int
19 :type pullrequestid: int
20 :param userid: Close the pull request as this user.
20 :param userid: Close the pull request as this user.
21 :type userid: Optional(str or int)
21 :type userid: Optional(str or int)
22
22
23 Example output:
23 Example output:
24
24
25 .. code-block:: bash
25 .. code-block:: bash
26
26
27 "id": <id_given_in_input>,
27 "id": <id_given_in_input>,
28 "result":
28 "result":
29 {
29 {
30 "pull_request_id": "<int>",
30 "pull_request_id": "<int>",
31 "closed": "<bool>"
31 "closed": "<bool>"
32 },
32 },
33 "error": null
33 "error": null
34
34
35
35
36 comment_pull_request
36 comment_pull_request
37 --------------------
37 --------------------
38
38
39 .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, status=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
39 .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, status=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
40
40
41 Comment on the pull request specified with the `pullrequestid`,
41 Comment on the pull request specified with the `pullrequestid`,
42 in the |repo| specified by the `repoid`, and optionally change the
42 in the |repo| specified by the `repoid`, and optionally change the
43 review status.
43 review status.
44
44
45 :param apiuser: This is filled automatically from the |authtoken|.
45 :param apiuser: This is filled automatically from the |authtoken|.
46 :type apiuser: AuthUser
46 :type apiuser: AuthUser
47 :param repoid: The repository name or repository ID.
47 :param repoid: The repository name or repository ID.
48 :type repoid: str or int
48 :type repoid: str or int
49 :param pullrequestid: The pull request ID.
49 :param pullrequestid: The pull request ID.
50 :type pullrequestid: int
50 :type pullrequestid: int
51 :param message: The text content of the comment.
51 :param message: The text content of the comment.
52 :type message: str
52 :type message: str
53 :param status: (**Optional**) Set the approval status of the pull
53 :param status: (**Optional**) Set the approval status of the pull
54 request. Valid options are:
54 request. Valid options are:
55 * not_reviewed
55 * not_reviewed
56 * approved
56 * approved
57 * rejected
57 * rejected
58 * under_review
58 * under_review
59 :type status: str
59 :type status: str
60 :param userid: Comment on the pull request as this user
60 :param userid: Comment on the pull request as this user
61 :type userid: Optional(str or int)
61 :type userid: Optional(str or int)
62
62
63 Example output:
63 Example output:
64
64
65 .. code-block:: bash
65 .. code-block:: bash
66
66
67 id : <id_given_in_input>
67 id : <id_given_in_input>
68 result :
68 result :
69 {
69 {
70 "pull_request_id": "<Integer>",
70 "pull_request_id": "<Integer>",
71 "comment_id": "<Integer>"
71 "comment_id": "<Integer>"
72 }
72 }
73 error : null
73 error : null
74
74
75
75
76 create_pull_request
76 create_pull_request
77 -------------------
77 -------------------
78
78
79 .. py:function:: create_pull_request(apiuser, source_repo, target_repo, source_ref, target_ref, title, description=<Optional:''>, reviewers=<Optional:None>)
79 .. py:function:: create_pull_request(apiuser, source_repo, target_repo, source_ref, target_ref, title, description=<Optional:''>, reviewers=<Optional:None>)
80
80
81 Creates a new pull request.
81 Creates a new pull request.
82
82
83 Accepts refs in the following formats:
83 Accepts refs in the following formats:
84
84
85 * branch:<branch_name>:<sha>
85 * branch:<branch_name>:<sha>
86 * branch:<branch_name>
86 * branch:<branch_name>
87 * bookmark:<bookmark_name>:<sha> (Mercurial only)
87 * bookmark:<bookmark_name>:<sha> (Mercurial only)
88 * bookmark:<bookmark_name> (Mercurial only)
88 * bookmark:<bookmark_name> (Mercurial only)
89
89
90 :param apiuser: This is filled automatically from the |authtoken|.
90 :param apiuser: This is filled automatically from the |authtoken|.
91 :type apiuser: AuthUser
91 :type apiuser: AuthUser
92 :param source_repo: Set the source repository name.
92 :param source_repo: Set the source repository name.
93 :type source_repo: str
93 :type source_repo: str
94 :param target_repo: Set the target repository name.
94 :param target_repo: Set the target repository name.
95 :type target_repo: str
95 :type target_repo: str
96 :param source_ref: Set the source ref name.
96 :param source_ref: Set the source ref name.
97 :type source_ref: str
97 :type source_ref: str
98 :param target_ref: Set the target ref name.
98 :param target_ref: Set the target ref name.
99 :type target_ref: str
99 :type target_ref: str
100 :param title: Set the pull request title.
100 :param title: Set the pull request title.
101 :type title: str
101 :type title: str
102 :param description: Set the pull request description.
102 :param description: Set the pull request description.
103 :type description: Optional(str)
103 :type description: Optional(str)
104 :param reviewers: Set the new pull request reviewers list.
104 :param reviewers: Set the new pull request reviewers list.
105 :type reviewers: Optional(list)
105 :type reviewers: Optional(list)
106 Accepts username strings or objects of the format:
107 {
108 'username': 'nick', 'reasons': ['original author']
109 }
106
110
107
111
108 get_pull_request
112 get_pull_request
109 ----------------
113 ----------------
110
114
111 .. py:function:: get_pull_request(apiuser, repoid, pullrequestid)
115 .. py:function:: get_pull_request(apiuser, repoid, pullrequestid)
112
116
113 Get a pull request based on the given ID.
117 Get a pull request based on the given ID.
114
118
115 :param apiuser: This is filled automatically from the |authtoken|.
119 :param apiuser: This is filled automatically from the |authtoken|.
116 :type apiuser: AuthUser
120 :type apiuser: AuthUser
117 :param repoid: Repository name or repository ID from where the pull
121 :param repoid: Repository name or repository ID from where the pull
118 request was opened.
122 request was opened.
119 :type repoid: str or int
123 :type repoid: str or int
120 :param pullrequestid: ID of the requested pull request.
124 :param pullrequestid: ID of the requested pull request.
121 :type pullrequestid: int
125 :type pullrequestid: int
122
126
123 Example output:
127 Example output:
124
128
125 .. code-block:: bash
129 .. code-block:: bash
126
130
127 "id": <id_given_in_input>,
131 "id": <id_given_in_input>,
128 "result":
132 "result":
129 {
133 {
130 "pull_request_id": "<pull_request_id>",
134 "pull_request_id": "<pull_request_id>",
131 "url": "<url>",
135 "url": "<url>",
132 "title": "<title>",
136 "title": "<title>",
133 "description": "<description>",
137 "description": "<description>",
134 "status" : "<status>",
138 "status" : "<status>",
135 "created_on": "<date_time_created>",
139 "created_on": "<date_time_created>",
136 "updated_on": "<date_time_updated>",
140 "updated_on": "<date_time_updated>",
137 "commit_ids": [
141 "commit_ids": [
138 ...
142 ...
139 "<commit_id>",
143 "<commit_id>",
140 "<commit_id>",
144 "<commit_id>",
141 ...
145 ...
142 ],
146 ],
143 "review_status": "<review_status>",
147 "review_status": "<review_status>",
144 "mergeable": {
148 "mergeable": {
145 "status": "<bool>",
149 "status": "<bool>",
146 "message": "<message>",
150 "message": "<message>",
147 },
151 },
148 "source": {
152 "source": {
149 "clone_url": "<clone_url>",
153 "clone_url": "<clone_url>",
150 "repository": "<repository_name>",
154 "repository": "<repository_name>",
151 "reference":
155 "reference":
152 {
156 {
153 "name": "<name>",
157 "name": "<name>",
154 "type": "<type>",
158 "type": "<type>",
155 "commit_id": "<commit_id>",
159 "commit_id": "<commit_id>",
156 }
160 }
157 },
161 },
158 "target": {
162 "target": {
159 "clone_url": "<clone_url>",
163 "clone_url": "<clone_url>",
160 "repository": "<repository_name>",
164 "repository": "<repository_name>",
161 "reference":
165 "reference":
162 {
166 {
163 "name": "<name>",
167 "name": "<name>",
164 "type": "<type>",
168 "type": "<type>",
165 "commit_id": "<commit_id>",
169 "commit_id": "<commit_id>",
166 }
170 }
167 },
171 },
172 "shadow": {
173 "clone_url": "<clone_url>",
174 },
168 "author": <user_obj>,
175 "author": <user_obj>,
169 "reviewers": [
176 "reviewers": [
170 ...
177 ...
171 {
178 {
172 "user": "<user_obj>",
179 "user": "<user_obj>",
173 "review_status": "<review_status>",
180 "review_status": "<review_status>",
174 }
181 }
175 ...
182 ...
176 ]
183 ]
177 },
184 },
178 "error": null
185 "error": null
179
186
180
187
181 get_pull_requests
188 get_pull_requests
182 -----------------
189 -----------------
183
190
184 .. py:function:: get_pull_requests(apiuser, repoid, status=<Optional:'new'>)
191 .. py:function:: get_pull_requests(apiuser, repoid, status=<Optional:'new'>)
185
192
186 Get all pull requests from the repository specified in `repoid`.
193 Get all pull requests from the repository specified in `repoid`.
187
194
188 :param apiuser: This is filled automatically from the |authtoken|.
195 :param apiuser: This is filled automatically from the |authtoken|.
189 :type apiuser: AuthUser
196 :type apiuser: AuthUser
190 :param repoid: Repository name or repository ID.
197 :param repoid: Repository name or repository ID.
191 :type repoid: str or int
198 :type repoid: str or int
192 :param status: Only return pull requests with the specified status.
199 :param status: Only return pull requests with the specified status.
193 Valid options are.
200 Valid options are.
194 * ``new`` (default)
201 * ``new`` (default)
195 * ``open``
202 * ``open``
196 * ``closed``
203 * ``closed``
197 :type status: str
204 :type status: str
198
205
199 Example output:
206 Example output:
200
207
201 .. code-block:: bash
208 .. code-block:: bash
202
209
203 "id": <id_given_in_input>,
210 "id": <id_given_in_input>,
204 "result":
211 "result":
205 [
212 [
206 ...
213 ...
207 {
214 {
208 "pull_request_id": "<pull_request_id>",
215 "pull_request_id": "<pull_request_id>",
209 "url": "<url>",
216 "url": "<url>",
210 "title" : "<title>",
217 "title" : "<title>",
211 "description": "<description>",
218 "description": "<description>",
212 "status": "<status>",
219 "status": "<status>",
213 "created_on": "<date_time_created>",
220 "created_on": "<date_time_created>",
214 "updated_on": "<date_time_updated>",
221 "updated_on": "<date_time_updated>",
215 "commit_ids": [
222 "commit_ids": [
216 ...
223 ...
217 "<commit_id>",
224 "<commit_id>",
218 "<commit_id>",
225 "<commit_id>",
219 ...
226 ...
220 ],
227 ],
221 "review_status": "<review_status>",
228 "review_status": "<review_status>",
222 "mergeable": {
229 "mergeable": {
223 "status": "<bool>",
230 "status": "<bool>",
224 "message: "<message>",
231 "message: "<message>",
225 },
232 },
226 "source": {
233 "source": {
227 "clone_url": "<clone_url>",
234 "clone_url": "<clone_url>",
228 "reference":
235 "reference":
229 {
236 {
230 "name": "<name>",
237 "name": "<name>",
231 "type": "<type>",
238 "type": "<type>",
232 "commit_id": "<commit_id>",
239 "commit_id": "<commit_id>",
233 }
240 }
234 },
241 },
235 "target": {
242 "target": {
236 "clone_url": "<clone_url>",
243 "clone_url": "<clone_url>",
237 "reference":
244 "reference":
238 {
245 {
239 "name": "<name>",
246 "name": "<name>",
240 "type": "<type>",
247 "type": "<type>",
241 "commit_id": "<commit_id>",
248 "commit_id": "<commit_id>",
242 }
249 }
243 },
250 },
251 "shadow": {
252 "clone_url": "<clone_url>",
253 },
244 "author": <user_obj>,
254 "author": <user_obj>,
245 "reviewers": [
255 "reviewers": [
246 ...
256 ...
247 {
257 {
248 "user": "<user_obj>",
258 "user": "<user_obj>",
249 "review_status": "<review_status>",
259 "review_status": "<review_status>",
250 }
260 }
251 ...
261 ...
252 ]
262 ]
253 }
263 }
254 ...
264 ...
255 ],
265 ],
256 "error": null
266 "error": null
257
267
258
268
259 merge_pull_request
269 merge_pull_request
260 ------------------
270 ------------------
261
271
262 .. py:function:: merge_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>)
272 .. py:function:: merge_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>)
263
273
264 Merge the pull request specified by `pullrequestid` into its target
274 Merge the pull request specified by `pullrequestid` into its target
265 repository.
275 repository.
266
276
267 :param apiuser: This is filled automatically from the |authtoken|.
277 :param apiuser: This is filled automatically from the |authtoken|.
268 :type apiuser: AuthUser
278 :type apiuser: AuthUser
269 :param repoid: The Repository name or repository ID of the
279 :param repoid: The Repository name or repository ID of the
270 target repository to which the |pr| is to be merged.
280 target repository to which the |pr| is to be merged.
271 :type repoid: str or int
281 :type repoid: str or int
272 :param pullrequestid: ID of the pull request which shall be merged.
282 :param pullrequestid: ID of the pull request which shall be merged.
273 :type pullrequestid: int
283 :type pullrequestid: int
274 :param userid: Merge the pull request as this user.
284 :param userid: Merge the pull request as this user.
275 :type userid: Optional(str or int)
285 :type userid: Optional(str or int)
276
286
277 Example output:
287 Example output:
278
288
279 .. code-block:: bash
289 .. code-block:: bash
280
290
281 "id": <id_given_in_input>,
291 "id": <id_given_in_input>,
282 "result":
292 "result":
283 {
293 {
284 "executed": "<bool>",
294 "executed": "<bool>",
285 "failure_reason": "<int>",
295 "failure_reason": "<int>",
286 "merge_commit_id": "<merge_commit_id>",
296 "merge_commit_id": "<merge_commit_id>",
287 "possible": "<bool>"
297 "possible": "<bool>"
288 },
298 },
289 "error": null
299 "error": null
290
300
291
301
292 update_pull_request
302 update_pull_request
293 -------------------
303 -------------------
294
304
295 .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>, close_pull_request=<Optional:None>)
305 .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>, close_pull_request=<Optional:None>)
296
306
297 Updates a pull request.
307 Updates a pull request.
298
308
299 :param apiuser: This is filled automatically from the |authtoken|.
309 :param apiuser: This is filled automatically from the |authtoken|.
300 :type apiuser: AuthUser
310 :type apiuser: AuthUser
301 :param repoid: The repository name or repository ID.
311 :param repoid: The repository name or repository ID.
302 :type repoid: str or int
312 :type repoid: str or int
303 :param pullrequestid: The pull request ID.
313 :param pullrequestid: The pull request ID.
304 :type pullrequestid: int
314 :type pullrequestid: int
305 :param title: Set the pull request title.
315 :param title: Set the pull request title.
306 :type title: str
316 :type title: str
307 :param description: Update pull request description.
317 :param description: Update pull request description.
308 :type description: Optional(str)
318 :type description: Optional(str)
309 :param reviewers: Update pull request reviewers list with new value.
319 :param reviewers: Update pull request reviewers list with new value.
310 :type reviewers: Optional(list)
320 :type reviewers: Optional(list)
311 :param update_commits: Trigger update of commits for this pull request
321 :param update_commits: Trigger update of commits for this pull request
312 :type: update_commits: Optional(bool)
322 :type: update_commits: Optional(bool)
313 :param close_pull_request: Close this pull request with rejected state
323 :param close_pull_request: Close this pull request with rejected state
314 :type: close_pull_request: Optional(bool)
324 :type: close_pull_request: Optional(bool)
315
325
316 Example output:
326 Example output:
317
327
318 .. code-block:: bash
328 .. code-block:: bash
319
329
320 id : <id_given_in_input>
330 id : <id_given_in_input>
321 result :
331 result :
322 {
332 {
323 "msg": "Updated pull request `63`",
333 "msg": "Updated pull request `63`",
324 "pull_request": <pull_request_object>,
334 "pull_request": <pull_request_object>,
325 "updated_reviewers": {
335 "updated_reviewers": {
326 "added": [
336 "added": [
327 "username"
337 "username"
328 ],
338 ],
329 "removed": []
339 "removed": []
330 },
340 },
331 "updated_commits": {
341 "updated_commits": {
332 "added": [
342 "added": [
333 "<sha1_hash>"
343 "<sha1_hash>"
334 ],
344 ],
335 "common": [
345 "common": [
336 "<sha1_hash>",
346 "<sha1_hash>",
337 "<sha1_hash>",
347 "<sha1_hash>",
338 ],
348 ],
339 "removed": []
349 "removed": []
340 }
350 }
341 }
351 }
342 error : null
352 error : null
343
353
344
354
@@ -1,350 +1,350 b''
1 .. _repo-group-methods-ref:
1 .. _repo-group-methods-ref:
2
2
3 repo_group methods
3 repo_group methods
4 =================
4 ==================
5
5
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, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, 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 "/", all the required repository
14 groups will be created.
14 groups will be created.
15
15
16 For example "foo/bar/baz" will create |repo| groups "foo" and "bar"
16 For example "foo/bar/baz" will create |repo| groups "foo" and "bar"
17 (with "foo" as parent). It will also create the "baz" repository
17 (with "foo" as parent). It will also create the "baz" repository
18 with "bar" as |repo| group.
18 with "bar" as |repo| group.
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 admin
21 permissions.
21 permissions.
22
22
23 :param apiuser: This is filled automatically from the |authtoken|.
23 :param apiuser: This is filled automatically from the |authtoken|.
24 :type apiuser: AuthUser
24 :type apiuser: AuthUser
25 :param group_name: Set the repository group name.
25 :param group_name: Set the repository group name.
26 :type group_name: str
26 :type group_name: str
27 :param description: Set the |repo| group description.
27 :param description: Set the |repo| group description.
28 :type description: str
28 :type description: str
29 :param owner: Set the |repo| group owner.
29 :param owner: Set the |repo| group owner.
30 :type owner: str
30 :type owner: str
31 :param copy_permissions:
31 :param copy_permissions:
32 :type copy_permissions:
32 :type copy_permissions:
33
33
34 Example output:
34 Example output:
35
35
36 .. code-block:: bash
36 .. code-block:: bash
37
37
38 id : <id_given_in_input>
38 id : <id_given_in_input>
39 result : {
39 result : {
40 "msg": "Created new repo group `<repo_group_name>`"
40 "msg": "Created new repo group `<repo_group_name>`"
41 "repo_group": <repogroup_object>
41 "repo_group": <repogroup_object>
42 }
42 }
43 error : null
43 error : null
44
44
45
45
46 Example error output:
46 Example error output:
47
47
48 .. code-block:: bash
48 .. code-block:: bash
49
49
50 id : <id_given_in_input>
50 id : <id_given_in_input>
51 result : null
51 result : null
52 error : {
52 error : {
53 failed to create repo group `<repogroupid>`
53 failed to create repo group `<repogroupid>`
54 }
54 }
55
55
56
56
57 delete_repo_group
57 delete_repo_group
58 -----------------
58 -----------------
59
59
60 .. py:function:: delete_repo_group(apiuser, repogroupid)
60 .. py:function:: delete_repo_group(apiuser, repogroupid)
61
61
62 Deletes a |repo| group.
62 Deletes a |repo| group.
63
63
64 :param apiuser: This is filled automatically from the |authtoken|.
64 :param apiuser: This is filled automatically from the |authtoken|.
65 :type apiuser: AuthUser
65 :type apiuser: AuthUser
66 :param repogroupid: Set the name or ID of repository group to be
66 :param repogroupid: Set the name or ID of repository group to be
67 deleted.
67 deleted.
68 :type repogroupid: str or int
68 :type repogroupid: str or int
69
69
70 Example output:
70 Example output:
71
71
72 .. code-block:: bash
72 .. code-block:: bash
73
73
74 id : <id_given_in_input>
74 id : <id_given_in_input>
75 result : {
75 result : {
76 'msg': 'deleted repo group ID:<repogroupid> <repogroupname>
76 'msg': 'deleted repo group ID:<repogroupid> <repogroupname>
77 'repo_group': null
77 'repo_group': null
78 }
78 }
79 error : null
79 error : null
80
80
81 Example error output:
81 Example error output:
82
82
83 .. code-block:: bash
83 .. code-block:: bash
84
84
85 id : <id_given_in_input>
85 id : <id_given_in_input>
86 result : null
86 result : null
87 error : {
87 error : {
88 "failed to delete repo group ID:<repogroupid> <repogroupname>"
88 "failed to delete repo group ID:<repogroupid> <repogroupname>"
89 }
89 }
90
90
91
91
92 get_repo_group
92 get_repo_group
93 --------------
93 --------------
94
94
95 .. py:function:: get_repo_group(apiuser, repogroupid)
95 .. py:function:: get_repo_group(apiuser, repogroupid)
96
96
97 Return the specified |repo| group, along with permissions,
97 Return the specified |repo| group, along with permissions,
98 and repositories inside the group
98 and repositories inside the group
99
99
100 :param apiuser: This is filled automatically from the |authtoken|.
100 :param apiuser: This is filled automatically from the |authtoken|.
101 :type apiuser: AuthUser
101 :type apiuser: AuthUser
102 :param repogroupid: Specify the name of ID of the repository group.
102 :param repogroupid: Specify the name of ID of the repository group.
103 :type repogroupid: str or int
103 :type repogroupid: str or int
104
104
105
105
106 Example output:
106 Example output:
107
107
108 .. code-block:: bash
108 .. code-block:: bash
109
109
110 {
110 {
111 "error": null,
111 "error": null,
112 "id": repo-group-id,
112 "id": repo-group-id,
113 "result": {
113 "result": {
114 "group_description": "repo group description",
114 "group_description": "repo group description",
115 "group_id": 14,
115 "group_id": 14,
116 "group_name": "group name",
116 "group_name": "group name",
117 "members": [
117 "members": [
118 {
118 {
119 "name": "super-admin-username",
119 "name": "super-admin-username",
120 "origin": "super-admin",
120 "origin": "super-admin",
121 "permission": "group.admin",
121 "permission": "group.admin",
122 "type": "user"
122 "type": "user"
123 },
123 },
124 {
124 {
125 "name": "owner-name",
125 "name": "owner-name",
126 "origin": "owner",
126 "origin": "owner",
127 "permission": "group.admin",
127 "permission": "group.admin",
128 "type": "user"
128 "type": "user"
129 },
129 },
130 {
130 {
131 "name": "user-group-name",
131 "name": "user-group-name",
132 "origin": "permission",
132 "origin": "permission",
133 "permission": "group.write",
133 "permission": "group.write",
134 "type": "user_group"
134 "type": "user_group"
135 }
135 }
136 ],
136 ],
137 "owner": "owner-name",
137 "owner": "owner-name",
138 "parent_group": null,
138 "parent_group": null,
139 "repositories": [ repo-list ]
139 "repositories": [ repo-list ]
140 }
140 }
141 }
141 }
142
142
143
143
144 get_repo_groups
144 get_repo_groups
145 ---------------
145 ---------------
146
146
147 .. py:function:: get_repo_groups(apiuser)
147 .. py:function:: get_repo_groups(apiuser)
148
148
149 Returns all repository groups.
149 Returns all repository groups.
150
150
151 :param apiuser: This is filled automatically from the |authtoken|.
151 :param apiuser: This is filled automatically from the |authtoken|.
152 :type apiuser: AuthUser
152 :type apiuser: AuthUser
153
153
154
154
155 grant_user_group_permission_to_repo_group
155 grant_user_group_permission_to_repo_group
156 -----------------------------------------
156 -----------------------------------------
157
157
158 .. py:function:: grant_user_group_permission_to_repo_group(apiuser, repogroupid, usergroupid, perm, apply_to_children=<Optional:'none'>)
158 .. py:function:: grant_user_group_permission_to_repo_group(apiuser, repogroupid, usergroupid, perm, apply_to_children=<Optional:'none'>)
159
159
160 Grant permission for a user group on given repository group, or update
160 Grant permission for a user group on given repository group, or update
161 existing permissions if found.
161 existing permissions if found.
162
162
163 This command can only be run using an |authtoken| with admin
163 This command can only be run using an |authtoken| with admin
164 permissions on the |repo| group.
164 permissions on the |repo| group.
165
165
166 :param apiuser: This is filled automatically from the |authtoken|.
166 :param apiuser: This is filled automatically from the |authtoken|.
167 :type apiuser: AuthUser
167 :type apiuser: AuthUser
168 :param repogroupid: Set the name or id of repository group
168 :param repogroupid: Set the name or id of repository group
169 :type repogroupid: str or int
169 :type repogroupid: str or int
170 :param usergroupid: id of usergroup
170 :param usergroupid: id of usergroup
171 :type usergroupid: str or int
171 :type usergroupid: str or int
172 :param perm: (group.(none|read|write|admin))
172 :param perm: (group.(none|read|write|admin))
173 :type perm: str
173 :type perm: str
174 :param apply_to_children: 'none', 'repos', 'groups', 'all'
174 :param apply_to_children: 'none', 'repos', 'groups', 'all'
175 :type apply_to_children: str
175 :type apply_to_children: str
176
176
177 Example output:
177 Example output:
178
178
179 .. code-block:: bash
179 .. code-block:: bash
180
180
181 id : <id_given_in_input>
181 id : <id_given_in_input>
182 result : {
182 result : {
183 "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`",
183 "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`",
184 "success": true
184 "success": true
185
185
186 }
186 }
187 error : null
187 error : null
188
188
189 Example error output:
189 Example error output:
190
190
191 .. code-block:: bash
191 .. code-block:: bash
192
192
193 id : <id_given_in_input>
193 id : <id_given_in_input>
194 result : null
194 result : null
195 error : {
195 error : {
196 "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`"
196 "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`"
197 }
197 }
198
198
199
199
200 grant_user_permission_to_repo_group
200 grant_user_permission_to_repo_group
201 -----------------------------------
201 -----------------------------------
202
202
203 .. py:function:: grant_user_permission_to_repo_group(apiuser, repogroupid, userid, perm, apply_to_children=<Optional:'none'>)
203 .. py:function:: grant_user_permission_to_repo_group(apiuser, repogroupid, userid, perm, apply_to_children=<Optional:'none'>)
204
204
205 Grant permission for a user on the given repository group, or update
205 Grant permission for a user on the given repository group, or update
206 existing permissions if found.
206 existing permissions if found.
207
207
208 This command can only be run using an |authtoken| with admin
208 This command can only be run using an |authtoken| with admin
209 permissions.
209 permissions.
210
210
211 :param apiuser: This is filled automatically from the |authtoken|.
211 :param apiuser: This is filled automatically from the |authtoken|.
212 :type apiuser: AuthUser
212 :type apiuser: AuthUser
213 :param repogroupid: Set the name or ID of repository group.
213 :param repogroupid: Set the name or ID of repository group.
214 :type repogroupid: str or int
214 :type repogroupid: str or int
215 :param userid: Set the user name.
215 :param userid: Set the user name.
216 :type userid: str
216 :type userid: str
217 :param perm: (group.(none|read|write|admin))
217 :param perm: (group.(none|read|write|admin))
218 :type perm: str
218 :type perm: str
219 :param apply_to_children: 'none', 'repos', 'groups', 'all'
219 :param apply_to_children: 'none', 'repos', 'groups', 'all'
220 :type apply_to_children: str
220 :type apply_to_children: str
221
221
222 Example output:
222 Example output:
223
223
224 .. code-block:: bash
224 .. code-block:: bash
225
225
226 id : <id_given_in_input>
226 id : <id_given_in_input>
227 result: {
227 result: {
228 "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`",
228 "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`",
229 "success": true
229 "success": true
230 }
230 }
231 error: null
231 error: null
232
232
233 Example error output:
233 Example error output:
234
234
235 .. code-block:: bash
235 .. code-block:: bash
236
236
237 id : <id_given_in_input>
237 id : <id_given_in_input>
238 result : null
238 result : null
239 error : {
239 error : {
240 "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`"
240 "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`"
241 }
241 }
242
242
243
243
244 revoke_user_group_permission_from_repo_group
244 revoke_user_group_permission_from_repo_group
245 --------------------------------------------
245 --------------------------------------------
246
246
247 .. py:function:: revoke_user_group_permission_from_repo_group(apiuser, repogroupid, usergroupid, apply_to_children=<Optional:'none'>)
247 .. py:function:: revoke_user_group_permission_from_repo_group(apiuser, repogroupid, usergroupid, apply_to_children=<Optional:'none'>)
248
248
249 Revoke permission for user group on given repository.
249 Revoke permission for user group on given repository.
250
250
251 This command can only be run using an |authtoken| with admin
251 This command can only be run using an |authtoken| with admin
252 permissions on the |repo| group.
252 permissions on the |repo| group.
253
253
254 :param apiuser: This is filled automatically from the |authtoken|.
254 :param apiuser: This is filled automatically from the |authtoken|.
255 :type apiuser: AuthUser
255 :type apiuser: AuthUser
256 :param repogroupid: name or id of repository group
256 :param repogroupid: name or id of repository group
257 :type repogroupid: str or int
257 :type repogroupid: str or int
258 :param usergroupid:
258 :param usergroupid:
259 :param apply_to_children: 'none', 'repos', 'groups', 'all'
259 :param apply_to_children: 'none', 'repos', 'groups', 'all'
260 :type apply_to_children: str
260 :type apply_to_children: str
261
261
262 Example output:
262 Example output:
263
263
264 .. code-block:: bash
264 .. code-block:: bash
265
265
266 id : <id_given_in_input>
266 id : <id_given_in_input>
267 result: {
267 result: {
268 "msg" : "Revoked perm (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`",
268 "msg" : "Revoked perm (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`",
269 "success": true
269 "success": true
270 }
270 }
271 error: null
271 error: null
272
272
273 Example error output:
273 Example error output:
274
274
275 .. code-block:: bash
275 .. code-block:: bash
276
276
277 id : <id_given_in_input>
277 id : <id_given_in_input>
278 result : null
278 result : null
279 error : {
279 error : {
280 "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`"
280 "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`"
281 }
281 }
282
282
283
283
284 revoke_user_permission_from_repo_group
284 revoke_user_permission_from_repo_group
285 --------------------------------------
285 --------------------------------------
286
286
287 .. py:function:: revoke_user_permission_from_repo_group(apiuser, repogroupid, userid, apply_to_children=<Optional:'none'>)
287 .. py:function:: revoke_user_permission_from_repo_group(apiuser, repogroupid, userid, apply_to_children=<Optional:'none'>)
288
288
289 Revoke permission for a user in a given repository group.
289 Revoke permission for a user in a given repository group.
290
290
291 This command can only be run using an |authtoken| with admin
291 This command can only be run using an |authtoken| with admin
292 permissions on the |repo| group.
292 permissions on the |repo| group.
293
293
294 :param apiuser: This is filled automatically from the |authtoken|.
294 :param apiuser: This is filled automatically from the |authtoken|.
295 :type apiuser: AuthUser
295 :type apiuser: AuthUser
296 :param repogroupid: Set the name or ID of the repository group.
296 :param repogroupid: Set the name or ID of the repository group.
297 :type repogroupid: str or int
297 :type repogroupid: str or int
298 :param userid: Set the user name to revoke.
298 :param userid: Set the user name to revoke.
299 :type userid: str
299 :type userid: str
300 :param apply_to_children: 'none', 'repos', 'groups', 'all'
300 :param apply_to_children: 'none', 'repos', 'groups', 'all'
301 :type apply_to_children: str
301 :type apply_to_children: str
302
302
303 Example output:
303 Example output:
304
304
305 .. code-block:: bash
305 .. code-block:: bash
306
306
307 id : <id_given_in_input>
307 id : <id_given_in_input>
308 result: {
308 result: {
309 "msg" : "Revoked perm (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`",
309 "msg" : "Revoked perm (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`",
310 "success": true
310 "success": true
311 }
311 }
312 error: null
312 error: null
313
313
314 Example error output:
314 Example error output:
315
315
316 .. code-block:: bash
316 .. code-block:: bash
317
317
318 id : <id_given_in_input>
318 id : <id_given_in_input>
319 result : null
319 result : null
320 error : {
320 error : {
321 "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`"
321 "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`"
322 }
322 }
323
323
324
324
325 update_repo_group
325 update_repo_group
326 -----------------
326 -----------------
327
327
328 .. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, parent=<Optional:None>, enable_locking=<Optional:False>)
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
329
330 Updates repository group with the details given.
330 Updates repository group with the details given.
331
331
332 This command can only be run using an |authtoken| with admin
332 This command can only be run using an |authtoken| with admin
333 permissions.
333 permissions.
334
334
335 :param apiuser: This is filled automatically from the |authtoken|.
335 :param apiuser: This is filled automatically from the |authtoken|.
336 :type apiuser: AuthUser
336 :type apiuser: AuthUser
337 :param repogroupid: Set the ID of repository group.
337 :param repogroupid: Set the ID of repository group.
338 :type repogroupid: str or int
338 :type repogroupid: str or int
339 :param group_name: Set the name of the |repo| group.
339 :param group_name: Set the name of the |repo| group.
340 :type group_name: str
340 :type group_name: str
341 :param description: Set a description for the group.
341 :param description: Set a description for the group.
342 :type description: str
342 :type description: str
343 :param owner: Set the |repo| group owner.
343 :param owner: Set the |repo| group owner.
344 :type owner: str
344 :type owner: str
345 :param parent: Set the |repo| group parent.
345 :param parent: Set the |repo| group parent.
346 :type parent: str or int
346 :type parent: str or int
347 :param enable_locking: Enable |repo| locking. The default is false.
347 :param enable_locking: Enable |repo| locking. The default is false.
348 :type enable_locking: bool
348 :type enable_locking: bool
349
349
350
350
@@ -1,967 +1,967 b''
1 .. _repo-methods-ref:
1 .. _repo-methods-ref:
2
2
3 repo methods
3 repo methods
4 =================
4 ============
5
5
6 add_field_to_repo
6 add_field_to_repo
7 -----------------
7 -----------------
8
8
9 .. py:function:: add_field_to_repo(apiuser, repoid, key, label=<Optional:''>, description=<Optional:''>)
9 .. py:function:: add_field_to_repo(apiuser, repoid, key, label=<Optional:''>, description=<Optional:''>)
10
10
11 Adds an extra field to a repository.
11 Adds an extra field to a repository.
12
12
13 This command can only be run using an |authtoken| with at least
13 This command can only be run using an |authtoken| with at least
14 write permissions to the |repo|.
14 write permissions to the |repo|.
15
15
16 :param apiuser: This is filled automatically from the |authtoken|.
16 :param apiuser: This is filled automatically from the |authtoken|.
17 :type apiuser: AuthUser
17 :type apiuser: AuthUser
18 :param repoid: Set the repository name or repository id.
18 :param repoid: Set the repository name or repository id.
19 :type repoid: str or int
19 :type repoid: str or int
20 :param key: Create a unique field key for this repository.
20 :param key: Create a unique field key for this repository.
21 :type key: str
21 :type key: str
22 :param label:
22 :param label:
23 :type label: Optional(str)
23 :type label: Optional(str)
24 :param description:
24 :param description:
25 :type description: Optional(str)
25 :type description: Optional(str)
26
26
27
27
28 comment_commit
28 comment_commit
29 --------------
29 --------------
30
30
31 .. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
31 .. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
32
32
33 Set a commit comment, and optionally change the status of the commit.
33 Set a commit comment, and optionally change the status of the commit.
34
34
35 :param apiuser: This is filled automatically from the |authtoken|.
35 :param apiuser: This is filled automatically from the |authtoken|.
36 :type apiuser: AuthUser
36 :type apiuser: AuthUser
37 :param repoid: Set the repository name or repository ID.
37 :param repoid: Set the repository name or repository ID.
38 :type repoid: str or int
38 :type repoid: str or int
39 :param commit_id: Specify the commit_id for which to set a comment.
39 :param commit_id: Specify the commit_id for which to set a comment.
40 :type commit_id: str
40 :type commit_id: str
41 :param message: The comment text.
41 :param message: The comment text.
42 :type message: str
42 :type message: str
43 :param userid: Set the user name of the comment creator.
43 :param userid: Set the user name of the comment creator.
44 :type userid: Optional(str or int)
44 :type userid: Optional(str or int)
45 :param status: status, one of 'not_reviewed', 'approved', 'rejected',
45 :param status: status, one of 'not_reviewed', 'approved', 'rejected',
46 'under_review'
46 'under_review'
47 :type status: str
47 :type status: str
48
48
49 Example error output:
49 Example error output:
50
50
51 .. code-block:: json
51 .. code-block:: json
52
52
53 {
53 {
54 "id" : <id_given_in_input>,
54 "id" : <id_given_in_input>,
55 "result" : {
55 "result" : {
56 "msg": "Commented on commit `<commit_id>` for repository `<repoid>`",
56 "msg": "Commented on commit `<commit_id>` for repository `<repoid>`",
57 "status_change": null or <status>,
57 "status_change": null or <status>,
58 "success": true
58 "success": true
59 },
59 },
60 "error" : null
60 "error" : null
61 }
61 }
62
62
63
63
64 create_repo
64 create_repo
65 -----------
65 -----------
66
66
67 .. py:function:: create_repo(apiuser, repo_name, repo_type, owner=<Optional:<OptionalAttr:apiuser>>, 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>, copy_permissions=<Optional:False>)
67 .. py:function:: create_repo(apiuser, repo_name, repo_type, owner=<Optional:<OptionalAttr:apiuser>>, 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>, copy_permissions=<Optional:False>)
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 "/", all the required repository
72 groups will be created.
72 groups will be created.
73
73
74 For example "foo/bar/baz" will create |repo| groups "foo" and "bar"
74 For example "foo/bar/baz" will create |repo| groups "foo" and "bar"
75 (with "foo" as parent). It will also create the "baz" repository
75 (with "foo" as parent). It will also create the "baz" repository
76 with "bar" as |repo| group.
76 with "bar" as |repo| group.
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 write permissions to the |repo|.
80
80
81 :param apiuser: This is filled automatically from the |authtoken|.
81 :param apiuser: This is filled automatically from the |authtoken|.
82 :type apiuser: AuthUser
82 :type apiuser: AuthUser
83 :param repo_name: Set the repository name.
83 :param repo_name: Set the repository name.
84 :type repo_name: str
84 :type repo_name: str
85 :param repo_type: Set the repository type; 'hg','git', or 'svn'.
85 :param repo_type: Set the repository type; 'hg','git', or 'svn'.
86 :type repo_type: str
86 :type repo_type: str
87 :param owner: user_id or username
87 :param owner: user_id or username
88 :type owner: Optional(str)
88 :type owner: Optional(str)
89 :param description: Set the repository description.
89 :param description: Set the repository description.
90 :type description: Optional(str)
90 :type description: Optional(str)
91 :param private:
91 :param private:
92 :type private: bool
92 :type private: bool
93 :param clone_uri:
93 :param clone_uri:
94 :type clone_uri: str
94 :type clone_uri: str
95 :param landing_rev: <rev_type>:<rev>
95 :param landing_rev: <rev_type>:<rev>
96 :type landing_rev: str
96 :type landing_rev: str
97 :param enable_locking:
97 :param enable_locking:
98 :type enable_locking: bool
98 :type enable_locking: bool
99 :param enable_downloads:
99 :param enable_downloads:
100 :type enable_downloads: bool
100 :type enable_downloads: bool
101 :param enable_statistics:
101 :param enable_statistics:
102 :type enable_statistics: bool
102 :type enable_statistics: bool
103 :param copy_permissions: Copy permission from group in which the
103 :param copy_permissions: Copy permission from group in which the
104 repository is being created.
104 repository is being created.
105 :type copy_permissions: bool
105 :type copy_permissions: bool
106
106
107
107
108 Example output:
108 Example output:
109
109
110 .. code-block:: bash
110 .. code-block:: bash
111
111
112 id : <id_given_in_input>
112 id : <id_given_in_input>
113 result: {
113 result: {
114 "msg": "Created new repository `<reponame>`",
114 "msg": "Created new repository `<reponame>`",
115 "success": true,
115 "success": true,
116 "task": "<celery task id or None if done sync>"
116 "task": "<celery task id or None if done sync>"
117 }
117 }
118 error: null
118 error: null
119
119
120
120
121 Example error output:
121 Example error output:
122
122
123 .. code-block:: bash
123 .. code-block:: bash
124
124
125 id : <id_given_in_input>
125 id : <id_given_in_input>
126 result : null
126 result : null
127 error : {
127 error : {
128 'failed to create repository `<repo_name>`
128 'failed to create repository `<repo_name>`
129 }
129 }
130
130
131
131
132 delete_repo
132 delete_repo
133 -----------
133 -----------
134
134
135 .. py:function:: delete_repo(apiuser, repoid, forks=<Optional:''>)
135 .. py:function:: delete_repo(apiuser, repoid, forks=<Optional:''>)
136
136
137 Deletes a repository.
137 Deletes a repository.
138
138
139 * When the `forks` parameter is set it's possible to detach or delete
139 * When the `forks` parameter is set it's possible to detach or delete
140 forks of deleted repository.
140 forks of deleted repository.
141
141
142 This command can only be run using an |authtoken| with admin
142 This command can only be run using an |authtoken| with admin
143 permissions on the |repo|.
143 permissions on the |repo|.
144
144
145 :param apiuser: This is filled automatically from the |authtoken|.
145 :param apiuser: This is filled automatically from the |authtoken|.
146 :type apiuser: AuthUser
146 :type apiuser: AuthUser
147 :param repoid: Set the repository name or repository ID.
147 :param repoid: Set the repository name or repository ID.
148 :type repoid: str or int
148 :type repoid: str or int
149 :param forks: Set to `detach` or `delete` forks from the |repo|.
149 :param forks: Set to `detach` or `delete` forks from the |repo|.
150 :type forks: Optional(str)
150 :type forks: Optional(str)
151
151
152 Example error output:
152 Example error output:
153
153
154 .. code-block:: bash
154 .. code-block:: bash
155
155
156 id : <id_given_in_input>
156 id : <id_given_in_input>
157 result: {
157 result: {
158 "msg": "Deleted repository `<reponame>`",
158 "msg": "Deleted repository `<reponame>`",
159 "success": true
159 "success": true
160 }
160 }
161 error: null
161 error: null
162
162
163
163
164 fork_repo
164 fork_repo
165 ---------
165 ---------
166
166
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'>)
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
168
169 Creates a fork of the specified |repo|.
169 Creates a fork of the specified |repo|.
170
170
171 * If using |RCE| with Celery this will immediately return a success
171 * If using |RCE| with Celery this will immediately return a success
172 message, even though the fork will be created asynchronously.
172 message, even though the fork will be created asynchronously.
173
173
174 This command can only be run using an |authtoken| with fork
174 This command can only be run using an |authtoken| with fork
175 permissions on the |repo|.
175 permissions on the |repo|.
176
176
177 :param apiuser: This is filled automatically from the |authtoken|.
177 :param apiuser: This is filled automatically from the |authtoken|.
178 :type apiuser: AuthUser
178 :type apiuser: AuthUser
179 :param repoid: Set repository name or repository ID.
179 :param repoid: Set repository name or repository ID.
180 :type repoid: str or int
180 :type repoid: str or int
181 :param fork_name: Set the fork name.
181 :param fork_name: Set the fork name.
182 :type fork_name: str
182 :type fork_name: str
183 :param owner: Set the fork owner.
183 :param owner: Set the fork owner.
184 :type owner: str
184 :type owner: str
185 :param description: Set the fork descripton.
185 :param description: Set the fork descripton.
186 :type description: str
186 :type description: str
187 :param copy_permissions: Copy permissions from parent |repo|. The
187 :param copy_permissions: Copy permissions from parent |repo|. The
188 default is False.
188 default is False.
189 :type copy_permissions: bool
189 :type copy_permissions: bool
190 :param private: Make the fork private. The default is False.
190 :param private: Make the fork private. The default is False.
191 :type private: bool
191 :type private: bool
192 :param landing_rev: Set the landing revision. The default is tip.
192 :param landing_rev: Set the landing revision. The default is tip.
193
193
194 Example output:
194 Example output:
195
195
196 .. code-block:: bash
196 .. code-block:: bash
197
197
198 id : <id_for_response>
198 id : <id_for_response>
199 api_key : "<api_key>"
199 api_key : "<api_key>"
200 args: {
200 args: {
201 "repoid" : "<reponame or repo_id>",
201 "repoid" : "<reponame or repo_id>",
202 "fork_name": "<forkname>",
202 "fork_name": "<forkname>",
203 "owner": "<username or user_id = Optional(=apiuser)>",
203 "owner": "<username or user_id = Optional(=apiuser)>",
204 "description": "<description>",
204 "description": "<description>",
205 "copy_permissions": "<bool>",
205 "copy_permissions": "<bool>",
206 "private": "<bool>",
206 "private": "<bool>",
207 "landing_rev": "<landing_rev>"
207 "landing_rev": "<landing_rev>"
208 }
208 }
209
209
210 Example error output:
210 Example error output:
211
211
212 .. code-block:: bash
212 .. code-block:: bash
213
213
214 id : <id_given_in_input>
214 id : <id_given_in_input>
215 result: {
215 result: {
216 "msg": "Created fork of `<reponame>` as `<forkname>`",
216 "msg": "Created fork of `<reponame>` as `<forkname>`",
217 "success": true,
217 "success": true,
218 "task": "<celery task id or None if done sync>"
218 "task": "<celery task id or None if done sync>"
219 }
219 }
220 error: null
220 error: null
221
221
222
222
223 get_repo
223 get_repo
224 --------
224 --------
225
225
226 .. py:function:: get_repo(apiuser, repoid, cache=<Optional:True>)
226 .. py:function:: get_repo(apiuser, repoid, cache=<Optional:True>)
227
227
228 Gets an existing repository by its name or repository_id.
228 Gets an existing repository by its name or repository_id.
229
229
230 The members section so the output returns users groups or users
230 The members section so the output returns users groups or users
231 associated with that repository.
231 associated with that repository.
232
232
233 This command can only be run using an |authtoken| with admin rights,
233 This command can only be run using an |authtoken| with admin rights,
234 or users with at least read rights to the |repo|.
234 or users with at least read rights to the |repo|.
235
235
236 :param apiuser: This is filled automatically from the |authtoken|.
236 :param apiuser: This is filled automatically from the |authtoken|.
237 :type apiuser: AuthUser
237 :type apiuser: AuthUser
238 :param repoid: The repository name or repository id.
238 :param repoid: The repository name or repository id.
239 :type repoid: str or int
239 :type repoid: str or int
240 :param cache: use the cached value for last changeset
240 :param cache: use the cached value for last changeset
241 :type: cache: Optional(bool)
241 :type: cache: Optional(bool)
242
242
243 Example output:
243 Example output:
244
244
245 .. code-block:: bash
245 .. code-block:: bash
246
246
247 {
247 {
248 "error": null,
248 "error": null,
249 "id": <repo_id>,
249 "id": <repo_id>,
250 "result": {
250 "result": {
251 "clone_uri": null,
251 "clone_uri": null,
252 "created_on": "timestamp",
252 "created_on": "timestamp",
253 "description": "repo description",
253 "description": "repo description",
254 "enable_downloads": false,
254 "enable_downloads": false,
255 "enable_locking": false,
255 "enable_locking": false,
256 "enable_statistics": false,
256 "enable_statistics": false,
257 "followers": [
257 "followers": [
258 {
258 {
259 "active": true,
259 "active": true,
260 "admin": false,
260 "admin": false,
261 "api_key": "****************************************",
261 "api_key": "****************************************",
262 "api_keys": [
262 "api_keys": [
263 "****************************************"
263 "****************************************"
264 ],
264 ],
265 "email": "user@example.com",
265 "email": "user@example.com",
266 "emails": [
266 "emails": [
267 "user@example.com"
267 "user@example.com"
268 ],
268 ],
269 "extern_name": "rhodecode",
269 "extern_name": "rhodecode",
270 "extern_type": "rhodecode",
270 "extern_type": "rhodecode",
271 "firstname": "username",
271 "firstname": "username",
272 "ip_addresses": [],
272 "ip_addresses": [],
273 "language": null,
273 "language": null,
274 "last_login": "2015-09-16T17:16:35.854",
274 "last_login": "2015-09-16T17:16:35.854",
275 "lastname": "surname",
275 "lastname": "surname",
276 "user_id": <user_id>,
276 "user_id": <user_id>,
277 "username": "name"
277 "username": "name"
278 }
278 }
279 ],
279 ],
280 "fork_of": "parent-repo",
280 "fork_of": "parent-repo",
281 "landing_rev": [
281 "landing_rev": [
282 "rev",
282 "rev",
283 "tip"
283 "tip"
284 ],
284 ],
285 "last_changeset": {
285 "last_changeset": {
286 "author": "User <user@example.com>",
286 "author": "User <user@example.com>",
287 "branch": "default",
287 "branch": "default",
288 "date": "timestamp",
288 "date": "timestamp",
289 "message": "last commit message",
289 "message": "last commit message",
290 "parents": [
290 "parents": [
291 {
291 {
292 "raw_id": "commit-id"
292 "raw_id": "commit-id"
293 }
293 }
294 ],
294 ],
295 "raw_id": "commit-id",
295 "raw_id": "commit-id",
296 "revision": <revision number>,
296 "revision": <revision number>,
297 "short_id": "short id"
297 "short_id": "short id"
298 },
298 },
299 "lock_reason": null,
299 "lock_reason": null,
300 "locked_by": null,
300 "locked_by": null,
301 "locked_date": null,
301 "locked_date": null,
302 "members": [
302 "members": [
303 {
303 {
304 "name": "super-admin-name",
304 "name": "super-admin-name",
305 "origin": "super-admin",
305 "origin": "super-admin",
306 "permission": "repository.admin",
306 "permission": "repository.admin",
307 "type": "user"
307 "type": "user"
308 },
308 },
309 {
309 {
310 "name": "owner-name",
310 "name": "owner-name",
311 "origin": "owner",
311 "origin": "owner",
312 "permission": "repository.admin",
312 "permission": "repository.admin",
313 "type": "user"
313 "type": "user"
314 },
314 },
315 {
315 {
316 "name": "user-group-name",
316 "name": "user-group-name",
317 "origin": "permission",
317 "origin": "permission",
318 "permission": "repository.write",
318 "permission": "repository.write",
319 "type": "user_group"
319 "type": "user_group"
320 }
320 }
321 ],
321 ],
322 "owner": "owner-name",
322 "owner": "owner-name",
323 "permissions": [
323 "permissions": [
324 {
324 {
325 "name": "super-admin-name",
325 "name": "super-admin-name",
326 "origin": "super-admin",
326 "origin": "super-admin",
327 "permission": "repository.admin",
327 "permission": "repository.admin",
328 "type": "user"
328 "type": "user"
329 },
329 },
330 {
330 {
331 "name": "owner-name",
331 "name": "owner-name",
332 "origin": "owner",
332 "origin": "owner",
333 "permission": "repository.admin",
333 "permission": "repository.admin",
334 "type": "user"
334 "type": "user"
335 },
335 },
336 {
336 {
337 "name": "user-group-name",
337 "name": "user-group-name",
338 "origin": "permission",
338 "origin": "permission",
339 "permission": "repository.write",
339 "permission": "repository.write",
340 "type": "user_group"
340 "type": "user_group"
341 }
341 }
342 ],
342 ],
343 "private": true,
343 "private": true,
344 "repo_id": 676,
344 "repo_id": 676,
345 "repo_name": "user-group/repo-name",
345 "repo_name": "user-group/repo-name",
346 "repo_type": "hg"
346 "repo_type": "hg"
347 }
347 }
348 }
348 }
349
349
350
350
351 get_repo_changeset
351 get_repo_changeset
352 ------------------
352 ------------------
353
353
354 .. py:function:: get_repo_changeset(apiuser, repoid, revision, details=<Optional:'basic'>)
354 .. py:function:: get_repo_changeset(apiuser, repoid, revision, details=<Optional:'basic'>)
355
355
356 Returns information about a changeset.
356 Returns information about a changeset.
357
357
358 Additionally parameters define the amount of details returned by
358 Additionally parameters define the amount of details returned by
359 this function.
359 this function.
360
360
361 This command can only be run using an |authtoken| with admin rights,
361 This command can only be run using an |authtoken| with admin rights,
362 or users with at least read rights to the |repo|.
362 or users with at least read rights to the |repo|.
363
363
364 :param apiuser: This is filled automatically from the |authtoken|.
364 :param apiuser: This is filled automatically from the |authtoken|.
365 :type apiuser: AuthUser
365 :type apiuser: AuthUser
366 :param repoid: The repository name or repository id
366 :param repoid: The repository name or repository id
367 :type repoid: str or int
367 :type repoid: str or int
368 :param revision: revision for which listing should be done
368 :param revision: revision for which listing should be done
369 :type revision: str
369 :type revision: str
370 :param details: details can be 'basic|extended|full' full gives diff
370 :param details: details can be 'basic|extended|full' full gives diff
371 info details like the diff itself, and number of changed files etc.
371 info details like the diff itself, and number of changed files etc.
372 :type details: Optional(str)
372 :type details: Optional(str)
373
373
374
374
375 get_repo_changesets
375 get_repo_changesets
376 -------------------
376 -------------------
377
377
378 .. py:function:: get_repo_changesets(apiuser, repoid, start_rev, limit, details=<Optional:'basic'>)
378 .. py:function:: get_repo_changesets(apiuser, repoid, start_rev, limit, details=<Optional:'basic'>)
379
379
380 Returns a set of commits limited by the number starting
380 Returns a set of commits limited by the number starting
381 from the `start_rev` option.
381 from the `start_rev` option.
382
382
383 Additional parameters define the amount of details returned by this
383 Additional parameters define the amount of details returned by this
384 function.
384 function.
385
385
386 This command can only be run using an |authtoken| with admin rights,
386 This command can only be run using an |authtoken| with admin rights,
387 or users with at least read rights to |repos|.
387 or users with at least read rights to |repos|.
388
388
389 :param apiuser: This is filled automatically from the |authtoken|.
389 :param apiuser: This is filled automatically from the |authtoken|.
390 :type apiuser: AuthUser
390 :type apiuser: AuthUser
391 :param repoid: The repository name or repository ID.
391 :param repoid: The repository name or repository ID.
392 :type repoid: str or int
392 :type repoid: str or int
393 :param start_rev: The starting revision from where to get changesets.
393 :param start_rev: The starting revision from where to get changesets.
394 :type start_rev: str
394 :type start_rev: str
395 :param limit: Limit the number of commits to this amount
395 :param limit: Limit the number of commits to this amount
396 :type limit: str or int
396 :type limit: str or int
397 :param details: Set the level of detail returned. Valid option are:
397 :param details: Set the level of detail returned. Valid option are:
398 ``basic``, ``extended`` and ``full``.
398 ``basic``, ``extended`` and ``full``.
399 :type details: Optional(str)
399 :type details: Optional(str)
400
400
401 .. note::
401 .. note::
402
402
403 Setting the parameter `details` to the value ``full`` is extensive
403 Setting the parameter `details` to the value ``full`` is extensive
404 and returns details like the diff itself, and the number
404 and returns details like the diff itself, and the number
405 of changed files.
405 of changed files.
406
406
407
407
408 get_repo_nodes
408 get_repo_nodes
409 --------------
409 --------------
410
410
411 .. py:function:: get_repo_nodes(apiuser, repoid, revision, root_path, ret_type=<Optional:'all'>, details=<Optional:'basic'>, max_file_bytes=<Optional:None>)
411 .. py:function:: get_repo_nodes(apiuser, repoid, revision, root_path, ret_type=<Optional:'all'>, details=<Optional:'basic'>, max_file_bytes=<Optional:None>)
412
412
413 Returns a list of nodes and children in a flat list for a given
413 Returns a list of nodes and children in a flat list for a given
414 path at given revision.
414 path at given revision.
415
415
416 It's possible to specify ret_type to show only `files` or `dirs`.
416 It's possible to specify ret_type to show only `files` or `dirs`.
417
417
418 This command can only be run using an |authtoken| with admin rights,
418 This command can only be run using an |authtoken| with admin rights,
419 or users with at least read rights to |repos|.
419 or users with at least read rights to |repos|.
420
420
421 :param apiuser: This is filled automatically from the |authtoken|.
421 :param apiuser: This is filled automatically from the |authtoken|.
422 :type apiuser: AuthUser
422 :type apiuser: AuthUser
423 :param repoid: The repository name or repository ID.
423 :param repoid: The repository name or repository ID.
424 :type repoid: str or int
424 :type repoid: str or int
425 :param revision: The revision for which listing should be done.
425 :param revision: The revision for which listing should be done.
426 :type revision: str
426 :type revision: str
427 :param root_path: The path from which to start displaying.
427 :param root_path: The path from which to start displaying.
428 :type root_path: str
428 :type root_path: str
429 :param ret_type: Set the return type. Valid options are
429 :param ret_type: Set the return type. Valid options are
430 ``all`` (default), ``files`` and ``dirs``.
430 ``all`` (default), ``files`` and ``dirs``.
431 :type ret_type: Optional(str)
431 :type ret_type: Optional(str)
432 :param details: Returns extended information about nodes, such as
432 :param details: Returns extended information about nodes, such as
433 md5, binary, and or content. The valid options are ``basic`` and
433 md5, binary, and or content. The valid options are ``basic`` and
434 ``full``.
434 ``full``.
435 :type details: Optional(str)
435 :type details: Optional(str)
436 :param max_file_bytes: Only return file content under this file size bytes
436 :param max_file_bytes: Only return file content under this file size bytes
437 :type details: Optional(int)
437 :type details: Optional(int)
438
438
439 Example output:
439 Example output:
440
440
441 .. code-block:: bash
441 .. code-block:: bash
442
442
443 id : <id_given_in_input>
443 id : <id_given_in_input>
444 result: [
444 result: [
445 {
445 {
446 "name" : "<name>"
446 "name" : "<name>"
447 "type" : "<type>",
447 "type" : "<type>",
448 "binary": "<true|false>" (only in extended mode)
448 "binary": "<true|false>" (only in extended mode)
449 "md5" : "<md5 of file content>" (only in extended mode)
449 "md5" : "<md5 of file content>" (only in extended mode)
450 },
450 },
451 ...
451 ...
452 ]
452 ]
453 error: null
453 error: null
454
454
455
455
456 get_repo_refs
456 get_repo_refs
457 -------------
457 -------------
458
458
459 .. py:function:: get_repo_refs(apiuser, repoid)
459 .. py:function:: get_repo_refs(apiuser, repoid)
460
460
461 Returns a dictionary of current references. It returns
461 Returns a dictionary of current references. It returns
462 bookmarks, branches, closed_branches, and tags for given repository
462 bookmarks, branches, closed_branches, and tags for given repository
463
463
464 It's possible to specify ret_type to show only `files` or `dirs`.
464 It's possible to specify ret_type to show only `files` or `dirs`.
465
465
466 This command can only be run using an |authtoken| with admin rights,
466 This command can only be run using an |authtoken| with admin rights,
467 or users with at least read rights to |repos|.
467 or users with at least read rights to |repos|.
468
468
469 :param apiuser: This is filled automatically from the |authtoken|.
469 :param apiuser: This is filled automatically from the |authtoken|.
470 :type apiuser: AuthUser
470 :type apiuser: AuthUser
471 :param repoid: The repository name or repository ID.
471 :param repoid: The repository name or repository ID.
472 :type repoid: str or int
472 :type repoid: str or int
473
473
474 Example output:
474 Example output:
475
475
476 .. code-block:: bash
476 .. code-block:: bash
477
477
478 id : <id_given_in_input>
478 id : <id_given_in_input>
479 result: [
479 result: [
480 TODO...
480 TODO...
481 ]
481 ]
482 error: null
482 error: null
483
483
484
484
485 get_repo_settings
485 get_repo_settings
486 -----------------
486 -----------------
487
487
488 .. py:function:: get_repo_settings(apiuser, repoid, key=<Optional:None>)
488 .. py:function:: get_repo_settings(apiuser, repoid, key=<Optional:None>)
489
489
490 Returns all settings for a repository. If key is given it only returns the
490 Returns all settings for a repository. If key is given it only returns the
491 setting identified by the key or null.
491 setting identified by the key or null.
492
492
493 :param apiuser: This is filled automatically from the |authtoken|.
493 :param apiuser: This is filled automatically from the |authtoken|.
494 :type apiuser: AuthUser
494 :type apiuser: AuthUser
495 :param repoid: The repository name or repository id.
495 :param repoid: The repository name or repository id.
496 :type repoid: str or int
496 :type repoid: str or int
497 :param key: Key of the setting to return.
497 :param key: Key of the setting to return.
498 :type: key: Optional(str)
498 :type: key: Optional(str)
499
499
500 Example output:
500 Example output:
501
501
502 .. code-block:: bash
502 .. code-block:: bash
503
503
504 {
504 {
505 "error": null,
505 "error": null,
506 "id": 237,
506 "id": 237,
507 "result": {
507 "result": {
508 "extensions_largefiles": true,
508 "extensions_largefiles": true,
509 "hooks_changegroup_push_logger": true,
509 "hooks_changegroup_push_logger": true,
510 "hooks_changegroup_repo_size": false,
510 "hooks_changegroup_repo_size": false,
511 "hooks_outgoing_pull_logger": true,
511 "hooks_outgoing_pull_logger": true,
512 "phases_publish": "True",
512 "phases_publish": "True",
513 "rhodecode_hg_use_rebase_for_merging": true,
513 "rhodecode_hg_use_rebase_for_merging": true,
514 "rhodecode_pr_merge_enabled": true,
514 "rhodecode_pr_merge_enabled": true,
515 "rhodecode_use_outdated_comments": true
515 "rhodecode_use_outdated_comments": true
516 }
516 }
517 }
517 }
518
518
519
519
520 get_repos
520 get_repos
521 ---------
521 ---------
522
522
523 .. py:function:: get_repos(apiuser)
523 .. py:function:: get_repos(apiuser)
524
524
525 Lists all existing repositories.
525 Lists all existing repositories.
526
526
527 This command can only be run using an |authtoken| with admin rights,
527 This command can only be run using an |authtoken| with admin rights,
528 or users with at least read rights to |repos|.
528 or users with at least read rights to |repos|.
529
529
530 :param apiuser: This is filled automatically from the |authtoken|.
530 :param apiuser: This is filled automatically from the |authtoken|.
531 :type apiuser: AuthUser
531 :type apiuser: AuthUser
532
532
533 Example output:
533 Example output:
534
534
535 .. code-block:: bash
535 .. code-block:: bash
536
536
537 id : <id_given_in_input>
537 id : <id_given_in_input>
538 result: [
538 result: [
539 {
539 {
540 "repo_id" : "<repo_id>",
540 "repo_id" : "<repo_id>",
541 "repo_name" : "<reponame>"
541 "repo_name" : "<reponame>"
542 "repo_type" : "<repo_type>",
542 "repo_type" : "<repo_type>",
543 "clone_uri" : "<clone_uri>",
543 "clone_uri" : "<clone_uri>",
544 "private": : "<bool>",
544 "private": : "<bool>",
545 "created_on" : "<datetimecreated>",
545 "created_on" : "<datetimecreated>",
546 "description" : "<description>",
546 "description" : "<description>",
547 "landing_rev": "<landing_rev>",
547 "landing_rev": "<landing_rev>",
548 "owner": "<repo_owner>",
548 "owner": "<repo_owner>",
549 "fork_of": "<name_of_fork_parent>",
549 "fork_of": "<name_of_fork_parent>",
550 "enable_downloads": "<bool>",
550 "enable_downloads": "<bool>",
551 "enable_locking": "<bool>",
551 "enable_locking": "<bool>",
552 "enable_statistics": "<bool>",
552 "enable_statistics": "<bool>",
553 },
553 },
554 ...
554 ...
555 ]
555 ]
556 error: null
556 error: null
557
557
558
558
559 grant_user_group_permission
559 grant_user_group_permission
560 ---------------------------
560 ---------------------------
561
561
562 .. py:function:: grant_user_group_permission(apiuser, repoid, usergroupid, perm)
562 .. py:function:: grant_user_group_permission(apiuser, repoid, usergroupid, perm)
563
563
564 Grant permission for a user group on the specified repository,
564 Grant permission for a user group on the specified repository,
565 or update existing permissions.
565 or update existing permissions.
566
566
567 This command can only be run using an |authtoken| with admin
567 This command can only be run using an |authtoken| with admin
568 permissions on the |repo|.
568 permissions on the |repo|.
569
569
570 :param apiuser: This is filled automatically from the |authtoken|.
570 :param apiuser: This is filled automatically from the |authtoken|.
571 :type apiuser: AuthUser
571 :type apiuser: AuthUser
572 :param repoid: Set the repository name or repository ID.
572 :param repoid: Set the repository name or repository ID.
573 :type repoid: str or int
573 :type repoid: str or int
574 :param usergroupid: Specify the ID of the user group.
574 :param usergroupid: Specify the ID of the user group.
575 :type usergroupid: str or int
575 :type usergroupid: str or int
576 :param perm: Set the user group permissions using the following
576 :param perm: Set the user group permissions using the following
577 format: (repository.(none|read|write|admin))
577 format: (repository.(none|read|write|admin))
578 :type perm: str
578 :type perm: str
579
579
580 Example output:
580 Example output:
581
581
582 .. code-block:: bash
582 .. code-block:: bash
583
583
584 id : <id_given_in_input>
584 id : <id_given_in_input>
585 result : {
585 result : {
586 "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
586 "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
587 "success": true
587 "success": true
588
588
589 }
589 }
590 error : null
590 error : null
591
591
592 Example error output:
592 Example error output:
593
593
594 .. code-block:: bash
594 .. code-block:: bash
595
595
596 id : <id_given_in_input>
596 id : <id_given_in_input>
597 result : null
597 result : null
598 error : {
598 error : {
599 "failed to edit permission for user group: `<usergroup>` in repo `<repo>`'
599 "failed to edit permission for user group: `<usergroup>` in repo `<repo>`'
600 }
600 }
601
601
602
602
603 grant_user_permission
603 grant_user_permission
604 ---------------------
604 ---------------------
605
605
606 .. py:function:: grant_user_permission(apiuser, repoid, userid, perm)
606 .. py:function:: grant_user_permission(apiuser, repoid, userid, perm)
607
607
608 Grant permissions for the specified user on the given repository,
608 Grant permissions for the specified user on the given repository,
609 or update existing permissions if found.
609 or update existing permissions if found.
610
610
611 This command can only be run using an |authtoken| with admin
611 This command can only be run using an |authtoken| with admin
612 permissions on the |repo|.
612 permissions on the |repo|.
613
613
614 :param apiuser: This is filled automatically from the |authtoken|.
614 :param apiuser: This is filled automatically from the |authtoken|.
615 :type apiuser: AuthUser
615 :type apiuser: AuthUser
616 :param repoid: Set the repository name or repository ID.
616 :param repoid: Set the repository name or repository ID.
617 :type repoid: str or int
617 :type repoid: str or int
618 :param userid: Set the user name.
618 :param userid: Set the user name.
619 :type userid: str
619 :type userid: str
620 :param perm: Set the user permissions, using the following format
620 :param perm: Set the user permissions, using the following format
621 ``(repository.(none|read|write|admin))``
621 ``(repository.(none|read|write|admin))``
622 :type perm: str
622 :type perm: str
623
623
624 Example output:
624 Example output:
625
625
626 .. code-block:: bash
626 .. code-block:: bash
627
627
628 id : <id_given_in_input>
628 id : <id_given_in_input>
629 result: {
629 result: {
630 "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
630 "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
631 "success": true
631 "success": true
632 }
632 }
633 error: null
633 error: null
634
634
635
635
636 invalidate_cache
636 invalidate_cache
637 ----------------
637 ----------------
638
638
639 .. py:function:: invalidate_cache(apiuser, repoid, delete_keys=<Optional:False>)
639 .. py:function:: invalidate_cache(apiuser, repoid, delete_keys=<Optional:False>)
640
640
641 Invalidates the cache for the specified repository.
641 Invalidates the cache for the specified repository.
642
642
643 This command can only be run using an |authtoken| with admin rights to
643 This command can only be run using an |authtoken| with admin rights to
644 the specified repository.
644 the specified repository.
645
645
646 This command takes the following options:
646 This command takes the following options:
647
647
648 :param apiuser: This is filled automatically from |authtoken|.
648 :param apiuser: This is filled automatically from |authtoken|.
649 :type apiuser: AuthUser
649 :type apiuser: AuthUser
650 :param repoid: Sets the repository name or repository ID.
650 :param repoid: Sets the repository name or repository ID.
651 :type repoid: str or int
651 :type repoid: str or int
652 :param delete_keys: This deletes the invalidated keys instead of
652 :param delete_keys: This deletes the invalidated keys instead of
653 just flagging them.
653 just flagging them.
654 :type delete_keys: Optional(``True`` | ``False``)
654 :type delete_keys: Optional(``True`` | ``False``)
655
655
656 Example output:
656 Example output:
657
657
658 .. code-block:: bash
658 .. code-block:: bash
659
659
660 id : <id_given_in_input>
660 id : <id_given_in_input>
661 result : {
661 result : {
662 'msg': Cache for repository `<repository name>` was invalidated,
662 'msg': Cache for repository `<repository name>` was invalidated,
663 'repository': <repository name>
663 'repository': <repository name>
664 }
664 }
665 error : null
665 error : null
666
666
667 Example error output:
667 Example error output:
668
668
669 .. code-block:: bash
669 .. code-block:: bash
670
670
671 id : <id_given_in_input>
671 id : <id_given_in_input>
672 result : null
672 result : null
673 error : {
673 error : {
674 'Error occurred during cache invalidation action'
674 'Error occurred during cache invalidation action'
675 }
675 }
676
676
677
677
678 lock
678 lock
679 ----
679 ----
680
680
681 .. py:function:: lock(apiuser, repoid, locked=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
681 .. py:function:: lock(apiuser, repoid, locked=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
682
682
683 Sets the lock state of the specified |repo| by the given user.
683 Sets the lock state of the specified |repo| by the given user.
684 From more information, see :ref:`repo-locking`.
684 From more information, see :ref:`repo-locking`.
685
685
686 * If the ``userid`` option is not set, the repository is locked to the
686 * If the ``userid`` option is not set, the repository is locked to the
687 user who called the method.
687 user who called the method.
688 * If the ``locked`` parameter is not set, the current lock state of the
688 * If the ``locked`` parameter is not set, the current lock state of the
689 repository is displayed.
689 repository is displayed.
690
690
691 This command can only be run using an |authtoken| with admin rights to
691 This command can only be run using an |authtoken| with admin rights to
692 the specified repository.
692 the specified repository.
693
693
694 This command takes the following options:
694 This command takes the following options:
695
695
696 :param apiuser: This is filled automatically from the |authtoken|.
696 :param apiuser: This is filled automatically from the |authtoken|.
697 :type apiuser: AuthUser
697 :type apiuser: AuthUser
698 :param repoid: Sets the repository name or repository ID.
698 :param repoid: Sets the repository name or repository ID.
699 :type repoid: str or int
699 :type repoid: str or int
700 :param locked: Sets the lock state.
700 :param locked: Sets the lock state.
701 :type locked: Optional(``True`` | ``False``)
701 :type locked: Optional(``True`` | ``False``)
702 :param userid: Set the repository lock to this user.
702 :param userid: Set the repository lock to this user.
703 :type userid: Optional(str or int)
703 :type userid: Optional(str or int)
704
704
705 Example error output:
705 Example error output:
706
706
707 .. code-block:: bash
707 .. code-block:: bash
708
708
709 id : <id_given_in_input>
709 id : <id_given_in_input>
710 result : {
710 result : {
711 'repo': '<reponame>',
711 'repo': '<reponame>',
712 'locked': <bool: lock state>,
712 'locked': <bool: lock state>,
713 'locked_since': <int: lock timestamp>,
713 'locked_since': <int: lock timestamp>,
714 'locked_by': <username of person who made the lock>,
714 'locked_by': <username of person who made the lock>,
715 'lock_reason': <str: reason for locking>,
715 'lock_reason': <str: reason for locking>,
716 'lock_state_changed': <bool: True if lock state has been changed in this request>,
716 'lock_state_changed': <bool: True if lock state has been changed in this request>,
717 'msg': 'Repo `<reponame>` locked by `<username>` on <timestamp>.'
717 'msg': 'Repo `<reponame>` locked by `<username>` on <timestamp>.'
718 or
718 or
719 'msg': 'Repo `<repository name>` not locked.'
719 'msg': 'Repo `<repository name>` not locked.'
720 or
720 or
721 'msg': 'User `<user name>` set lock state for repo `<repository name>` to `<new lock state>`'
721 'msg': 'User `<user name>` set lock state for repo `<repository name>` to `<new lock state>`'
722 }
722 }
723 error : null
723 error : null
724
724
725 Example error output:
725 Example error output:
726
726
727 .. code-block:: bash
727 .. code-block:: bash
728
728
729 id : <id_given_in_input>
729 id : <id_given_in_input>
730 result : null
730 result : null
731 error : {
731 error : {
732 'Error occurred locking repository `<reponame>`
732 'Error occurred locking repository `<reponame>`
733 }
733 }
734
734
735
735
736 pull
736 pull
737 ----
737 ----
738
738
739 .. py:function:: pull(apiuser, repoid)
739 .. py:function:: pull(apiuser, repoid)
740
740
741 Triggers a pull on the given repository from a remote location. You
741 Triggers a pull on the given repository from a remote location. You
742 can use this to keep remote repositories up-to-date.
742 can use this to keep remote repositories up-to-date.
743
743
744 This command can only be run using an |authtoken| with admin
744 This command can only be run using an |authtoken| with admin
745 rights to the specified repository. For more information,
745 rights to the specified repository. For more information,
746 see :ref:`config-token-ref`.
746 see :ref:`config-token-ref`.
747
747
748 This command takes the following options:
748 This command takes the following options:
749
749
750 :param apiuser: This is filled automatically from the |authtoken|.
750 :param apiuser: This is filled automatically from the |authtoken|.
751 :type apiuser: AuthUser
751 :type apiuser: AuthUser
752 :param repoid: The repository name or repository ID.
752 :param repoid: The repository name or repository ID.
753 :type repoid: str or int
753 :type repoid: str or int
754
754
755 Example output:
755 Example output:
756
756
757 .. code-block:: bash
757 .. code-block:: bash
758
758
759 id : <id_given_in_input>
759 id : <id_given_in_input>
760 result : {
760 result : {
761 "msg": "Pulled from `<repository name>`"
761 "msg": "Pulled from `<repository name>`"
762 "repository": "<repository name>"
762 "repository": "<repository name>"
763 }
763 }
764 error : null
764 error : null
765
765
766 Example error output:
766 Example error output:
767
767
768 .. code-block:: bash
768 .. code-block:: bash
769
769
770 id : <id_given_in_input>
770 id : <id_given_in_input>
771 result : null
771 result : null
772 error : {
772 error : {
773 "Unable to pull changes from `<reponame>`"
773 "Unable to pull changes from `<reponame>`"
774 }
774 }
775
775
776
776
777 remove_field_from_repo
777 remove_field_from_repo
778 ----------------------
778 ----------------------
779
779
780 .. py:function:: remove_field_from_repo(apiuser, repoid, key)
780 .. py:function:: remove_field_from_repo(apiuser, repoid, key)
781
781
782 Removes an extra field from a repository.
782 Removes an extra field from a repository.
783
783
784 This command can only be run using an |authtoken| with at least
784 This command can only be run using an |authtoken| with at least
785 write permissions to the |repo|.
785 write permissions to the |repo|.
786
786
787 :param apiuser: This is filled automatically from the |authtoken|.
787 :param apiuser: This is filled automatically from the |authtoken|.
788 :type apiuser: AuthUser
788 :type apiuser: AuthUser
789 :param repoid: Set the repository name or repository ID.
789 :param repoid: Set the repository name or repository ID.
790 :type repoid: str or int
790 :type repoid: str or int
791 :param key: Set the unique field key for this repository.
791 :param key: Set the unique field key for this repository.
792 :type key: str
792 :type key: str
793
793
794
794
795 revoke_user_group_permission
795 revoke_user_group_permission
796 ----------------------------
796 ----------------------------
797
797
798 .. py:function:: revoke_user_group_permission(apiuser, repoid, usergroupid)
798 .. py:function:: revoke_user_group_permission(apiuser, repoid, usergroupid)
799
799
800 Revoke the permissions of a user group on a given repository.
800 Revoke the permissions of a user group on a given repository.
801
801
802 This command can only be run using an |authtoken| with admin
802 This command can only be run using an |authtoken| with admin
803 permissions on the |repo|.
803 permissions on the |repo|.
804
804
805 :param apiuser: This is filled automatically from the |authtoken|.
805 :param apiuser: This is filled automatically from the |authtoken|.
806 :type apiuser: AuthUser
806 :type apiuser: AuthUser
807 :param repoid: Set the repository name or repository ID.
807 :param repoid: Set the repository name or repository ID.
808 :type repoid: str or int
808 :type repoid: str or int
809 :param usergroupid: Specify the user group ID.
809 :param usergroupid: Specify the user group ID.
810 :type usergroupid: str or int
810 :type usergroupid: str or int
811
811
812 Example output:
812 Example output:
813
813
814 .. code-block:: bash
814 .. code-block:: bash
815
815
816 id : <id_given_in_input>
816 id : <id_given_in_input>
817 result: {
817 result: {
818 "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
818 "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
819 "success": true
819 "success": true
820 }
820 }
821 error: null
821 error: null
822
822
823
823
824 revoke_user_permission
824 revoke_user_permission
825 ----------------------
825 ----------------------
826
826
827 .. py:function:: revoke_user_permission(apiuser, repoid, userid)
827 .. py:function:: revoke_user_permission(apiuser, repoid, userid)
828
828
829 Revoke permission for a user on the specified repository.
829 Revoke permission for a user on the specified repository.
830
830
831 This command can only be run using an |authtoken| with admin
831 This command can only be run using an |authtoken| with admin
832 permissions on the |repo|.
832 permissions on the |repo|.
833
833
834 :param apiuser: This is filled automatically from the |authtoken|.
834 :param apiuser: This is filled automatically from the |authtoken|.
835 :type apiuser: AuthUser
835 :type apiuser: AuthUser
836 :param repoid: Set the repository name or repository ID.
836 :param repoid: Set the repository name or repository ID.
837 :type repoid: str or int
837 :type repoid: str or int
838 :param userid: Set the user name of revoked user.
838 :param userid: Set the user name of revoked user.
839 :type userid: str or int
839 :type userid: str or int
840
840
841 Example error output:
841 Example error output:
842
842
843 .. code-block:: bash
843 .. code-block:: bash
844
844
845 id : <id_given_in_input>
845 id : <id_given_in_input>
846 result: {
846 result: {
847 "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
847 "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
848 "success": true
848 "success": true
849 }
849 }
850 error: null
850 error: null
851
851
852
852
853 set_repo_settings
853 set_repo_settings
854 -----------------
854 -----------------
855
855
856 .. py:function:: set_repo_settings(apiuser, repoid, settings)
856 .. py:function:: set_repo_settings(apiuser, repoid, settings)
857
857
858 Update repository settings. Returns true on success.
858 Update repository settings. Returns true on success.
859
859
860 :param apiuser: This is filled automatically from the |authtoken|.
860 :param apiuser: This is filled automatically from the |authtoken|.
861 :type apiuser: AuthUser
861 :type apiuser: AuthUser
862 :param repoid: The repository name or repository id.
862 :param repoid: The repository name or repository id.
863 :type repoid: str or int
863 :type repoid: str or int
864 :param settings: The new settings for the repository.
864 :param settings: The new settings for the repository.
865 :type: settings: dict
865 :type: settings: dict
866
866
867 Example output:
867 Example output:
868
868
869 .. code-block:: bash
869 .. code-block:: bash
870
870
871 {
871 {
872 "error": null,
872 "error": null,
873 "id": 237,
873 "id": 237,
874 "result": true
874 "result": true
875 }
875 }
876
876
877
877
878 strip
878 strip
879 -----
879 -----
880
880
881 .. py:function:: strip(apiuser, repoid, revision, branch)
881 .. py:function:: strip(apiuser, repoid, revision, branch)
882
882
883 Strips the given revision from the specified repository.
883 Strips the given revision from the specified repository.
884
884
885 * This will remove the revision and all of its decendants.
885 * This will remove the revision and all of its decendants.
886
886
887 This command can only be run using an |authtoken| with admin rights to
887 This command can only be run using an |authtoken| with admin rights to
888 the specified repository.
888 the specified repository.
889
889
890 This command takes the following options:
890 This command takes the following options:
891
891
892 :param apiuser: This is filled automatically from the |authtoken|.
892 :param apiuser: This is filled automatically from the |authtoken|.
893 :type apiuser: AuthUser
893 :type apiuser: AuthUser
894 :param repoid: The repository name or repository ID.
894 :param repoid: The repository name or repository ID.
895 :type repoid: str or int
895 :type repoid: str or int
896 :param revision: The revision you wish to strip.
896 :param revision: The revision you wish to strip.
897 :type revision: str
897 :type revision: str
898 :param branch: The branch from which to strip the revision.
898 :param branch: The branch from which to strip the revision.
899 :type branch: str
899 :type branch: str
900
900
901 Example output:
901 Example output:
902
902
903 .. code-block:: bash
903 .. code-block:: bash
904
904
905 id : <id_given_in_input>
905 id : <id_given_in_input>
906 result : {
906 result : {
907 "msg": "'Stripped commit <commit_hash> from repo `<repository name>`'"
907 "msg": "'Stripped commit <commit_hash> from repo `<repository name>`'"
908 "repository": "<repository name>"
908 "repository": "<repository name>"
909 }
909 }
910 error : null
910 error : null
911
911
912 Example error output:
912 Example error output:
913
913
914 .. code-block:: bash
914 .. code-block:: bash
915
915
916 id : <id_given_in_input>
916 id : <id_given_in_input>
917 result : null
917 result : null
918 error : {
918 error : {
919 "Unable to strip commit <commit_hash> from repo `<repository name>`"
919 "Unable to strip commit <commit_hash> from repo `<repository name>`"
920 }
920 }
921
921
922
922
923 update_repo
923 update_repo
924 -----------
924 -----------
925
925
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:''>)
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:''>)
927
927
928 Updates a repository with the given information.
928 Updates a repository with the given information.
929
929
930 This command can only be run using an |authtoken| with at least
930 This command can only be run using an |authtoken| with at least
931 write permissions to the |repo|.
931 write permissions to the |repo|.
932
932
933 :param apiuser: This is filled automatically from the |authtoken|.
933 :param apiuser: This is filled automatically from the |authtoken|.
934 :type apiuser: AuthUser
934 :type apiuser: AuthUser
935 :param repoid: repository name or repository ID.
935 :param repoid: repository name or repository ID.
936 :type repoid: str or int
936 :type repoid: str or int
937 :param name: Update the |repo| name.
937 :param name: Update the |repo| name.
938 :type name: str
938 :type name: str
939 :param owner: Set the |repo| owner.
939 :param owner: Set the |repo| owner.
940 :type owner: str
940 :type owner: str
941 :param group: Set the |repo| group the |repo| belongs to.
941 :param group: Set the |repo| group the |repo| belongs to.
942 :type group: str
942 :type group: str
943 :param fork_of: Set the master |repo| name.
943 :param fork_of: Set the master |repo| name.
944 :type fork_of: str
944 :type fork_of: str
945 :param description: Update the |repo| description.
945 :param description: Update the |repo| description.
946 :type description: str
946 :type description: str
947 :param private: Set the |repo| as private. (True | False)
947 :param private: Set the |repo| as private. (True | False)
948 :type private: bool
948 :type private: bool
949 :param clone_uri: Update the |repo| clone URI.
949 :param clone_uri: Update the |repo| clone URI.
950 :type clone_uri: str
950 :type clone_uri: str
951 :param landing_rev: Set the |repo| landing revision. Default is
951 :param landing_rev: Set the |repo| landing revision. Default is
952 ``tip``.
952 ``tip``.
953 :type landing_rev: str
953 :type landing_rev: str
954 :param enable_statistics: Enable statistics on the |repo|,
954 :param enable_statistics: Enable statistics on the |repo|,
955 (True | False).
955 (True | False).
956 :type enable_statistics: bool
956 :type enable_statistics: bool
957 :param enable_locking: Enable |repo| locking.
957 :param enable_locking: Enable |repo| locking.
958 :type enable_locking: bool
958 :type enable_locking: bool
959 :param enable_downloads: Enable downloads from the |repo|,
959 :param enable_downloads: Enable downloads from the |repo|,
960 (True | False).
960 (True | False).
961 :type enable_downloads: bool
961 :type enable_downloads: bool
962 :param fields: Add extra fields to the |repo|. Use the following
962 :param fields: Add extra fields to the |repo|. Use the following
963 example format: ``field_key=field_val,field_key2=fieldval2``.
963 example format: ``field_key=field_val,field_key2=fieldval2``.
964 Escape ', ' with \,
964 Escape ', ' with \,
965 :type fields: str
965 :type fields: str
966
966
967
967
@@ -1,115 +1,115 b''
1 .. _server-methods-ref:
1 .. _server-methods-ref:
2
2
3 server methods
3 server methods
4 =================
4 ==============
5
5
6 get_ip
6 get_ip
7 ------
7 ------
8
8
9 .. py:function:: get_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
9 .. py:function:: get_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
10
10
11 Displays the IP Address as seen from the |RCE| server.
11 Displays the IP Address as seen from the |RCE| server.
12
12
13 * This command displays the IP Address, as well as all the defined IP
13 * This command displays the IP Address, as well as all the defined IP
14 addresses for the specified user. If the ``userid`` is not set, the
14 addresses for the specified user. If the ``userid`` is not set, the
15 data returned is for the user calling the method.
15 data returned is for the user calling the method.
16
16
17 This command can only be run using an |authtoken| with admin rights to
17 This command can only be run using an |authtoken| with admin rights to
18 the specified repository.
18 the specified repository.
19
19
20 This command takes the following options:
20 This command takes the following options:
21
21
22 :param apiuser: This is filled automatically from |authtoken|.
22 :param apiuser: This is filled automatically from |authtoken|.
23 :type apiuser: AuthUser
23 :type apiuser: AuthUser
24 :param userid: Sets the userid for which associated IP Address data
24 :param userid: Sets the userid for which associated IP Address data
25 is returned.
25 is returned.
26 :type userid: Optional(str or int)
26 :type userid: Optional(str or int)
27
27
28 Example output:
28 Example output:
29
29
30 .. code-block:: bash
30 .. code-block:: bash
31
31
32 id : <id_given_in_input>
32 id : <id_given_in_input>
33 result : {
33 result : {
34 "server_ip_addr": "<ip_from_clien>",
34 "server_ip_addr": "<ip_from_clien>",
35 "user_ips": [
35 "user_ips": [
36 {
36 {
37 "ip_addr": "<ip_with_mask>",
37 "ip_addr": "<ip_with_mask>",
38 "ip_range": ["<start_ip>", "<end_ip>"],
38 "ip_range": ["<start_ip>", "<end_ip>"],
39 },
39 },
40 ...
40 ...
41 ]
41 ]
42 }
42 }
43
43
44
44
45 get_server_info
45 get_server_info
46 ---------------
46 ---------------
47
47
48 .. py:function:: get_server_info(apiuser)
48 .. py:function:: get_server_info(apiuser)
49
49
50 Returns the |RCE| server information.
50 Returns the |RCE| server information.
51
51
52 This includes the running version of |RCE| and all installed
52 This includes the running version of |RCE| and all installed
53 packages. This command takes the following options:
53 packages. This command takes the following options:
54
54
55 :param apiuser: This is filled automatically from the |authtoken|.
55 :param apiuser: This is filled automatically from the |authtoken|.
56 :type apiuser: AuthUser
56 :type apiuser: AuthUser
57
57
58 Example output:
58 Example output:
59
59
60 .. code-block:: bash
60 .. code-block:: bash
61
61
62 id : <id_given_in_input>
62 id : <id_given_in_input>
63 result : {
63 result : {
64 'modules': [<module name>,...]
64 'modules': [<module name>,...]
65 'py_version': <python version>,
65 'py_version': <python version>,
66 'platform': <platform type>,
66 'platform': <platform type>,
67 'rhodecode_version': <rhodecode version>
67 'rhodecode_version': <rhodecode version>
68 }
68 }
69 error : null
69 error : null
70
70
71
71
72 rescan_repos
72 rescan_repos
73 ------------
73 ------------
74
74
75 .. py:function:: rescan_repos(apiuser, remove_obsolete=<Optional:False>)
75 .. py:function:: rescan_repos(apiuser, remove_obsolete=<Optional:False>)
76
76
77 Triggers a rescan of the specified repositories.
77 Triggers a rescan of the specified repositories.
78
78
79 * If the ``remove_obsolete`` option is set, it also deletes repositories
79 * If the ``remove_obsolete`` option is set, it also deletes repositories
80 that are found in the database but not on the file system, so called
80 that are found in the database but not on the file system, so called
81 "clean zombies".
81 "clean zombies".
82
82
83 This command can only be run using an |authtoken| with admin rights to
83 This command can only be run using an |authtoken| with admin rights to
84 the specified repository.
84 the specified repository.
85
85
86 This command takes the following options:
86 This command takes the following options:
87
87
88 :param apiuser: This is filled automatically from the |authtoken|.
88 :param apiuser: This is filled automatically from the |authtoken|.
89 :type apiuser: AuthUser
89 :type apiuser: AuthUser
90 :param remove_obsolete: Deletes repositories from the database that
90 :param remove_obsolete: Deletes repositories from the database that
91 are not found on the filesystem.
91 are not found on the filesystem.
92 :type remove_obsolete: Optional(``True`` | ``False``)
92 :type remove_obsolete: Optional(``True`` | ``False``)
93
93
94 Example output:
94 Example output:
95
95
96 .. code-block:: bash
96 .. code-block:: bash
97
97
98 id : <id_given_in_input>
98 id : <id_given_in_input>
99 result : {
99 result : {
100 'added': [<added repository name>,...]
100 'added': [<added repository name>,...]
101 'removed': [<removed repository name>,...]
101 'removed': [<removed repository name>,...]
102 }
102 }
103 error : null
103 error : null
104
104
105 Example error output:
105 Example error output:
106
106
107 .. code-block:: bash
107 .. code-block:: bash
108
108
109 id : <id_given_in_input>
109 id : <id_given_in_input>
110 result : null
110 result : null
111 error : {
111 error : {
112 'Error occurred during rescan repositories action'
112 'Error occurred during rescan repositories action'
113 }
113 }
114
114
115
115
@@ -1,406 +1,406 b''
1 .. _user-group-methods-ref:
1 .. _user-group-methods-ref:
2
2
3 user_group methods
3 user_group methods
4 =================
4 ==================
5
5
6 add_user_to_user_group
6 add_user_to_user_group
7 ----------------------
7 ----------------------
8
8
9 .. py:function:: add_user_to_user_group(apiuser, usergroupid, userid)
9 .. py:function:: add_user_to_user_group(apiuser, usergroupid, userid)
10
10
11 Adds a user to a `user group`. If the user already exists in the group
11 Adds a user to a `user group`. If the user already exists in the group
12 this command will return false.
12 this command will return false.
13
13
14 This command can only be run using an |authtoken| with admin rights to
14 This command can only be run using an |authtoken| with admin rights to
15 the specified user group.
15 the specified user group.
16
16
17 This command takes the following options:
17 This command takes the following options:
18
18
19 :param apiuser: This is filled automatically from the |authtoken|.
19 :param apiuser: This is filled automatically from the |authtoken|.
20 :type apiuser: AuthUser
20 :type apiuser: AuthUser
21 :param usergroupid: Set the name of the `user group` to which a
21 :param usergroupid: Set the name of the `user group` to which a
22 user will be added.
22 user will be added.
23 :type usergroupid: int
23 :type usergroupid: int
24 :param userid: Set the `user_id` of the user to add to the group.
24 :param userid: Set the `user_id` of the user to add to the group.
25 :type userid: int
25 :type userid: int
26
26
27 Example output:
27 Example output:
28
28
29 .. code-block:: bash
29 .. code-block:: bash
30
30
31 id : <id_given_in_input>
31 id : <id_given_in_input>
32 result : {
32 result : {
33 "success": True|False # depends on if member is in group
33 "success": True|False # depends on if member is in group
34 "msg": "added member `<username>` to user group `<groupname>` |
34 "msg": "added member `<username>` to user group `<groupname>` |
35 User is already in that group"
35 User is already in that group"
36
36
37 }
37 }
38 error : null
38 error : null
39
39
40 Example error output:
40 Example error output:
41
41
42 .. code-block:: bash
42 .. code-block:: bash
43
43
44 id : <id_given_in_input>
44 id : <id_given_in_input>
45 result : null
45 result : null
46 error : {
46 error : {
47 "failed to add member to user group `<user_group_name>`"
47 "failed to add member to user group `<user_group_name>`"
48 }
48 }
49
49
50
50
51 create_user_group
51 create_user_group
52 -----------------
52 -----------------
53
53
54 .. py:function:: create_user_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, active=<Optional:True>)
54 .. py:function:: create_user_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, active=<Optional:True>)
55
55
56 Creates a new user group.
56 Creates a new user group.
57
57
58 This command can only be run using an |authtoken| with admin rights to
58 This command can only be run using an |authtoken| with admin rights to
59 the specified repository.
59 the specified repository.
60
60
61 This command takes the following options:
61 This command takes the following options:
62
62
63 :param apiuser: This is filled automatically from the |authtoken|.
63 :param apiuser: This is filled automatically from the |authtoken|.
64 :type apiuser: AuthUser
64 :type apiuser: AuthUser
65 :param group_name: Set the name of the new user group.
65 :param group_name: Set the name of the new user group.
66 :type group_name: str
66 :type group_name: str
67 :param description: Give a description of the new user group.
67 :param description: Give a description of the new user group.
68 :type description: str
68 :type description: str
69 :param owner: Set the owner of the new user group.
69 :param owner: Set the owner of the new user group.
70 If not set, the owner is the |authtoken| user.
70 If not set, the owner is the |authtoken| user.
71 :type owner: Optional(str or int)
71 :type owner: Optional(str or int)
72 :param active: Set this group as active.
72 :param active: Set this group as active.
73 :type active: Optional(``True`` | ``False``)
73 :type active: Optional(``True`` | ``False``)
74
74
75 Example output:
75 Example output:
76
76
77 .. code-block:: bash
77 .. code-block:: bash
78
78
79 id : <id_given_in_input>
79 id : <id_given_in_input>
80 result: {
80 result: {
81 "msg": "created new user group `<groupname>`",
81 "msg": "created new user group `<groupname>`",
82 "user_group": <user_group_object>
82 "user_group": <user_group_object>
83 }
83 }
84 error: null
84 error: null
85
85
86 Example error output:
86 Example error output:
87
87
88 .. code-block:: bash
88 .. code-block:: bash
89
89
90 id : <id_given_in_input>
90 id : <id_given_in_input>
91 result : null
91 result : null
92 error : {
92 error : {
93 "user group `<group name>` already exist"
93 "user group `<group name>` already exist"
94 or
94 or
95 "failed to create group `<group name>`"
95 "failed to create group `<group name>`"
96 }
96 }
97
97
98
98
99 delete_user_group
99 delete_user_group
100 -----------------
100 -----------------
101
101
102 .. py:function:: delete_user_group(apiuser, usergroupid)
102 .. py:function:: delete_user_group(apiuser, usergroupid)
103
103
104 Deletes the specified `user group`.
104 Deletes the specified `user group`.
105
105
106 This command can only be run using an |authtoken| with admin rights to
106 This command can only be run using an |authtoken| with admin rights to
107 the specified repository.
107 the specified repository.
108
108
109 This command takes the following options:
109 This command takes the following options:
110
110
111 :param apiuser: filled automatically from apikey
111 :param apiuser: filled automatically from apikey
112 :type apiuser: AuthUser
112 :type apiuser: AuthUser
113 :param usergroupid:
113 :param usergroupid:
114 :type usergroupid: int
114 :type usergroupid: int
115
115
116 Example output:
116 Example output:
117
117
118 .. code-block:: bash
118 .. code-block:: bash
119
119
120 id : <id_given_in_input>
120 id : <id_given_in_input>
121 result : {
121 result : {
122 "msg": "deleted user group ID:<user_group_id> <user_group_name>"
122 "msg": "deleted user group ID:<user_group_id> <user_group_name>"
123 }
123 }
124 error : null
124 error : null
125
125
126 Example error output:
126 Example error output:
127
127
128 .. code-block:: bash
128 .. code-block:: bash
129
129
130 id : <id_given_in_input>
130 id : <id_given_in_input>
131 result : null
131 result : null
132 error : {
132 error : {
133 "failed to delete user group ID:<user_group_id> <user_group_name>"
133 "failed to delete user group ID:<user_group_id> <user_group_name>"
134 or
134 or
135 "RepoGroup assigned to <repo_groups_list>"
135 "RepoGroup assigned to <repo_groups_list>"
136 }
136 }
137
137
138
138
139 get_user_group
139 get_user_group
140 --------------
140 --------------
141
141
142 .. py:function:: get_user_group(apiuser, usergroupid)
142 .. py:function:: get_user_group(apiuser, usergroupid)
143
143
144 Returns the data of an existing user group.
144 Returns the data of an existing user group.
145
145
146 This command can only be run using an |authtoken| with admin rights to
146 This command can only be run using an |authtoken| with admin rights to
147 the specified repository.
147 the specified repository.
148
148
149 :param apiuser: This is filled automatically from the |authtoken|.
149 :param apiuser: This is filled automatically from the |authtoken|.
150 :type apiuser: AuthUser
150 :type apiuser: AuthUser
151 :param usergroupid: Set the user group from which to return data.
151 :param usergroupid: Set the user group from which to return data.
152 :type usergroupid: str or int
152 :type usergroupid: str or int
153
153
154 Example error output:
154 Example error output:
155
155
156 .. code-block:: bash
156 .. code-block:: bash
157
157
158 {
158 {
159 "error": null,
159 "error": null,
160 "id": <id>,
160 "id": <id>,
161 "result": {
161 "result": {
162 "active": true,
162 "active": true,
163 "group_description": "group description",
163 "group_description": "group description",
164 "group_name": "group name",
164 "group_name": "group name",
165 "members": [
165 "members": [
166 {
166 {
167 "name": "owner-name",
167 "name": "owner-name",
168 "origin": "owner",
168 "origin": "owner",
169 "permission": "usergroup.admin",
169 "permission": "usergroup.admin",
170 "type": "user"
170 "type": "user"
171 },
171 },
172 {
172 {
173 {
173 {
174 "name": "user name",
174 "name": "user name",
175 "origin": "permission",
175 "origin": "permission",
176 "permission": "usergroup.admin",
176 "permission": "usergroup.admin",
177 "type": "user"
177 "type": "user"
178 },
178 },
179 {
179 {
180 "name": "user group name",
180 "name": "user group name",
181 "origin": "permission",
181 "origin": "permission",
182 "permission": "usergroup.write",
182 "permission": "usergroup.write",
183 "type": "user_group"
183 "type": "user_group"
184 }
184 }
185 ],
185 ],
186 "owner": "owner name",
186 "owner": "owner name",
187 "users": [],
187 "users": [],
188 "users_group_id": 2
188 "users_group_id": 2
189 }
189 }
190 }
190 }
191
191
192
192
193 get_user_groups
193 get_user_groups
194 ---------------
194 ---------------
195
195
196 .. py:function:: get_user_groups(apiuser)
196 .. py:function:: get_user_groups(apiuser)
197
197
198 Lists all the existing user groups within RhodeCode.
198 Lists all the existing user groups within RhodeCode.
199
199
200 This command can only be run using an |authtoken| with admin rights to
200 This command can only be run using an |authtoken| with admin rights to
201 the specified repository.
201 the specified repository.
202
202
203 This command takes the following options:
203 This command takes the following options:
204
204
205 :param apiuser: This is filled automatically from the |authtoken|.
205 :param apiuser: This is filled automatically from the |authtoken|.
206 :type apiuser: AuthUser
206 :type apiuser: AuthUser
207
207
208 Example error output:
208 Example error output:
209
209
210 .. code-block:: bash
210 .. code-block:: bash
211
211
212 id : <id_given_in_input>
212 id : <id_given_in_input>
213 result : [<user_group_obj>,...]
213 result : [<user_group_obj>,...]
214 error : null
214 error : null
215
215
216
216
217 grant_user_group_permission_to_user_group
217 grant_user_group_permission_to_user_group
218 -----------------------------------------
218 -----------------------------------------
219
219
220 .. py:function:: grant_user_group_permission_to_user_group(apiuser, usergroupid, sourceusergroupid, perm)
220 .. py:function:: grant_user_group_permission_to_user_group(apiuser, usergroupid, sourceusergroupid, perm)
221
221
222 Give one user group permissions to another user group.
222 Give one user group permissions to another user group.
223
223
224 :param apiuser: This is filled automatically from the |authtoken|.
224 :param apiuser: This is filled automatically from the |authtoken|.
225 :type apiuser: AuthUser
225 :type apiuser: AuthUser
226 :param usergroupid: Set the user group on which to edit permissions.
226 :param usergroupid: Set the user group on which to edit permissions.
227 :type usergroupid: str or int
227 :type usergroupid: str or int
228 :param sourceusergroupid: Set the source user group to which
228 :param sourceusergroupid: Set the source user group to which
229 access/permissions will be granted.
229 access/permissions will be granted.
230 :type sourceusergroupid: str or int
230 :type sourceusergroupid: str or int
231 :param perm: (usergroup.(none|read|write|admin))
231 :param perm: (usergroup.(none|read|write|admin))
232 :type perm: str
232 :type perm: str
233
233
234 Example output:
234 Example output:
235
235
236 .. code-block:: bash
236 .. code-block:: bash
237
237
238 id : <id_given_in_input>
238 id : <id_given_in_input>
239 result : {
239 result : {
240 "msg": "Granted perm: `<perm_name>` for user group: `<source_user_group_name>` in user group: `<user_group_name>`",
240 "msg": "Granted perm: `<perm_name>` for user group: `<source_user_group_name>` in user group: `<user_group_name>`",
241 "success": true
241 "success": true
242 }
242 }
243 error : null
243 error : null
244
244
245
245
246 grant_user_permission_to_user_group
246 grant_user_permission_to_user_group
247 -----------------------------------
247 -----------------------------------
248
248
249 .. py:function:: grant_user_permission_to_user_group(apiuser, usergroupid, userid, perm)
249 .. py:function:: grant_user_permission_to_user_group(apiuser, usergroupid, userid, perm)
250
250
251 Set permissions for a user in a user group.
251 Set permissions for a user in a user group.
252
252
253 :param apiuser: This is filled automatically from the |authtoken|.
253 :param apiuser: This is filled automatically from the |authtoken|.
254 :type apiuser: AuthUser
254 :type apiuser: AuthUser
255 :param usergroupid: Set the user group to edit permissions on.
255 :param usergroupid: Set the user group to edit permissions on.
256 :type usergroupid: str or int
256 :type usergroupid: str or int
257 :param userid: Set the user from whom you wish to set permissions.
257 :param userid: Set the user from whom you wish to set permissions.
258 :type userid: str
258 :type userid: str
259 :param perm: (usergroup.(none|read|write|admin))
259 :param perm: (usergroup.(none|read|write|admin))
260 :type perm: str
260 :type perm: str
261
261
262 Example output:
262 Example output:
263
263
264 .. code-block:: bash
264 .. code-block:: bash
265
265
266 id : <id_given_in_input>
266 id : <id_given_in_input>
267 result : {
267 result : {
268 "msg": "Granted perm: `<perm_name>` for user: `<username>` in user group: `<user_group_name>`",
268 "msg": "Granted perm: `<perm_name>` for user: `<username>` in user group: `<user_group_name>`",
269 "success": true
269 "success": true
270 }
270 }
271 error : null
271 error : null
272
272
273
273
274 remove_user_from_user_group
274 remove_user_from_user_group
275 ---------------------------
275 ---------------------------
276
276
277 .. py:function:: remove_user_from_user_group(apiuser, usergroupid, userid)
277 .. py:function:: remove_user_from_user_group(apiuser, usergroupid, userid)
278
278
279 Removes a user from a user group.
279 Removes a user from a user group.
280
280
281 * If the specified user is not in the group, this command will return
281 * If the specified user is not in the group, this command will return
282 `false`.
282 `false`.
283
283
284 This command can only be run using an |authtoken| with admin rights to
284 This command can only be run using an |authtoken| with admin rights to
285 the specified user group.
285 the specified user group.
286
286
287 :param apiuser: This is filled automatically from the |authtoken|.
287 :param apiuser: This is filled automatically from the |authtoken|.
288 :type apiuser: AuthUser
288 :type apiuser: AuthUser
289 :param usergroupid: Sets the user group name.
289 :param usergroupid: Sets the user group name.
290 :type usergroupid: str or int
290 :type usergroupid: str or int
291 :param userid: The user you wish to remove from |RCE|.
291 :param userid: The user you wish to remove from |RCE|.
292 :type userid: str or int
292 :type userid: str or int
293
293
294 Example output:
294 Example output:
295
295
296 .. code-block:: bash
296 .. code-block:: bash
297
297
298 id : <id_given_in_input>
298 id : <id_given_in_input>
299 result: {
299 result: {
300 "success": True|False, # depends on if member is in group
300 "success": True|False, # depends on if member is in group
301 "msg": "removed member <username> from user group <groupname> |
301 "msg": "removed member <username> from user group <groupname> |
302 User wasn't in group"
302 User wasn't in group"
303 }
303 }
304 error: null
304 error: null
305
305
306
306
307 revoke_user_group_permission_from_user_group
307 revoke_user_group_permission_from_user_group
308 --------------------------------------------
308 --------------------------------------------
309
309
310 .. py:function:: revoke_user_group_permission_from_user_group(apiuser, usergroupid, sourceusergroupid)
310 .. py:function:: revoke_user_group_permission_from_user_group(apiuser, usergroupid, sourceusergroupid)
311
311
312 Revoke the permissions that one user group has to another.
312 Revoke the permissions that one user group has to another.
313
313
314 :param apiuser: This is filled automatically from the |authtoken|.
314 :param apiuser: This is filled automatically from the |authtoken|.
315 :type apiuser: AuthUser
315 :type apiuser: AuthUser
316 :param usergroupid: Set the user group on which to edit permissions.
316 :param usergroupid: Set the user group on which to edit permissions.
317 :type usergroupid: str or int
317 :type usergroupid: str or int
318 :param sourceusergroupid: Set the user group from which permissions
318 :param sourceusergroupid: Set the user group from which permissions
319 are revoked.
319 are revoked.
320 :type sourceusergroupid: str or int
320 :type sourceusergroupid: str or int
321
321
322 Example output:
322 Example output:
323
323
324 .. code-block:: bash
324 .. code-block:: bash
325
325
326 id : <id_given_in_input>
326 id : <id_given_in_input>
327 result : {
327 result : {
328 "msg": "Revoked perm for user group: `<user_group_name>` in user group: `<target_user_group_name>`",
328 "msg": "Revoked perm for user group: `<user_group_name>` in user group: `<target_user_group_name>`",
329 "success": true
329 "success": true
330 }
330 }
331 error : null
331 error : null
332
332
333
333
334 revoke_user_permission_from_user_group
334 revoke_user_permission_from_user_group
335 --------------------------------------
335 --------------------------------------
336
336
337 .. py:function:: revoke_user_permission_from_user_group(apiuser, usergroupid, userid)
337 .. py:function:: revoke_user_permission_from_user_group(apiuser, usergroupid, userid)
338
338
339 Revoke a users permissions in a user group.
339 Revoke a users permissions in a user group.
340
340
341 :param apiuser: This is filled automatically from the |authtoken|.
341 :param apiuser: This is filled automatically from the |authtoken|.
342 :type apiuser: AuthUser
342 :type apiuser: AuthUser
343 :param usergroupid: Set the user group from which to revoke the user
343 :param usergroupid: Set the user group from which to revoke the user
344 permissions.
344 permissions.
345 :type: usergroupid: str or int
345 :type: usergroupid: str or int
346 :param userid: Set the userid of the user whose permissions will be
346 :param userid: Set the userid of the user whose permissions will be
347 revoked.
347 revoked.
348 :type userid: str
348 :type userid: str
349
349
350 Example output:
350 Example output:
351
351
352 .. code-block:: bash
352 .. code-block:: bash
353
353
354 id : <id_given_in_input>
354 id : <id_given_in_input>
355 result : {
355 result : {
356 "msg": "Revoked perm for user: `<username>` in user group: `<user_group_name>`",
356 "msg": "Revoked perm for user: `<username>` in user group: `<user_group_name>`",
357 "success": true
357 "success": true
358 }
358 }
359 error : null
359 error : null
360
360
361
361
362 update_user_group
362 update_user_group
363 -----------------
363 -----------------
364
364
365 .. py:function:: update_user_group(apiuser, usergroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:None>, active=<Optional:True>)
365 .. py:function:: update_user_group(apiuser, usergroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:None>, active=<Optional:True>)
366
366
367 Updates the specified `user group` with the details provided.
367 Updates the specified `user group` with the details provided.
368
368
369 This command can only be run using an |authtoken| with admin rights to
369 This command can only be run using an |authtoken| with admin rights to
370 the specified repository.
370 the specified repository.
371
371
372 :param apiuser: This is filled automatically from the |authtoken|.
372 :param apiuser: This is filled automatically from the |authtoken|.
373 :type apiuser: AuthUser
373 :type apiuser: AuthUser
374 :param usergroupid: Set the id of the `user group` to update.
374 :param usergroupid: Set the id of the `user group` to update.
375 :type usergroupid: str or int
375 :type usergroupid: str or int
376 :param group_name: Set the new name the `user group`
376 :param group_name: Set the new name the `user group`
377 :type group_name: str
377 :type group_name: str
378 :param description: Give a description for the `user group`
378 :param description: Give a description for the `user group`
379 :type description: str
379 :type description: str
380 :param owner: Set the owner of the `user group`.
380 :param owner: Set the owner of the `user group`.
381 :type owner: Optional(str or int)
381 :type owner: Optional(str or int)
382 :param active: Set the group as active.
382 :param active: Set the group as active.
383 :type active: Optional(``True`` | ``False``)
383 :type active: Optional(``True`` | ``False``)
384
384
385 Example output:
385 Example output:
386
386
387 .. code-block:: bash
387 .. code-block:: bash
388
388
389 id : <id_given_in_input>
389 id : <id_given_in_input>
390 result : {
390 result : {
391 "msg": 'updated user group ID:<user group id> <user group name>',
391 "msg": 'updated user group ID:<user group id> <user group name>',
392 "user_group": <user_group_object>
392 "user_group": <user_group_object>
393 }
393 }
394 error : null
394 error : null
395
395
396 Example error output:
396 Example error output:
397
397
398 .. code-block:: bash
398 .. code-block:: bash
399
399
400 id : <id_given_in_input>
400 id : <id_given_in_input>
401 result : null
401 result : null
402 error : {
402 error : {
403 "failed to update user group `<user group name>`"
403 "failed to update user group `<user group name>`"
404 }
404 }
405
405
406
406
@@ -1,295 +1,295 b''
1 .. _user-methods-ref:
1 .. _user-methods-ref:
2
2
3 user methods
3 user methods
4 =================
4 ============
5
5
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>)
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
13 This command can only be run using an |authtoken| with admin rights to
13 This command can only be run using an |authtoken| with admin rights to
14 the specified repository.
14 the specified repository.
15
15
16 This command takes the following options:
16 This command takes the following options:
17
17
18 :param apiuser: This is filled automatically from the |authtoken|.
18 :param apiuser: This is filled automatically from the |authtoken|.
19 :type apiuser: AuthUser
19 :type apiuser: AuthUser
20 :param username: Set the new username.
20 :param username: Set the new username.
21 :type username: str or int
21 :type username: str or int
22 :param email: Set the user email address.
22 :param email: Set the user email address.
23 :type email: str
23 :type email: str
24 :param password: Set the new user password.
24 :param password: Set the new user password.
25 :type password: Optional(str)
25 :type password: Optional(str)
26 :param firstname: Set the new user firstname.
26 :param firstname: Set the new user firstname.
27 :type firstname: Optional(str)
27 :type firstname: Optional(str)
28 :param lastname: Set the new user surname.
28 :param lastname: Set the new user surname.
29 :type lastname: Optional(str)
29 :type lastname: Optional(str)
30 :param active: Set the user as active.
30 :param active: Set the user as active.
31 :type active: Optional(``True`` | ``False``)
31 :type active: Optional(``True`` | ``False``)
32 :param admin: Give the new user admin rights.
32 :param admin: Give the new user admin rights.
33 :type admin: Optional(``True`` | ``False``)
33 :type admin: Optional(``True`` | ``False``)
34 :param extern_name: Set the authentication plugin name.
34 :param extern_name: Set the authentication plugin name.
35 Using LDAP this is filled with LDAP UID.
35 Using LDAP this is filled with LDAP UID.
36 :type extern_name: Optional(str)
36 :type extern_name: Optional(str)
37 :param extern_type: Set the new user authentication plugin.
37 :param extern_type: Set the new user authentication plugin.
38 :type extern_type: Optional(str)
38 :type extern_type: Optional(str)
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
43 Example output:
43 Example output:
44
44
45 .. code-block:: bash
45 .. code-block:: bash
46
46
47 id : <id_given_in_input>
47 id : <id_given_in_input>
48 result: {
48 result: {
49 "msg" : "created new user `<username>`",
49 "msg" : "created new user `<username>`",
50 "user": <user_obj>
50 "user": <user_obj>
51 }
51 }
52 error: null
52 error: null
53
53
54 Example error output:
54 Example error output:
55
55
56 .. code-block:: bash
56 .. code-block:: bash
57
57
58 id : <id_given_in_input>
58 id : <id_given_in_input>
59 result : null
59 result : null
60 error : {
60 error : {
61 "user `<username>` already exist"
61 "user `<username>` already exist"
62 or
62 or
63 "email `<email>` already exist"
63 "email `<email>` already exist"
64 or
64 or
65 "failed to create user `<username>`"
65 "failed to create user `<username>`"
66 }
66 }
67
67
68
68
69 delete_user
69 delete_user
70 -----------
70 -----------
71
71
72 .. py:function:: delete_user(apiuser, userid)
72 .. py:function:: delete_user(apiuser, userid)
73
73
74 Deletes the specified user from the |RCE| user database.
74 Deletes the specified user from the |RCE| user database.
75
75
76 This command can only be run using an |authtoken| with admin rights to
76 This command can only be run using an |authtoken| with admin rights to
77 the specified repository.
77 the specified repository.
78
78
79 .. important::
79 .. important::
80
80
81 Ensure all open pull requests and open code review
81 Ensure all open pull requests and open code review
82 requests to this user are close.
82 requests to this user are close.
83
83
84 Also ensure all repositories, or repository groups owned by this
84 Also ensure all repositories, or repository groups owned by this
85 user are reassigned before deletion.
85 user are reassigned before deletion.
86
86
87 This command takes the following options:
87 This command takes the following options:
88
88
89 :param apiuser: This is filled automatically from the |authtoken|.
89 :param apiuser: This is filled automatically from the |authtoken|.
90 :type apiuser: AuthUser
90 :type apiuser: AuthUser
91 :param userid: Set the user to delete.
91 :param userid: Set the user to delete.
92 :type userid: str or int
92 :type userid: str or int
93
93
94 Example output:
94 Example output:
95
95
96 .. code-block:: bash
96 .. code-block:: bash
97
97
98 id : <id_given_in_input>
98 id : <id_given_in_input>
99 result: {
99 result: {
100 "msg" : "deleted user ID:<userid> <username>",
100 "msg" : "deleted user ID:<userid> <username>",
101 "user": null
101 "user": null
102 }
102 }
103 error: null
103 error: null
104
104
105 Example error output:
105 Example error output:
106
106
107 .. code-block:: bash
107 .. code-block:: bash
108
108
109 id : <id_given_in_input>
109 id : <id_given_in_input>
110 result : null
110 result : null
111 error : {
111 error : {
112 "failed to delete user ID:<userid> <username>"
112 "failed to delete user ID:<userid> <username>"
113 }
113 }
114
114
115
115
116 get_user
116 get_user
117 --------
117 --------
118
118
119 .. py:function:: get_user(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
119 .. py:function:: get_user(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
120
120
121 Returns the information associated with a username or userid.
121 Returns the information associated with a username or userid.
122
122
123 * If the ``userid`` is not set, this command returns the information
123 * If the ``userid`` is not set, this command returns the information
124 for the ``userid`` calling the method.
124 for the ``userid`` calling the method.
125
125
126 .. note::
126 .. note::
127
127
128 Normal users may only run this command against their ``userid``. For
128 Normal users may only run this command against their ``userid``. For
129 full privileges you must run this command using an |authtoken| with
129 full privileges you must run this command using an |authtoken| with
130 admin rights.
130 admin rights.
131
131
132 :param apiuser: This is filled automatically from the |authtoken|.
132 :param apiuser: This is filled automatically from the |authtoken|.
133 :type apiuser: AuthUser
133 :type apiuser: AuthUser
134 :param userid: Sets the userid for which data will be returned.
134 :param userid: Sets the userid for which data will be returned.
135 :type userid: Optional(str or int)
135 :type userid: Optional(str or int)
136
136
137 Example output:
137 Example output:
138
138
139 .. code-block:: bash
139 .. code-block:: bash
140
140
141 {
141 {
142 "error": null,
142 "error": null,
143 "id": <id>,
143 "id": <id>,
144 "result": {
144 "result": {
145 "active": true,
145 "active": true,
146 "admin": false,
146 "admin": false,
147 "api_key": "api-key",
147 "api_key": "api-key",
148 "api_keys": [ list of keys ],
148 "api_keys": [ list of keys ],
149 "email": "user@example.com",
149 "email": "user@example.com",
150 "emails": [
150 "emails": [
151 "user@example.com"
151 "user@example.com"
152 ],
152 ],
153 "extern_name": "rhodecode",
153 "extern_name": "rhodecode",
154 "extern_type": "rhodecode",
154 "extern_type": "rhodecode",
155 "firstname": "username",
155 "firstname": "username",
156 "ip_addresses": [],
156 "ip_addresses": [],
157 "language": null,
157 "language": null,
158 "last_login": "Timestamp",
158 "last_login": "Timestamp",
159 "lastname": "surnae",
159 "lastname": "surnae",
160 "permissions": {
160 "permissions": {
161 "global": [
161 "global": [
162 "hg.inherit_default_perms.true",
162 "hg.inherit_default_perms.true",
163 "usergroup.read",
163 "usergroup.read",
164 "hg.repogroup.create.false",
164 "hg.repogroup.create.false",
165 "hg.create.none",
165 "hg.create.none",
166 "hg.extern_activate.manual",
166 "hg.extern_activate.manual",
167 "hg.create.write_on_repogroup.false",
167 "hg.create.write_on_repogroup.false",
168 "hg.usergroup.create.false",
168 "hg.usergroup.create.false",
169 "group.none",
169 "group.none",
170 "repository.none",
170 "repository.none",
171 "hg.register.none",
171 "hg.register.none",
172 "hg.fork.repository"
172 "hg.fork.repository"
173 ],
173 ],
174 "repositories": { "username/example": "repository.write"},
174 "repositories": { "username/example": "repository.write"},
175 "repositories_groups": { "user-group/repo": "group.none" },
175 "repositories_groups": { "user-group/repo": "group.none" },
176 "user_groups": { "user_group_name": "usergroup.read" }
176 "user_groups": { "user_group_name": "usergroup.read" }
177 },
177 },
178 "user_id": 32,
178 "user_id": 32,
179 "username": "username"
179 "username": "username"
180 }
180 }
181 }
181 }
182
182
183
183
184 get_user_locks
184 get_user_locks
185 --------------
185 --------------
186
186
187 .. py:function:: get_user_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
187 .. py:function:: get_user_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
188
188
189 Displays all repositories locked by the specified user.
189 Displays all repositories locked by the specified user.
190
190
191 * If this command is run by a non-admin user, it returns
191 * If this command is run by a non-admin user, it returns
192 a list of |repos| locked by that user.
192 a list of |repos| locked by that user.
193
193
194 This command takes the following options:
194 This command takes the following options:
195
195
196 :param apiuser: This is filled automatically from the |authtoken|.
196 :param apiuser: This is filled automatically from the |authtoken|.
197 :type apiuser: AuthUser
197 :type apiuser: AuthUser
198 :param userid: Sets the userid whose list of locked |repos| will be
198 :param userid: Sets the userid whose list of locked |repos| will be
199 displayed.
199 displayed.
200 :type userid: Optional(str or int)
200 :type userid: Optional(str or int)
201
201
202 Example output:
202 Example output:
203
203
204 .. code-block:: bash
204 .. code-block:: bash
205
205
206 id : <id_given_in_input>
206 id : <id_given_in_input>
207 result : {
207 result : {
208 [repo_object, repo_object,...]
208 [repo_object, repo_object,...]
209 }
209 }
210 error : null
210 error : null
211
211
212
212
213 get_users
213 get_users
214 ---------
214 ---------
215
215
216 .. py:function:: get_users(apiuser)
216 .. py:function:: get_users(apiuser)
217
217
218 Lists all users in the |RCE| user database.
218 Lists all users in the |RCE| user database.
219
219
220 This command can only be run using an |authtoken| with admin rights to
220 This command can only be run using an |authtoken| with admin rights to
221 the specified repository.
221 the specified repository.
222
222
223 This command takes the following options:
223 This command takes the following options:
224
224
225 :param apiuser: This is filled automatically from the |authtoken|.
225 :param apiuser: This is filled automatically from the |authtoken|.
226 :type apiuser: AuthUser
226 :type apiuser: AuthUser
227
227
228 Example output:
228 Example output:
229
229
230 .. code-block:: bash
230 .. code-block:: bash
231
231
232 id : <id_given_in_input>
232 id : <id_given_in_input>
233 result: [<user_object>, ...]
233 result: [<user_object>, ...]
234 error: null
234 error: null
235
235
236
236
237 update_user
237 update_user
238 -----------
238 -----------
239
239
240 .. py:function:: update_user(apiuser, userid, username=<Optional:None>, email=<Optional:None>, password=<Optional:None>, firstname=<Optional:None>, lastname=<Optional:None>, active=<Optional:None>, admin=<Optional:None>, extern_type=<Optional:None>, extern_name=<Optional:None>)
240 .. py:function:: update_user(apiuser, userid, username=<Optional:None>, email=<Optional:None>, password=<Optional:None>, firstname=<Optional:None>, lastname=<Optional:None>, active=<Optional:None>, admin=<Optional:None>, extern_type=<Optional:None>, extern_name=<Optional:None>)
241
241
242 Updates the details for the specified user, if that user exists.
242 Updates the details for the specified user, if that user exists.
243
243
244 This command can only be run using an |authtoken| with admin rights to
244 This command can only be run using an |authtoken| with admin rights to
245 the specified repository.
245 the specified repository.
246
246
247 This command takes the following options:
247 This command takes the following options:
248
248
249 :param apiuser: This is filled automatically from |authtoken|.
249 :param apiuser: This is filled automatically from |authtoken|.
250 :type apiuser: AuthUser
250 :type apiuser: AuthUser
251 :param userid: Set the ``userid`` to update.
251 :param userid: Set the ``userid`` to update.
252 :type userid: str or int
252 :type userid: str or int
253 :param username: Set the new username.
253 :param username: Set the new username.
254 :type username: str or int
254 :type username: str or int
255 :param email: Set the new email.
255 :param email: Set the new email.
256 :type email: str
256 :type email: str
257 :param password: Set the new password.
257 :param password: Set the new password.
258 :type password: Optional(str)
258 :type password: Optional(str)
259 :param firstname: Set the new first name.
259 :param firstname: Set the new first name.
260 :type firstname: Optional(str)
260 :type firstname: Optional(str)
261 :param lastname: Set the new surname.
261 :param lastname: Set the new surname.
262 :type lastname: Optional(str)
262 :type lastname: Optional(str)
263 :param active: Set the new user as active.
263 :param active: Set the new user as active.
264 :type active: Optional(``True`` | ``False``)
264 :type active: Optional(``True`` | ``False``)
265 :param admin: Give the user admin rights.
265 :param admin: Give the user admin rights.
266 :type admin: Optional(``True`` | ``False``)
266 :type admin: Optional(``True`` | ``False``)
267 :param extern_name: Set the authentication plugin user name.
267 :param extern_name: Set the authentication plugin user name.
268 Using LDAP this is filled with LDAP UID.
268 Using LDAP this is filled with LDAP UID.
269 :type extern_name: Optional(str)
269 :type extern_name: Optional(str)
270 :param extern_type: Set the authentication plugin type.
270 :param extern_type: Set the authentication plugin type.
271 :type extern_type: Optional(str)
271 :type extern_type: Optional(str)
272
272
273
273
274 Example output:
274 Example output:
275
275
276 .. code-block:: bash
276 .. code-block:: bash
277
277
278 id : <id_given_in_input>
278 id : <id_given_in_input>
279 result: {
279 result: {
280 "msg" : "updated user ID:<userid> <username>",
280 "msg" : "updated user ID:<userid> <username>",
281 "user": <user_object>,
281 "user": <user_object>,
282 }
282 }
283 error: null
283 error: null
284
284
285 Example error output:
285 Example error output:
286
286
287 .. code-block:: bash
287 .. code-block:: bash
288
288
289 id : <id_given_in_input>
289 id : <id_given_in_input>
290 result : null
290 result : null
291 error : {
291 error : {
292 "failed to update user `<username>`"
292 "failed to update user `<username>`"
293 }
293 }
294
294
295
295
General Comments 0
You need to be logged in to leave comments. Login now