Mercurial > kallithea
comparison docs/api/api.rst @ 8936:ac5525c48f0a stable
api docs: more consistent use of space around ":" in examples
The examples are informal pseudo code - not json and not python. But let's try
to be consistent anyway.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 14 Oct 2022 14:25:12 +0200 |
parents | ba64339f7937 |
children | 2dd317e9cc4b |
comparison
equal
deleted
inserted
replaced
8935:ba64339f7937 | 8936:ac5525c48f0a |
---|---|
113 | 113 |
114 OUTPUT:: | 114 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 : null | 118 error : null |
119 | 119 |
120 rescan_repos | 120 rescan_repos |
121 ^^^^^^^^^^^^ | 121 ^^^^^^^^^^^^ |
122 | 122 |
123 Rescan repositories. If ``remove_obsolete`` is set, | 123 Rescan repositories. If ``remove_obsolete`` is set, |
136 OUTPUT:: | 136 OUTPUT:: |
137 | 137 |
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 : null | 141 error : null |
142 | 142 |
143 invalidate_cache | 143 invalidate_cache |
144 ^^^^^^^^^^^^^^^^ | 144 ^^^^^^^^^^^^^^^^ |
145 | 145 |
146 Invalidate the cache for a repository. | 146 Invalidate the cache for a repository. |
158 | 158 |
159 OUTPUT:: | 159 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 : null | 163 error : null |
164 | 164 |
165 get_ip | 165 get_ip |
166 ^^^^^^ | 166 ^^^^^^ |
167 | 167 |
168 Return IP address as seen from Kallithea server, together with all | 168 Return IP address as seen from Kallithea server, together with all |
180 | 180 |
181 OUTPUT:: | 181 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 : null | 194 error : null |
195 | 195 |
196 get_user | 196 get_user |
197 ^^^^^^^^ | 197 ^^^^^^^^ |
198 | 198 |
199 Get a user by username or userid. The result is empty if user can't be found. | 199 Get a user by username or userid. The result is empty if user can't be found. |
211 } | 211 } |
212 | 212 |
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": "<firstname>", | 221 "firstname" : "<firstname>", |
222 "lastname" : "<lastname>", | 222 "lastname" : "<lastname>", |
223 "email" : "<email>", | 223 "email" : "<email>", |
224 "emails": "<list_of_all_additional_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": "<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: null | 238 error : null |
239 | 239 |
240 get_users | 240 get_users |
241 ^^^^^^^^^ | 241 ^^^^^^^^^ |
242 | 242 |
243 List all existing users. | 243 List all existing users. |
251 args : { } | 251 args : { } |
252 | 252 |
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": "<firstname>", | 261 "firstname" : "<firstname>", |
262 "lastname" : "<lastname>", | 262 "lastname" : "<lastname>", |
263 "email" : "<email>", | 263 "email" : "<email>", |
264 "emails": "<list_of_all_additional_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": "<last_login>", | 269 "last_login" : "<last_login>", |
270 }, | 270 }, |
271 … | 271 … |
272 ] | 272 ] |
273 error: null | 273 error : null |
274 | 274 |
275 .. _create-user: | 275 .. _create-user: |
276 | 276 |
277 create_user | 277 create_user |
278 ^^^^^^^^^^^ | 278 ^^^^^^^^^^^ |
297 } | 297 } |
298 | 298 |
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": "<list_of_all_additional_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: null | 317 error : null |
318 | 318 |
319 Example:: | 319 Example:: |
320 | 320 |
321 kallithea-api create_user username:bent email:bent@example.com firstname:Bent lastname:Bentsen extern_type:ldap extern_name:uid=bent,dc=example,dc=com | 321 kallithea-api create_user username:bent email:bent@example.com firstname:Bent lastname:Bentsen extern_type:ldap extern_name:uid=bent,dc=example,dc=com |
322 | 322 |
344 } | 344 } |
345 | 345 |
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": "<list_of_all_additional_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: null | 365 error : null |
366 | 366 |
367 delete_user | 367 delete_user |
368 ^^^^^^^^^^^ | 368 ^^^^^^^^^^^ |
369 | 369 |
370 Delete the given user if such a user exists. | 370 Delete the given user if such a user exists. |
380 } | 380 } |
381 | 381 |
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: null | 389 error : null |
390 | 390 |
391 get_user_group | 391 get_user_group |
392 ^^^^^^^^^^^^^^ | 392 ^^^^^^^^^^^^^^ |
393 | 393 |
394 Get an existing user group. | 394 Get an existing user group. |
408 id : <id_given_in_input> | 408 id : <id_given_in_input> |
409 result : None if group not exist | 409 result : None if group not exist |
410 { | 410 { |
411 "users_group_id" : "<id>", | 411 "users_group_id" : "<id>", |
412 "group_name" : "<groupname>", | 412 "group_name" : "<groupname>", |
413 "active": "<bool>", | 413 "active" : "<bool>", |
414 "members" : [ | 414 "members" : [ |
415 { | 415 { |
416 "user_id" : "<user_id>", | 416 "user_id" : "<user_id>", |
417 "api_key" : "<api_key>", | 417 "api_key" : "<api_key>", |
418 "username" : "<username>", | 418 "username" : "<username>", |
419 "firstname": "<firstname>", | 419 "firstname": "<firstname>", |
420 "lastname" : "<lastname>", | 420 "lastname" : "<lastname>", |
421 "email" : "<email>", | 421 "email" : "<email>", |
422 "emails": "<list_of_all_additional_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>", |
426 "last_login": "<last_login>", | 426 "last_login": "<last_login>", |
427 }, | 427 }, |
448 id : <id_given_in_input> | 448 id : <id_given_in_input> |
449 result : [ | 449 result : [ |
450 { | 450 { |
451 "users_group_id" : "<id>", | 451 "users_group_id" : "<id>", |
452 "group_name" : "<groupname>", | 452 "group_name" : "<groupname>", |
453 "active": "<bool>", | 453 "active" : "<bool>", |
454 }, | 454 }, |
455 … | 455 … |
456 ] | 456 ] |
457 error : null | 457 error : null |
458 | 458 |
465 INPUT:: | 465 INPUT:: |
466 | 466 |
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": "<bool> = Optional(True)" | 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": "<bool>", | 484 "active" : "<bool>", |
485 }, | 485 }, |
486 } | 486 } |
487 error: null | 487 error : null |
488 | 488 |
489 add_user_to_user_group | 489 add_user_to_user_group |
490 ^^^^^^^^^^^^^^^^^^^^^^ | 490 ^^^^^^^^^^^^^^^^^^^^^^ |
491 | 491 |
492 Adds a user to a user group. If the user already is in that group, success will be | 492 Adds a user to a user group. If the user already is in that group, success will be |
496 INPUT:: | 496 INPUT:: |
497 | 497 |
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 } |
505 | 505 |
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: null | 514 error : null |
515 | 515 |
516 remove_user_from_user_group | 516 remove_user_from_user_group |
517 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 517 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
518 | 518 |
519 Remove a user from a user group. If the user isn't in the given group, success will | 519 Remove a user from a user group. If the user isn't in the given group, success will |
523 INPUT:: | 523 INPUT:: |
524 | 524 |
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 } |
532 | 532 |
533 OUTPUT:: | 533 OUTPUT:: |
534 | 534 |
535 id : <id_given_in_input> | 535 id : <id_given_in_input> |
536 result: { | 536 result : { |
537 "success": True|False, # depends on if member is in group | 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: null | 541 error : null |
542 | 542 |
543 get_repo | 543 get_repo |
544 ^^^^^^^^ | 544 ^^^^^^^^ |
545 | 545 |
546 Get an existing repository by its name or repository_id. Members will contain | 546 Get an existing repository by its name or repository_id. Members will contain |
551 INPUT:: | 551 INPUT:: |
552 | 552 |
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": "<bool>", | 571 "enable_downloads" : "<bool>", |
572 "enable_statistics": "<bool>", | 572 "enable_statistics": "<bool>", |
573 "private": "<bool>", | 573 "private" : "<bool>", |
574 "created_on" : "<date_time_created>", | 574 "created_on" : "<date_time_created>", |
575 "description" : "<description>", | 575 "description" : "<description>", |
576 "landing_rev": "<landing_rev>", | 576 "landing_rev" : "<landing_rev>", |
577 "last_changeset": { | 577 "last_changeset" : { |
578 "author": "<full_author>", | 578 "author" : "<full_author>", |
579 "date": "<date_time_of_commit>", | 579 "date" : "<date_time_of_commit>", |
580 "message": "<commit_message>", | 580 "message" : "<commit_message>", |
581 "raw_id": "<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": "<repo_owner>", | 585 "owner" : "<repo_owner>", |
586 "fork_of": "<name_of_fork_parent>", | 586 "fork_of" : "<name_of_fork_parent>", |
587 "members" : [ | 587 "members" : [ |
588 { | 588 { |
589 "type": "user", | 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": "<firstname>", | 593 "firstname" : "<firstname>", |
594 "lastname" : "<lastname>", | 594 "lastname" : "<lastname>", |
595 "email" : "<email>", | 595 "email" : "<email>", |
596 "emails": "<list_of_all_additional_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": "<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": "users_group", | 605 "type" : "users_group", |
606 "id" : "<usersgroupid>", | 606 "id" : "<usersgroupid>", |
607 "name" : "<usersgroupname>", | 607 "name" : "<usersgroupname>", |
608 "active": "<bool>", | 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": "<firstname>", | 618 "firstname" : "<firstname>", |
619 "lastname" : "<lastname>", | 619 "lastname" : "<lastname>", |
620 "email" : "<email>", | 620 "email" : "<email>", |
621 "emails": "<list_of_all_additional_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": "<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: null | 693 error : null |
694 | 694 |
695 get_repos | 695 get_repos |
696 ^^^^^^^^^ | 696 ^^^^^^^^^ |
697 | 697 |
698 List all existing repositories. | 698 List all existing repositories. |
702 INPUT:: | 702 INPUT:: |
703 | 703 |
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>" |
716 "repo_type" : "<repo_type>", | 716 "repo_type" : "<repo_type>", |
717 "clone_uri" : "<clone_uri>", | 717 "clone_uri" : "<clone_uri>", |
718 "private" : "<bool>", | 718 "private" : "<bool>", |
719 "created_on" : "<datetimecreated>", | 719 "created_on" : "<datetimecreated>", |
720 "description" : "<description>", | 720 "description" : "<description>", |
721 "landing_rev": "<landing_rev>", | 721 "landing_rev" : "<landing_rev>", |
722 "owner": "<repo_owner>", | 722 "owner" : "<repo_owner>", |
723 "fork_of": "<name_of_fork_parent>", | 723 "fork_of" : "<name_of_fork_parent>", |
724 "enable_downloads": "<bool>", | 724 "enable_downloads" : "<bool>", |
725 "enable_statistics": "<bool>", | 725 "enable_statistics": "<bool>", |
726 }, | 726 }, |
727 … | 727 … |
728 ] | 728 ] |
729 error: null | 729 error : null |
730 | 730 |
731 get_repo_nodes | 731 get_repo_nodes |
732 ^^^^^^^^^^^^^^ | 732 ^^^^^^^^^^^^^^ |
733 | 733 |
734 Return a list of files and directories for a given path at the given revision. | 734 Return a list of files and directories for a given path at the given revision. |
738 INPUT:: | 738 INPUT:: |
739 | 739 |
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" : "<revision>", | 745 "revision" : "<revision>", |
746 "root_path" : "<root_path>", | 746 "root_path" : "<root_path>", |
747 "ret_type" : "<ret_type> = Optional('all')" | 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: null | 760 error : null |
761 | 761 |
762 create_repo | 762 create_repo |
763 ^^^^^^^^^^^ | 763 ^^^^^^^^^^^ |
764 | 764 |
765 Create a repository. If the repository name contains "/", the repository will be | 765 Create a repository. If the repository name contains "/", the repository will be |
775 INPUT:: | 775 INPUT:: |
776 | 776 |
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')", |
784 "description" : "<description> = Optional('')", | 784 "description" : "<description> = Optional('')", |
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": "<bool> = Optional(False)", | 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>", |
801 "clone_uri" : "<clone_uri>", | 801 "clone_uri" : "<clone_uri>", |
802 "private" : "<bool>", | 802 "private" : "<bool>", |
803 "created_on" : "<datetimecreated>", | 803 "created_on" : "<datetimecreated>", |
804 "description" : "<description>", | 804 "description" : "<description>", |
805 "landing_rev": "<landing_rev>", | 805 "landing_rev" : "<landing_rev>", |
806 "owner": "<username or user_id>", | 806 "owner" : "<username or user_id>", |
807 "fork_of": "<name_of_fork_parent>", | 807 "fork_of" : "<name_of_fork_parent>", |
808 "enable_downloads": "<bool>", | 808 "enable_downloads" : "<bool>", |
809 "enable_statistics": "<bool>", | 809 "enable_statistics": "<bool>", |
810 }, | 810 }, |
811 } | 811 } |
812 error: null | 812 error : null |
813 | 813 |
814 update_repo | 814 update_repo |
815 ^^^^^^^^^^^ | 815 ^^^^^^^^^^^ |
816 | 816 |
817 Update a repository. | 817 Update a repository. |
822 INPUT:: | 822 INPUT:: |
823 | 823 |
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)", |
831 "owner" : "<owner_name_or_id = Optional(=apiuser)>", | 831 "owner" : "<owner_name_or_id = Optional(=apiuser)>", |
832 "description" : "<description> = Optional('')", | 832 "description" : "<description> = Optional('')", |
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": "<bool> = Optional(False)", | 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": "<bool>", | 850 "private" : "<bool>", |
851 "created_on" : "<datetimecreated>", | 851 "created_on" : "<datetimecreated>", |
852 "description" : "<description>", | 852 "description" : "<description>", |
853 "landing_rev": "<landing_rev>", | 853 "landing_rev" : "<landing_rev>", |
854 "owner": "<username or user_id>", | 854 "owner" : "<username or user_id>", |
855 "fork_of": "<name_of_fork_parent>", | 855 "fork_of" : "<name_of_fork_parent>", |
856 "enable_downloads": "<bool>", | 856 "enable_downloads" : "<bool>", |
857 "enable_statistics": "<bool>", | 857 "enable_statistics": "<bool>", |
858 "last_changeset": { | 858 "last_changeset" : { |
859 "author": "<full_author>", | 859 "author" : "<full_author>", |
860 "date": "<date_time_of_commit>", | 860 "date" : "<date_time_of_commit>", |
861 "message": "<commit_message>", | 861 "message" : "<commit_message>", |
862 "raw_id": "<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: null | 868 error : null |
869 | 869 |
870 fork_repo | 870 fork_repo |
871 ^^^^^^^^^ | 871 ^^^^^^^^^ |
872 | 872 |
873 Create a fork of the given repo. If using Celery, this will | 873 Create a fork of the given repo. If using Celery, this will |
881 INPUT:: | 881 INPUT:: |
882 | 882 |
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": "<forkname>", | 888 "fork_name" : "<forkname>", |
889 "owner": "<username or user_id = Optional(=apiuser)>", | 889 "owner" : "<username or user_id = Optional(=apiuser)>", |
890 "description": "<description>", | 890 "description" : "<description>", |
891 "copy_permissions": "<bool>", | 891 "copy_permissions": "<bool>", |
892 "private": "<bool>", | 892 "private" : "<bool>", |
893 "landing_rev": "<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: null | 903 error : null |
904 | 904 |
905 delete_repo | 905 delete_repo |
906 ^^^^^^^^^^^ | 906 ^^^^^^^^^^^ |
907 | 907 |
908 Delete a repository. | 908 Delete a repository. |
913 INPUT:: | 913 INPUT:: |
914 | 914 |
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" : "`delete` or `detach` = Optional(None)" | 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: null | 930 error : null |
931 | 931 |
932 grant_user_permission | 932 grant_user_permission |
933 ^^^^^^^^^^^^^^^^^^^^^ | 933 ^^^^^^^^^^^^^^^^^^^^^ |
934 | 934 |
935 Grant permission for a user on the given repository, or update the existing one if found. | 935 Grant permission for a user on the given repository, or update the existing one if found. |
938 INPUT:: | 938 INPUT:: |
939 | 939 |
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))", |
947 } | 947 } |
948 | 948 |
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: null | 956 error : null |
957 | 957 |
958 revoke_user_permission | 958 revoke_user_permission |
959 ^^^^^^^^^^^^^^^^^^^^^^ | 959 ^^^^^^^^^^^^^^^^^^^^^^ |
960 | 960 |
961 Revoke permission for a user on the given repository. | 961 Revoke permission for a user on the given repository. |
963 | 963 |
964 INPUT:: | 964 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 : "revoke_user_permission" | 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 } |
973 | 973 |
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: null | 981 error : null |
982 | 982 |
983 grant_user_group_permission | 983 grant_user_group_permission |
984 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 984 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
985 | 985 |
986 Grant permission for a user group on the given repository, or update the | 986 Grant permission for a user group on the given repository, or update the |
990 INPUT:: | 990 INPUT:: |
991 | 991 |
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))", |
999 } | 999 } |
1000 | 1000 |
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: null | 1008 error : null |
1009 | 1009 |
1010 revoke_user_group_permission | 1010 revoke_user_group_permission |
1011 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 1011 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1012 | 1012 |
1013 Revoke permission for a user group on the given repository. | 1013 Revoke permission for a user group on the given repository. |
1015 | 1015 |
1016 INPUT:: | 1016 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 : "revoke_user_group_permission" | 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 } |
1025 | 1025 |
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: null | 1033 error : null |
1034 | 1034 |
1035 get_changesets | 1035 get_changesets |
1036 ^^^^^^^^^^^^^^ | 1036 ^^^^^^^^^^^^^^ |
1037 | 1037 |
1038 Get changesets of a given repository. This command can only be executed using the api_key | 1038 Get changesets of a given repository. This command can only be executed using the api_key |
1040 | 1040 |
1041 INPUT:: | 1041 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 : "get_changesets" | 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: null | 1075 error : null |
1076 | 1076 |
1077 get_changeset | 1077 get_changeset |
1078 ^^^^^^^^^^^^^ | 1078 ^^^^^^^^^^^^^ |
1079 | 1079 |
1080 Get information and review status for a given changeset. This command can only | 1080 Get information and review status for a given changeset. This command can only |
1083 | 1083 |
1084 INPUT:: | 1084 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 : "get_changeset" | 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": "<full_author>", | 1099 "author" : "<full_author>", |
1100 "date": "<date_time_of_commit>", | 1100 "date" : "<date_time_of_commit>", |
1101 "message": "<commit_message>", | 1101 "message" : "<commit_message>", |
1102 "raw_id": "<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": "<username>", | 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": "<status_of_review>", # "under_review", "approved" or "rejected" | 1108 "status" : "<status_of_review>", # "under_review", "approved" or "rejected" |
1109 }, | 1109 }, |
1110 ... | 1110 ... |
1111 ] | 1111 ] |
1112 } | 1112 } |
1113 error: null | 1113 error : null |
1114 | 1114 |
1115 Example output:: | 1115 Example output:: |
1116 | 1116 |
1117 { | 1117 { |
1118 "id" : 1, | 1118 "id" : 1, |
1151 | 1151 |
1152 INPUT:: | 1152 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 : "get_pullrequest" | 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: null | 1209 error : null |
1210 | 1210 |
1211 comment_pullrequest | 1211 comment_pullrequest |
1212 ^^^^^^^^^^^^^^^^^^^ | 1212 ^^^^^^^^^^^^^^^^^^^ |
1213 | 1213 |
1214 Add comment, change status or close a given pull request. This command can only be executed | 1214 Add comment, change status or close a given pull request. This command can only be executed |
1216 | 1216 |
1217 INPUT:: | 1217 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 : "comment_pullrequest" | 1221 method : "comment_pullrequest" |
1222 args: { | 1222 args : { |
1223 "pull_request_id": "<pull_request_id>", | 1223 "pull_request_id" : "<pull_request_id>", |
1224 "comment_msg": Optional(''), | 1224 "comment_msg" : Optional(''), |
1225 "status": Optional(None), # "under_review", "approved" or "rejected" | 1225 "status" : Optional(None), # "under_review", "approved" or "rejected" |
1226 "close_pr": Optional(False)", | 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: null | 1233 error : null |
1234 | 1234 |
1235 | 1235 |
1236 API access for web views | 1236 API access for web views |
1237 ------------------------ | 1237 ------------------------ |
1238 | 1238 |