Show More
@@ -24,13 +24,12 b' close_pull_request' | |||
|
24 | 24 | |
|
25 | 25 | .. code-block:: bash |
|
26 | 26 | |
|
27 | "id": <id_given_in_input>, | |
|
28 | "result": | |
|
29 | { | |
|
27 | "id": <id_given_in_input>, | |
|
28 | "result": { | |
|
30 | 29 | "pull_request_id": "<int>", |
|
31 | 30 | "closed": "<bool>" |
|
32 | 31 | }, |
|
33 | "error": null | |
|
32 | "error": null | |
|
34 | 33 | |
|
35 | 34 | |
|
36 | 35 | comment_pull_request |
@@ -67,15 +66,14 b' comment_pull_request' | |||
|
67 | 66 | |
|
68 | 67 | .. code-block:: bash |
|
69 | 68 | |
|
70 | id : <id_given_in_input> | |
|
71 | result : | |
|
72 | { | |
|
69 | id : <id_given_in_input> | |
|
70 | result : { | |
|
73 | 71 | "pull_request_id": "<Integer>", |
|
74 | 72 | "comment_id": "<Integer>", |
|
75 | 73 | "status": {"given": <given_status>, |
|
76 | 74 | "was_changed": <bool status_was_actually_changed> }, |
|
77 | } | |
|
78 | error : null | |
|
75 | }, | |
|
76 | error : null | |
|
79 | 77 | |
|
80 | 78 | |
|
81 | 79 | create_pull_request |
@@ -109,9 +107,8 b' create_pull_request' | |||
|
109 | 107 | :param reviewers: Set the new pull request reviewers list. |
|
110 | 108 | :type reviewers: Optional(list) |
|
111 | 109 | Accepts username strings or objects of the format: |
|
112 | { | |
|
113 | 'username': 'nick', 'reasons': ['original author'] | |
|
114 | } | |
|
110 | ||
|
111 | {'username': 'nick', 'reasons': ['original author']} | |
|
115 | 112 | |
|
116 | 113 | |
|
117 | 114 | get_pull_request |
@@ -305,9 +302,8 b' merge_pull_request' | |||
|
305 | 302 | |
|
306 | 303 | .. code-block:: bash |
|
307 | 304 | |
|
308 | "id": <id_given_in_input>, | |
|
309 | "result": | |
|
310 | { | |
|
305 | "id": <id_given_in_input>, | |
|
306 | "result": { | |
|
311 | 307 | "executed": "<bool>", |
|
312 | 308 | "failure_reason": "<int>", |
|
313 | 309 | "merge_commit_id": "<merge_commit_id>", |
@@ -318,7 +314,7 b' merge_pull_request' | |||
|
318 | 314 | "name": "<name>" |
|
319 | 315 | } |
|
320 | 316 | }, |
|
321 | "error": null | |
|
317 | "error": null | |
|
322 | 318 | |
|
323 | 319 | |
|
324 | 320 | update_pull_request |
@@ -349,9 +345,8 b' update_pull_request' | |||
|
349 | 345 | |
|
350 | 346 | .. code-block:: bash |
|
351 | 347 | |
|
352 | id : <id_given_in_input> | |
|
353 | result : | |
|
354 | { | |
|
348 | id : <id_given_in_input> | |
|
349 | result : { | |
|
355 | 350 | "msg": "Updated pull request `63`", |
|
356 | 351 | "pull_request": <pull_request_object>, |
|
357 | 352 | "updated_reviewers": { |
@@ -371,6 +366,6 b' update_pull_request' | |||
|
371 | 366 | "removed": [] |
|
372 | 367 | } |
|
373 | 368 | } |
|
374 | error : null | |
|
369 | error : null | |
|
375 | 370 | |
|
376 | 371 |
@@ -85,6 +85,58 b' get_ip' | |||
|
85 | 85 | } |
|
86 | 86 | |
|
87 | 87 | |
|
88 | get_method | |
|
89 | ---------- | |
|
90 | ||
|
91 | .. py:function:: get_method(apiuser, pattern=<Optional:'*'>) | |
|
92 | ||
|
93 | Returns list of all available API methods. By default match pattern | |
|
94 | os "*" but any other pattern can be specified. eg *comment* will return | |
|
95 | all methods with comment inside them. If just single method is matched | |
|
96 | returned data will also include method specification | |
|
97 | ||
|
98 | This command can only be run using an |authtoken| with admin rights to | |
|
99 | the specified repository. | |
|
100 | ||
|
101 | This command takes the following options: | |
|
102 | ||
|
103 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
104 | :type apiuser: AuthUser | |
|
105 | :param pattern: pattern to match method names against | |
|
106 | :type older_then: Optional("*") | |
|
107 | ||
|
108 | Example output: | |
|
109 | ||
|
110 | .. code-block:: bash | |
|
111 | ||
|
112 | id : <id_given_in_input> | |
|
113 | "result": [ | |
|
114 | "changeset_comment", | |
|
115 | "comment_pull_request", | |
|
116 | "comment_commit" | |
|
117 | ] | |
|
118 | error : null | |
|
119 | ||
|
120 | .. code-block:: bash | |
|
121 | ||
|
122 | id : <id_given_in_input> | |
|
123 | "result": [ | |
|
124 | "comment_commit", | |
|
125 | { | |
|
126 | "apiuser": "<RequiredType>", | |
|
127 | "comment_type": "<Optional:u'note'>", | |
|
128 | "commit_id": "<RequiredType>", | |
|
129 | "message": "<RequiredType>", | |
|
130 | "repoid": "<RequiredType>", | |
|
131 | "request": "<RequiredType>", | |
|
132 | "resolves_comment_id": "<Optional:None>", | |
|
133 | "status": "<Optional:None>", | |
|
134 | "userid": "<Optional:<OptionalAttr:apiuser>>" | |
|
135 | } | |
|
136 | ] | |
|
137 | error : null | |
|
138 | ||
|
139 | ||
|
88 | 140 | get_server_info |
|
89 | 141 | --------------- |
|
90 | 142 |
@@ -41,15 +41,16 b' create_user' | |||
|
41 | 41 | :type force_password_change: Optional(``True`` | ``False``) |
|
42 | 42 | :param create_personal_repo_group: Create personal repo group for this user |
|
43 | 43 | :type create_personal_repo_group: Optional(``True`` | ``False``) |
|
44 | ||
|
44 | 45 | Example output: |
|
45 | 46 | |
|
46 | 47 | .. code-block:: bash |
|
47 | 48 | |
|
48 | 49 | id : <id_given_in_input> |
|
49 | 50 | result: { |
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
51 | "msg" : "created new user `<username>`", | |
|
52 | "user": <user_obj> | |
|
53 | } | |
|
53 | 54 | error: null |
|
54 | 55 | |
|
55 | 56 | Example error output: |
@@ -98,9 +99,9 b' delete_user' | |||
|
98 | 99 | |
|
99 | 100 | id : <id_given_in_input> |
|
100 | 101 | result: { |
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
102 | "msg" : "deleted user ID:<userid> <username>", | |
|
103 | "user": null | |
|
104 | } | |
|
104 | 105 | error: null |
|
105 | 106 | |
|
106 | 107 | Example error output: |
@@ -145,8 +146,8 b' get_user' | |||
|
145 | 146 | "result": { |
|
146 | 147 | "active": true, |
|
147 | 148 | "admin": false, |
|
148 | "api_key": "api-key", | |
|
149 | 149 | "api_keys": [ list of keys ], |
|
150 | "auth_tokens": [ list of tokens with details ], | |
|
150 | 151 | "email": "user@example.com", |
|
151 | 152 | "emails": [ |
|
152 | 153 | "user@example.com" |
@@ -157,6 +158,7 b' get_user' | |||
|
157 | 158 | "ip_addresses": [], |
|
158 | 159 | "language": null, |
|
159 | 160 | "last_login": "Timestamp", |
|
161 | "last_activity": "Timestamp", | |
|
160 | 162 | "lastname": "surnae", |
|
161 | 163 | "permissions": { |
|
162 | 164 | "global": [ |
@@ -183,6 +185,32 b' get_user' | |||
|
183 | 185 | } |
|
184 | 186 | |
|
185 | 187 | |
|
188 | get_user_audit_logs | |
|
189 | ------------------- | |
|
190 | ||
|
191 | .. py:function:: get_user_audit_logs(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
192 | ||
|
193 | Fetches all action logs made by the specified user. | |
|
194 | ||
|
195 | This command takes the following options: | |
|
196 | ||
|
197 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
198 | :type apiuser: AuthUser | |
|
199 | :param userid: Sets the userid whose list of locked |repos| will be | |
|
200 | displayed. | |
|
201 | :type userid: Optional(str or int) | |
|
202 | ||
|
203 | Example output: | |
|
204 | ||
|
205 | .. code-block:: bash | |
|
206 | ||
|
207 | id : <id_given_in_input> | |
|
208 | result : { | |
|
209 | [action, action,...] | |
|
210 | } | |
|
211 | error : null | |
|
212 | ||
|
213 | ||
|
186 | 214 | get_user_locks |
|
187 | 215 | -------------- |
|
188 | 216 | |
@@ -232,7 +260,7 b' get_users' | |||
|
232 | 260 | .. code-block:: bash |
|
233 | 261 | |
|
234 | 262 | id : <id_given_in_input> |
|
235 |
|
|
|
263 | result: [<user_object>, ...] | |
|
236 | 264 | error: null |
|
237 | 265 | |
|
238 | 266 | |
@@ -279,9 +307,9 b' update_user' | |||
|
279 | 307 | |
|
280 | 308 | id : <id_given_in_input> |
|
281 | 309 | result: { |
|
282 |
|
|
|
283 |
|
|
|
284 |
|
|
|
310 | "msg" : "updated user ID:<userid> <username>", | |
|
311 | "user": <user_object>, | |
|
312 | } | |
|
285 | 313 | error: null |
|
286 | 314 | |
|
287 | 315 | Example error output: |
@@ -244,9 +244,8 b' def merge_pull_request(request, apiuser,' | |||
|
244 | 244 | |
|
245 | 245 | .. code-block:: bash |
|
246 | 246 | |
|
247 | "id": <id_given_in_input>, | |
|
248 | "result": | |
|
249 | { | |
|
247 | "id": <id_given_in_input>, | |
|
248 | "result": { | |
|
250 | 249 | "executed": "<bool>", |
|
251 | 250 | "failure_reason": "<int>", |
|
252 | 251 | "merge_commit_id": "<merge_commit_id>", |
@@ -257,8 +256,7 b' def merge_pull_request(request, apiuser,' | |||
|
257 | 256 | "name": "<name>" |
|
258 | 257 | } |
|
259 | 258 | }, |
|
260 | "error": null | |
|
261 | ||
|
259 | "error": null | |
|
262 | 260 | """ |
|
263 | 261 | repo = get_repo_or_error(repoid) |
|
264 | 262 | if not isinstance(userid, Optional): |
@@ -321,13 +319,12 b' def close_pull_request(request, apiuser,' | |||
|
321 | 319 | |
|
322 | 320 | .. code-block:: bash |
|
323 | 321 | |
|
324 | "id": <id_given_in_input>, | |
|
325 | "result": | |
|
326 | { | |
|
322 | "id": <id_given_in_input>, | |
|
323 | "result": { | |
|
327 | 324 | "pull_request_id": "<int>", |
|
328 | 325 | "closed": "<bool>" |
|
329 | 326 | }, |
|
330 | "error": null | |
|
327 | "error": null | |
|
331 | 328 | |
|
332 | 329 | """ |
|
333 | 330 | repo = get_repo_or_error(repoid) |
@@ -396,15 +393,14 b' def comment_pull_request(' | |||
|
396 | 393 | |
|
397 | 394 | .. code-block:: bash |
|
398 | 395 | |
|
399 | id : <id_given_in_input> | |
|
400 | result : | |
|
401 | { | |
|
396 | id : <id_given_in_input> | |
|
397 | result : { | |
|
402 | 398 | "pull_request_id": "<Integer>", |
|
403 | 399 | "comment_id": "<Integer>", |
|
404 | 400 | "status": {"given": <given_status>, |
|
405 | 401 | "was_changed": <bool status_was_actually_changed> }, |
|
406 | } | |
|
407 | error : null | |
|
402 | }, | |
|
403 | error : null | |
|
408 | 404 | """ |
|
409 | 405 | repo = get_repo_or_error(repoid) |
|
410 | 406 | if not isinstance(userid, Optional): |
@@ -535,9 +531,8 b' def create_pull_request(' | |||
|
535 | 531 | :param reviewers: Set the new pull request reviewers list. |
|
536 | 532 | :type reviewers: Optional(list) |
|
537 | 533 | Accepts username strings or objects of the format: |
|
538 | { | |
|
539 | 'username': 'nick', 'reasons': ['original author'] | |
|
540 | } | |
|
534 | ||
|
535 | {'username': 'nick', 'reasons': ['original author']} | |
|
541 | 536 | """ |
|
542 | 537 | |
|
543 | 538 | source = get_repo_or_error(source_repo) |
@@ -633,9 +628,8 b' def update_pull_request(' | |||
|
633 | 628 | |
|
634 | 629 | .. code-block:: bash |
|
635 | 630 | |
|
636 | id : <id_given_in_input> | |
|
637 | result : | |
|
638 | { | |
|
631 | id : <id_given_in_input> | |
|
632 | result : { | |
|
639 | 633 | "msg": "Updated pull request `63`", |
|
640 | 634 | "pull_request": <pull_request_object>, |
|
641 | 635 | "updated_reviewers": { |
@@ -655,7 +649,7 b' def update_pull_request(' | |||
|
655 | 649 | "removed": [] |
|
656 | 650 | } |
|
657 | 651 | } |
|
658 | error : null | |
|
652 | error : null | |
|
659 | 653 | """ |
|
660 | 654 | |
|
661 | 655 | repo = get_repo_or_error(repoid) |
@@ -133,7 +133,7 b' def get_users(request, apiuser):' | |||
|
133 | 133 | .. code-block:: bash |
|
134 | 134 | |
|
135 | 135 | id : <id_given_in_input> |
|
136 |
|
|
|
136 | result: [<user_object>, ...] | |
|
137 | 137 | error: null |
|
138 | 138 | """ |
|
139 | 139 | |
@@ -191,15 +191,16 b' def create_user(request, apiuser, userna' | |||
|
191 | 191 | :type force_password_change: Optional(``True`` | ``False``) |
|
192 | 192 | :param create_personal_repo_group: Create personal repo group for this user |
|
193 | 193 | :type create_personal_repo_group: Optional(``True`` | ``False``) |
|
194 | ||
|
194 | 195 | Example output: |
|
195 | 196 | |
|
196 | 197 | .. code-block:: bash |
|
197 | 198 | |
|
198 | 199 | id : <id_given_in_input> |
|
199 | 200 | result: { |
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
201 | "msg" : "created new user `<username>`", | |
|
202 | "user": <user_obj> | |
|
203 | } | |
|
203 | 204 | error: null |
|
204 | 205 | |
|
205 | 206 | Example error output: |
@@ -305,9 +306,9 b' def update_user(request, apiuser, userid' | |||
|
305 | 306 | |
|
306 | 307 | id : <id_given_in_input> |
|
307 | 308 | result: { |
|
308 |
|
|
|
309 |
|
|
|
310 |
|
|
|
309 | "msg" : "updated user ID:<userid> <username>", | |
|
310 | "user": <user_object>, | |
|
311 | } | |
|
311 | 312 | error: null |
|
312 | 313 | |
|
313 | 314 | Example error output: |
@@ -384,9 +385,9 b' def delete_user(request, apiuser, userid' | |||
|
384 | 385 | |
|
385 | 386 | id : <id_given_in_input> |
|
386 | 387 | result: { |
|
387 |
|
|
|
388 |
|
|
|
389 |
|
|
|
388 | "msg" : "deleted user ID:<userid> <username>", | |
|
389 | "user": null | |
|
390 | } | |
|
390 | 391 | error: null |
|
391 | 392 | |
|
392 | 393 | Example error output: |
General Comments 0
You need to be logged in to leave comments.
Login now