Show More
This diff has been collapsed as it changes many lines, (530 lines changed) Show them Hide them | |||||
@@ -115,7 +115,7 b' OUTPUT::' | |||||
115 |
|
115 | |||
116 | id : <id_given_in_input> |
|
116 | id : <id_given_in_input> | |
117 | result : "Pulled from `<reponame>`" |
|
117 | result : "Pulled from `<reponame>`" | |
118 |
error : |
|
118 | error : null | |
119 |
|
119 | |||
120 | rescan_repos |
|
120 | rescan_repos | |
121 | ^^^^^^^^^^^^ |
|
121 | ^^^^^^^^^^^^ | |
@@ -138,7 +138,7 b' OUTPUT::' | |||||
138 | id : <id_given_in_input> |
|
138 | id : <id_given_in_input> | |
139 | result : "{'added': [<list of names of added repos>], |
|
139 | result : "{'added': [<list of names of added repos>], | |
140 | 'removed': [<list of names of removed repos>]}" |
|
140 | 'removed': [<list of names of removed repos>]}" | |
141 |
error : |
|
141 | error : null | |
142 |
|
142 | |||
143 | invalidate_cache |
|
143 | invalidate_cache | |
144 | ^^^^^^^^^^^^^^^^ |
|
144 | ^^^^^^^^^^^^^^^^ | |
@@ -160,7 +160,7 b' OUTPUT::' | |||||
160 |
|
160 | |||
161 | id : <id_given_in_input> |
|
161 | id : <id_given_in_input> | |
162 | result : "Caches of repository `<reponame>`" |
|
162 | result : "Caches of repository `<reponame>`" | |
163 |
error : |
|
163 | error : null | |
164 |
|
164 | |||
165 | get_ip |
|
165 | get_ip | |
166 | ^^^^^^ |
|
166 | ^^^^^^ | |
@@ -182,16 +182,16 b' OUTPUT::' | |||||
182 |
|
182 | |||
183 | id : <id_given_in_input> |
|
183 | id : <id_given_in_input> | |
184 | result : { |
|
184 | result : { | |
185 | "ip_addr_server": <ip_from_client>", |
|
185 | "ip_addr_server" : <ip_from_client>", | |
186 | "user_ips": [ |
|
186 | "user_ips" : [ | |
187 | { |
|
187 | { | |
188 | "ip_addr": "<ip_with_mask>", |
|
188 | "ip_addr" : "<ip_with_mask>", | |
189 | "ip_range": ["<start_ip>", "<end_ip>"], |
|
189 | "ip_range" : ["<start_ip>", "<end_ip>"], | |
190 | }, |
|
190 | }, | |
191 | ... |
|
191 | ... | |
192 | ] |
|
192 | ] | |
193 | } |
|
193 | } | |
194 |
error : |
|
194 | error : null | |
195 |
|
195 | |||
196 | get_user |
|
196 | get_user | |
197 | ^^^^^^^^ |
|
197 | ^^^^^^^^ | |
@@ -213,29 +213,29 b' INPUT::' | |||||
213 | OUTPUT:: |
|
213 | OUTPUT:: | |
214 |
|
214 | |||
215 | id : <id_given_in_input> |
|
215 | id : <id_given_in_input> | |
216 | result: None if user does not exist or |
|
216 | result : None if user does not exist or | |
217 | { |
|
217 | { | |
218 | "user_id" : "<user_id>", |
|
218 | "user_id" : "<user_id>", | |
219 | "api_key" : "<api_key>", |
|
219 | "api_key" : "<api_key>", | |
220 | "username" : "<username>", |
|
220 | "username" : "<username>", | |
221 |
"firstname" |
|
221 | "firstname" : "<firstname>", | |
222 | "lastname" : "<lastname>", |
|
222 | "lastname" : "<lastname>", | |
223 | "email" : "<email>", |
|
223 | "email" : "<email>", | |
224 |
"emails" |
|
224 | "emails" : "<list_of_all_additional_emails>", | |
225 | "ip_addresses": "<list_of_ip_addresses_for_user>", |
|
225 | "ip_addresses": "<list_of_ip_addresses_for_user>", | |
226 | "active" : "<bool>", |
|
226 | "active" : "<bool>", | |
227 | "admin" : "<bool>", |
|
227 | "admin" : "<bool>", | |
228 | "ldap_dn" : "<ldap_dn>", |
|
228 | "ldap_dn" : "<ldap_dn>", | |
229 |
"last_login" |
|
229 | "last_login" : "<last_login>", | |
230 | "permissions": { |
|
230 | "permissions": { | |
231 | "global": ["hg.create.repository", |
|
231 | "global": ["hg.create.repository", | |
232 | "repository.read", |
|
232 | "repository.read", | |
233 | "hg.register.manual_activate"], |
|
233 | "hg.register.manual_activate"], | |
234 | "repositories": {"repo1": "repository.none"}, |
|
234 | "repositories" : {"repo1" : "repository.none"}, | |
235 | "repositories_groups": {"Group1": "group.read"} |
|
235 | "repositories_groups" : {"Group1" : "group.read"} | |
236 | }, |
|
236 | }, | |
237 | } |
|
237 | } | |
238 |
error |
|
238 | error : null | |
239 |
|
239 | |||
240 | get_users |
|
240 | get_users | |
241 | ^^^^^^^^^ |
|
241 | ^^^^^^^^^ | |
@@ -253,24 +253,24 b' INPUT::' | |||||
253 | OUTPUT:: |
|
253 | OUTPUT:: | |
254 |
|
254 | |||
255 | id : <id_given_in_input> |
|
255 | id : <id_given_in_input> | |
256 | result: [ |
|
256 | result : [ | |
257 | { |
|
257 | { | |
258 | "user_id" : "<user_id>", |
|
258 | "user_id" : "<user_id>", | |
259 | "api_key" : "<api_key>", |
|
259 | "api_key" : "<api_key>", | |
260 | "username" : "<username>", |
|
260 | "username" : "<username>", | |
261 |
"firstname" |
|
261 | "firstname" : "<firstname>", | |
262 | "lastname" : "<lastname>", |
|
262 | "lastname" : "<lastname>", | |
263 | "email" : "<email>", |
|
263 | "email" : "<email>", | |
264 |
"emails" |
|
264 | "emails" : "<list_of_all_additional_emails>", | |
265 | "ip_addresses": "<list_of_ip_addresses_for_user>", |
|
265 | "ip_addresses": "<list_of_ip_addresses_for_user>", | |
266 | "active" : "<bool>", |
|
266 | "active" : "<bool>", | |
267 | "admin" : "<bool>", |
|
267 | "admin" : "<bool>", | |
268 | "ldap_dn" : "<ldap_dn>", |
|
268 | "ldap_dn" : "<ldap_dn>", | |
269 |
"last_login" |
|
269 | "last_login" : "<last_login>", | |
270 | }, |
|
270 | }, | |
271 | β¦ |
|
271 | β¦ | |
272 | ] |
|
272 | ] | |
273 |
error |
|
273 | error : null | |
274 |
|
274 | |||
275 | .. _create-user: |
|
275 | .. _create-user: | |
276 |
|
276 | |||
@@ -299,22 +299,22 b' INPUT::' | |||||
299 | OUTPUT:: |
|
299 | OUTPUT:: | |
300 |
|
300 | |||
301 | id : <id_given_in_input> |
|
301 | id : <id_given_in_input> | |
302 | result: { |
|
302 | result : { | |
303 | "msg" : "created new user `<username>`", |
|
303 | "msg" : "created new user `<username>`", | |
304 | "user": { |
|
304 | "user" : { | |
305 | "user_id" : "<user_id>", |
|
305 | "user_id" : "<user_id>", | |
306 | "username" : "<username>", |
|
306 | "username" : "<username>", | |
307 | "firstname": "<firstname>", |
|
307 | "firstname": "<firstname>", | |
308 | "lastname" : "<lastname>", |
|
308 | "lastname" : "<lastname>", | |
309 | "email" : "<email>", |
|
309 | "email" : "<email>", | |
310 |
"emails" |
|
310 | "emails" : "<list_of_all_additional_emails>", | |
311 | "active" : "<bool>", |
|
311 | "active" : "<bool>", | |
312 | "admin" : "<bool>", |
|
312 | "admin" : "<bool>", | |
313 | "ldap_dn" : "<ldap_dn>", |
|
313 | "ldap_dn" : "<ldap_dn>", | |
314 | "last_login": "<last_login>", |
|
314 | "last_login": "<last_login>", | |
315 | }, |
|
315 | }, | |
316 | } |
|
316 | } | |
317 |
error |
|
317 | error : null | |
318 |
|
318 | |||
319 | Example:: |
|
319 | Example:: | |
320 |
|
320 | |||
@@ -346,23 +346,23 b' INPUT::' | |||||
346 | OUTPUT:: |
|
346 | OUTPUT:: | |
347 |
|
347 | |||
348 | id : <id_given_in_input> |
|
348 | id : <id_given_in_input> | |
349 | result: { |
|
349 | result : { | |
350 | "msg" : "updated user ID:<userid> <username>", |
|
350 | "msg" : "updated user ID:<userid> <username>", | |
351 | "user": { |
|
351 | "user" : { | |
352 | "user_id" : "<user_id>", |
|
352 | "user_id" : "<user_id>", | |
353 | "api_key" : "<api_key>", |
|
353 | "api_key" : "<api_key>", | |
354 | "username" : "<username>", |
|
354 | "username" : "<username>", | |
355 | "firstname": "<firstname>", |
|
355 | "firstname": "<firstname>", | |
356 | "lastname" : "<lastname>", |
|
356 | "lastname" : "<lastname>", | |
357 | "email" : "<email>", |
|
357 | "email" : "<email>", | |
358 |
"emails" |
|
358 | "emails" : "<list_of_all_additional_emails>", | |
359 | "active" : "<bool>", |
|
359 | "active" : "<bool>", | |
360 | "admin" : "<bool>", |
|
360 | "admin" : "<bool>", | |
361 | "ldap_dn" : "<ldap_dn>", |
|
361 | "ldap_dn" : "<ldap_dn>", | |
362 | "last_login": "<last_login>", |
|
362 | "last_login": "<last_login>", | |
363 | }, |
|
363 | }, | |
364 | } |
|
364 | } | |
365 |
error |
|
365 | error : null | |
366 |
|
366 | |||
367 | delete_user |
|
367 | delete_user | |
368 | ^^^^^^^^^^^ |
|
368 | ^^^^^^^^^^^ | |
@@ -382,11 +382,11 b' INPUT::' | |||||
382 | OUTPUT:: |
|
382 | OUTPUT:: | |
383 |
|
383 | |||
384 | id : <id_given_in_input> |
|
384 | id : <id_given_in_input> | |
385 | result: { |
|
385 | result : { | |
386 | "msg" : "deleted user ID:<userid> <username>", |
|
386 | "msg" : "deleted user ID:<userid> <username>", | |
387 | "user": null |
|
387 | "user" : null | |
388 | } |
|
388 | } | |
389 |
error |
|
389 | error : null | |
390 |
|
390 | |||
391 | get_user_group |
|
391 | get_user_group | |
392 | ^^^^^^^^^^^^^^ |
|
392 | ^^^^^^^^^^^^^^ | |
@@ -410,7 +410,7 b' OUTPUT::' | |||||
410 | { |
|
410 | { | |
411 | "users_group_id" : "<id>", |
|
411 | "users_group_id" : "<id>", | |
412 | "group_name" : "<groupname>", |
|
412 | "group_name" : "<groupname>", | |
413 |
"active" |
|
413 | "active" : "<bool>", | |
414 | "members" : [ |
|
414 | "members" : [ | |
415 | { |
|
415 | { | |
416 | "user_id" : "<user_id>", |
|
416 | "user_id" : "<user_id>", | |
@@ -419,7 +419,7 b' OUTPUT::' | |||||
419 | "firstname": "<firstname>", |
|
419 | "firstname": "<firstname>", | |
420 | "lastname" : "<lastname>", |
|
420 | "lastname" : "<lastname>", | |
421 | "email" : "<email>", |
|
421 | "email" : "<email>", | |
422 |
"emails" |
|
422 | "emails" : "<list_of_all_additional_emails>", | |
423 | "active" : "<bool>", |
|
423 | "active" : "<bool>", | |
424 | "admin" : "<bool>", |
|
424 | "admin" : "<bool>", | |
425 | "ldap_dn" : "<ldap_dn>", |
|
425 | "ldap_dn" : "<ldap_dn>", | |
@@ -450,7 +450,7 b' OUTPUT::' | |||||
450 | { |
|
450 | { | |
451 | "users_group_id" : "<id>", |
|
451 | "users_group_id" : "<id>", | |
452 | "group_name" : "<groupname>", |
|
452 | "group_name" : "<groupname>", | |
453 |
"active" |
|
453 | "active" : "<bool>", | |
454 | }, |
|
454 | }, | |
455 | β¦ |
|
455 | β¦ | |
456 | ] |
|
456 | ] | |
@@ -467,24 +467,24 b' INPUT::' | |||||
467 | id : <id_for_response> |
|
467 | id : <id_for_response> | |
468 | api_key : "<api_key>" |
|
468 | api_key : "<api_key>" | |
469 | method : "create_user_group" |
|
469 | method : "create_user_group" | |
470 |
args |
|
470 | args : { | |
471 | "group_name": "<groupname>", |
|
471 | "group_name": "<groupname>", | |
472 | "owner" : "<owner_name_or_id = Optional(=apiuser)>", |
|
472 | "owner" : "<owner_name_or_id = Optional(=apiuser)>", | |
473 |
"active" |
|
473 | "active" : "<bool> = Optional(True)" | |
474 | } |
|
474 | } | |
475 |
|
475 | |||
476 | OUTPUT:: |
|
476 | OUTPUT:: | |
477 |
|
477 | |||
478 | id : <id_given_in_input> |
|
478 | id : <id_given_in_input> | |
479 | result: { |
|
479 | result : { | |
480 | "msg": "created new user group `<groupname>`", |
|
480 | "msg" : "created new user group `<groupname>`", | |
481 | "users_group": { |
|
481 | "users_group" : { | |
482 | "users_group_id" : "<id>", |
|
482 | "users_group_id" : "<id>", | |
483 | "group_name" : "<groupname>", |
|
483 | "group_name" : "<groupname>", | |
484 |
"active" |
|
484 | "active" : "<bool>", | |
485 | }, |
|
485 | }, | |
486 | } |
|
486 | } | |
487 |
error |
|
487 | error : null | |
488 |
|
488 | |||
489 | add_user_to_user_group |
|
489 | add_user_to_user_group | |
490 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
490 | ^^^^^^^^^^^^^^^^^^^^^^ | |
@@ -498,7 +498,7 b' INPUT::' | |||||
498 | id : <id_for_response> |
|
498 | id : <id_for_response> | |
499 | api_key : "<api_key>" |
|
499 | api_key : "<api_key>" | |
500 | method : "add_user_user_group" |
|
500 | method : "add_user_user_group" | |
501 |
args |
|
501 | args : { | |
502 | "usersgroupid" : "<user group id or name>", |
|
502 | "usersgroupid" : "<user group id or name>", | |
503 | "userid" : "<user_id or username>", |
|
503 | "userid" : "<user_id or username>", | |
504 | } |
|
504 | } | |
@@ -506,12 +506,12 b' INPUT::' | |||||
506 | OUTPUT:: |
|
506 | OUTPUT:: | |
507 |
|
507 | |||
508 | id : <id_given_in_input> |
|
508 | id : <id_given_in_input> | |
509 | result: { |
|
509 | result : { | |
510 | "success": True|False # depends on if member is in group |
|
510 | "success" : True|False # depends on if member is in group | |
511 | "msg": "added member `<username>` to a user group `<groupname>` | |
|
511 | "msg" : "added member `<username>` to a user group `<groupname>` | | |
512 | User is already in that group" |
|
512 | User is already in that group" | |
513 | } |
|
513 | } | |
514 |
error |
|
514 | error : null | |
515 |
|
515 | |||
516 | remove_user_from_user_group |
|
516 | remove_user_from_user_group | |
517 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
517 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
@@ -525,7 +525,7 b' INPUT::' | |||||
525 | id : <id_for_response> |
|
525 | id : <id_for_response> | |
526 | api_key : "<api_key>" |
|
526 | api_key : "<api_key>" | |
527 | method : "remove_user_from_user_group" |
|
527 | method : "remove_user_from_user_group" | |
528 |
args |
|
528 | args : { | |
529 | "usersgroupid" : "<user group id or name>", |
|
529 | "usersgroupid" : "<user group id or name>", | |
530 | "userid" : "<user_id or username>", |
|
530 | "userid" : "<user_id or username>", | |
531 | } |
|
531 | } | |
@@ -533,12 +533,12 b' INPUT::' | |||||
533 | OUTPUT:: |
|
533 | OUTPUT:: | |
534 |
|
534 | |||
535 | id : <id_given_in_input> |
|
535 | id : <id_given_in_input> | |
536 | result: { |
|
536 | result : { | |
537 |
"success" |
|
537 | "success" : True|False, # depends on if member is in group | |
538 | "msg": "removed member <username> from user group <groupname> | |
|
538 | "msg" : "removed member <username> from user group <groupname> | | |
539 | User wasn't in group" |
|
539 | User wasn't in group" | |
540 | } |
|
540 | } | |
541 |
error |
|
541 | error : null | |
542 |
|
542 | |||
543 | get_repo |
|
543 | get_repo | |
544 | ^^^^^^^^ |
|
544 | ^^^^^^^^ | |
@@ -553,144 +553,144 b' INPUT::' | |||||
553 | id : <id_for_response> |
|
553 | id : <id_for_response> | |
554 | api_key : "<api_key>" |
|
554 | api_key : "<api_key>" | |
555 | method : "get_repo" |
|
555 | method : "get_repo" | |
556 |
args |
|
556 | args : { | |
557 | "repoid" : "<reponame or repo_id>", |
|
557 | "repoid" : "<reponame or repo_id>", | |
558 | "with_revision_names": "<bool> = Optional(False)", |
|
558 | "with_revision_names" : "<bool> = Optional(False)", | |
559 | "with_pullrequests": "<bool> = Optional(False)", |
|
559 | "with_pullrequests" : "<bool> = Optional(False)", | |
560 | } |
|
560 | } | |
561 |
|
561 | |||
562 | OUTPUT:: |
|
562 | OUTPUT:: | |
563 |
|
563 | |||
564 | id : <id_given_in_input> |
|
564 | id : <id_given_in_input> | |
565 | result: None if repository does not exist or |
|
565 | result : None if repository does not exist or | |
566 | { |
|
566 | { | |
567 | "repo_id" : "<repo_id>", |
|
567 | "repo_id" : "<repo_id>", | |
568 | "repo_name" : "<reponame>" |
|
568 | "repo_name" : "<reponame>" | |
569 | "repo_type" : "<repo_type>", |
|
569 | "repo_type" : "<repo_type>", | |
570 | "clone_uri" : "<clone_uri>", |
|
570 | "clone_uri" : "<clone_uri>", | |
571 |
"enable_downloads" |
|
571 | "enable_downloads" : "<bool>", | |
572 | "enable_statistics": "<bool>", |
|
572 | "enable_statistics": "<bool>", | |
573 |
"private" |
|
573 | "private" : "<bool>", | |
574 | "created_on" : "<date_time_created>", |
|
574 | "created_on" : "<date_time_created>", | |
575 | "description" : "<description>", |
|
575 | "description" : "<description>", | |
576 |
"landing_rev" |
|
576 | "landing_rev" : "<landing_rev>", | |
577 |
"last_changeset" |
|
577 | "last_changeset" : { | |
578 |
"author" |
|
578 | "author" : "<full_author>", | |
579 |
"date" |
|
579 | "date" : "<date_time_of_commit>", | |
580 |
"message" |
|
580 | "message" : "<commit_message>", | |
581 |
"raw_id" |
|
581 | "raw_id" : "<raw_id>", | |
582 | "revision": "<numeric_revision>", |
|
582 | "revision": "<numeric_revision>", | |
583 | "short_id": "<short_id>" |
|
583 | "short_id": "<short_id>" | |
584 | }, |
|
584 | }, | |
585 |
"owner" |
|
585 | "owner" : "<repo_owner>", | |
586 |
"fork_of" |
|
586 | "fork_of" : "<name_of_fork_parent>", | |
587 | "members" : [ |
|
587 | "members" : [ | |
588 | { |
|
588 | { | |
589 |
"type" |
|
589 | "type" : "user", | |
590 | "user_id" : "<user_id>", |
|
590 | "user_id" : "<user_id>", | |
591 | "api_key" : "<api_key>", |
|
591 | "api_key" : "<api_key>", | |
592 | "username" : "<username>", |
|
592 | "username" : "<username>", | |
593 |
"firstname" |
|
593 | "firstname" : "<firstname>", | |
594 | "lastname" : "<lastname>", |
|
594 | "lastname" : "<lastname>", | |
595 | "email" : "<email>", |
|
595 | "email" : "<email>", | |
596 |
"emails" |
|
596 | "emails" : "<list_of_all_additional_emails>", | |
597 | "active" : "<bool>", |
|
597 | "active" : "<bool>", | |
598 | "admin" : "<bool>", |
|
598 | "admin" : "<bool>", | |
599 | "ldap_dn" : "<ldap_dn>", |
|
599 | "ldap_dn" : "<ldap_dn>", | |
600 |
"last_login" |
|
600 | "last_login" : "<last_login>", | |
601 | "permission" : "repository.(read|write|admin)" |
|
601 | "permission" : "repository.(read|write|admin)" | |
602 | }, |
|
602 | }, | |
603 | β¦ |
|
603 | β¦ | |
604 | { |
|
604 | { | |
605 |
"type" |
|
605 | "type" : "users_group", | |
606 | "id" : "<usersgroupid>", |
|
606 | "id" : "<usersgroupid>", | |
607 | "name" : "<usersgroupname>", |
|
607 | "name" : "<usersgroupname>", | |
608 |
"active" |
|
608 | "active" : "<bool>", | |
609 | "permission" : "repository.(read|write|admin)" |
|
609 | "permission" : "repository.(read|write|admin)" | |
610 | }, |
|
610 | }, | |
611 | β¦ |
|
611 | β¦ | |
612 | ], |
|
612 | ], | |
613 |
"followers" |
|
613 | "followers" : [ | |
614 | { |
|
614 | { | |
615 | "user_id" : "<user_id>", |
|
615 | "user_id" : "<user_id>", | |
616 | "username" : "<username>", |
|
616 | "username" : "<username>", | |
617 | "api_key" : "<api_key>", |
|
617 | "api_key" : "<api_key>", | |
618 |
"firstname" |
|
618 | "firstname" : "<firstname>", | |
619 | "lastname" : "<lastname>", |
|
619 | "lastname" : "<lastname>", | |
620 | "email" : "<email>", |
|
620 | "email" : "<email>", | |
621 |
"emails" |
|
621 | "emails" : "<list_of_all_additional_emails>", | |
622 | "ip_addresses": "<list_of_ip_addresses_for_user>", |
|
622 | "ip_addresses": "<list_of_ip_addresses_for_user>", | |
623 | "active" : "<bool>", |
|
623 | "active" : "<bool>", | |
624 | "admin" : "<bool>", |
|
624 | "admin" : "<bool>", | |
625 | "ldap_dn" : "<ldap_dn>", |
|
625 | "ldap_dn" : "<ldap_dn>", | |
626 |
"last_login" |
|
626 | "last_login" : "<last_login>", | |
627 | }, |
|
627 | }, | |
628 | β¦ |
|
628 | β¦ | |
629 | ], |
|
629 | ], | |
630 | <if with_revision_names == True> |
|
630 | <if with_revision_names == True> | |
631 | "tags": { |
|
631 | "tags" : { | |
632 | "<tagname>": "<raw_id>", |
|
632 | "<tagname>" : "<raw_id>", | |
633 | ... |
|
633 | ... | |
634 | }, |
|
634 | }, | |
635 | "branches": { |
|
635 | "branches" : { | |
636 | "<branchname>": "<raw_id>", |
|
636 | "<branchname>" : "<raw_id>", | |
637 | ... |
|
637 | ... | |
638 | }, |
|
638 | }, | |
639 | "bookmarks": { |
|
639 | "bookmarks" : { | |
640 | "<bookmarkname>": "<raw_id>", |
|
640 | "<bookmarkname>" : "<raw_id>", | |
641 | ... |
|
641 | ... | |
642 | }, |
|
642 | }, | |
643 | <if with_pullrequests == True> |
|
643 | <if with_pullrequests == True> | |
644 | "pull_requests": [ |
|
644 | "pull_requests" : [ | |
645 | { |
|
645 | { | |
646 | "status": "<pull_request_status>", |
|
646 | "status" : "<pull_request_status>", | |
647 | "pull_request_id": <pull_request_id>, |
|
647 | "pull_request_id" : <pull_request_id>, | |
648 | "description": "<pull_request_description>", |
|
648 | "description" : "<pull_request_description>", | |
649 | "title": "<pull_request_title>", |
|
649 | "title" : "<pull_request_title>", | |
650 | "url": "<pull_request_url>", |
|
650 | "url" : "<pull_request_url>", | |
651 | "reviewers": [ |
|
651 | "reviewers" : [ | |
652 | { |
|
652 | { | |
653 | "username": "<user_id>", |
|
653 | "username" : "<user_id>", | |
654 | }, |
|
654 | }, | |
655 | ... |
|
655 | ... | |
656 | ], |
|
656 | ], | |
657 | "org_repo_url": "<repo_url>", |
|
657 | "org_repo_url" : "<repo_url>", | |
658 | "org_ref_parts": [ |
|
658 | "org_ref_parts" : [ | |
659 | "<ref_type>", |
|
659 | "<ref_type>", | |
660 | "<ref_name>", |
|
660 | "<ref_name>", | |
661 | "<raw_id>" |
|
661 | "<raw_id>" | |
662 | ], |
|
662 | ], | |
663 | "other_ref_parts": [ |
|
663 | "other_ref_parts" : [ | |
664 | "<ref_type>", |
|
664 | "<ref_type>", | |
665 | "<ref_name>", |
|
665 | "<ref_name>", | |
666 | "<raw_id>" |
|
666 | "<raw_id>" | |
667 | ], |
|
667 | ], | |
668 | "comments": [ |
|
668 | "comments" : [ | |
669 | { |
|
669 | { | |
670 | "username": "<user_id>", |
|
670 | "username" : "<user_id>", | |
671 | "text": "<comment text>", |
|
671 | "text" : "<comment text>", | |
672 | "comment_id": "<comment_id>", |
|
672 | "comment_id" : "<comment_id>", | |
673 | }, |
|
673 | }, | |
674 | ... |
|
674 | ... | |
675 | ], |
|
675 | ], | |
676 | "owner": "<username>", |
|
676 | "owner" : "<username>", | |
677 | "statuses": [ |
|
677 | "statuses" : [ | |
678 | { |
|
678 | { | |
679 | "status": "<status_of_review>", # "under_review", "approved" or "rejected" |
|
679 | "status" : "<status_of_review>", # "under_review", "approved" or "rejected" | |
680 | "reviewer": "<user_id>", |
|
680 | "reviewer" : "<user_id>", | |
681 | "modified_at": "<date_time_of_review>" # iso 8601 date, server's timezone |
|
681 | "modified_at" : "<date_time_of_review>" # iso 8601 date, server's timezone | |
682 | }, |
|
682 | }, | |
683 | ... |
|
683 | ... | |
684 | ], |
|
684 | ], | |
685 | "revisions": [ |
|
685 | "revisions" : [ | |
686 | "<raw_id>", |
|
686 | "<raw_id>", | |
687 | ... |
|
687 | ... | |
688 | ] |
|
688 | ] | |
689 | }, |
|
689 | }, | |
690 | ... |
|
690 | ... | |
691 | ] |
|
691 | ] | |
692 | } |
|
692 | } | |
693 |
error |
|
693 | error : null | |
694 |
|
694 | |||
695 | get_repos |
|
695 | get_repos | |
696 | ^^^^^^^^^ |
|
696 | ^^^^^^^^^ | |
@@ -704,12 +704,12 b' INPUT::' | |||||
704 | id : <id_for_response> |
|
704 | id : <id_for_response> | |
705 | api_key : "<api_key>" |
|
705 | api_key : "<api_key>" | |
706 | method : "get_repos" |
|
706 | method : "get_repos" | |
707 |
args |
|
707 | args : { } | |
708 |
|
708 | |||
709 | OUTPUT:: |
|
709 | OUTPUT:: | |
710 |
|
710 | |||
711 | id : <id_given_in_input> |
|
711 | id : <id_given_in_input> | |
712 | result: [ |
|
712 | result : [ | |
713 | { |
|
713 | { | |
714 | "repo_id" : "<repo_id>", |
|
714 | "repo_id" : "<repo_id>", | |
715 | "repo_name" : "<reponame>" |
|
715 | "repo_name" : "<reponame>" | |
@@ -718,15 +718,15 b' OUTPUT::' | |||||
718 | "private" : "<bool>", |
|
718 | "private" : "<bool>", | |
719 | "created_on" : "<datetimecreated>", |
|
719 | "created_on" : "<datetimecreated>", | |
720 | "description" : "<description>", |
|
720 | "description" : "<description>", | |
721 |
"landing_rev" |
|
721 | "landing_rev" : "<landing_rev>", | |
722 |
"owner" |
|
722 | "owner" : "<repo_owner>", | |
723 |
"fork_of" |
|
723 | "fork_of" : "<name_of_fork_parent>", | |
724 |
"enable_downloads" |
|
724 | "enable_downloads" : "<bool>", | |
725 | "enable_statistics": "<bool>", |
|
725 | "enable_statistics": "<bool>", | |
726 | }, |
|
726 | }, | |
727 | β¦ |
|
727 | β¦ | |
728 | ] |
|
728 | ] | |
729 |
error |
|
729 | error : null | |
730 |
|
730 | |||
731 | get_repo_nodes |
|
731 | get_repo_nodes | |
732 | ^^^^^^^^^^^^^^ |
|
732 | ^^^^^^^^^^^^^^ | |
@@ -740,24 +740,24 b' INPUT::' | |||||
740 | id : <id_for_response> |
|
740 | id : <id_for_response> | |
741 | api_key : "<api_key>" |
|
741 | api_key : "<api_key>" | |
742 | method : "get_repo_nodes" |
|
742 | method : "get_repo_nodes" | |
743 |
args |
|
743 | args : { | |
744 | "repoid" : "<reponame or repo_id>" |
|
744 | "repoid" : "<reponame or repo_id>" | |
745 |
"revision" |
|
745 | "revision" : "<revision>", | |
746 | "root_path" : "<root_path>", |
|
746 | "root_path" : "<root_path>", | |
747 |
"ret_type" |
|
747 | "ret_type" : "<ret_type> = Optional('all')" | |
748 | } |
|
748 | } | |
749 |
|
749 | |||
750 | OUTPUT:: |
|
750 | OUTPUT:: | |
751 |
|
751 | |||
752 | id : <id_given_in_input> |
|
752 | id : <id_given_in_input> | |
753 | result: [ |
|
753 | result : [ | |
754 | { |
|
754 | { | |
755 | "name" : "<name>" |
|
755 | "name" : "<name>" | |
756 | "type" : "<type>", |
|
756 | "type" : "<type>", | |
757 | }, |
|
757 | }, | |
758 | β¦ |
|
758 | β¦ | |
759 | ] |
|
759 | ] | |
760 |
error |
|
760 | error : null | |
761 |
|
761 | |||
762 | create_repo |
|
762 | create_repo | |
763 | ^^^^^^^^^^^ |
|
763 | ^^^^^^^^^^^ | |
@@ -777,7 +777,7 b' INPUT::' | |||||
777 | id : <id_for_response> |
|
777 | id : <id_for_response> | |
778 | api_key : "<api_key>" |
|
778 | api_key : "<api_key>" | |
779 | method : "create_repo" |
|
779 | method : "create_repo" | |
780 |
args |
|
780 | args : { | |
781 | "repo_name" : "<reponame>", |
|
781 | "repo_name" : "<reponame>", | |
782 | "owner" : "<owner_name_or_id = Optional(=apiuser)>", |
|
782 | "owner" : "<owner_name_or_id = Optional(=apiuser)>", | |
783 | "repo_type" : "<repo_type> = Optional('hg')", |
|
783 | "repo_type" : "<repo_type> = Optional('hg')", | |
@@ -785,16 +785,16 b' INPUT::' | |||||
785 | "private" : "<bool> = Optional(False)", |
|
785 | "private" : "<bool> = Optional(False)", | |
786 | "clone_uri" : "<clone_uri> = Optional(None)", |
|
786 | "clone_uri" : "<clone_uri> = Optional(None)", | |
787 | "landing_rev" : "<landing_rev> = Optional('tip')", |
|
787 | "landing_rev" : "<landing_rev> = Optional('tip')", | |
788 |
"enable_downloads" |
|
788 | "enable_downloads" : "<bool> = Optional(False)", | |
789 | "enable_statistics": "<bool> = Optional(False)", |
|
789 | "enable_statistics": "<bool> = Optional(False)", | |
790 | } |
|
790 | } | |
791 |
|
791 | |||
792 | OUTPUT:: |
|
792 | OUTPUT:: | |
793 |
|
793 | |||
794 | id : <id_given_in_input> |
|
794 | id : <id_given_in_input> | |
795 | result: { |
|
795 | result : { | |
796 | "msg": "Created new repository `<reponame>`", |
|
796 | "msg" : "Created new repository `<reponame>`", | |
797 | "repo": { |
|
797 | "repo" : { | |
798 | "repo_id" : "<repo_id>", |
|
798 | "repo_id" : "<repo_id>", | |
799 | "repo_name" : "<reponame>" |
|
799 | "repo_name" : "<reponame>" | |
800 | "repo_type" : "<repo_type>", |
|
800 | "repo_type" : "<repo_type>", | |
@@ -802,14 +802,14 b' OUTPUT::' | |||||
802 | "private" : "<bool>", |
|
802 | "private" : "<bool>", | |
803 | "created_on" : "<datetimecreated>", |
|
803 | "created_on" : "<datetimecreated>", | |
804 | "description" : "<description>", |
|
804 | "description" : "<description>", | |
805 |
"landing_rev" |
|
805 | "landing_rev" : "<landing_rev>", | |
806 |
"owner" |
|
806 | "owner" : "<username or user_id>", | |
807 |
"fork_of" |
|
807 | "fork_of" : "<name_of_fork_parent>", | |
808 |
"enable_downloads" |
|
808 | "enable_downloads" : "<bool>", | |
809 | "enable_statistics": "<bool>", |
|
809 | "enable_statistics": "<bool>", | |
810 | }, |
|
810 | }, | |
811 | } |
|
811 | } | |
812 |
error |
|
812 | error : null | |
813 |
|
813 | |||
814 | update_repo |
|
814 | update_repo | |
815 | ^^^^^^^^^^^ |
|
815 | ^^^^^^^^^^^ | |
@@ -824,7 +824,7 b' INPUT::' | |||||
824 | id : <id_for_response> |
|
824 | id : <id_for_response> | |
825 | api_key : "<api_key>" |
|
825 | api_key : "<api_key>" | |
826 | method : "update_repo" |
|
826 | method : "update_repo" | |
827 |
args |
|
827 | args : { | |
828 | "repoid" : "<reponame or repo_id>" |
|
828 | "repoid" : "<reponame or repo_id>" | |
829 | "name" : "<reponame> = Optional('')", |
|
829 | "name" : "<reponame> = Optional('')", | |
830 | "group" : "<group_id> = Optional(None)", |
|
830 | "group" : "<group_id> = Optional(None)", | |
@@ -833,39 +833,39 b' INPUT::' | |||||
833 | "private" : "<bool> = Optional(False)", |
|
833 | "private" : "<bool> = Optional(False)", | |
834 | "clone_uri" : "<clone_uri> = Optional(None)", |
|
834 | "clone_uri" : "<clone_uri> = Optional(None)", | |
835 | "landing_rev" : "<landing_rev> = Optional('tip')", |
|
835 | "landing_rev" : "<landing_rev> = Optional('tip')", | |
836 |
"enable_downloads" |
|
836 | "enable_downloads" : "<bool> = Optional(False)", | |
837 | "enable_statistics": "<bool> = Optional(False)", |
|
837 | "enable_statistics": "<bool> = Optional(False)", | |
838 | } |
|
838 | } | |
839 |
|
839 | |||
840 | OUTPUT:: |
|
840 | OUTPUT:: | |
841 |
|
841 | |||
842 | id : <id_given_in_input> |
|
842 | id : <id_given_in_input> | |
843 | result: { |
|
843 | result : { | |
844 | "msg": "updated repo ID:repo_id `<reponame>`", |
|
844 | "msg" : "updated repo ID:repo_id `<reponame>`", | |
845 | "repository": { |
|
845 | "repository" : { | |
846 | "repo_id" : "<repo_id>", |
|
846 | "repo_id" : "<repo_id>", | |
847 | "repo_name" : "<reponame>" |
|
847 | "repo_name" : "<reponame>" | |
848 | "repo_type" : "<repo_type>", |
|
848 | "repo_type" : "<repo_type>", | |
849 | "clone_uri" : "<clone_uri>", |
|
849 | "clone_uri" : "<clone_uri>", | |
850 |
"private" |
|
850 | "private" : "<bool>", | |
851 | "created_on" : "<datetimecreated>", |
|
851 | "created_on" : "<datetimecreated>", | |
852 | "description" : "<description>", |
|
852 | "description" : "<description>", | |
853 |
"landing_rev" |
|
853 | "landing_rev" : "<landing_rev>", | |
854 |
"owner" |
|
854 | "owner" : "<username or user_id>", | |
855 |
"fork_of" |
|
855 | "fork_of" : "<name_of_fork_parent>", | |
856 |
"enable_downloads" |
|
856 | "enable_downloads" : "<bool>", | |
857 | "enable_statistics": "<bool>", |
|
857 | "enable_statistics": "<bool>", | |
858 |
"last_changeset" |
|
858 | "last_changeset" : { | |
859 |
"author" |
|
859 | "author" : "<full_author>", | |
860 |
"date" |
|
860 | "date" : "<date_time_of_commit>", | |
861 |
"message" |
|
861 | "message" : "<commit_message>", | |
862 |
"raw_id" |
|
862 | "raw_id" : "<raw_id>", | |
863 | "revision": "<numeric_revision>", |
|
863 | "revision": "<numeric_revision>", | |
864 | "short_id": "<short_id>" |
|
864 | "short_id": "<short_id>" | |
865 | } |
|
865 | } | |
866 | }, |
|
866 | }, | |
867 | } |
|
867 | } | |
868 |
error |
|
868 | error : null | |
869 |
|
869 | |||
870 | fork_repo |
|
870 | fork_repo | |
871 | ^^^^^^^^^ |
|
871 | ^^^^^^^^^ | |
@@ -883,24 +883,24 b' INPUT::' | |||||
883 | id : <id_for_response> |
|
883 | id : <id_for_response> | |
884 | api_key : "<api_key>" |
|
884 | api_key : "<api_key>" | |
885 | method : "fork_repo" |
|
885 | method : "fork_repo" | |
886 |
args |
|
886 | args : { | |
887 | "repoid" : "<reponame or repo_id>", |
|
887 | "repoid" : "<reponame or repo_id>", | |
888 |
"fork_name" |
|
888 | "fork_name" : "<forkname>", | |
889 |
"owner" |
|
889 | "owner" : "<username or user_id = Optional(=apiuser)>", | |
890 |
"description" |
|
890 | "description" : "<description>", | |
891 | "copy_permissions": "<bool>", |
|
891 | "copy_permissions": "<bool>", | |
892 |
"private" |
|
892 | "private" : "<bool>", | |
893 |
"landing_rev" |
|
893 | "landing_rev" : "<landing_rev>" | |
894 | } |
|
894 | } | |
895 |
|
895 | |||
896 | OUTPUT:: |
|
896 | OUTPUT:: | |
897 |
|
897 | |||
898 | id : <id_given_in_input> |
|
898 | id : <id_given_in_input> | |
899 | result: { |
|
899 | result : { | |
900 | "msg": "Created fork of `<reponame>` as `<forkname>`", |
|
900 | "msg" : "Created fork of `<reponame>` as `<forkname>`", | |
901 | "success": true |
|
901 | "success" : true | |
902 | } |
|
902 | } | |
903 |
error |
|
903 | error : null | |
904 |
|
904 | |||
905 | delete_repo |
|
905 | delete_repo | |
906 | ^^^^^^^^^^^ |
|
906 | ^^^^^^^^^^^ | |
@@ -915,19 +915,19 b' INPUT::' | |||||
915 | id : <id_for_response> |
|
915 | id : <id_for_response> | |
916 | api_key : "<api_key>" |
|
916 | api_key : "<api_key>" | |
917 | method : "delete_repo" |
|
917 | method : "delete_repo" | |
918 |
args |
|
918 | args : { | |
919 | "repoid" : "<reponame or repo_id>", |
|
919 | "repoid" : "<reponame or repo_id>", | |
920 |
"forks" |
|
920 | "forks" : "`delete` or `detach` = Optional(None)" | |
921 | } |
|
921 | } | |
922 |
|
922 | |||
923 | OUTPUT:: |
|
923 | OUTPUT:: | |
924 |
|
924 | |||
925 | id : <id_given_in_input> |
|
925 | id : <id_given_in_input> | |
926 | result: { |
|
926 | result : { | |
927 | "msg": "Deleted repository `<reponame>`", |
|
927 | "msg" : "Deleted repository `<reponame>`", | |
928 | "success": true |
|
928 | "success" : true | |
929 | } |
|
929 | } | |
930 |
error |
|
930 | error : null | |
931 |
|
931 | |||
932 | grant_user_permission |
|
932 | grant_user_permission | |
933 | ^^^^^^^^^^^^^^^^^^^^^ |
|
933 | ^^^^^^^^^^^^^^^^^^^^^ | |
@@ -940,7 +940,7 b' INPUT::' | |||||
940 | id : <id_for_response> |
|
940 | id : <id_for_response> | |
941 | api_key : "<api_key>" |
|
941 | api_key : "<api_key>" | |
942 | method : "grant_user_permission" |
|
942 | method : "grant_user_permission" | |
943 |
args |
|
943 | args : { | |
944 | "repoid" : "<reponame or repo_id>" |
|
944 | "repoid" : "<reponame or repo_id>" | |
945 | "userid" : "<username or user_id>" |
|
945 | "userid" : "<username or user_id>" | |
946 | "perm" : "(repository.(none|read|write|admin))", |
|
946 | "perm" : "(repository.(none|read|write|admin))", | |
@@ -949,11 +949,11 b' INPUT::' | |||||
949 | OUTPUT:: |
|
949 | OUTPUT:: | |
950 |
|
950 | |||
951 | id : <id_given_in_input> |
|
951 | id : <id_given_in_input> | |
952 | result: { |
|
952 | result : { | |
953 | "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`", |
|
953 | "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`", | |
954 | "success": true |
|
954 | "success" : true | |
955 | } |
|
955 | } | |
956 |
error |
|
956 | error : null | |
957 |
|
957 | |||
958 | revoke_user_permission |
|
958 | revoke_user_permission | |
959 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
959 | ^^^^^^^^^^^^^^^^^^^^^^ | |
@@ -965,8 +965,8 b' INPUT::' | |||||
965 |
|
965 | |||
966 | id : <id_for_response> |
|
966 | id : <id_for_response> | |
967 | api_key : "<api_key>" |
|
967 | api_key : "<api_key>" | |
968 |
method |
|
968 | method : "revoke_user_permission" | |
969 |
args |
|
969 | args : { | |
970 | "repoid" : "<reponame or repo_id>" |
|
970 | "repoid" : "<reponame or repo_id>" | |
971 | "userid" : "<username or user_id>" |
|
971 | "userid" : "<username or user_id>" | |
972 | } |
|
972 | } | |
@@ -974,11 +974,11 b' INPUT::' | |||||
974 | OUTPUT:: |
|
974 | OUTPUT:: | |
975 |
|
975 | |||
976 | id : <id_given_in_input> |
|
976 | id : <id_given_in_input> | |
977 | result: { |
|
977 | result : { | |
978 | "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`", |
|
978 | "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`", | |
979 | "success": true |
|
979 | "success" : true | |
980 | } |
|
980 | } | |
981 |
error |
|
981 | error : null | |
982 |
|
982 | |||
983 | grant_user_group_permission |
|
983 | grant_user_group_permission | |
984 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
984 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
@@ -992,7 +992,7 b' INPUT::' | |||||
992 | id : <id_for_response> |
|
992 | id : <id_for_response> | |
993 | api_key : "<api_key>" |
|
993 | api_key : "<api_key>" | |
994 | method : "grant_user_group_permission" |
|
994 | method : "grant_user_group_permission" | |
995 |
args |
|
995 | args : { | |
996 | "repoid" : "<reponame or repo_id>" |
|
996 | "repoid" : "<reponame or repo_id>" | |
997 | "usersgroupid" : "<user group id or name>" |
|
997 | "usersgroupid" : "<user group id or name>" | |
998 | "perm" : "(repository.(none|read|write|admin))", |
|
998 | "perm" : "(repository.(none|read|write|admin))", | |
@@ -1001,11 +1001,11 b' INPUT::' | |||||
1001 | OUTPUT:: |
|
1001 | OUTPUT:: | |
1002 |
|
1002 | |||
1003 | id : <id_given_in_input> |
|
1003 | id : <id_given_in_input> | |
1004 | result: { |
|
1004 | result : { | |
1005 | "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`", |
|
1005 | "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`", | |
1006 | "success": true |
|
1006 | "success" : true | |
1007 | } |
|
1007 | } | |
1008 |
error |
|
1008 | error : null | |
1009 |
|
1009 | |||
1010 | revoke_user_group_permission |
|
1010 | revoke_user_group_permission | |
1011 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
1011 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
@@ -1017,8 +1017,8 b' INPUT::' | |||||
1017 |
|
1017 | |||
1018 | id : <id_for_response> |
|
1018 | id : <id_for_response> | |
1019 | api_key : "<api_key>" |
|
1019 | api_key : "<api_key>" | |
1020 |
method |
|
1020 | method : "revoke_user_group_permission" | |
1021 |
args |
|
1021 | args : { | |
1022 | "repoid" : "<reponame or repo_id>" |
|
1022 | "repoid" : "<reponame or repo_id>" | |
1023 | "usersgroupid" : "<user group id or name>" |
|
1023 | "usersgroupid" : "<user group id or name>" | |
1024 | } |
|
1024 | } | |
@@ -1026,11 +1026,11 b' INPUT::' | |||||
1026 | OUTPUT:: |
|
1026 | OUTPUT:: | |
1027 |
|
1027 | |||
1028 | id : <id_given_in_input> |
|
1028 | id : <id_given_in_input> | |
1029 | result: { |
|
1029 | result : { | |
1030 | "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`", |
|
1030 | "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`", | |
1031 | "success": true |
|
1031 | "success" : true | |
1032 | } |
|
1032 | } | |
1033 |
error |
|
1033 | error : null | |
1034 |
|
1034 | |||
1035 | get_changesets |
|
1035 | get_changesets | |
1036 | ^^^^^^^^^^^^^^ |
|
1036 | ^^^^^^^^^^^^^^ | |
@@ -1042,37 +1042,37 b' INPUT::' | |||||
1042 |
|
1042 | |||
1043 | id : <id_for_response> |
|
1043 | id : <id_for_response> | |
1044 | api_key : "<api_key>" |
|
1044 | api_key : "<api_key>" | |
1045 |
method |
|
1045 | method : "get_changesets" | |
1046 |
args |
|
1046 | args : { | |
1047 | "repoid" : "<reponame or repo_id>", |
|
1047 | "repoid" : "<reponame or repo_id>", | |
1048 | "start": "<revision number> = Optional(None)", |
|
1048 | "start" : "<revision number> = Optional(None)", | |
1049 | "end": "<revision number> = Optional(None)", |
|
1049 | "end" : "<revision number> = Optional(None)", | |
1050 | "start_date": "<date> = Optional(None)", # in "%Y-%m-%dT%H:%M:%S" format |
|
1050 | "start_date" : "<date> = Optional(None)", # in "%Y-%m-%dT%H:%M:%S" format | |
1051 | "end_date": "<date> = Optional(None)", # in "%Y-%m-%dT%H:%M:%S" format |
|
1051 | "end_date" : "<date> = Optional(None)", # in "%Y-%m-%dT%H:%M:%S" format | |
1052 | "branch_name": "<branch name filter> = Optional(None)", |
|
1052 | "branch_name" : "<branch name filter> = Optional(None)", | |
1053 | "reverse": "<bool> = Optional(False)", |
|
1053 | "reverse" : "<bool> = Optional(False)", | |
1054 | "with_file_list": "<bool> = Optional(False)" |
|
1054 | "with_file_list" : "<bool> = Optional(False)" | |
1055 | } |
|
1055 | } | |
1056 |
|
1056 | |||
1057 | OUTPUT:: |
|
1057 | OUTPUT:: | |
1058 |
|
1058 | |||
1059 | id : <id_given_in_input> |
|
1059 | id : <id_given_in_input> | |
1060 | result: [ |
|
1060 | result : [ | |
1061 | { |
|
1061 | { | |
1062 | "raw_id": "<raw_id>", |
|
1062 | "raw_id" : "<raw_id>", | |
1063 | "short_id": "<short_id>", |
|
1063 | "short_id" : "<short_id>", | |
1064 | "author": "<full_author>", |
|
1064 | "author" : "<full_author>", | |
1065 | "date": "<date_time_of_commit>", |
|
1065 | "date" : "<date_time_of_commit>", | |
1066 | "message": "<commit_message>", |
|
1066 | "message" : "<commit_message>", | |
1067 | "revision": "<numeric_revision>", |
|
1067 | "revision" : "<numeric_revision>", | |
1068 | <if with_file_list == True> |
|
1068 | <if with_file_list == True> | |
1069 | "added": [<list of added files>], |
|
1069 | "added" : [<list of added files>], | |
1070 | "changed": [<list of changed files>], |
|
1070 | "changed" : [<list of changed files>], | |
1071 | "removed": [<list of removed files>] |
|
1071 | "removed" : [<list of removed files>] | |
1072 | }, |
|
1072 | }, | |
1073 | ... |
|
1073 | ... | |
1074 | ] |
|
1074 | ] | |
1075 |
error |
|
1075 | error : null | |
1076 |
|
1076 | |||
1077 | get_changeset |
|
1077 | get_changeset | |
1078 | ^^^^^^^^^^^^^ |
|
1078 | ^^^^^^^^^^^^^ | |
@@ -1085,32 +1085,32 b' INPUT::' | |||||
1085 |
|
1085 | |||
1086 | id : <id_for_response> |
|
1086 | id : <id_for_response> | |
1087 | api_key : "<api_key>" |
|
1087 | api_key : "<api_key>" | |
1088 |
method |
|
1088 | method : "get_changeset" | |
1089 |
args |
|
1089 | args : { | |
1090 | "repoid" : "<reponame or repo_id>", |
|
1090 | "repoid" : "<reponame or repo_id>", | |
1091 | "raw_id" : "<raw_id>", |
|
1091 | "raw_id" : "<raw_id>", | |
1092 | "with_reviews": "<bool> = Optional(False)" |
|
1092 | "with_reviews" : "<bool> = Optional(False)" | |
1093 | } |
|
1093 | } | |
1094 |
|
1094 | |||
1095 | OUTPUT:: |
|
1095 | OUTPUT:: | |
1096 |
|
1096 | |||
1097 | id : <id_given_in_input> |
|
1097 | id : <id_given_in_input> | |
1098 | result: { |
|
1098 | result : { | |
1099 |
"author" |
|
1099 | "author" : "<full_author>", | |
1100 |
"date" |
|
1100 | "date" : "<date_time_of_commit>", | |
1101 |
"message" |
|
1101 | "message" : "<commit_message>", | |
1102 |
"raw_id" |
|
1102 | "raw_id" : "<raw_id>", | |
1103 | "revision": "<numeric_revision>", |
|
1103 | "revision": "<numeric_revision>", | |
1104 | "short_id": "<short_id>", |
|
1104 | "short_id": "<short_id>", | |
1105 | "reviews": [{ |
|
1105 | "reviews" : [{ | |
1106 |
"reviewer" |
|
1106 | "reviewer" : "<username>", | |
1107 | "modified_at": "<date_time_of_review>", # iso 8601 date, server's timezone |
|
1107 | "modified_at" : "<date_time_of_review>", # iso 8601 date, server's timezone | |
1108 |
"status" |
|
1108 | "status" : "<status_of_review>", # "under_review", "approved" or "rejected" | |
1109 | }, |
|
1109 | }, | |
1110 | ... |
|
1110 | ... | |
1111 | ] |
|
1111 | ] | |
1112 | } |
|
1112 | } | |
1113 |
error |
|
1113 | error : null | |
1114 |
|
1114 | |||
1115 | Example output:: |
|
1115 | Example output:: | |
1116 |
|
1116 | |||
@@ -1153,60 +1153,60 b' INPUT::' | |||||
1153 |
|
1153 | |||
1154 | id : <id_for_response> |
|
1154 | id : <id_for_response> | |
1155 | api_key : "<api_key>" |
|
1155 | api_key : "<api_key>" | |
1156 |
method |
|
1156 | method : "get_pullrequest" | |
1157 |
args |
|
1157 | args : { | |
1158 | "pullrequest_id" : "<pullrequest_id>", |
|
1158 | "pullrequest_id" : "<pullrequest_id>", | |
1159 | } |
|
1159 | } | |
1160 |
|
1160 | |||
1161 | OUTPUT:: |
|
1161 | OUTPUT:: | |
1162 |
|
1162 | |||
1163 | id : <id_given_in_input> |
|
1163 | id : <id_given_in_input> | |
1164 | result: { |
|
1164 | result : { | |
1165 | "status": "<pull_request_status>", |
|
1165 | "status" : "<pull_request_status>", | |
1166 | "pull_request_id": <pull_request_id>, |
|
1166 | "pull_request_id" : <pull_request_id>, | |
1167 | "description": "<pull_request_description>", |
|
1167 | "description" : "<pull_request_description>", | |
1168 | "title": "<pull_request_title>", |
|
1168 | "title" : "<pull_request_title>", | |
1169 | "url": "<pull_request_url>", |
|
1169 | "url" : "<pull_request_url>", | |
1170 | "reviewers": [ |
|
1170 | "reviewers" : [ | |
1171 | { |
|
1171 | { | |
1172 | "username": "<user_name>", |
|
1172 | "username" : "<user_name>", | |
1173 | }, |
|
1173 | }, | |
1174 | ... |
|
1174 | ... | |
1175 | ], |
|
1175 | ], | |
1176 | "org_repo_url": "<repo_url>", |
|
1176 | "org_repo_url" : "<repo_url>", | |
1177 | "org_ref_parts": [ |
|
1177 | "org_ref_parts" : [ | |
1178 | "<ref_type>", |
|
1178 | "<ref_type>", | |
1179 | "<ref_name>", |
|
1179 | "<ref_name>", | |
1180 | "<raw_id>" |
|
1180 | "<raw_id>" | |
1181 | ], |
|
1181 | ], | |
1182 | "other_ref_parts": [ |
|
1182 | "other_ref_parts" : [ | |
1183 | "<ref_type>", |
|
1183 | "<ref_type>", | |
1184 | "<ref_name>", |
|
1184 | "<ref_name>", | |
1185 | "<raw_id>" |
|
1185 | "<raw_id>" | |
1186 | ], |
|
1186 | ], | |
1187 | "comments": [ |
|
1187 | "comments" : [ | |
1188 | { |
|
1188 | { | |
1189 | "username": "<user_name>", |
|
1189 | "username" : "<user_name>", | |
1190 | "text": "<comment text>", |
|
1190 | "text" : "<comment text>", | |
1191 | "comment_id": "<comment_id>", |
|
1191 | "comment_id" : "<comment_id>", | |
1192 | }, |
|
1192 | }, | |
1193 | ... |
|
1193 | ... | |
1194 | ], |
|
1194 | ], | |
1195 | "owner": "<username>", |
|
1195 | "owner" : "<username>", | |
1196 | "statuses": [ |
|
1196 | "statuses" : [ | |
1197 | { |
|
1197 | { | |
1198 | "status": "<status_of_review>", # "under_review", "approved" or "rejected" |
|
1198 | "status" : "<status_of_review>", # "under_review", "approved" or "rejected" | |
1199 | "reviewer": "<user_name>", |
|
1199 | "reviewer" : "<user_name>", | |
1200 | "modified_at": "<date_time_of_review>" # iso 8601 date, server's timezone |
|
1200 | "modified_at" : "<date_time_of_review>" # iso 8601 date, server's timezone | |
1201 | }, |
|
1201 | }, | |
1202 | ... |
|
1202 | ... | |
1203 | ], |
|
1203 | ], | |
1204 | "revisions": [ |
|
1204 | "revisions" : [ | |
1205 | "<raw_id>", |
|
1205 | "<raw_id>", | |
1206 | ... |
|
1206 | ... | |
1207 | ] |
|
1207 | ] | |
1208 | }, |
|
1208 | }, | |
1209 |
error |
|
1209 | error : null | |
1210 |
|
1210 | |||
1211 | comment_pullrequest |
|
1211 | comment_pullrequest | |
1212 | ^^^^^^^^^^^^^^^^^^^ |
|
1212 | ^^^^^^^^^^^^^^^^^^^ | |
@@ -1218,19 +1218,19 b' INPUT::' | |||||
1218 |
|
1218 | |||
1219 | id : <id_for_response> |
|
1219 | id : <id_for_response> | |
1220 | api_key : "<api_key>" |
|
1220 | api_key : "<api_key>" | |
1221 |
method |
|
1221 | method : "comment_pullrequest" | |
1222 |
args |
|
1222 | args : { | |
1223 |
"pull_request_id" |
|
1223 | "pull_request_id" : "<pull_request_id>", | |
1224 |
"comment_msg" |
|
1224 | "comment_msg" : Optional(''), | |
1225 |
"status" |
|
1225 | "status" : Optional(None), # "under_review", "approved" or "rejected" | |
1226 |
"close_pr" |
|
1226 | "close_pr" : Optional(False)", | |
1227 | } |
|
1227 | } | |
1228 |
|
1228 | |||
1229 | OUTPUT:: |
|
1229 | OUTPUT:: | |
1230 |
|
1230 | |||
1231 | id : <id_given_in_input> |
|
1231 | id : <id_given_in_input> | |
1232 | result: True |
|
1232 | result : True | |
1233 |
error |
|
1233 | error : null | |
1234 |
|
1234 | |||
1235 |
|
1235 | |||
1236 | API access for web views |
|
1236 | API access for web views |
@@ -174,10 +174,10 b' class ApiController(JSONRPCController):' | |||||
174 |
|
174 | |||
175 | id : <id_given_in_input> |
|
175 | id : <id_given_in_input> | |
176 | result : { |
|
176 | result : { | |
177 | "msg": "Pulled from `<repository name>`" |
|
177 | "msg" : "Pulled from `<repository name>`" | |
178 | "repository": "<repository name>" |
|
178 | "repository" : "<repository name>" | |
179 | } |
|
179 | } | |
180 |
error : |
|
180 | error : null | |
181 |
|
181 | |||
182 | ERROR OUTPUT:: |
|
182 | ERROR OUTPUT:: | |
183 |
|
183 | |||
@@ -223,7 +223,7 b' class ApiController(JSONRPCController):' | |||||
223 | 'added': [<added repository name>,...] |
|
223 | 'added': [<added repository name>,...] | |
224 | 'removed': [<removed repository name>,...] |
|
224 | 'removed': [<removed repository name>,...] | |
225 | } |
|
225 | } | |
226 |
error : |
|
226 | error : null | |
227 |
|
227 | |||
228 | ERROR OUTPUT:: |
|
228 | ERROR OUTPUT:: | |
229 |
|
229 | |||
@@ -260,7 +260,7 b' class ApiController(JSONRPCController):' | |||||
260 | 'msg': Cache for repository `<repository name>` was invalidated, |
|
260 | 'msg': Cache for repository `<repository name>` was invalidated, | |
261 | 'repository': <repository name> |
|
261 | 'repository': <repository name> | |
262 | } |
|
262 | } | |
263 |
error : |
|
263 | error : null | |
264 |
|
264 | |||
265 | ERROR OUTPUT:: |
|
265 | ERROR OUTPUT:: | |
266 |
|
266 | |||
@@ -303,14 +303,14 b' class ApiController(JSONRPCController):' | |||||
303 |
|
303 | |||
304 | id : <id_given_in_input> |
|
304 | id : <id_given_in_input> | |
305 | result : { |
|
305 | result : { | |
306 | "server_ip_addr": "<ip_from_client>", |
|
306 | "server_ip_addr" : "<ip_from_client>", | |
307 | "user_ips": [ |
|
307 | "user_ips" : [ | |
308 | { |
|
308 | { | |
309 | "ip_addr": "<ip_with_mask>", |
|
309 | "ip_addr" : "<ip_with_mask>", | |
310 | "ip_range": ["<start_ip>", "<end_ip>"], |
|
310 | "ip_range" : ["<start_ip>", "<end_ip>"], | |
311 | }, |
|
311 | }, | |
312 | ... |
|
312 | ... | |
313 | ] |
|
313 | ] | |
314 | } |
|
314 | } | |
315 | error : null |
|
315 | error : null | |
316 | """ |
|
316 | """ | |
@@ -335,12 +335,12 b' class ApiController(JSONRPCController):' | |||||
335 |
|
335 | |||
336 | id : <id_given_in_input> |
|
336 | id : <id_given_in_input> | |
337 | result : { |
|
337 | result : { | |
338 | 'modules': [ [<module name>, <module version>], ...] |
|
338 | 'modules' : [ [<module name>, <module version>], ...] | |
339 | 'py_version': <python version>, |
|
339 | 'py_version' : <python version>, | |
340 | 'platform': <platform type>, |
|
340 | 'platform' : <platform type>, | |
341 | 'kallithea_version': <kallithea version>, |
|
341 | 'kallithea_version' : <kallithea version>, | |
342 | 'git_version': '<git version>', |
|
342 | 'git_version' : '<git version>', | |
343 | 'git_path': '<git path>' |
|
343 | 'git_path' : '<git path>' | |
344 | } |
|
344 | } | |
345 | error : null |
|
345 | error : null | |
346 | """ |
|
346 | """ | |
@@ -360,26 +360,26 b' class ApiController(JSONRPCController):' | |||||
360 | OUTPUT:: |
|
360 | OUTPUT:: | |
361 |
|
361 | |||
362 | id : <id_given_in_input> |
|
362 | id : <id_given_in_input> | |
363 | result: None if user does not exist or |
|
363 | result : None if user does not exist or | |
364 | { |
|
364 | { | |
365 | "user_id" : "<user_id>", |
|
365 | "user_id" : "<user_id>", | |
366 | "username" : "<username>", |
|
366 | "username" : "<username>", | |
367 |
"firstname" |
|
367 | "firstname" : "<firstname>", | |
368 | "lastname" : "<lastname>", |
|
368 | "lastname" : "<lastname>", | |
369 | "email" : "<email>", |
|
369 | "email" : "<email>", | |
370 |
"emails" |
|
370 | "emails" : "[<list of all emails including additional ones>]", | |
371 | "active" : "<bool: user active>", |
|
371 | "active" : "<bool: user active>", | |
372 | "admin" : "<bool: user is admin>", |
|
372 | "admin" : "<bool: user is admin>", | |
373 | "permissions": { |
|
373 | "permissions" : { | |
374 | "global": ["hg.create.repository", |
|
374 | "global" : ["hg.create.repository", | |
375 | "repository.read", |
|
375 | "repository.read", | |
376 | "hg.register.manual_activate"], |
|
376 | "hg.register.manual_activate"], | |
377 | "repositories": {"repo1": "repository.none"}, |
|
377 | "repositories" : {"repo1" : "repository.none"}, | |
378 | "repositories_groups": {"Group1": "group.read"}, |
|
378 | "repositories_groups" : {"Group1" : "group.read"}, | |
379 | "user_groups": { "usrgrp1": "usergroup.admin" } |
|
379 | "user_groups" : { "usrgrp1" : "usergroup.admin" } | |
380 | }, |
|
380 | }, | |
381 | } |
|
381 | } | |
382 |
error |
|
382 | error : null | |
383 | """ |
|
383 | """ | |
384 | if not HasPermissionAny('hg.admin')(): |
|
384 | if not HasPermissionAny('hg.admin')(): | |
385 | # make sure normal user does not pass someone else userid, |
|
385 | # make sure normal user does not pass someone else userid, | |
@@ -406,8 +406,8 b' class ApiController(JSONRPCController):' | |||||
406 | OUTPUT:: |
|
406 | OUTPUT:: | |
407 |
|
407 | |||
408 | id : <id_given_in_input> |
|
408 | id : <id_given_in_input> | |
409 | result: [<user_object>, ...] |
|
409 | result : [<user_object>, ...] | |
410 |
error |
|
410 | error : null | |
411 | """ |
|
411 | """ | |
412 | return [ |
|
412 | return [ | |
413 | user.get_api_data() |
|
413 | user.get_api_data() | |
@@ -448,11 +448,11 b' class ApiController(JSONRPCController):' | |||||
448 | OUTPUT:: |
|
448 | OUTPUT:: | |
449 |
|
449 | |||
450 | id : <id_given_in_input> |
|
450 | id : <id_given_in_input> | |
451 | result: { |
|
451 | result : { | |
452 | "msg" : "created new user `<username>`", |
|
452 | "msg" : "created new user `<username>`", | |
453 | "user": <user_obj> |
|
453 | "user" : <user_obj> | |
454 | } |
|
454 | } | |
455 |
error |
|
455 | error : null | |
456 |
|
456 | |||
457 | ERROR OUTPUT:: |
|
457 | ERROR OUTPUT:: | |
458 |
|
458 | |||
@@ -527,11 +527,11 b' class ApiController(JSONRPCController):' | |||||
527 | OUTPUT:: |
|
527 | OUTPUT:: | |
528 |
|
528 | |||
529 | id : <id_given_in_input> |
|
529 | id : <id_given_in_input> | |
530 | result: { |
|
530 | result : { | |
531 | "msg" : "updated user ID:<userid> <username>", |
|
531 | "msg" : "updated user ID:<userid> <username>", | |
532 | "user": <user_object>, |
|
532 | "user" : <user_object>, | |
533 | } |
|
533 | } | |
534 |
error |
|
534 | error : null | |
535 |
|
535 | |||
536 | ERROR OUTPUT:: |
|
536 | ERROR OUTPUT:: | |
537 |
|
537 | |||
@@ -583,11 +583,11 b' class ApiController(JSONRPCController):' | |||||
583 | OUTPUT:: |
|
583 | OUTPUT:: | |
584 |
|
584 | |||
585 | id : <id_given_in_input> |
|
585 | id : <id_given_in_input> | |
586 | result: { |
|
586 | result : { | |
587 | "msg" : "deleted user ID:<userid> <username>", |
|
587 | "msg" : "deleted user ID:<userid> <username>", | |
588 | "user": null |
|
588 | "user" : null | |
589 | } |
|
589 | } | |
590 |
error |
|
590 | error : null | |
591 |
|
591 | |||
592 | ERROR OUTPUT:: |
|
592 | ERROR OUTPUT:: | |
593 |
|
593 | |||
@@ -629,10 +629,10 b' class ApiController(JSONRPCController):' | |||||
629 | { |
|
629 | { | |
630 | "users_group_id" : "<id>", |
|
630 | "users_group_id" : "<id>", | |
631 | "group_name" : "<groupname>", |
|
631 | "group_name" : "<groupname>", | |
632 | "group_description": "<description>" |
|
632 | "group_description" : "<description>" | |
633 |
"active" |
|
633 | "active" : "<bool>", | |
634 |
"owner" |
|
634 | "owner" : "<username>" | |
635 | "members" : [<user_obj>,...] |
|
635 | "members" : [<user_obj>,...] | |
636 | } |
|
636 | } | |
637 | error : null |
|
637 | error : null | |
638 | """ |
|
638 | """ | |
@@ -682,11 +682,11 b' class ApiController(JSONRPCController):' | |||||
682 | OUTPUT:: |
|
682 | OUTPUT:: | |
683 |
|
683 | |||
684 | id : <id_given_in_input> |
|
684 | id : <id_given_in_input> | |
685 | result: { |
|
685 | result : { | |
686 | "msg": "created new user group `<groupname>`", |
|
686 | "msg" : "created new user group `<groupname>`", | |
687 | "user_group": <user_group_object> |
|
687 | "user_group" : <user_group_object> | |
688 | } |
|
688 | } | |
689 |
error |
|
689 | error : null | |
690 |
|
690 | |||
691 | ERROR OUTPUT:: |
|
691 | ERROR OUTPUT:: | |
692 |
|
692 | |||
@@ -740,10 +740,10 b' class ApiController(JSONRPCController):' | |||||
740 |
|
740 | |||
741 | id : <id_given_in_input> |
|
741 | id : <id_given_in_input> | |
742 | result : { |
|
742 | result : { | |
743 | "msg": 'updated user group ID:<user group id> <user group name>', |
|
743 | "msg" : 'updated user group ID:<user group id> <user group name>', | |
744 | "user_group": <user_group_object> |
|
744 | "user_group" : <user_group_object> | |
745 | } |
|
745 | } | |
746 |
error : |
|
746 | error : null | |
747 |
|
747 | |||
748 | ERROR OUTPUT:: |
|
748 | ERROR OUTPUT:: | |
749 |
|
749 | |||
@@ -792,9 +792,9 b' class ApiController(JSONRPCController):' | |||||
792 |
|
792 | |||
793 | id : <id_given_in_input> |
|
793 | id : <id_given_in_input> | |
794 | result : { |
|
794 | result : { | |
795 | "msg": "deleted user group ID:<user_group_id> <user_group_name>" |
|
795 | "msg" : "deleted user group ID:<user_group_id> <user_group_name>" | |
796 | } |
|
796 | } | |
797 |
error : |
|
797 | error : null | |
798 |
|
798 | |||
799 | ERROR OUTPUT:: |
|
799 | ERROR OUTPUT:: | |
800 |
|
800 | |||
@@ -845,11 +845,11 b' class ApiController(JSONRPCController):' | |||||
845 |
|
845 | |||
846 | id : <id_given_in_input> |
|
846 | id : <id_given_in_input> | |
847 | result : { |
|
847 | result : { | |
848 | "success": True|False # depends on if member is in group |
|
848 | "success" : True|False # depends on if member is in group | |
849 | "msg": "added member `<username>` to a user group `<groupname>` | |
|
849 | "msg" : "added member `<username>` to a user group `<groupname>` | | |
850 | User is already in that group" |
|
850 | User is already in that group" | |
851 | } |
|
851 | } | |
852 |
error : |
|
852 | error : null | |
853 |
|
853 | |||
854 | ERROR OUTPUT:: |
|
854 | ERROR OUTPUT:: | |
855 |
|
855 | |||
@@ -899,12 +899,12 b' class ApiController(JSONRPCController):' | |||||
899 | OUTPUT:: |
|
899 | OUTPUT:: | |
900 |
|
900 | |||
901 | id : <id_given_in_input> |
|
901 | id : <id_given_in_input> | |
902 | result: { |
|
902 | result : { | |
903 |
"success" |
|
903 | "success" : True|False, # depends on if member is in group | |
904 | "msg": "removed member <username> from user group <groupname> | |
|
904 | "msg" : "removed member <username> from user group <groupname> | | |
905 | User wasn't in group" |
|
905 | User wasn't in group" | |
906 | } |
|
906 | } | |
907 |
error |
|
907 | error : null | |
908 | """ |
|
908 | """ | |
909 | user = get_user_or_error(userid) |
|
909 | user = get_user_or_error(userid) | |
910 | user_group = get_user_group_or_error(usergroupid) |
|
910 | user_group = get_user_group_or_error(usergroupid) | |
@@ -949,52 +949,52 b' class ApiController(JSONRPCController):' | |||||
949 | "repo_name" : "<reponame>" |
|
949 | "repo_name" : "<reponame>" | |
950 | "repo_type" : "<repo_type>", |
|
950 | "repo_type" : "<repo_type>", | |
951 | "clone_uri" : "<clone_uri>", |
|
951 | "clone_uri" : "<clone_uri>", | |
952 |
"enable_downloads" |
|
952 | "enable_downloads" : "<bool>", | |
953 | "enable_statistics": "<bool>", |
|
953 | "enable_statistics": "<bool>", | |
954 |
"private" |
|
954 | "private" : "<bool>", | |
955 | "created_on" : "<date_time_created>", |
|
955 | "created_on" : "<date_time_created>", | |
956 | "description" : "<description>", |
|
956 | "description" : "<description>", | |
957 |
"landing_rev" |
|
957 | "landing_rev" : "<landing_rev>", | |
958 |
"last_changeset" |
|
958 | "last_changeset" : { | |
959 |
"author" |
|
959 | "author" : "<full_author>", | |
960 |
"date" |
|
960 | "date" : "<date_time_of_commit>", | |
961 |
"message" |
|
961 | "message" : "<commit_message>", | |
962 |
"raw_id" |
|
962 | "raw_id" : "<raw_id>", | |
963 | "revision": "<numeric_revision>", |
|
963 | "revision": "<numeric_revision>", | |
964 | "short_id": "<short_id>" |
|
964 | "short_id": "<short_id>" | |
965 | } |
|
965 | } | |
966 |
"owner" |
|
966 | "owner" : "<repo_owner>", | |
967 |
"fork_of" |
|
967 | "fork_of" : "<name_of_fork_parent>", | |
968 | "members" : [ |
|
968 | "members" : [ | |
969 | { |
|
969 | { | |
970 |
"name" |
|
970 | "name" : "<username>", | |
971 | "type" : "user", |
|
971 | "type" : "user", | |
972 | "permission" : "repository.(read|write|admin)" |
|
972 | "permission" : "repository.(read|write|admin)" | |
973 | }, |
|
973 | }, | |
974 | β¦ |
|
974 | β¦ | |
975 | { |
|
975 | { | |
976 |
"name" |
|
976 | "name" : "<usergroup name>", | |
977 | "type" : "user_group", |
|
977 | "type" : "user_group", | |
978 | "permission" : "usergroup.(read|write|admin)" |
|
978 | "permission" : "usergroup.(read|write|admin)" | |
979 | }, |
|
979 | }, | |
980 | β¦ |
|
980 | β¦ | |
981 | ] |
|
981 | ] | |
982 |
"followers" |
|
982 | "followers" : [<user_obj>, ...], | |
983 | <if with_revision_names == True> |
|
983 | <if with_revision_names == True> | |
984 | "tags": { |
|
984 | "tags" : { | |
985 | "<tagname>": "<raw_id>", |
|
985 | "<tagname>" : "<raw_id>", | |
986 | ... |
|
986 | ... | |
987 | }, |
|
987 | }, | |
988 | "branches": { |
|
988 | "branches" : { | |
989 | "<branchname>": "<raw_id>", |
|
989 | "<branchname>" : "<raw_id>", | |
990 | ... |
|
990 | ... | |
991 | }, |
|
991 | }, | |
992 | "bookmarks": { |
|
992 | "bookmarks" : { | |
993 | "<bookmarkname>": "<raw_id>", |
|
993 | "<bookmarkname>" : "<raw_id>", | |
994 | ... |
|
994 | ... | |
995 | }, |
|
995 | }, | |
996 | } |
|
996 | } | |
997 |
error : |
|
997 | error : null | |
998 | """ |
|
998 | """ | |
999 | repo = get_repo_or_error(repoid) |
|
999 | repo = get_repo_or_error(repoid) | |
1000 |
|
1000 | |||
@@ -1044,7 +1044,7 b' class ApiController(JSONRPCController):' | |||||
1044 | OUTPUT:: |
|
1044 | OUTPUT:: | |
1045 |
|
1045 | |||
1046 | id : <id_given_in_input> |
|
1046 | id : <id_given_in_input> | |
1047 | result: [ |
|
1047 | result : [ | |
1048 | { |
|
1048 | { | |
1049 | "repo_id" : "<repo_id>", |
|
1049 | "repo_id" : "<repo_id>", | |
1050 | "repo_name" : "<reponame>" |
|
1050 | "repo_name" : "<reponame>" | |
@@ -1053,15 +1053,15 b' class ApiController(JSONRPCController):' | |||||
1053 | "private" : "<bool>", |
|
1053 | "private" : "<bool>", | |
1054 | "created_on" : "<datetimecreated>", |
|
1054 | "created_on" : "<datetimecreated>", | |
1055 | "description" : "<description>", |
|
1055 | "description" : "<description>", | |
1056 |
"landing_rev" |
|
1056 | "landing_rev" : "<landing_rev>", | |
1057 |
"owner" |
|
1057 | "owner" : "<repo_owner>", | |
1058 |
"fork_of" |
|
1058 | "fork_of" : "<name_of_fork_parent>", | |
1059 |
"enable_downloads" |
|
1059 | "enable_downloads" : "<bool>", | |
1060 | "enable_statistics": "<bool>", |
|
1060 | "enable_statistics": "<bool>", | |
1061 | }, |
|
1061 | }, | |
1062 | β¦ |
|
1062 | β¦ | |
1063 | ] |
|
1063 | ] | |
1064 |
error |
|
1064 | error : null | |
1065 | """ |
|
1065 | """ | |
1066 | if not HasPermissionAny('hg.admin')(): |
|
1066 | if not HasPermissionAny('hg.admin')(): | |
1067 | repos = request.authuser.get_all_user_repos() |
|
1067 | repos = request.authuser.get_all_user_repos() | |
@@ -1094,14 +1094,14 b' class ApiController(JSONRPCController):' | |||||
1094 | OUTPUT:: |
|
1094 | OUTPUT:: | |
1095 |
|
1095 | |||
1096 | id : <id_given_in_input> |
|
1096 | id : <id_given_in_input> | |
1097 | result: [ |
|
1097 | result : [ | |
1098 | { |
|
1098 | { | |
1099 | "name" : "<name>" |
|
1099 | "name" : "<name>" | |
1100 | "type" : "<type>", |
|
1100 | "type" : "<type>", | |
1101 | }, |
|
1101 | }, | |
1102 | β¦ |
|
1102 | β¦ | |
1103 | ] |
|
1103 | ] | |
1104 |
error |
|
1104 | error : null | |
1105 | """ |
|
1105 | """ | |
1106 | repo = get_repo_or_error(repoid) |
|
1106 | repo = get_repo_or_error(repoid) | |
1107 |
|
1107 | |||
@@ -1169,11 +1169,11 b' class ApiController(JSONRPCController):' | |||||
1169 | OUTPUT:: |
|
1169 | OUTPUT:: | |
1170 |
|
1170 | |||
1171 | id : <id_given_in_input> |
|
1171 | id : <id_given_in_input> | |
1172 | result: { |
|
1172 | result : { | |
1173 | "msg": "Created new repository `<reponame>`", |
|
1173 | "msg" : "Created new repository `<reponame>`", | |
1174 | "success": true |
|
1174 | "success" : true | |
1175 | } |
|
1175 | } | |
1176 |
error |
|
1176 | error : null | |
1177 |
|
1177 | |||
1178 | ERROR OUTPUT:: |
|
1178 | ERROR OUTPUT:: | |
1179 |
|
1179 | |||
@@ -1342,24 +1342,24 b' class ApiController(JSONRPCController):' | |||||
1342 | id : <id_for_response> |
|
1342 | id : <id_for_response> | |
1343 | api_key : "<api_key>" |
|
1343 | api_key : "<api_key>" | |
1344 | method : "fork_repo" |
|
1344 | method : "fork_repo" | |
1345 |
args |
|
1345 | args : { | |
1346 | "repoid" : "<reponame or repo_id>", |
|
1346 | "repoid" : "<reponame or repo_id>", | |
1347 |
"fork_name" |
|
1347 | "fork_name" : "<forkname>", | |
1348 |
"owner" |
|
1348 | "owner" : "<username or user_id = Optional(=apiuser)>", | |
1349 |
"description" |
|
1349 | "description" : "<description>", | |
1350 | "copy_permissions": "<bool>", |
|
1350 | "copy_permissions": "<bool>", | |
1351 |
"private" |
|
1351 | "private" : "<bool>", | |
1352 |
"landing_rev" |
|
1352 | "landing_rev" : "<landing_rev>" | |
1353 | } |
|
1353 | } | |
1354 |
|
1354 | |||
1355 | OUTPUT:: |
|
1355 | OUTPUT:: | |
1356 |
|
1356 | |||
1357 | id : <id_given_in_input> |
|
1357 | id : <id_given_in_input> | |
1358 | result: { |
|
1358 | result : { | |
1359 | "msg": "Created fork of `<reponame>` as `<forkname>`", |
|
1359 | "msg" : "Created fork of `<reponame>` as `<forkname>`", | |
1360 | "success": true |
|
1360 | "success" : true | |
1361 | } |
|
1361 | } | |
1362 |
error |
|
1362 | error : null | |
1363 | """ |
|
1363 | """ | |
1364 | repo = get_repo_or_error(repoid) |
|
1364 | repo = get_repo_or_error(repoid) | |
1365 | repo_name = repo.repo_name |
|
1365 | repo_name = repo.repo_name | |
@@ -1442,11 +1442,11 b' class ApiController(JSONRPCController):' | |||||
1442 | OUTPUT:: |
|
1442 | OUTPUT:: | |
1443 |
|
1443 | |||
1444 | id : <id_given_in_input> |
|
1444 | id : <id_given_in_input> | |
1445 | result: { |
|
1445 | result : { | |
1446 | "msg": "Deleted repository `<reponame>`", |
|
1446 | "msg" : "Deleted repository `<reponame>`", | |
1447 | "success": true |
|
1447 | "success" : true | |
1448 | } |
|
1448 | } | |
1449 |
error |
|
1449 | error : null | |
1450 | """ |
|
1450 | """ | |
1451 | repo = get_repo_or_error(repoid) |
|
1451 | repo = get_repo_or_error(repoid) | |
1452 |
|
1452 | |||
@@ -1496,11 +1496,11 b' class ApiController(JSONRPCController):' | |||||
1496 | OUTPUT:: |
|
1496 | OUTPUT:: | |
1497 |
|
1497 | |||
1498 | id : <id_given_in_input> |
|
1498 | id : <id_given_in_input> | |
1499 | result: { |
|
1499 | result : { | |
1500 | "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`", |
|
1500 | "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`", | |
1501 | "success": true |
|
1501 | "success" : true | |
1502 | } |
|
1502 | } | |
1503 |
error |
|
1503 | error : null | |
1504 | """ |
|
1504 | """ | |
1505 | repo = get_repo_or_error(repoid) |
|
1505 | repo = get_repo_or_error(repoid) | |
1506 | user = get_user_or_error(userid) |
|
1506 | user = get_user_or_error(userid) | |
@@ -1538,11 +1538,11 b' class ApiController(JSONRPCController):' | |||||
1538 | OUTPUT:: |
|
1538 | OUTPUT:: | |
1539 |
|
1539 | |||
1540 | id : <id_given_in_input> |
|
1540 | id : <id_given_in_input> | |
1541 | result: { |
|
1541 | result : { | |
1542 | "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`", |
|
1542 | "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`", | |
1543 | "success": true |
|
1543 | "success" : true | |
1544 | } |
|
1544 | } | |
1545 |
error |
|
1545 | error : null | |
1546 | """ |
|
1546 | """ | |
1547 | repo = get_repo_or_error(repoid) |
|
1547 | repo = get_repo_or_error(repoid) | |
1548 | user = get_user_or_error(userid) |
|
1548 | user = get_user_or_error(userid) | |
@@ -1582,9 +1582,9 b' class ApiController(JSONRPCController):' | |||||
1582 | id : <id_given_in_input> |
|
1582 | id : <id_given_in_input> | |
1583 | result : { |
|
1583 | result : { | |
1584 | "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`", |
|
1584 | "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`", | |
1585 | "success": true |
|
1585 | "success" : true | |
1586 | } |
|
1586 | } | |
1587 |
error : |
|
1587 | error : null | |
1588 |
|
1588 | |||
1589 | ERROR OUTPUT:: |
|
1589 | ERROR OUTPUT:: | |
1590 |
|
1590 | |||
@@ -1639,11 +1639,11 b' class ApiController(JSONRPCController):' | |||||
1639 | OUTPUT:: |
|
1639 | OUTPUT:: | |
1640 |
|
1640 | |||
1641 | id : <id_given_in_input> |
|
1641 | id : <id_given_in_input> | |
1642 | result: { |
|
1642 | result : { | |
1643 | "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`", |
|
1643 | "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`", | |
1644 | "success": true |
|
1644 | "success" : true | |
1645 | } |
|
1645 | } | |
1646 |
error |
|
1646 | error : null | |
1647 | """ |
|
1647 | """ | |
1648 | repo = get_repo_or_error(repoid) |
|
1648 | repo = get_repo_or_error(repoid) | |
1649 | user_group = get_user_group_or_error(usergroupid) |
|
1649 | user_group = get_user_group_or_error(usergroupid) | |
@@ -1744,10 +1744,10 b' class ApiController(JSONRPCController):' | |||||
1744 |
|
1744 | |||
1745 | id : <id_given_in_input> |
|
1745 | id : <id_given_in_input> | |
1746 | result : { |
|
1746 | result : { | |
1747 | "msg": "created new repo group `<repo_group_name>`" |
|
1747 | "msg" : "created new repo group `<repo_group_name>`" | |
1748 | "repo_group": <repogroup_object> |
|
1748 | "repo_group" : <repogroup_object> | |
1749 | } |
|
1749 | } | |
1750 |
error : |
|
1750 | error : null | |
1751 |
|
1751 | |||
1752 | ERROR OUTPUT:: |
|
1752 | ERROR OUTPUT:: | |
1753 |
|
1753 | |||
@@ -1820,10 +1820,10 b' class ApiController(JSONRPCController):' | |||||
1820 |
|
1820 | |||
1821 | id : <id_given_in_input> |
|
1821 | id : <id_given_in_input> | |
1822 | result : { |
|
1822 | result : { | |
1823 | 'msg': 'deleted repo group ID:<repogroupid> <repogroupname> |
|
1823 | 'msg' : 'deleted repo group ID:<repogroupid> <repogroupname> | |
1824 | 'repo_group': null |
|
1824 | 'repo_group' : null | |
1825 | } |
|
1825 | } | |
1826 |
error : |
|
1826 | error : null | |
1827 |
|
1827 | |||
1828 | ERROR OUTPUT:: |
|
1828 | ERROR OUTPUT:: | |
1829 |
|
1829 | |||
@@ -1869,11 +1869,11 b' class ApiController(JSONRPCController):' | |||||
1869 | OUTPUT:: |
|
1869 | OUTPUT:: | |
1870 |
|
1870 | |||
1871 | id : <id_given_in_input> |
|
1871 | id : <id_given_in_input> | |
1872 | result: { |
|
1872 | result : { | |
1873 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", |
|
1873 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", | |
1874 | "success": true |
|
1874 | "success" : true | |
1875 | } |
|
1875 | } | |
1876 |
error |
|
1876 | error : null | |
1877 |
|
1877 | |||
1878 | ERROR OUTPUT:: |
|
1878 | ERROR OUTPUT:: | |
1879 |
|
1879 | |||
@@ -1929,11 +1929,11 b' class ApiController(JSONRPCController):' | |||||
1929 | OUTPUT:: |
|
1929 | OUTPUT:: | |
1930 |
|
1930 | |||
1931 | id : <id_given_in_input> |
|
1931 | id : <id_given_in_input> | |
1932 | result: { |
|
1932 | result : { | |
1933 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", |
|
1933 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", | |
1934 | "success": true |
|
1934 | "success" : true | |
1935 | } |
|
1935 | } | |
1936 |
error |
|
1936 | error : null | |
1937 |
|
1937 | |||
1938 | ERROR OUTPUT:: |
|
1938 | ERROR OUTPUT:: | |
1939 |
|
1939 | |||
@@ -1994,9 +1994,9 b' class ApiController(JSONRPCController):' | |||||
1994 | id : <id_given_in_input> |
|
1994 | id : <id_given_in_input> | |
1995 | result : { |
|
1995 | result : { | |
1996 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", |
|
1996 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", | |
1997 | "success": true |
|
1997 | "success" : true | |
1998 | } |
|
1998 | } | |
1999 |
error : |
|
1999 | error : null | |
2000 |
|
2000 | |||
2001 | ERROR OUTPUT:: |
|
2001 | ERROR OUTPUT:: | |
2002 |
|
2002 | |||
@@ -2059,11 +2059,11 b' class ApiController(JSONRPCController):' | |||||
2059 | OUTPUT:: |
|
2059 | OUTPUT:: | |
2060 |
|
2060 | |||
2061 | id : <id_given_in_input> |
|
2061 | id : <id_given_in_input> | |
2062 | result: { |
|
2062 | result : { | |
2063 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", |
|
2063 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", | |
2064 | "success": true |
|
2064 | "success" : true | |
2065 | } |
|
2065 | } | |
2066 |
error |
|
2066 | error : null | |
2067 |
|
2067 | |||
2068 | ERROR OUTPUT:: |
|
2068 | ERROR OUTPUT:: | |
2069 |
|
2069 | |||
@@ -2169,10 +2169,10 b' class ApiController(JSONRPCController):' | |||||
2169 |
|
2169 | |||
2170 | id : <id_given_in_input> |
|
2170 | id : <id_given_in_input> | |
2171 | result : { |
|
2171 | result : { | |
2172 | "msg": "created new gist", |
|
2172 | "msg" : "created new gist", | |
2173 | "gist": <gist_object> |
|
2173 | "gist" : <gist_object> | |
2174 | } |
|
2174 | } | |
2175 |
error : |
|
2175 | error : null | |
2176 |
|
2176 | |||
2177 | ERROR OUTPUT:: |
|
2177 | ERROR OUTPUT:: | |
2178 |
|
2178 | |||
@@ -2215,10 +2215,10 b' class ApiController(JSONRPCController):' | |||||
2215 |
|
2215 | |||
2216 | id : <id_given_in_input> |
|
2216 | id : <id_given_in_input> | |
2217 | result : { |
|
2217 | result : { | |
2218 | "msg": "deleted gist ID: <gist_id>", |
|
2218 | "msg" : "deleted gist ID: <gist_id>", | |
2219 | "gist": null |
|
2219 | "gist" : null | |
2220 | } |
|
2220 | } | |
2221 |
error : |
|
2221 | error : null | |
2222 |
|
2222 | |||
2223 | ERROR OUTPUT:: |
|
2223 | ERROR OUTPUT:: | |
2224 |
|
2224 |
General Comments 0
You need to be logged in to leave comments.
Login now