diff options
-rw-r--r-- | support/doc/api/openapi.yaml | 166 |
1 files changed, 126 insertions, 40 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 460d5938b..8cfd3e6d7 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -505,66 +505,105 @@ paths: | |||
505 | maxItems: 100 | 505 | maxItems: 100 |
506 | items: | 506 | items: |
507 | $ref: '#/components/schemas/Job' | 507 | $ref: '#/components/schemas/Job' |
508 | '/server/following/{host}': | 508 | |
509 | /server/followers: | ||
510 | get: | ||
511 | tags: | ||
512 | - Instance Follows | ||
513 | summary: List instances following the server | ||
514 | parameters: | ||
515 | - $ref: '#/components/parameters/followState' | ||
516 | - $ref: '#/components/parameters/actorType' | ||
517 | - $ref: '#/components/parameters/start' | ||
518 | - $ref: '#/components/parameters/count' | ||
519 | - $ref: '#/components/parameters/sort' | ||
520 | responses: | ||
521 | '200': | ||
522 | description: successful operation | ||
523 | content: | ||
524 | application/json: | ||
525 | schema: | ||
526 | type: object | ||
527 | properties: | ||
528 | total: | ||
529 | type: integer | ||
530 | example: 1 | ||
531 | data: | ||
532 | type: array | ||
533 | items: | ||
534 | $ref: '#/components/schemas/Follow' | ||
535 | '/server/followers/{nameWithHost}': | ||
509 | delete: | 536 | delete: |
537 | summary: Remove or reject a follower to your server | ||
510 | security: | 538 | security: |
511 | - OAuth2: | 539 | - OAuth2: |
512 | - admin | 540 | - admin |
513 | tags: | 541 | tags: |
514 | - Instance Follows | 542 | - Instance Follows |
515 | summary: Unfollow a server | ||
516 | parameters: | 543 | parameters: |
517 | - name: host | 544 | - name: nameWithHost |
518 | in: path | 545 | in: path |
519 | required: true | 546 | required: true |
520 | description: 'The host to unfollow ' | 547 | description: The remote actor handle to remove from your followers |
521 | schema: | 548 | schema: |
522 | type: string | 549 | type: string |
523 | format: hostname | 550 | format: email |
524 | responses: | 551 | responses: |
525 | '201': | 552 | '204': |
526 | description: successful operation | 553 | description: successful operation |
527 | /server/followers: | 554 | '404': |
528 | get: | 555 | description: follower not found |
556 | '/server/followers/{nameWithHost}/reject': | ||
557 | post: | ||
558 | summary: Reject a pending follower to your server | ||
559 | security: | ||
560 | - OAuth2: | ||
561 | - admin | ||
529 | tags: | 562 | tags: |
530 | - Instance Follows | 563 | - Instance Follows |
531 | summary: List instance followers | ||
532 | parameters: | 564 | parameters: |
533 | - $ref: '#/components/parameters/start' | 565 | - name: nameWithHost |
534 | - $ref: '#/components/parameters/count' | 566 | in: path |
535 | - $ref: '#/components/parameters/sort' | 567 | required: true |
568 | description: The remote actor handle to remove from your followers | ||
569 | schema: | ||
570 | type: string | ||
571 | format: email | ||
536 | responses: | 572 | responses: |
537 | '200': | 573 | '204': |
538 | description: successful operation | 574 | description: successful operation |
539 | content: | 575 | '404': |
540 | application/json: | 576 | description: follower not found |
541 | schema: | 577 | '/server/followers/{nameWithHost}/accept': |
542 | type: array | 578 | post: |
543 | items: | 579 | summary: Accept a pending follower to your server |
544 | $ref: '#/components/schemas/Follow' | 580 | security: |
581 | - OAuth2: | ||
582 | - admin | ||
583 | tags: | ||
584 | - Instance Follows | ||
585 | parameters: | ||
586 | - name: nameWithHost | ||
587 | in: path | ||
588 | required: true | ||
589 | description: The remote actor handle to remove from your followers | ||
590 | schema: | ||
591 | type: string | ||
592 | format: email | ||
593 | responses: | ||
594 | '204': | ||
595 | description: successful operation | ||
596 | '404': | ||
597 | description: follower not found | ||
598 | |||
545 | /server/following: | 599 | /server/following: |
546 | get: | 600 | get: |
547 | tags: | 601 | tags: |
548 | - Instance Follows | 602 | - Instance Follows |
549 | summary: List instances followed by the server | 603 | summary: List instances followed by the server |
550 | parameters: | 604 | parameters: |
551 | - name: state | 605 | - $ref: '#/components/parameters/followState' |
552 | in: query | 606 | - $ref: '#/components/parameters/actorType' |
553 | schema: | ||
554 | type: string | ||
555 | enum: | ||
556 | - pending | ||
557 | - accepted | ||
558 | - name: actorType | ||
559 | in: query | ||
560 | schema: | ||
561 | type: string | ||
562 | enum: | ||
563 | - Person | ||
564 | - Application | ||
565 | - Group | ||
566 | - Service | ||
567 | - Organization | ||
568 | - $ref: '#/components/parameters/start' | 607 | - $ref: '#/components/parameters/start' |
569 | - $ref: '#/components/parameters/count' | 608 | - $ref: '#/components/parameters/count' |
570 | - $ref: '#/components/parameters/sort' | 609 | - $ref: '#/components/parameters/sort' |
@@ -574,16 +613,22 @@ paths: | |||
574 | content: | 613 | content: |
575 | application/json: | 614 | application/json: |
576 | schema: | 615 | schema: |
577 | type: array | 616 | type: object |
578 | items: | 617 | properties: |
579 | $ref: '#/components/schemas/Follow' | 618 | total: |
619 | type: integer | ||
620 | example: 1 | ||
621 | data: | ||
622 | type: array | ||
623 | items: | ||
624 | $ref: '#/components/schemas/Follow' | ||
580 | post: | 625 | post: |
581 | security: | 626 | security: |
582 | - OAuth2: | 627 | - OAuth2: |
583 | - admin | 628 | - admin |
584 | tags: | 629 | tags: |
585 | - Instance Follows | 630 | - Instance Follows |
586 | summary: Follow a server | 631 | summary: Follow a list of servers |
587 | responses: | 632 | responses: |
588 | '204': | 633 | '204': |
589 | description: successful operation | 634 | description: successful operation |
@@ -601,6 +646,28 @@ paths: | |||
601 | type: string | 646 | type: string |
602 | format: hostname | 647 | format: hostname |
603 | uniqueItems: true | 648 | uniqueItems: true |
649 | '/server/following/{host}': | ||
650 | delete: | ||
651 | summary: Unfollow a server | ||
652 | security: | ||
653 | - OAuth2: | ||
654 | - admin | ||
655 | tags: | ||
656 | - Instance Follows | ||
657 | parameters: | ||
658 | - name: host | ||
659 | in: path | ||
660 | required: true | ||
661 | description: The host to unfollow | ||
662 | schema: | ||
663 | type: string | ||
664 | format: hostname | ||
665 | responses: | ||
666 | '204': | ||
667 | description: successful operation | ||
668 | '404': | ||
669 | description: host not found | ||
670 | |||
604 | /users: | 671 | /users: |
605 | post: | 672 | post: |
606 | summary: Create a user | 673 | summary: Create a user |
@@ -4378,6 +4445,25 @@ components: | |||
4378 | - activitypub-refresher | 4445 | - activitypub-refresher |
4379 | - video-redundancy | 4446 | - video-redundancy |
4380 | - video-live-ending | 4447 | - video-live-ending |
4448 | followState: | ||
4449 | name: state | ||
4450 | in: query | ||
4451 | schema: | ||
4452 | type: string | ||
4453 | enum: | ||
4454 | - pending | ||
4455 | - accepted | ||
4456 | actorType: | ||
4457 | name: actorType | ||
4458 | in: query | ||
4459 | schema: | ||
4460 | type: string | ||
4461 | enum: | ||
4462 | - Person | ||
4463 | - Application | ||
4464 | - Group | ||
4465 | - Service | ||
4466 | - Organization | ||
4381 | securitySchemes: | 4467 | securitySchemes: |
4382 | OAuth2: | 4468 | OAuth2: |
4383 | description: | | 4469 | description: | |