##// END OF EJS Templates
docs: updated API documentation.
marcink -
r2508:94401909 default
parent child Browse files
Show More
@@ -38,13 +38,13 b' changeset_comment'
38
38
39 Example error output:
39 Example error output:
40
40
41 .. code-block:: javascript
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
@@ -6,7 +6,7 b' pull_request methods'
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>>, message=<Optional:''>)
9 .. py:function:: close_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>, message=<Optional:''>)
10
10
11 Close the pull request specified by `pullrequestid`.
11 Close the pull request specified by `pullrequestid`.
12
12
@@ -39,7 +39,7 b' close_pull_request'
39 comment_pull_request
39 comment_pull_request
40 --------------------
40 --------------------
41
41
42 .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, commit_id=<Optional:None>, status=<Optional:None>, comment_type=<Optional:u'note'>, resolves_comment_id=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
42 .. py:function:: comment_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, message=<Optional:None>, commit_id=<Optional:None>, status=<Optional:None>, comment_type=<Optional:u'note'>, resolves_comment_id=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
43
43
44 Comment on the pull request specified with the `pullrequestid`,
44 Comment on the pull request specified with the `pullrequestid`,
45 in the |repo| specified by the `repoid`, and optionally change the
45 in the |repo| specified by the `repoid`, and optionally change the
@@ -47,7 +47,7 b' comment_pull_request'
47
47
48 :param apiuser: This is filled automatically from the |authtoken|.
48 :param apiuser: This is filled automatically from the |authtoken|.
49 :type apiuser: AuthUser
49 :type apiuser: AuthUser
50 :param repoid: The repository name or repository ID.
50 :param repoid: Optional repository name or repository ID.
51 :type repoid: str or int
51 :type repoid: str or int
52 :param pullrequestid: The pull request ID.
52 :param pullrequestid: The pull request ID.
53 :type pullrequestid: int
53 :type pullrequestid: int
@@ -120,14 +120,14 b' create_pull_request'
120 get_pull_request
120 get_pull_request
121 ----------------
121 ----------------
122
122
123 .. py:function:: get_pull_request(apiuser, repoid, pullrequestid)
123 .. py:function:: get_pull_request(apiuser, pullrequestid, repoid=<Optional:None>)
124
124
125 Get a pull request based on the given ID.
125 Get a pull request based on the given ID.
126
126
127 :param apiuser: This is filled automatically from the |authtoken|.
127 :param apiuser: This is filled automatically from the |authtoken|.
128 :type apiuser: AuthUser
128 :type apiuser: AuthUser
129 :param repoid: Repository name or repository ID from where the pull
129 :param repoid: Optional, repository name or repository ID from where
130 request was opened.
130 the pull request was opened.
131 :type repoid: str or int
131 :type repoid: str or int
132 :param pullrequestid: ID of the requested pull request.
132 :param pullrequestid: ID of the requested pull request.
133 :type pullrequestid: int
133 :type pullrequestid: int
@@ -199,6 +199,48 b' get_pull_request'
199 "error": null
199 "error": null
200
200
201
201
202 get_pull_request_comments
203 -------------------------
204
205 .. py:function:: get_pull_request_comments(apiuser, pullrequestid, repoid=<Optional:None>)
206
207 Get all comments of pull request specified with the `pullrequestid`
208
209 :param apiuser: This is filled automatically from the |authtoken|.
210 :type apiuser: AuthUser
211 :param repoid: Optional repository name or repository ID.
212 :type repoid: str or int
213 :param pullrequestid: The pull request ID.
214 :type pullrequestid: int
215
216 Example output:
217
218 .. code-block:: bash
219
220 id : <id_given_in_input>
221 result : [
222 {
223 "comment_author": {
224 "active": true,
225 "full_name_or_username": "Tom Gore",
226 "username": "admin"
227 },
228 "comment_created_on": "2017-01-02T18:43:45.533",
229 "comment_f_path": null,
230 "comment_id": 25,
231 "comment_lineno": null,
232 "comment_status": {
233 "status": "under_review",
234 "status_lbl": "Under Review"
235 },
236 "comment_text": "Example text",
237 "comment_type": null,
238 "pull_request_version": null
239 }
240 ],
241 error : null
242
243
202 get_pull_requests
244 get_pull_requests
203 -----------------
245 -----------------
204
246
@@ -208,7 +250,7 b' get_pull_requests'
208
250
209 :param apiuser: This is filled automatically from the |authtoken|.
251 :param apiuser: This is filled automatically from the |authtoken|.
210 :type apiuser: AuthUser
252 :type apiuser: AuthUser
211 :param repoid: Repository name or repository ID.
253 :param repoid: Optional repository name or repository ID.
212 :type repoid: str or int
254 :type repoid: str or int
213 :param status: Only return pull requests with the specified status.
255 :param status: Only return pull requests with the specified status.
214 Valid options are.
256 Valid options are.
@@ -289,14 +331,14 b' get_pull_requests'
289 merge_pull_request
331 merge_pull_request
290 ------------------
332 ------------------
291
333
292 .. py:function:: merge_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>)
334 .. py:function:: merge_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
293
335
294 Merge the pull request specified by `pullrequestid` into its target
336 Merge the pull request specified by `pullrequestid` into its target
295 repository.
337 repository.
296
338
297 :param apiuser: This is filled automatically from the |authtoken|.
339 :param apiuser: This is filled automatically from the |authtoken|.
298 :type apiuser: AuthUser
340 :type apiuser: AuthUser
299 :param repoid: The Repository name or repository ID of the
341 :param repoid: Optional, repository name or repository ID of the
300 target repository to which the |pr| is to be merged.
342 target repository to which the |pr| is to be merged.
301 :type repoid: str or int
343 :type repoid: str or int
302 :param pullrequestid: ID of the pull request which shall be merged.
344 :param pullrequestid: ID of the pull request which shall be merged.
@@ -326,13 +368,13 b' merge_pull_request'
326 update_pull_request
368 update_pull_request
327 -------------------
369 -------------------
328
370
329 .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>)
371 .. py:function:: update_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>)
330
372
331 Updates a pull request.
373 Updates a pull request.
332
374
333 :param apiuser: This is filled automatically from the |authtoken|.
375 :param apiuser: This is filled automatically from the |authtoken|.
334 :type apiuser: AuthUser
376 :type apiuser: AuthUser
335 :param repoid: The repository name or repository ID.
377 :param repoid: Optional repository name or repository ID.
336 :type repoid: str or int
378 :type repoid: str or int
337 :param pullrequestid: The pull request ID.
379 :param pullrequestid: The pull request ID.
338 :type pullrequestid: int
380 :type pullrequestid: int
@@ -115,7 +115,7 b' get_repo_group'
115 "group_description": "repo group description",
115 "group_description": "repo group description",
116 "group_id": 14,
116 "group_id": 14,
117 "group_name": "group name",
117 "group_name": "group name",
118 "members": [
118 "permissions": [
119 {
119 {
120 "name": "super-admin-username",
120 "name": "super-admin-username",
121 "origin": "super-admin",
121 "origin": "super-admin",
@@ -306,26 +306,6 b' get_repo'
306 "lock_reason": null,
306 "lock_reason": null,
307 "locked_by": null,
307 "locked_by": null,
308 "locked_date": null,
308 "locked_date": null,
309 "members": [
310 {
311 "name": "super-admin-name",
312 "origin": "super-admin",
313 "permission": "repository.admin",
314 "type": "user"
315 },
316 {
317 "name": "owner-name",
318 "origin": "owner",
319 "permission": "repository.admin",
320 "type": "user"
321 },
322 {
323 "name": "user-group-name",
324 "origin": "permission",
325 "permission": "repository.write",
326 "type": "user_group"
327 }
328 ],
329 "owner": "owner-name",
309 "owner": "owner-name",
330 "permissions": [
310 "permissions": [
331 {
311 {
@@ -533,9 +513,6 b' get_repo_settings'
533 "hooks_outgoing_pull_logger": true,
513 "hooks_outgoing_pull_logger": true,
534 "phases_publish": "True",
514 "phases_publish": "True",
535 "rhodecode_hg_use_rebase_for_merging": true,
515 "rhodecode_hg_use_rebase_for_merging": true,
536 "rhodecode_hg_close_branch_before_merging": false,
537 "rhodecode_git_use_rebase_for_merging": true,
538 "rhodecode_git_close_branch_before_merging": false,
539 "rhodecode_pr_merge_enabled": true,
516 "rhodecode_pr_merge_enabled": true,
540 "rhodecode_use_outdated_comments": true
517 "rhodecode_use_outdated_comments": true
541 }
518 }
@@ -162,7 +162,7 b' get_user_group'
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 "permissions": [
166 {
166 {
167 "name": "owner-name",
167 "name": "owner-name",
168 "origin": "owner",
168 "origin": "owner",
@@ -183,6 +183,12 b' get_user_group'
183 "type": "user_group"
183 "type": "user_group"
184 }
184 }
185 ],
185 ],
186 "permissions_summary": {
187 "repositories": {
188 "aa-root-level-repo-1": "repository.admin"
189 },
190 "repositories_groups": {}
191 },
186 "owner": "owner name",
192 "owner": "owner name",
187 "users": [],
193 "users": [],
188 "users_group_id": 2
194 "users_group_id": 2
@@ -160,7 +160,8 b' get_user'
160 "last_login": "Timestamp",
160 "last_login": "Timestamp",
161 "last_activity": "Timestamp",
161 "last_activity": "Timestamp",
162 "lastname": "surnae",
162 "lastname": "surnae",
163 "permissions": {
163 "permissions": <deprecated>,
164 "permissions_summary": {
164 "global": [
165 "global": [
165 "hg.inherit_default_perms.true",
166 "hg.inherit_default_perms.true",
166 "usergroup.read",
167 "usergroup.read",
@@ -178,7 +179,7 b' get_user'
178 "repositories": { "username/example": "repository.write"},
179 "repositories": { "username/example": "repository.write"},
179 "repositories_groups": { "user-group/repo": "group.none" },
180 "repositories_groups": { "user-group/repo": "group.none" },
180 "user_groups": { "user_group_name": "usergroup.read" }
181 "user_groups": { "user_group_name": "usergroup.read" }
181 },
182 }
182 "user_id": 32,
183 "user_id": 32,
183 "username": "username"
184 "username": "username"
184 }
185 }
General Comments 0
You need to be logged in to leave comments. Login now