aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api/openapi.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r--support/doc/api/openapi.yaml293
1 files changed, 292 insertions, 1 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 33cb4bb23..eb278a72f 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -72,6 +72,9 @@ tags:
72 Manage the list of instances you wish to help by seeding their videos according 72 Manage the list of instances you wish to help by seeding their videos according
73 to the policy of video selection of your choice. Note that you have a similar functionality 73 to the policy of video selection of your choice. Note that you have a similar functionality
74 to mirror individual videos, see `Video Mirroring`. 74 to mirror individual videos, see `Video Mirroring`.
75 - name: Plugins
76 description: >
77 Managign plugins installed from a local path or from NPM.
75 - name: Video Abuses 78 - name: Video Abuses
76 description: | 79 description: |
77 Video abuses deal with reports of local or remote videos alike. 80 Video abuses deal with reports of local or remote videos alike.
@@ -141,6 +144,7 @@ x-tagGroups:
141 - Config 144 - Config
142 - Instance Follows 145 - Instance Follows
143 - Instance Redundancy 146 - Instance Redundancy
147 - Plugins
144 - name: Jobs 148 - name: Jobs
145 tags: 149 tags:
146 - Job 150 - Job
@@ -2606,6 +2610,253 @@ paths:
2606 type: object 2610 type: object
2607 '406': 2611 '406':
2608 description: accept header unsupported 2612 description: accept header unsupported
2613 /plugins:
2614 get:
2615 tags:
2616 - Plugins
2617 summary: List plugins
2618 security:
2619 - OAuth2:
2620 - admin
2621 parameters:
2622 - name: pluginType
2623 in: query
2624 schema:
2625 type: integer
2626 - name: uninstalled
2627 in: query
2628 schema:
2629 type: boolean
2630 - $ref: '#/components/parameters/start'
2631 - $ref: '#/components/parameters/count'
2632 - $ref: '#/components/parameters/sort'
2633 responses:
2634 '200':
2635 description: successful operation
2636 content:
2637 application/json:
2638 schema:
2639 $ref: '#/components/schemas/PluginResponse'
2640 /plugins/available:
2641 get:
2642 tags:
2643 - Plugins
2644 summary: List available plugins
2645 security:
2646 - OAuth2:
2647 - admin
2648 parameters:
2649 - name: search
2650 in: query
2651 schema:
2652 type: string
2653 - name: pluginType
2654 in: query
2655 schema:
2656 type: integer
2657 - name: currentPeerTubeEngine
2658 in: query
2659 schema:
2660 type: string
2661 - $ref: '#/components/parameters/start'
2662 - $ref: '#/components/parameters/count'
2663 - $ref: '#/components/parameters/sort'
2664 responses:
2665 '200':
2666 description: successful operation
2667 content:
2668 application/json:
2669 schema:
2670 $ref: '#/components/schemas/PluginResponse'
2671 '503':
2672 description: plugin index unavailable
2673 /plugins/install:
2674 post:
2675 tags:
2676 - Plugins
2677 summary: Install a plugin
2678 security:
2679 - OAuth2:
2680 - admin
2681 requestBody:
2682 content:
2683 application/json:
2684 schema:
2685 oneOf:
2686 - type: object
2687 properties:
2688 npmName:
2689 type: string
2690 required:
2691 - npmName
2692 additionalProperties: false
2693 - type: object
2694 properties:
2695 path:
2696 type: string
2697 required:
2698 - path
2699 additionalProperties: false
2700 responses:
2701 '204':
2702 description: successful operation
2703 '400':
2704 description: should have either `npmName` or `path` set
2705 /plugins/update:
2706 post:
2707 tags:
2708 - Plugins
2709 summary: Update a plugin
2710 security:
2711 - OAuth2:
2712 - admin
2713 requestBody:
2714 content:
2715 application/json:
2716 schema:
2717 oneOf:
2718 - type: object
2719 properties:
2720 npmName:
2721 type: string
2722 required:
2723 - npmName
2724 additionalProperties: false
2725 - type: object
2726 properties:
2727 path:
2728 type: string
2729 required:
2730 - path
2731 additionalProperties: false
2732 responses:
2733 '204':
2734 description: successful operation
2735 '400':
2736 description: should have either `npmName` or `path` set
2737 '404':
2738 description: existing plugin not found
2739 /plugins/uninstall:
2740 post:
2741 tags:
2742 - Plugins
2743 summary: Uninstall a plugin
2744 security:
2745 - OAuth2:
2746 - admin
2747 requestBody:
2748 content:
2749 application/json:
2750 schema:
2751 type: object
2752 properties:
2753 npmName:
2754 type: string
2755 required:
2756 - npmName
2757 responses:
2758 '204':
2759 description: successful operation
2760 '404':
2761 description: existing plugin not found
2762 /plugins/{npmName}:
2763 get:
2764 tags:
2765 - Plugins
2766 summary: Get a plugin
2767 security:
2768 - OAuth2:
2769 - admin
2770 parameters:
2771 - name: npmName
2772 in: path
2773 required: true
2774 schema:
2775 type: string
2776 responses:
2777 '200':
2778 description: successful operation
2779 content:
2780 application/json:
2781 schema:
2782 $ref: '#/components/schemas/Plugin'
2783 '404':
2784 description: plugin not found
2785 /plugins/{npmName}/settings:
2786 put:
2787 tags:
2788 - Plugins
2789 summary: Set a plugin's settings
2790 security:
2791 - OAuth2:
2792 - admin
2793 parameters:
2794 - name: npmName
2795 in: path
2796 required: true
2797 schema:
2798 type: string
2799 requestBody:
2800 content:
2801 application/json:
2802 schema:
2803 type: object
2804 properties:
2805 settings:
2806 type: object
2807 additionalProperties: true
2808 responses:
2809 '204':
2810 description: successful operation
2811 '404':
2812 description: plugin not found
2813 /plugins/{npmName}/public-settings:
2814 get:
2815 tags:
2816 - Plugins
2817 summary: Get a plugin's public settings
2818 security:
2819 - OAuth2: []
2820 parameters:
2821 - name: npmName
2822 in: path
2823 required: true
2824 schema:
2825 type: string
2826 responses:
2827 '200':
2828 description: successful operation
2829 content:
2830 application/json:
2831 schema:
2832 type: object
2833 additionalProperties: true
2834 '404':
2835 description: plugin not found
2836 /plugins/{npmName}/registered-settings:
2837 get:
2838 tags:
2839 - Plugins
2840 summary: Get a plugin's registered settings
2841 security:
2842 - OAuth2:
2843 - admin
2844 parameters:
2845 - name: npmName
2846 in: path
2847 required: true
2848 schema:
2849 type: string
2850 responses:
2851 '200':
2852 description: successful operation
2853 content:
2854 application/json:
2855 schema:
2856 type: object
2857 additionalProperties: true
2858 '404':
2859 description: plugin not found
2609servers: 2860servers:
2610 - url: 'https://peertube2.cpy.re/api/v1' 2861 - url: 'https://peertube2.cpy.re/api/v1'
2611 description: Live Test Server (live data - latest nightly version) 2862 description: Live Test Server (live data - latest nightly version)
@@ -4497,4 +4748,44 @@ components:
4497 data: 4748 data:
4498 type: array 4749 type: array
4499 items: 4750 items:
4500 $ref: '#/components/schemas/Notification' \ No newline at end of file 4751 $ref: '#/components/schemas/Notification'
4752 Plugin:
4753 properties:
4754 name:
4755 type: string
4756 type:
4757 type: integer
4758 enum:
4759 - 1
4760 - 2
4761 latestVersion:
4762 type: string
4763 version:
4764 type: string
4765 enabled:
4766 type: boolean
4767 uninstalled:
4768 type: boolean
4769 peertubeEngine:
4770 type: string
4771 description:
4772 type: string
4773 homepage:
4774 type: string
4775 settings:
4776 type: object
4777 additionalProperties: true
4778 createdAt:
4779 type: string
4780 format: date-time
4781 updatedAt:
4782 type: string
4783 format: date-time
4784 PluginResponse:
4785 properties:
4786 total:
4787 type: integer
4788 data:
4789 type: array
4790 items:
4791 $ref: '#/components/schemas/Plugin' \ No newline at end of file