add examples and descriptions, missing filters for abuses in openapi spec
[oweals/peertube.git] / support / doc / api / openapi.yaml
1 openapi: 3.0.0
2 info:
3   title: PeerTube
4   version: 2.2.0
5   contact:
6     name: PeerTube Community
7     url: 'https://joinpeertube.org'
8   license:
9     name: AGPLv3.0
10     url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'
11   x-logo:
12     url: 'https://joinpeertube.org/img/brand.png'
13     altText: PeerTube Project Homepage
14   description: |
15     # Introduction
16
17     The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
18     HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
19     [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
20     which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
21
22     - [Python](https://framagit.org/framasoft/peertube/clients/python)
23     - [Go](https://framagit.org/framasoft/peertube/clients/go)
24     - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
25
26     See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API.
27
28     # Authentication
29
30     When you sign up for an account, you are given the possibility to generate
31     sessions, and authenticate using this session token. One session token can
32     currently be used at a time.
33
34     ## Roles
35
36     Accounts are given permissions based on their role. There are three roles on
37     PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) for a detail of their permissions.
38
39     # Errors
40
41     The API uses standard HTTP status codes to indicate the success or failure
42     of the API call. The body of the response will be JSON in the following
43     format.
44
45     ```
46     {
47       "code": "unauthorized_request", // example inner error code
48       "error": "Token is invalid." // example exposed error message
49     }
50     ```
51 externalDocs:
52   url: https://docs.joinpeertube.org/api-rest-reference.html
53 tags:
54   - name: Accounts
55     description: >
56       Accounts encompass remote accounts discovered across the federation, 
57       and correspond to the main Actor, along with video channels a user can create, which
58       are also Actors.
59
60       When a comment is posted, it is done with your Account's Actor.
61   - name: Users
62     description: >
63       Using some features of PeerTube require authentication, for which User
64       provide different levels of permission as well as associated user
65       information. Each user has a corresponding local Account for federation.
66   - name: My User
67     description: >
68       Operations related to your own User, when logged-in.
69   - name: My Subscriptions
70     description: >
71       Operations related to your subscriptions to video channels, their
72       new videos, and how to keep up to date with their latest publications!
73   - name: My Notifications
74     description: >
75       Notifications following new videos, follows or reports. They allow you
76       to keep track of the interactions and overall important information that
77       concerns you. You MAY set per-notification type delivery preference, to
78       receive the info either by mail, by in-browser notification or both.
79   - name: Config
80     description: >
81       Each server exposes public information regarding supported videos and
82       options.
83   - name: Job
84     description: >
85       Jobs are long-running tasks enqueued and processed by the instance
86       itself. No additional worker registration is currently available.
87   - name: Instance Follows
88     description: >
89       Managing servers which the instance interacts with is crucial to the
90       concept of federation in PeerTube and external video indexation. The PeerTube
91       server then deals with inter-server ActivityPub operations and propagates
92       information across its social graph by posting activities to actors' inbox
93       endpoints.
94     externalDocs:
95       url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-follows
96   - name: Instance Redundancy
97     description: >
98       Redundancy is part of the inter-server solidarity that PeerTube fosters.
99       Manage the list of instances you wish to help by seeding their videos according
100       to the policy of video selection of your choice. Note that you have a similar functionality
101       to mirror individual videos, see `Video Mirroring`.
102     externalDocs:
103       url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-redundancy
104   - name: Plugins
105     description: >
106       Managing plugins installed from a local path or from NPM, or search for new ones.
107     externalDocs:
108       url: https://docs.joinpeertube.org/#/api-plugins
109   - name: Video Abuses
110     description: |
111       Video abuses deal with reports of local or remote videos alike.
112   - name: Video
113     description: |
114       Operations dealing with listing, uploading, fetching or modifying videos.
115   - name: Search
116     description: |
117       The search helps to find _videos_ or _channels_ from within the instance and beyond.
118       Videos from other instances federated by the instance (that is, instances
119       followed by the instance) can be found via keywords and other criteria of
120       the advanced search.
121
122       Administrators can also enable the use of a remote search system, indexing
123       videos and channels not could be not federated by the instance.
124   - name: Video Comments
125     description: >
126       Operations dealing with comments to a video. Comments are organized in
127       threads.
128   - name: Video Playlists
129     description: >
130       Operations dealing with playlists of videos. Playlists are bound to users
131       and/or channels.
132   - name: Video Channels
133     description: >
134       Operations dealing with the creation, modification and listing of videos within a channel.
135   - name: Video Blocks
136     description: >
137       Operations dealing with blocking videos (removing them from view and
138       preventing interactions).
139   - name: Video Rates
140     description: >
141       Like/dislike a video.
142   - name: Feeds
143     description: >
144       Server syndication feeds
145 x-tagGroups:
146   - name: Accounts
147     tags:
148       - Accounts
149       - Users
150       - My User
151       - My Subscriptions
152       - My Notifications
153   - name: Videos
154     tags:
155       - Video
156       - Video Captions
157       - Video Channels
158       - Video Comments
159       - Video Rates
160       - Video Playlists
161       - Video Ownership Change
162       - Video Mirroring
163       - Feeds
164   - name: Search
165     tags:
166       - Search
167   - name: Moderation
168     tags:
169       - Video Abuses
170       - Video Blocks
171       - Account Blocks
172       - Server Blocks
173   - name: Instance Configuration
174     tags:
175       - Config
176       - Instance Follows
177       - Instance Redundancy
178       - Plugins
179   - name: Jobs
180     tags:
181       - Job
182 paths:
183   '/accounts/{name}':
184     get:
185       tags:
186         - Accounts
187       summary: Get an account
188       parameters:
189         - $ref: '#/components/parameters/name'
190       responses:
191         '200':
192           description: successful operation
193           content:
194             application/json:
195               schema:
196                 $ref: '#/components/schemas/Account'
197         '404':
198           description: account not found
199   '/accounts/{name}/videos':
200     get:
201       tags:
202         - Accounts
203         - Video
204       summary: 'List videos of an account'
205       parameters:
206         - $ref: '#/components/parameters/name'
207         - $ref: '#/components/parameters/categoryOneOf'
208         - $ref: '#/components/parameters/tagsOneOf'
209         - $ref: '#/components/parameters/tagsAllOf'
210         - $ref: '#/components/parameters/licenceOneOf'
211         - $ref: '#/components/parameters/languageOneOf'
212         - $ref: '#/components/parameters/nsfw'
213         - $ref: '#/components/parameters/filter'
214         - $ref: '#/components/parameters/skipCount'
215         - $ref: '#/components/parameters/start'
216         - $ref: '#/components/parameters/count'
217         - $ref: '#/components/parameters/videosSort'
218       responses:
219         '200':
220           description: successful operation
221           content:
222             application/json:
223               schema:
224                 $ref: '#/components/schemas/VideoListResponse'
225       x-code-samples:
226         - lang: JavaScript
227           source: |
228             fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
229             .then(function(response) {
230               return response.json()
231             }).then(function(data) {
232               console.log(data)
233             })
234         - lang: Shell
235           source: |
236             # pip install httpie
237             http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
238         - lang: Ruby
239           source: |
240             require 'net/http'
241             require 'json'
242
243             uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
244
245             http = Net::HTTP.new(uri.host, uri.port)
246             http.use_ssl = true
247
248             response = http.get(uri.request_uri)
249
250             puts JSON.parse(response.read_body)
251         - lang: Python
252           source: |
253             import requests
254
255             r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
256             json = r.json()
257
258             print(json)
259   /accounts:
260     get:
261       tags:
262         - Accounts
263       summary: List accounts
264       parameters:
265         - $ref: '#/components/parameters/start'
266         - $ref: '#/components/parameters/count'
267         - $ref: '#/components/parameters/sort'
268       responses:
269         '200':
270           description: successful operation
271           content:
272             'application/json':
273               schema:
274                 type: array
275                 items:
276                   $ref: '#/components/schemas/Account'
277   /config:
278     get:
279       tags:
280         - Config
281       summary: Get instance public configuration
282       responses:
283         '200':
284           description: successful operation
285           content:
286             application/json:
287               schema:
288                 $ref: '#/components/schemas/ServerConfig'
289   /config/about:
290     get:
291       summary: Get instance "About" information
292       tags:
293         - Config
294       responses:
295         '200':
296           description: successful operation
297           content:
298             application/json:
299               schema:
300                 $ref: '#/components/schemas/ServerConfigAbout'
301   /config/custom:
302     get:
303       summary: Get instance runtime configuration
304       tags:
305         - Config
306       security:
307         - OAuth2:
308             - admin
309       responses:
310         '200':
311           description: successful operation
312           content:
313             application/json:
314               schema:
315                 $ref: '#/components/schemas/ServerConfigCustom'
316     put:
317       summary: Set instance runtime configuration
318       tags:
319         - Config
320       security:
321         - OAuth2:
322             - admin
323       responses:
324         '200':
325           description: successful operation
326         '400':
327           x-summary: field inconsistencies
328           description: >
329             Arises when:
330               - the emailer is disabled and the instance is open to registrations
331               - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
332     delete:
333       summary: Delete instance runtime configuration
334       tags:
335         - Config
336       security:
337         - OAuth2:
338             - admin
339       responses:
340         '200':
341           description: successful operation
342   /jobs/{state}:
343     get:
344       summary: List instance jobs
345       security:
346         - OAuth2:
347             - admin
348       tags:
349         - Job
350       parameters:
351         - name: state
352           in: path
353           required: true
354           description: The state of the job
355           schema:
356             type: string
357             enum:
358               - active
359               - completed
360               - failed
361               - waiting
362               - delayed
363         - $ref: '#/components/parameters/start'
364         - $ref: '#/components/parameters/count'
365         - $ref: '#/components/parameters/sort'
366       responses:
367         '200':
368           description: successful operation
369           content:
370             application/json:
371               schema:
372                 type: object
373                 properties:
374                   total:
375                     type: integer
376                     example: 1
377                   data:
378                     type: array
379                     maxItems: 100
380                     items:
381                       $ref: '#/components/schemas/Job'
382   '/server/following/{host}':
383     delete:
384       security:
385         - OAuth2:
386           - admin
387       tags:
388         - Instance Follows
389       summary: Unfollow a server
390       parameters:
391         - name: host
392           in: path
393           required: true
394           description: 'The host to unfollow '
395           schema:
396             type: string
397             format: hostname
398       responses:
399         '201':
400           description: successful operation
401   /server/followers:
402     get:
403       tags:
404         - Instance Follows
405       summary: List instance followers
406       parameters:
407         - $ref: '#/components/parameters/start'
408         - $ref: '#/components/parameters/count'
409         - $ref: '#/components/parameters/sort'
410       responses:
411         '200':
412           description: successful operation
413           content:
414             application/json:
415               schema:
416                 type: array
417                 items:
418                   $ref: '#/components/schemas/Follow'
419   /server/following:
420     get:
421       tags:
422         - Instance Follows
423       summary: List instances followed by the server
424       parameters:
425         - name: state
426           in: query
427           schema:
428             type: string
429             enum:
430               - pending
431               - accepted
432         - name: actorType
433           in: query
434           schema:
435             type: string
436             enum:
437               - Person
438               - Application
439               - Group
440               - Service
441               - Organization
442         - $ref: '#/components/parameters/start'
443         - $ref: '#/components/parameters/count'
444         - $ref: '#/components/parameters/sort'
445       responses:
446         '200':
447           description: successful operation
448           content:
449             application/json:
450               schema:
451                 type: array
452                 items:
453                   $ref: '#/components/schemas/Follow'
454     post:
455       security:
456         - OAuth2:
457             - admin
458       tags:
459         - Instance Follows
460       summary: Follow a server
461       responses:
462         '204':
463           description: successful operation
464         '500':
465           description: cannot follow a non-HTTPS server
466       requestBody:
467         content:
468           application/json:
469             schema:
470               type: object
471               properties:
472                 hosts:
473                   type: array
474                   items:
475                     type: string
476                     format: hostname
477                   uniqueItems: true
478   /users:
479     post:
480       summary: Create a user
481       security:
482         - OAuth2:
483             - admin
484       tags:
485         - Users
486       responses:
487         '200':
488           description: successful operation
489           content:
490             application/json:
491               schema:
492                 $ref: '#/components/schemas/AddUserResponse'
493       requestBody:
494         content:
495           application/json:
496             schema:
497               $ref: '#/components/schemas/AddUser'
498         description: User to create
499         required: true
500     get:
501       summary: List users
502       security:
503         - OAuth2: []
504       tags:
505         - Users
506       parameters:
507         - $ref: '#/components/parameters/start'
508         - $ref: '#/components/parameters/count'
509         - $ref: '#/components/parameters/usersSort'
510       responses:
511         '200':
512           description: successful operation
513           content:
514             application/json:
515               schema:
516                 type: array
517                 items:
518                   $ref: '#/components/schemas/User'
519   '/users/{id}':
520     delete:
521       summary: Delete a user
522       security:
523         - OAuth2:
524             - admin
525       tags:
526         - Users
527       parameters:
528         - $ref: '#/components/parameters/id'
529       responses:
530         '204':
531           description: successful operation
532     get:
533       summary: Get a user
534       security:
535         - OAuth2: []
536       tags:
537         - Users
538       parameters:
539         - $ref: '#/components/parameters/id'
540       responses:
541         '200':
542           description: successful operation
543           content:
544             application/json:
545               schema:
546                 $ref: '#/components/schemas/User'
547     put:
548       summary: Update a user
549       security:
550         - OAuth2: []
551       tags:
552         - Users
553       parameters:
554         - $ref: '#/components/parameters/id'
555       responses:
556         '204':
557           description: successful operation
558       requestBody:
559         content:
560           application/json:
561             schema:
562               $ref: '#/components/schemas/UpdateUser'
563         required: true
564   /users/register:
565     post:
566       summary: Register a user
567       tags:
568         - Users
569       responses:
570         '204':
571           description: successful operation
572       requestBody:
573         content:
574           application/json:
575             schema:
576               $ref: '#/components/schemas/RegisterUser'
577         required: true
578   /users/me:
579     get:
580       summary: Get my user information
581       security:
582         - OAuth2:
583           - user
584       tags:
585         - My User
586       responses:
587         '200':
588           description: successful operation
589           content:
590             application/json:
591               schema:
592                 type: array
593                 items:
594                   $ref: '#/components/schemas/User'
595     put:
596       summary: Update my user information
597       security:
598         - OAuth2:
599           - user
600       tags:
601         - My User
602       responses:
603         '204':
604           description: successful operation
605       requestBody:
606         content:
607           application/json:
608             schema:
609               $ref: '#/components/schemas/UpdateMe'
610         required: true
611   /users/me/videos/imports:
612     get:
613       summary: Get video imports of my user
614       security:
615         - OAuth2:
616             - user
617       tags:
618         - Videos
619         - My User
620       parameters:
621         - $ref: '#/components/parameters/start'
622         - $ref: '#/components/parameters/count'
623         - $ref: '#/components/parameters/sort'
624       responses:
625         '200':
626           description: successful operation
627           content:
628             application/json:
629               schema:
630                 $ref: '#/components/schemas/VideoImport'
631   /users/me/video-quota-used:
632     get:
633       summary: Get my user used quota
634       security:
635         - OAuth2:
636           - user
637       tags:
638         - My User
639       responses:
640         '200':
641           description: successful operation
642           content:
643             application/json:
644               schema:
645                 type: number
646   '/users/me/videos/{videoId}/rating':
647     get:
648       summary: Get rate of my user for a video
649       security:
650         - OAuth2: []
651       tags:
652         - My User
653         - Video Rates
654       parameters:
655         - name: videoId
656           in: path
657           required: true
658           description: 'The video id '
659           schema:
660             type: string
661       responses:
662         '200':
663           description: successful operation
664           content:
665             application/json:
666               schema:
667                 $ref: '#/components/schemas/GetMeVideoRating'
668   /users/me/videos:
669     get:
670       summary: Get videos of my user
671       security:
672         - OAuth2:
673           - user
674       tags:
675         - My User
676         - Videos
677       parameters:
678         - $ref: '#/components/parameters/start'
679         - $ref: '#/components/parameters/count'
680         - $ref: '#/components/parameters/sort'
681       responses:
682         '200':
683           description: successful operation
684           content:
685             application/json:
686               schema:
687                 $ref: '#/components/schemas/VideoListResponse'
688   /users/me/subscriptions:
689     get:
690       summary: Get my user subscriptions
691       security:
692         - OAuth2:
693             - user
694       tags:
695         - My Subscriptions
696       parameters:
697         - $ref: '#/components/parameters/start'
698         - $ref: '#/components/parameters/count'
699         - $ref: '#/components/parameters/sort'
700       responses:
701         '200':
702           description: successful operation
703     post:
704       summary: Add subscription to my user
705       security:
706         - OAuth2:
707             - user
708       tags:
709         - My Subscriptions
710       responses:
711         '200':
712           description: successful operation
713   /users/me/subscriptions/exist:
714     get:
715       summary: Get if subscriptions exist for my user
716       security:
717         - OAuth2:
718             - user
719       tags:
720         - My Subscriptions
721       parameters:
722         - $ref: '#/components/parameters/subscriptionsUris'
723       responses:
724         '200':
725           description: successful operation
726           content:
727             application/json:
728               schema:
729                 type: object
730   /users/me/subscriptions/videos:
731     get:
732       summary: List videos of subscriptions of my user
733       security:
734         - OAuth2:
735           - user
736       tags:
737         - My Subscriptions
738         - Videos
739       parameters:
740         - $ref: '#/components/parameters/categoryOneOf'
741         - $ref: '#/components/parameters/tagsOneOf'
742         - $ref: '#/components/parameters/tagsAllOf'
743         - $ref: '#/components/parameters/licenceOneOf'
744         - $ref: '#/components/parameters/languageOneOf'
745         - $ref: '#/components/parameters/nsfw'
746         - $ref: '#/components/parameters/filter'
747         - $ref: '#/components/parameters/skipCount'
748         - $ref: '#/components/parameters/start'
749         - $ref: '#/components/parameters/count'
750         - $ref: '#/components/parameters/videosSort'
751       responses:
752         '200':
753           description: successful operation
754           content:
755             application/json:
756               schema:
757                 $ref: '#/components/schemas/VideoListResponse'
758   '/users/me/subscriptions/{subscriptionHandle}':
759     get:
760       summary: Get subscription of my user
761       security:
762         - OAuth2:
763             - user
764       tags:
765         - My Subscriptions
766       parameters:
767         - $ref: '#/components/parameters/subscriptionHandle'
768       responses:
769         '200':
770           description: successful operation
771           content:
772             application/json:
773               schema:
774                 $ref: '#/components/schemas/VideoChannel'
775     delete:
776       summary: Delete subscription of my user
777       security:
778         - OAuth2:
779             - user
780       tags:
781         - My Subscriptions
782       parameters:
783         - $ref: '#/components/parameters/subscriptionHandle'
784       responses:
785         '200':
786           description: successful operation
787   /users/me/notifications:
788     get:
789       summary: List my notifications
790       security:
791         - OAuth2: []
792       tags:
793         - My Notifications
794       parameters:
795         - name: unread
796           in: query
797           description: only list unread notifications
798           schema:
799             type: boolean
800         - $ref: '#/components/parameters/start'
801         - $ref: '#/components/parameters/count'
802         - $ref: '#/components/parameters/sort'
803       responses:
804         '200':
805           description: successful operation
806           content:
807             application/json:
808               schema:
809                 $ref: '#/components/schemas/NotificationListResponse'
810   /users/me/notifications/read:
811     post:
812       summary: Mark notifications as read by their id
813       security:
814         - OAuth2: []
815       tags:
816         - My Notifications
817       requestBody:
818         content:
819           multipart/form-data:
820             schema:
821               type: object
822               properties:
823                 ids:
824                   type: array
825                   description: ids of the notifications to mark as read
826                   items:
827                     type: integer
828               required:
829                 - ids
830       responses:
831         '204':
832           description: successful operation
833   /users/me/notifications/read-all:
834     post:
835       summary: Mark all my notification as read
836       security:
837         - OAuth2: []
838       tags:
839         - My Notifications
840       responses:
841         '204':
842           description: successful operation
843   /users/me/notification-settings:
844     put:
845       summary: Update my notification settings
846       security:
847         - OAuth2: []
848       tags:
849         - My Notifications
850       requestBody:
851         content:
852           multipart/form-data:
853             schema:
854               type: object
855               properties:
856                 newVideoFromSubscription:
857                   $ref: '#/components/schemas/NotificationSettingValue'
858                 newCommentOnMyVideo:
859                   $ref: '#/components/schemas/NotificationSettingValue'
860                 videoAbuseAsModerator:
861                   $ref: '#/components/schemas/NotificationSettingValue'
862                 videoAutoBlacklistAsModerator:
863                   $ref: '#/components/schemas/NotificationSettingValue'
864                 blacklistOnMyVideo:
865                   $ref: '#/components/schemas/NotificationSettingValue'
866                 myVideoPublished:
867                   $ref: '#/components/schemas/NotificationSettingValue'
868                 myVideoImportFinished:
869                   $ref: '#/components/schemas/NotificationSettingValue'
870                 newFollow:
871                   $ref: '#/components/schemas/NotificationSettingValue'
872                 newUserRegistration:
873                   $ref: '#/components/schemas/NotificationSettingValue'
874                 commentMention:
875                   $ref: '#/components/schemas/NotificationSettingValue'
876                 newInstanceFollower:
877                   $ref: '#/components/schemas/NotificationSettingValue'
878                 autoInstanceFollowing:
879                   $ref: '#/components/schemas/NotificationSettingValue'
880       responses:
881         '204':
882           description: successful operation
883   /users/me/avatar/pick:
884     post:
885       summary: Update my user avatar
886       security:
887         - OAuth2: []
888       tags:
889         - My User
890       responses:
891         '200':
892           description: successful operation
893           content:
894             application/json:
895               schema:
896                 $ref: '#/components/schemas/Avatar'
897       requestBody:
898         content:
899           multipart/form-data:
900             schema:
901               type: object
902               properties:
903                 avatarfile:
904                   description: The file to upload.
905                   type: string
906                   format: binary
907             encoding:
908               avatarfile:
909                 contentType: image/png, image/jpeg
910   /videos/ownership:
911     get:
912       summary: List video ownership changes
913       tags:
914         - Video Ownership Change
915       security:
916         - OAuth2: []
917       responses:
918         '200':
919           description: successful operation
920   '/videos/ownership/{id}/accept':
921     post:
922       summary: Accept ownership change request
923       tags:
924         - Video Ownership Change
925       security:
926         - OAuth2: []
927       parameters:
928         - $ref: '#/components/parameters/idOrUUID'
929       responses:
930         '204':
931           description: successful operation
932         '403':
933           description: cannot terminate an ownership change of another user
934         '404':
935           description: video owneship change not found
936   '/videos/ownership/{id}/refuse':
937     post:
938       summary: Refuse ownership change request
939       tags:
940         - Video Ownership Change
941       security:
942         - OAuth2: []
943       parameters:
944         - $ref: '#/components/parameters/idOrUUID'
945       responses:
946         '204':
947           description: successful operation
948         '403':
949           description: cannot terminate an ownership change of another user
950         '404':
951           description: video owneship change not found
952   '/videos/{id}/give-ownership':
953     post:
954       summary: Request ownership change
955       tags:
956         - Video Ownership Change
957       security:
958         - OAuth2: []
959       parameters:
960         - $ref: '#/components/parameters/idOrUUID'
961       requestBody:
962         required: true
963         content:
964           application/x-www-form-urlencoded:
965             schema:
966               type: object
967               properties:
968                 username:
969                   type: string
970               required:
971                 - username
972       responses:
973         '204':
974           description: successful operation
975         '400':
976           description: changing video ownership to a remote account is not supported yet
977         '404':
978           description: video not found
979   /videos:
980     get:
981       summary: List videos
982       tags:
983         - Video
984       parameters:
985         - $ref: '#/components/parameters/categoryOneOf'
986         - $ref: '#/components/parameters/tagsOneOf'
987         - $ref: '#/components/parameters/tagsAllOf'
988         - $ref: '#/components/parameters/licenceOneOf'
989         - $ref: '#/components/parameters/languageOneOf'
990         - $ref: '#/components/parameters/nsfw'
991         - $ref: '#/components/parameters/filter'
992         - $ref: '#/components/parameters/skipCount'
993         - $ref: '#/components/parameters/start'
994         - $ref: '#/components/parameters/count'
995         - $ref: '#/components/parameters/videosSort'
996       responses:
997         '200':
998           description: successful operation
999           content:
1000             application/json:
1001               schema:
1002                 $ref: '#/components/schemas/VideoListResponse'
1003   /videos/categories:
1004     get:
1005       summary: List available video categories
1006       tags:
1007         - Video
1008       responses:
1009         '200':
1010           description: successful operation
1011           content:
1012             application/json:
1013               schema:
1014                 type: array
1015                 items:
1016                   type: string
1017               examples:
1018                 nightly:
1019                   externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1020   /videos/licences:
1021     get:
1022       summary: List available video licences
1023       tags:
1024         - Video
1025       responses:
1026         '200':
1027           description: successful operation
1028           content:
1029             application/json:
1030               schema:
1031                 type: array
1032                 items:
1033                   type: string
1034               examples:
1035                 nightly:
1036                   externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1037   /videos/languages:
1038     get:
1039       summary: List available video languages
1040       tags:
1041         - Video
1042       responses:
1043         '200':
1044           description: successful operation
1045           content:
1046             application/json:
1047               schema:
1048                 type: array
1049                 items:
1050                   type: string
1051               examples:
1052                 nightly:
1053                   externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1054   /videos/privacies:
1055     get:
1056       summary: List available video privacies
1057       tags:
1058         - Video
1059       responses:
1060         '200':
1061           description: successful operation
1062           content:
1063             application/json:
1064               schema:
1065                 type: array
1066                 items:
1067                   type: string
1068               examples:
1069                 nightly:
1070                   externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1071   '/videos/{id}':
1072     put:
1073       summary: Update a video
1074       security:
1075         - OAuth2: []
1076       tags:
1077         - Video
1078       parameters:
1079         - $ref: '#/components/parameters/idOrUUID'
1080       responses:
1081         '204':
1082           description: successful operation
1083       requestBody:
1084         content:
1085           multipart/form-data:
1086             schema:
1087               type: object
1088               properties:
1089                 thumbnailfile:
1090                   description: Video thumbnail file
1091                   type: string
1092                   format: binary
1093                 previewfile:
1094                   description: Video preview file
1095                   type: string
1096                   format: binary
1097                 category:
1098                   description: Video category
1099                   type: integer
1100                   example: 4
1101                 licence:
1102                   description: Video licence
1103                   type: integer
1104                   example: 2
1105                 language:
1106                   description: Video language
1107                   type: string
1108                 privacy:
1109                   $ref: '#/components/schemas/VideoPrivacySet'
1110                 description:
1111                   description: Video description
1112                   type: string
1113                 waitTranscoding:
1114                   description: Whether or not we wait transcoding before publish the video
1115                   type: string
1116                 support:
1117                   description: Text describing how to support the video uploader
1118                   type: string
1119                 nsfw:
1120                   description: Whether or not this video contains sensitive content
1121                   type: boolean
1122                 name:
1123                   description: Video name
1124                   type: string
1125                 tags:
1126                   description: Video tags (maximum 5 tags each between 2 and 30 characters)
1127                   type: array
1128                   minItems: 1
1129                   maxItems: 5
1130                   items:
1131                     type: string
1132                     minLength: 2
1133                     maxLength: 30
1134                 commentsEnabled:
1135                   description: Enable or disable comments for this video
1136                   type: boolean
1137                 originallyPublishedAt:
1138                   description: Date when the content was originally published
1139                   type: string
1140                   format: date-time
1141                 scheduleUpdate:
1142                   $ref: '#/components/schemas/VideoScheduledUpdate'
1143             encoding:
1144               thumbnailfile:
1145                 contentType: image/jpeg
1146               previewfile:
1147                 contentType: image/jpeg
1148     get:
1149       summary: Get a video
1150       tags:
1151         - Video
1152       parameters:
1153         - $ref: '#/components/parameters/idOrUUID'
1154       responses:
1155         '200':
1156           description: successful operation
1157           content:
1158             application/json:
1159               schema:
1160                 $ref: '#/components/schemas/VideoDetails'
1161     delete:
1162       summary: Delete a video
1163       security:
1164         - OAuth2: []
1165       tags:
1166         - Video
1167       parameters:
1168         - $ref: '#/components/parameters/idOrUUID'
1169       responses:
1170         '204':
1171           description: successful operation
1172   '/videos/{id}/description':
1173     get:
1174       summary: Get complete video description
1175       tags:
1176         - Video
1177       parameters:
1178         - $ref: '#/components/parameters/idOrUUID'
1179       responses:
1180         '200':
1181           description: successful operation
1182           content:
1183             application/json:
1184               schema:
1185                 type: string
1186   '/videos/{id}/views':
1187     post:
1188       summary: Add a view to a video
1189       tags:
1190         - Video
1191       parameters:
1192         - $ref: '#/components/parameters/idOrUUID'
1193       responses:
1194         '204':
1195           description: successful operation
1196   '/videos/{id}/watching':
1197     put:
1198       summary: Set watching progress of a video
1199       tags:
1200         - Video
1201       security:
1202         - OAuth2: []
1203       parameters:
1204         - $ref: '#/components/parameters/idOrUUID'
1205       requestBody:
1206         content:
1207           application/json:
1208             schema:
1209               $ref: '#/components/schemas/UserWatchingVideo'
1210         required: true
1211       responses:
1212         '204':
1213           description: successful operation
1214   /videos/upload:
1215     post:
1216       summary: Upload a video
1217       security:
1218         - OAuth2: []
1219       tags:
1220         - Video
1221       responses:
1222         '200':
1223           description: successful operation
1224           content:
1225             application/json:
1226               schema:
1227                 $ref: '#/components/schemas/VideoUploadResponse'
1228         '403':
1229           description: user video quota is exceeded with this video
1230         '408':
1231           description: upload has timed out
1232         '422':
1233           description: invalid input file
1234       requestBody:
1235         content:
1236           multipart/form-data:
1237             schema:
1238               type: object
1239               properties:
1240                 videofile:
1241                   description: Video file
1242                   type: string
1243                   format: binary
1244                 channelId:
1245                   description: Channel id that will contain this video
1246                   type: integer
1247                 thumbnailfile:
1248                   description: Video thumbnail file
1249                   type: string
1250                   format: binary
1251                 previewfile:
1252                   description: Video preview file
1253                   type: string
1254                   format: binary
1255                 privacy:
1256                   $ref: '#/components/schemas/VideoPrivacySet'
1257                 category:
1258                   description: Video category
1259                   type: integer
1260                   example: 4
1261                 licence:
1262                   description: Video licence
1263                   type: string
1264                 language:
1265                   description: Video language
1266                   type: integer
1267                   example: 2
1268                 description:
1269                   description: Video description
1270                   type: string
1271                 waitTranscoding:
1272                   description: Whether or not we wait transcoding before publish the video
1273                   type: string
1274                 support:
1275                   description: Text describing how to support the video uploader
1276                   type: string
1277                 nsfw:
1278                   description: Whether or not this video contains sensitive content
1279                   type: boolean
1280                 name:
1281                   description: Video name
1282                   type: string
1283                 tags:
1284                   description: Video tags (maximum 5 tags each between 2 and 30 characters)
1285                   type: array
1286                   minItems: 1
1287                   maxItems: 5
1288                   uniqueItems: true
1289                   items:
1290                     type: string
1291                     minLength: 2
1292                     maxLength: 30
1293                 commentsEnabled:
1294                   description: Enable or disable comments for this video
1295                   type: boolean
1296                 originallyPublishedAt:
1297                   description: Date when the content was originally published
1298                   type: string
1299                   format: date-time
1300                 scheduleUpdate:
1301                   $ref: '#/components/schemas/VideoScheduledUpdate'
1302               required:
1303                 - videofile
1304                 - channelId
1305                 - name
1306             encoding:
1307               videofile:
1308                 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1309               thumbnailfile:
1310                 contentType: image/jpeg
1311               previewfile:
1312                 contentType: image/jpeg
1313       x-code-samples:
1314         - lang: Shell
1315           source: |
1316             ## DEPENDENCIES: httpie, jq
1317             # pip install httpie
1318             USERNAME="<your_username>"
1319             PASSWORD="<your_password>"
1320             FILE_PATH="<your_file_path>"
1321             CHANNEL_ID="<your_channel_id>"
1322             NAME="<video_name>"
1323
1324             API_PATH="https://peertube2.cpy.re/api/v1"
1325             ## AUTH
1326             client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1327             client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1328             token=$(http -b --form POST "$API_PATH/users/token" \
1329               client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1330               username=$USERNAME \
1331               password=$PASSWORD \
1332               | jq -r ".access_token")
1333             ## VIDEO UPLOAD
1334             http -b --form POST "$API_PATH/videos/upload" \
1335               videofile@$FILE_PATH \
1336               channelId=$CHANNEL_ID \
1337               name=$NAME \
1338               "Authorization:Bearer $token"
1339   /videos/imports:
1340     post:
1341       summary: Import a video
1342       description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1343       security:
1344         - OAuth2: []
1345       tags:
1346         - Video
1347       requestBody:
1348         content:
1349           multipart/form-data:
1350             schema:
1351               type: object
1352               properties:
1353                 torrentfile:
1354                   description: Torrent File
1355                   type: string
1356                   format: binary
1357                 targetUrl:
1358                   description: HTTP target URL
1359                   type: string
1360                 magnetUri:
1361                   description: Magnet URI
1362                   type: string
1363                 channelId:
1364                   description: Channel id that will contain this video
1365                   type: integer
1366                 thumbnailfile:
1367                   description: Video thumbnail file
1368                   type: string
1369                   format: binary
1370                 previewfile:
1371                   description: Video preview file
1372                   type: string
1373                   format: binary
1374                 privacy:
1375                   $ref: '#/components/schemas/VideoPrivacySet'
1376                 category:
1377                   description: Video category
1378                   type: string
1379                 licence:
1380                   description: Video licence
1381                   type: string
1382                 language:
1383                   description: Video language
1384                   type: string
1385                 description:
1386                   description: Video description
1387                   type: string
1388                 waitTranscoding:
1389                   description: Whether or not we wait transcoding before publish the video
1390                   type: string
1391                 support:
1392                   description: Text describing how to support the video uploader
1393                   type: string
1394                 nsfw:
1395                   description: Whether or not this video contains sensitive content
1396                   type: string
1397                 name:
1398                   description: Video name
1399                   type: string
1400                 tags:
1401                   description: Video tags (maximum 5 tags each between 2 and 30 characters)
1402                   type: array
1403                   minItems: 1
1404                   maxItems: 5
1405                   items:
1406                     type: string
1407                     minLength: 2
1408                     maxLength: 30
1409                 commentsEnabled:
1410                   description: Enable or disable comments for this video
1411                   type: string
1412                 scheduleUpdate:
1413                   $ref: '#/components/schemas/VideoScheduledUpdate'
1414               required:
1415                 - channelId
1416                 - name
1417             encoding:
1418               torrentfile:
1419                 contentType: application/x-bittorrent
1420               thumbnailfile:
1421                 contentType: image/jpeg
1422               previewfile:
1423                 contentType: image/jpeg
1424       responses:
1425         '200':
1426           description: successful operation
1427           content:
1428             application/json:
1429               schema:
1430                 $ref: '#/components/schemas/VideoUploadResponse'
1431         '409':
1432           description: HTTP or Torrent/magnetURI import not enabled
1433         '400':
1434           description: '`magnetUri` or `targetUrl` or a torrent file missing'
1435   /videos/abuse:
1436     get:
1437       summary: List video abuses
1438       security:
1439         - OAuth2:
1440           - admin
1441           - moderator
1442       tags:
1443         - Video Abuses
1444       parameters:
1445         - name: id
1446           in: query
1447           description: only list the report with this id
1448           schema:
1449             type: integer
1450         - name: predefinedReason
1451           in: query
1452           description: predefined reason the listed reports should contain
1453           schema:
1454             type: string
1455             enum:
1456               - violentOrAbusive
1457               - hatefulOrAbusive
1458               - spamOrMisleading
1459               - privacy
1460               - rights
1461               - serverRules
1462               - thumbnails
1463               - captions
1464         - name: search
1465           in: query
1466           description: plain search that will match with video titles, reporter names and more
1467           schema:
1468             type: string
1469         - name: state
1470           in: query
1471           description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)'
1472           schema:
1473             type: integer
1474             enum:
1475               - 1
1476               - 2
1477               - 3
1478         - name: searchReporter
1479           in: query
1480           description: only list reports of a specific reporter
1481           schema:
1482             type: string
1483         - name: searchReportee
1484           description: only list reports of a specific reportee
1485           in: query
1486           schema:
1487             type: string
1488         - name: searchVideo
1489           in: query
1490           description: only list reports of a specific video
1491           schema:
1492             type: string
1493         - name: searchVideoChannel
1494           in: query
1495           description: only list reports of a specific video channel
1496           schema:
1497             type: string
1498         - $ref: '#/components/parameters/start'
1499         - $ref: '#/components/parameters/count'
1500         - $ref: '#/components/parameters/abusesSort'
1501       responses:
1502         '200':
1503           description: successful operation
1504           content:
1505             application/json:
1506               schema:
1507                 type: array
1508                 items:
1509                   $ref: '#/components/schemas/VideoAbuse'
1510   '/videos/{id}/abuse':
1511     post:
1512       summary: Report an abuse
1513       security:
1514         - OAuth2: []
1515       tags:
1516         - Video Abuses
1517         - Videos
1518       parameters:
1519         - $ref: '#/components/parameters/idOrUUID'
1520       requestBody:
1521         required: true
1522         content:
1523           application/json:
1524             schema:
1525               type: object
1526               properties:
1527                 reason:
1528                   description: Reason why the user reports this video
1529                   type: string
1530                   minLength: 4
1531                 predefinedReasons:
1532                   description: Reason categories that help triage reports
1533                   type: array
1534                   items:
1535                     type: string
1536                     enum:
1537                     - violentOrAbusive
1538                     - hatefulOrAbusive
1539                     - spamOrMisleading
1540                     - privacy
1541                     - rights
1542                     - serverRules
1543                     - thumbnails
1544                     - captions
1545                 startAt:
1546                   type: integer
1547                   description: Timestamp in the video that marks the beginning of the report
1548                   minimum: 0
1549                 endAt:
1550                   type: integer
1551                   description: Timestamp in the video that marks the ending of the report
1552                   minimum: 0
1553               required:
1554                 - reason
1555       responses:
1556         '204':
1557           description: successful operation
1558         '400':
1559           description: incorrect request parameters
1560   '/videos/{id}/abuse/{abuseId}':
1561     put:
1562       summary: Update an abuse
1563       security:
1564         - OAuth2:
1565           - admin
1566           - moderator
1567       tags:
1568         - Video Abuses
1569       parameters:
1570         - $ref: '#/components/parameters/idOrUUID'
1571         - $ref: '#/components/parameters/abuseId'
1572       requestBody:
1573         content:
1574           application/json:
1575             schema:
1576               type: object
1577               properties:
1578                 state:
1579                   $ref: '#/components/schemas/VideoAbuseStateSet'
1580                 moderationComment:
1581                   type: string
1582                   description: Update the report comment visible only to the moderation team
1583       responses:
1584         '204':
1585           description: successful operation
1586         '404':
1587           description: video abuse not found
1588     delete:
1589       tags:
1590         - Video Abuses
1591       summary: Delete an abuse
1592       security:
1593         - OAuth2:
1594             - admin
1595             - moderator
1596       parameters:
1597         - $ref: '#/components/parameters/idOrUUID'
1598         - $ref: '#/components/parameters/abuseId'
1599       responses:
1600         '204':
1601           description: successful operation
1602         '404':
1603           description: block not found
1604
1605   '/videos/{id}/blacklist':
1606     post:
1607       summary: Block a video
1608       security:
1609         - OAuth2:
1610             - admin
1611             - moderator
1612       tags:
1613         - Video Blocks
1614       parameters:
1615         - $ref: '#/components/parameters/idOrUUID'
1616       responses:
1617         '204':
1618           description: successful operation
1619     delete:
1620       summary: Unblock a video by its id
1621       security:
1622         - OAuth2:
1623             - admin
1624             - moderator
1625       tags:
1626         - Video Blocks
1627       parameters:
1628         - $ref: '#/components/parameters/idOrUUID'
1629       responses:
1630         '204':
1631           description: successful operation
1632         '404':
1633           description: block not found
1634   /videos/blacklist:
1635     get:
1636       tags:
1637         - Video Blocks
1638       summary: List video blocks
1639       security:
1640         - OAuth2:
1641             - admin
1642             - moderator
1643       parameters:
1644         - name: type
1645           in: query
1646           description: >
1647             list only blocks that match this type:
1648
1649             - `1`: manual block
1650
1651             - `2`: automatic block that needs review
1652           schema:
1653             type: integer
1654             enum:
1655               - 1
1656               - 2
1657         - name: search
1658           in: query
1659           description: plain search that will match with video titles, and more
1660           schema:
1661             type: string
1662         - $ref: '#/components/parameters/start'
1663         - $ref: '#/components/parameters/count'
1664         - $ref: '#/components/parameters/blacklistsSort'
1665       responses:
1666         '200':
1667           description: successful operation
1668           content:
1669             application/json:
1670               schema:
1671                 type: object
1672                 properties:
1673                   total:
1674                     type: integer
1675                     example: 1
1676                   data:
1677                     type: array
1678                     items:
1679                       $ref: '#/components/schemas/VideoBlacklist'
1680   /videos/{id}/captions:
1681     get:
1682       summary: List captions of a video
1683       tags:
1684         - Video Captions
1685       parameters:
1686         - $ref: '#/components/parameters/idOrUUID'
1687       responses:
1688         '200':
1689           description: successful operation
1690           content:
1691             application/json:
1692               schema:
1693                 type: object
1694                 properties:
1695                   total:
1696                     type: integer
1697                     example: 1
1698                   data:
1699                     type: array
1700                     items:
1701                       $ref: '#/components/schemas/VideoCaption'
1702   /videos/{id}/captions/{captionLanguage}:
1703     put:
1704       summary: Add or replace a video caption
1705       tags:
1706         - Video Captions
1707       parameters:
1708         - $ref: '#/components/parameters/idOrUUID'
1709         - $ref: '#/components/parameters/captionLanguage'
1710       requestBody:
1711         content:
1712           multipart/form-data:
1713             schema:
1714               type: object
1715               properties:
1716                 captionfile:
1717                   description: The file to upload.
1718                   type: string
1719                   format: binary
1720             encoding:
1721               captionfile:
1722                 contentType: text/vtt, application/x-subrip, text/plain
1723       responses:
1724         '204':
1725           description: successful operation
1726         '404':
1727           description: video or language not found
1728     delete:
1729       summary: Delete a video caption
1730       tags:
1731         - Video Captions
1732       parameters:
1733         - $ref: '#/components/parameters/idOrUUID'
1734         - $ref: '#/components/parameters/captionLanguage'
1735       responses:
1736         '204':
1737           description: successful operation
1738         '404':
1739           description: video or language or caption for that language not found
1740   /video-channels:
1741     get:
1742       summary: List video channels
1743       tags:
1744         - Video Channels
1745       parameters:
1746         - $ref: '#/components/parameters/start'
1747         - $ref: '#/components/parameters/count'
1748         - $ref: '#/components/parameters/sort'
1749       responses:
1750         '200':
1751           description: successful operation
1752           content:
1753             application/json:
1754               schema:
1755                 type: object
1756                 properties:
1757                   total:
1758                     type: integer
1759                     example: 1
1760                   data:
1761                     type: array
1762                     items:
1763                       $ref: '#/components/schemas/VideoChannel'
1764     post:
1765       summary: Create a video channel
1766       security:
1767         - OAuth2: []
1768       tags:
1769         - Video Channels
1770       responses:
1771         '204':
1772           description: successful operation
1773       requestBody:
1774         content:
1775           application/json:
1776             schema:
1777               $ref: '#/components/schemas/VideoChannelCreate'
1778   '/video-channels/{channelHandle}':
1779     get:
1780       summary: Get a video channel
1781       tags:
1782         - Video Channels
1783       parameters:
1784         - $ref: '#/components/parameters/channelHandle'
1785       responses:
1786         '200':
1787           description: successful operation
1788           content:
1789             application/json:
1790               schema:
1791                 $ref: '#/components/schemas/VideoChannel'
1792     put:
1793       summary: Update a video channel
1794       security:
1795         - OAuth2: []
1796       tags:
1797         - Video Channels
1798       parameters:
1799         - $ref: '#/components/parameters/channelHandle'
1800       responses:
1801         '204':
1802           description: successful operation
1803       requestBody:
1804         content:
1805           application/json:
1806             schema:
1807               $ref: '#/components/schemas/VideoChannelUpdate'
1808     delete:
1809       summary: Delete a video channel
1810       security:
1811         - OAuth2: []
1812       tags:
1813         - Video Channels
1814       parameters:
1815         - $ref: '#/components/parameters/channelHandle'
1816       responses:
1817         '204':
1818           description: successful operation
1819   '/video-channels/{channelHandle}/videos':
1820     get:
1821       summary: List videos of a video channel
1822       tags:
1823         - Video
1824         - Video Channels
1825       parameters:
1826         - $ref: '#/components/parameters/channelHandle'
1827         - $ref: '#/components/parameters/categoryOneOf'
1828         - $ref: '#/components/parameters/tagsOneOf'
1829         - $ref: '#/components/parameters/tagsAllOf'
1830         - $ref: '#/components/parameters/licenceOneOf'
1831         - $ref: '#/components/parameters/languageOneOf'
1832         - $ref: '#/components/parameters/nsfw'
1833         - $ref: '#/components/parameters/filter'
1834         - $ref: '#/components/parameters/skipCount'
1835         - $ref: '#/components/parameters/start'
1836         - $ref: '#/components/parameters/count'
1837         - $ref: '#/components/parameters/videosSort'
1838       responses:
1839         '200':
1840           description: successful operation
1841           content:
1842             application/json:
1843               schema:
1844                 $ref: '#/components/schemas/VideoListResponse'
1845
1846   /video-playlists/privacies:
1847     get:
1848       summary: List available playlist privacies
1849       tags:
1850         - Video Playlists
1851       responses:
1852         '200':
1853           description: successful operation
1854           content:
1855             application/json:
1856               schema:
1857                 type: array
1858                 items:
1859                   type: string
1860               examples:
1861                 nightly:
1862                   externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
1863
1864   /video-playlists:
1865     get:
1866       summary: List video playlists
1867       tags:
1868         - Video Playlists
1869       parameters:
1870         - $ref: '#/components/parameters/start'
1871         - $ref: '#/components/parameters/count'
1872         - $ref: '#/components/parameters/sort'
1873       responses:
1874         '200':
1875           description: successful operation
1876           content:
1877             application/json:
1878               schema:
1879                 type: object
1880                 properties:
1881                   total:
1882                     type: integer
1883                     example: 1
1884                   data:
1885                     type: array
1886                     items:
1887                       $ref: '#/components/schemas/VideoPlaylist'
1888     post:
1889       summary: Create a video playlist
1890       description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1891       security:
1892         - OAuth2: []
1893       tags:
1894         - Video Playlists
1895       responses:
1896         '200':
1897           description: successful operation
1898           content:
1899             application/json:
1900               schema:
1901                 type: object
1902                 properties:
1903                   videoPlaylist:
1904                     type: object
1905                     properties:
1906                       id:
1907                         type: integer
1908                       uuid:
1909                         type: string
1910       requestBody:
1911         content:
1912           multipart/form-data:
1913             schema:
1914               type: object
1915               properties:
1916                 displayName:
1917                   description: Video playlist display name
1918                   type: string
1919                 thumbnailfile:
1920                   description: Video playlist thumbnail file
1921                   type: string
1922                   format: binary
1923                 privacy:
1924                   $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1925                 description:
1926                   description: Video playlist description
1927                   type: string
1928                 videoChannelId:
1929                   description: Video channel in which the playlist will be published
1930                   type: integer
1931               required:
1932                 - displayName
1933
1934   /video-playlists/{id}:
1935     get:
1936       summary: Get a video playlist
1937       tags:
1938         - Video Playlists
1939       parameters:
1940         - $ref: '#/components/parameters/idOrUUID'
1941       responses:
1942         '200':
1943           description: successful operation
1944           content:
1945             application/json:
1946               schema:
1947                 $ref: '#/components/schemas/VideoPlaylist'
1948     put:
1949       summary: Update a video playlist
1950       description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1951       security:
1952         - OAuth2: []
1953       tags:
1954         - Video Playlists
1955       responses:
1956         '204':
1957           description: successful operation
1958       parameters:
1959         - $ref: '#/components/parameters/idOrUUID'
1960       requestBody:
1961         content:
1962           multipart/form-data:
1963             schema:
1964               type: object
1965               properties:
1966                 displayName:
1967                   description: Video playlist display name
1968                   type: string
1969                 thumbnailfile:
1970                   description: Video playlist thumbnail file
1971                   type: string
1972                   format: binary
1973                 privacy:
1974                   $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1975                 description:
1976                   description: Video playlist description
1977                   type: string
1978                 videoChannelId:
1979                   description: Video channel in which the playlist will be published
1980                   type: integer
1981     delete:
1982       summary: Delete a video playlist
1983       security:
1984         - OAuth2: []
1985       tags:
1986         - Video Playlists
1987       parameters:
1988         - $ref: '#/components/parameters/idOrUUID'
1989       responses:
1990         '204':
1991           description: successful operation
1992
1993   /video-playlists/{id}/videos:
1994     get:
1995       summary: 'List videos of a playlist'
1996       tags:
1997         - Videos
1998         - Video Playlists
1999       parameters:
2000         - $ref: '#/components/parameters/idOrUUID'
2001       responses:
2002         '200':
2003           description: successful operation
2004           content:
2005             application/json:
2006               schema:
2007                 $ref: '#/components/schemas/VideoListResponse'
2008     post:
2009       summary: 'Add a video in a playlist'
2010       security:
2011         - OAuth2: []
2012       tags:
2013         - Videos
2014         - Video Playlists
2015       parameters:
2016         - $ref: '#/components/parameters/idOrUUID'
2017       responses:
2018         '200':
2019           description: successful operation
2020           content:
2021             application/json:
2022               schema:
2023                 type: object
2024                 properties:
2025                   videoPlaylistElement:
2026                     type: object
2027                     properties:
2028                       id:
2029                         type: integer
2030       requestBody:
2031         content:
2032           application/json:
2033             schema:
2034               type: object
2035               properties:
2036                 videoId:
2037                   type: integer
2038                   description: 'Video to add in the playlist'
2039                 startTimestamp:
2040                   type: integer
2041                   description: 'Start the video at this specific timestamp (in seconds)'
2042                 stopTimestamp:
2043                   type: integer
2044                   description: 'Stop the video at this specific timestamp (in seconds)'
2045               required:
2046                 - videoId
2047
2048   /video-playlists/{id}/videos/reorder:
2049     post:
2050       summary: 'Reorder a playlist'
2051       security:
2052         - OAuth2: []
2053       tags:
2054         - Video Playlists
2055       parameters:
2056         - $ref: '#/components/parameters/idOrUUID'
2057       responses:
2058         '204':
2059           description: successful operation
2060       requestBody:
2061         content:
2062           application/json:
2063             schema:
2064               type: object
2065               properties:
2066                 startPosition:
2067                   type: integer
2068                   description: 'Start position of the element to reorder'
2069                   minimum: 1
2070                 insertAfterPosition:
2071                   type: integer
2072                   description: 'New position for the block to reorder, to add the block before the first element'
2073                   minimum: 0
2074                 reorderLength:
2075                   type: integer
2076                   description: 'How many element from `startPosition` to reorder'
2077                   minimum: 1
2078               required:
2079                 - startPosition
2080                 - insertAfterPosition
2081
2082   /video-playlists/{id}/videos/{playlistElementId}:
2083     put:
2084       summary: 'Update a playlist element'
2085       security:
2086         - OAuth2: []
2087       tags:
2088         - Video Playlists
2089       parameters:
2090         - $ref: '#/components/parameters/idOrUUID'
2091         - $ref: '#/components/parameters/playlistElementId'
2092       responses:
2093         '204':
2094           description: successful operation
2095       requestBody:
2096         content:
2097           application/json:
2098             schema:
2099               type: object
2100               properties:
2101                 startTimestamp:
2102                   type: integer
2103                   description: 'Start the video at this specific timestamp (in seconds)'
2104                 stopTimestamp:
2105                   type: integer
2106                   description: 'Stop the video at this specific timestamp (in seconds)'
2107     delete:
2108       summary: 'Delete an element from a playlist'
2109       security:
2110         - OAuth2: []
2111       tags:
2112         - Video Playlists
2113       parameters:
2114         - $ref: '#/components/parameters/idOrUUID'
2115         - $ref: '#/components/parameters/playlistElementId'
2116       responses:
2117         '204':
2118           description: successful operation
2119
2120   '/users/me/video-playlists/videos-exist':
2121     get:
2122       summary: 'Check video exists in my playlists'
2123       security:
2124         - OAuth2: []
2125       tags:
2126         - Video Playlists
2127       parameters:
2128         - name: videoIds
2129           in: query
2130           required: true
2131           description: The video ids to check
2132           schema:
2133             type: array
2134             items:
2135               type: integer
2136       responses:
2137         '200':
2138           description: successful operation
2139           content:
2140             application/json:
2141               schema:
2142                 type: object
2143                 properties:
2144                   videoId:
2145                     type: array
2146                     items:
2147                       type: object
2148                       properties:
2149                         playlistElementId:
2150                           type: integer
2151                         playlistId:
2152                           type: integer
2153                         startTimestamp:
2154                           type: integer
2155                         stopTimestamp:
2156                           type: integer
2157
2158   '/accounts/{name}/video-channels':
2159     get:
2160       summary: List video channels of an account
2161       tags:
2162         - Video Channels
2163         - Accounts
2164       parameters:
2165         - $ref: '#/components/parameters/name'
2166         - name: withStats
2167           in: query
2168           description: include view statistics for the last 30 days (only if authentified as the account user)
2169           schema:
2170             type: boolean
2171         - $ref: '#/components/parameters/start'
2172         - $ref: '#/components/parameters/count'
2173         - $ref: '#/components/parameters/sort'
2174       responses:
2175         '200':
2176           description: successful operation
2177           content:
2178             application/json:
2179               schema:
2180                 type: array
2181                 items:
2182                   $ref: '#/components/schemas/VideoChannel'
2183   '/accounts/{name}/ratings':
2184     get:
2185       summary: List ratings of an account
2186       security:
2187         - OAuth2: []
2188       tags:
2189         - Accounts
2190       parameters:
2191         - $ref: '#/components/parameters/name'
2192         - $ref: '#/components/parameters/start'
2193         - $ref: '#/components/parameters/count'
2194         - $ref: '#/components/parameters/sort'
2195         - name: rating
2196           in: query
2197           required: false
2198           description: Optionally filter which ratings to retrieve
2199           schema:
2200             type: string
2201             enum:
2202               - like
2203               - dislike
2204       responses:
2205         '200':
2206           description: successful operation
2207           content:
2208             application/json:
2209               schema:
2210                 type: array
2211                 items:
2212                   $ref: '#/components/schemas/VideoRating'
2213   '/videos/{id}/comment-threads':
2214     get:
2215       summary: List threads of a video
2216       tags:
2217         - Video Comments
2218       parameters:
2219         - $ref: '#/components/parameters/idOrUUID'
2220         - $ref: '#/components/parameters/start'
2221         - $ref: '#/components/parameters/count'
2222         - $ref: '#/components/parameters/commentsSort'
2223       responses:
2224         '200':
2225           description: successful operation
2226           content:
2227             application/json:
2228               schema:
2229                 $ref: '#/components/schemas/CommentThreadResponse'
2230     post:
2231       summary: Create a thread
2232       security:
2233         - OAuth2: []
2234       tags:
2235         - Video Comments
2236       parameters:
2237         - $ref: '#/components/parameters/idOrUUID'
2238       responses:
2239         '200':
2240           description: successful operation
2241           content:
2242             application/json:
2243               schema:
2244                 $ref: '#/components/schemas/CommentThreadPostResponse'
2245       requestBody:
2246         content:
2247           application/json:
2248             schema:
2249               type: object
2250               properties:
2251                 text:
2252                   type: string
2253                   description: 'Text comment'
2254               required:
2255                 - text
2256
2257   '/videos/{id}/comment-threads/{threadId}':
2258     get:
2259       summary: Get a thread
2260       tags:
2261         - Video Comments
2262       parameters:
2263         - $ref: '#/components/parameters/idOrUUID'
2264         - $ref: '#/components/parameters/threadId'
2265       responses:
2266         '200':
2267           description: successful operation
2268           content:
2269             application/json:
2270               schema:
2271                 $ref: '#/components/schemas/VideoCommentThreadTree'
2272   '/videos/{id}/comments/{commentId}':
2273     post:
2274       summary: Reply to a thread of a video
2275       security:
2276         - OAuth2: []
2277       tags:
2278         - Video Comments
2279       parameters:
2280         - $ref: '#/components/parameters/idOrUUID'
2281         - $ref: '#/components/parameters/commentId'
2282       responses:
2283         '200':
2284           description: successful operation
2285           content:
2286             application/json:
2287               schema:
2288                 $ref: '#/components/schemas/CommentThreadPostResponse'
2289       requestBody:
2290         content:
2291           application/json:
2292             schema:
2293               type: object
2294               properties:
2295                 text:
2296                   type: string
2297                   description: 'Text comment'
2298               required:
2299                 - text
2300
2301     delete:
2302       summary: Delete a comment or a reply
2303       security:
2304         - OAuth2: []
2305       tags:
2306         - Video Comments
2307       parameters:
2308         - $ref: '#/components/parameters/idOrUUID'
2309         - $ref: '#/components/parameters/commentId'
2310       responses:
2311         '204':
2312           description: successful operation
2313         '403':
2314           description: cannot remove comment of another user
2315         '404':
2316           description: comment or video does not exist
2317         '409':
2318           description: comment is already deleted
2319   '/videos/{id}/rate':
2320     put:
2321       summary: Like/dislike a video
2322       security:
2323         - OAuth2: []
2324       tags:
2325         - Video Rates
2326       parameters:
2327         - $ref: '#/components/parameters/idOrUUID'
2328       responses:
2329         '204':
2330           description: successful operation
2331   /search/videos:
2332     get:
2333       tags:
2334         - Search
2335       summary: Search videos
2336       parameters:
2337         - name: search
2338           in: query
2339           required: true
2340           allowEmptyValue: false
2341           description: >
2342             String to search. If the user can make a remote URI search, and the string is an URI then the
2343             PeerTube instance will fetch the remote object and add it to its database. Then,
2344             you can use the REST API to fetch the complete video information and interact with it.
2345           schema:
2346             type: string
2347         - $ref: '#/components/parameters/categoryOneOf'
2348         - $ref: '#/components/parameters/tagsOneOf'
2349         - $ref: '#/components/parameters/tagsAllOf'
2350         - $ref: '#/components/parameters/licenceOneOf'
2351         - $ref: '#/components/parameters/languageOneOf'
2352         - $ref: '#/components/parameters/nsfw'
2353         - $ref: '#/components/parameters/filter'
2354         - $ref: '#/components/parameters/skipCount'
2355         - $ref: '#/components/parameters/start'
2356         - $ref: '#/components/parameters/count'
2357         - $ref: '#/components/parameters/searchTarget'
2358         - $ref: '#/components/parameters/videosSearchSort'
2359         - name: startDate
2360           in: query
2361           description: Get videos that are published after this date
2362           schema:
2363             type: string
2364             format: date-time
2365         - name: endDate
2366           in: query
2367           description: Get videos that are published before this date
2368           schema:
2369             type: string
2370             format: date-time
2371         - name: originallyPublishedStartDate
2372           in: query
2373           description: Get videos that are originally published after this date
2374           schema:
2375             type: string
2376             format: date-time
2377         - name: originallyPublishedEndDate
2378           in: query
2379           description: Get videos that are originally published before this date
2380           schema:
2381             type: string
2382             format: date-time
2383         - name: durationMin
2384           in: query
2385           description: Get videos that have this minimum duration
2386           schema:
2387             type: integer
2388         - name: durationMax
2389           in: query
2390           description: Get videos that have this maximum duration
2391           schema:
2392             type: integer
2393       responses:
2394         '200':
2395           description: successful operation
2396           content:
2397             application/json:
2398               schema:
2399                 $ref: '#/components/schemas/VideoListResponse'
2400   /search/video-channels:
2401     get:
2402       tags:
2403         - Search
2404       summary: Search channels
2405       parameters:
2406         - name: search
2407           in: query
2408           required: true
2409           description: >
2410             String to search. If the user can make a remote URI search, and the string is an URI then the
2411             PeerTube instance will fetch the remote object and add it to its database. Then,
2412             you can use the REST API to fetch the complete channel information and interact with it.
2413           schema:
2414             type: string
2415         - $ref: '#/components/parameters/start'
2416         - $ref: '#/components/parameters/count'
2417         - $ref: '#/components/parameters/searchTarget'
2418         - $ref: '#/components/parameters/sort'
2419       responses:
2420         '200':
2421           description: successful operation
2422           content:
2423             application/json:
2424               schema:
2425                 type: array
2426                 items:
2427                   $ref: '#/components/schemas/VideoChannel'
2428   /blocklist/accounts:
2429     get:
2430       tags:
2431         - Account Blocks
2432       summary: List account blocks
2433       security:
2434         - OAuth2:
2435           - admin
2436       parameters:
2437         - $ref: '#/components/parameters/start'
2438         - $ref: '#/components/parameters/count'
2439         - $ref: '#/components/parameters/sort'
2440       responses:
2441         '200':
2442           description: successful operation
2443     post:
2444       tags:
2445         - Account Blocks
2446       summary: Block an account
2447       security:
2448         - OAuth2:
2449           - admin
2450       requestBody:
2451         content:
2452           application/json:
2453             schema:
2454               type: object
2455               properties:
2456                 accountName:
2457                   type: string
2458                   example: chocobozzz@example.org
2459                   description: account to block, in the form `username@domain`
2460               required:
2461                 - accountName
2462       responses:
2463         '200':
2464           description: successful operation
2465         '409':
2466           description: self-blocking forbidden
2467   '/blocklist/accounts/{accountName}':
2468     delete:
2469       tags:
2470         - Account Blocks
2471       summary: Unblock an account by its handle
2472       security:
2473         - OAuth2:
2474           - admin
2475       parameters:
2476         - name: accountName
2477           in: path
2478           required: true
2479           description: account to unblock, in the form `username@domain`
2480           schema:
2481             type: string
2482       responses:
2483         '201':
2484           description: successful operation
2485         '404':
2486           description: account or account block does not exist
2487   /blocklist/servers:
2488     get:
2489       tags:
2490         - Server Blocks
2491       summary: List server blocks
2492       security:
2493         - OAuth2:
2494           - admin
2495       parameters:
2496         - $ref: '#/components/parameters/start'
2497         - $ref: '#/components/parameters/count'
2498         - $ref: '#/components/parameters/sort'
2499       responses:
2500         '200':
2501           description: successful operation
2502     post:
2503       tags:
2504         - Server Blocks
2505       summary: Block a server
2506       security:
2507         - OAuth2:
2508           - admin
2509       requestBody:
2510         content:
2511           application/json:
2512             schema:
2513               type: object
2514               properties:
2515                 host:
2516                   type: string
2517                   format: hostname
2518                   description: server domain to block
2519               required:
2520                 - host
2521       responses:
2522         '200':
2523           description: successful operation
2524         '409':
2525           description: self-blocking forbidden
2526   '/blocklist/servers/{host}':
2527     delete:
2528       tags:
2529         - Server Blocks
2530       summary: Unblock a server by its domain
2531       security:
2532         - OAuth2:
2533           - admin
2534       parameters:
2535         - name: host
2536           in: path
2537           required: true
2538           description: server domain to unblock
2539           schema:
2540             type: string
2541             format: hostname
2542       responses:
2543         '201':
2544           description: successful operation
2545         '404':
2546           description: account block does not exist
2547   /redundancy/{host}:
2548     put:
2549       tags:
2550         - Instance Redundancy
2551       summary: Update a server redundancy policy
2552       security:
2553         - OAuth2:
2554           - admin
2555       parameters:
2556         - name: host
2557           in: path
2558           required: true
2559           description: server domain to mirror
2560           schema:
2561             type: string
2562             format: hostname
2563       requestBody:
2564         content:
2565           application/json:
2566             schema:
2567               type: object
2568               properties:
2569                 redundancyAllowed:
2570                   type: boolean
2571                   description: allow mirroring of the host's local videos
2572               required:
2573                 - redundancyAllowed
2574       responses:
2575         '204':
2576           description: successful operation
2577         '404':
2578           description: server is not already known
2579   /redundancy/videos:
2580     get:
2581       tags:
2582         - Video Mirroring
2583       summary: List videos being mirrored
2584       security:
2585         - OAuth2:
2586           - admin
2587       parameters:
2588         - name: target
2589           in: query
2590           required: true
2591           description: direction of the mirror
2592           schema:
2593             type: string
2594             enum:
2595               - my-videos
2596               - remote-videos
2597         - $ref: '#/components/parameters/start'
2598         - $ref: '#/components/parameters/count'
2599         - $ref: '#/components/parameters/videoRedundanciesSort'
2600       responses:
2601         '200':
2602           description: successful operation
2603           content:
2604             application/json:
2605               schema:
2606                 type: array
2607                 items:
2608                   $ref: '#/components/schemas/VideoRedundancy'
2609     post:
2610       tags:
2611         - Video Mirroring
2612       summary: Mirror a video
2613       security:
2614         - OAuth2:
2615           - admin
2616       requestBody:
2617         content:
2618           application/json:
2619             schema:
2620               type: object
2621               properties:
2622                 videoId:
2623                   type: integer
2624               required:
2625                 - videoId
2626       responses:
2627         '204':
2628           description: successful operation
2629         '400':
2630           description: cannot mirror a local video
2631         '404':
2632           description: video does not exist
2633         '409':
2634           description: video is already mirrored
2635   /redundancy/videos/{redundancyId}:
2636     delete:
2637       tags:
2638         - Video Mirroring
2639       summary: Delete a mirror done on a video
2640       security:
2641         - OAuth2:
2642           - admin
2643       parameters:
2644         - name: redundancyId
2645           in: path
2646           required: true
2647           description: id of an existing redundancy on a video
2648           schema:
2649             type: string
2650       responses:
2651         '204':
2652           description: successful operation
2653         '404':
2654           description: video redundancy not found
2655   '/feeds/video-comments.{format}':
2656     get:
2657       tags:
2658         - Feeds
2659       summary: List comments on videos
2660       servers:
2661         - url: 'https://peertube2.cpy.re'
2662           description: Live Test Server (live data - latest nightly version)
2663         - url: 'https://peertube3.cpy.re'
2664           description: Live Test Server (live data - latest RC version)
2665         - url: 'https://peertube.cpy.re'
2666           description: Live Test Server (live data - stable version)
2667       parameters:
2668         - name: format
2669           in: path
2670           required: true
2671           description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2672           schema:
2673             type: string
2674             enum:
2675               - xml
2676               - rss
2677               - rss2
2678               - atom
2679               - atom1
2680               - json
2681               - json1
2682         - name: videoId
2683           in: query
2684           description: 'limit listing to a specific video'
2685           schema:
2686             type: string
2687       responses:
2688         '204':
2689           description: successful operation
2690           headers:
2691             Cache-Control:
2692               schema:
2693                 type: string
2694                 default: 'max-age=900' # 15 min cache
2695           content:
2696             application/xml:
2697               schema:
2698                 $ref: '#/components/schemas/VideoCommentsForXML'
2699             application/rss+xml:
2700               schema:
2701                 $ref: '#/components/schemas/VideoCommentsForXML'
2702             text/xml:
2703               schema:
2704                 $ref: '#/components/schemas/VideoCommentsForXML'
2705             application/atom+xml:
2706               schema:
2707                 $ref: '#/components/schemas/VideoCommentsForXML'
2708             application/json:
2709               schema:
2710                 type: object
2711         '406':
2712           description: accept header unsupported
2713   '/feeds/videos.{format}':
2714     get:
2715       tags:
2716         - Feeds
2717       summary: List videos
2718       servers:
2719         - url: 'https://peertube2.cpy.re'
2720           description: Live Test Server (live data - latest nightly version)
2721         - url: 'https://peertube3.cpy.re'
2722           description: Live Test Server (live data - latest RC version)
2723         - url: 'https://peertube.cpy.re'
2724           description: Live Test Server (live data - stable version)
2725       parameters:
2726         - name: format
2727           in: path
2728           required: true
2729           description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)'
2730           schema:
2731             type: string
2732             enum:
2733               - xml
2734               - rss
2735               - rss2
2736               - atom
2737               - atom1
2738               - json
2739               - json1
2740         - name: accountId
2741           in: query
2742           description: 'limit listing to a specific account'
2743           schema:
2744             type: string
2745         - name: accountName
2746           in: query
2747           description: 'limit listing to a specific account'
2748           schema:
2749             type: string
2750         - name: videoChannelId
2751           in: query
2752           description: 'limit listing to a specific video channel'
2753           schema:
2754             type: string
2755         - name: videoChannelName
2756           in: query
2757           description: 'limit listing to a specific video channel'
2758           schema:
2759             type: string
2760         - $ref: '#/components/parameters/sort'
2761         - $ref: '#/components/parameters/nsfw'
2762         - $ref: '#/components/parameters/filter'
2763       responses:
2764         '204':
2765           description: successful operation
2766           headers:
2767             Cache-Control:
2768               schema:
2769                 type: string
2770                 default: 'max-age=900' # 15 min cache
2771           content:
2772             application/xml:
2773               schema:
2774                 $ref: '#/components/schemas/VideosForXML'
2775               examples:
2776                 nightly:
2777                   externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
2778             application/rss+xml:
2779               schema:
2780                 $ref: '#/components/schemas/VideosForXML'
2781             text/xml:
2782               schema:
2783                 $ref: '#/components/schemas/VideosForXML'
2784             application/atom+xml:
2785               schema:
2786                 $ref: '#/components/schemas/VideosForXML'
2787             application/json:
2788               schema:
2789                 type: object
2790         '406':
2791           description: accept header unsupported
2792   /plugins:
2793     get:
2794       tags:
2795         - Plugins
2796       summary: List plugins
2797       security:
2798         - OAuth2:
2799           - admin
2800       parameters:
2801         - name: pluginType
2802           in: query
2803           schema:
2804             type: integer
2805         - name: uninstalled
2806           in: query
2807           schema:
2808             type: boolean
2809         - $ref: '#/components/parameters/start'
2810         - $ref: '#/components/parameters/count'
2811         - $ref: '#/components/parameters/sort'
2812       responses:
2813         '200':
2814           description: successful operation
2815           content:
2816             application/json:
2817               schema:
2818                 $ref: '#/components/schemas/PluginResponse'
2819   /plugins/available:
2820     get:
2821       tags:
2822         - Plugins
2823       summary: List available plugins
2824       security:
2825         - OAuth2:
2826           - admin
2827       parameters:
2828         - name: search
2829           in: query
2830           schema:
2831             type: string
2832         - name: pluginType
2833           in: query
2834           schema:
2835             type: integer
2836         - name: currentPeerTubeEngine
2837           in: query
2838           schema:
2839             type: string
2840         - $ref: '#/components/parameters/start'
2841         - $ref: '#/components/parameters/count'
2842         - $ref: '#/components/parameters/sort'
2843       responses:
2844         '200':
2845           description: successful operation
2846           content:
2847             application/json:
2848               schema:
2849                 $ref: '#/components/schemas/PluginResponse'
2850         '503':
2851           description: plugin index unavailable
2852   /plugins/install:
2853     post:
2854       tags:
2855         - Plugins
2856       summary: Install a plugin
2857       security:
2858         - OAuth2:
2859           - admin
2860       requestBody:
2861         content:
2862           application/json:
2863             schema:
2864               oneOf:
2865                 - type: object
2866                   properties:
2867                     npmName:
2868                       type: string
2869                       example: peertube-plugin-auth-ldap
2870                   required:
2871                     - npmName
2872                   additionalProperties: false
2873                 - type: object
2874                   properties:
2875                     path:
2876                       type: string
2877                   required:
2878                     - path
2879                   additionalProperties: false
2880       responses:
2881         '204':
2882           description: successful operation
2883         '400':
2884           description: should have either `npmName` or `path` set
2885   /plugins/update:
2886     post:
2887       tags:
2888         - Plugins
2889       summary: Update a plugin
2890       security:
2891         - OAuth2:
2892           - admin
2893       requestBody:
2894         content:
2895           application/json:
2896             schema:
2897               oneOf:
2898                 - type: object
2899                   properties:
2900                     npmName:
2901                       type: string
2902                       example: peertube-plugin-auth-ldap
2903                   required:
2904                     - npmName
2905                   additionalProperties: false
2906                 - type: object
2907                   properties:
2908                     path:
2909                       type: string
2910                   required:
2911                     - path
2912                   additionalProperties: false
2913       responses:
2914         '204':
2915           description: successful operation
2916         '400':
2917           description: should have either `npmName` or `path` set
2918         '404':
2919           description: existing plugin not found
2920   /plugins/uninstall:
2921     post:
2922       tags:
2923         - Plugins
2924       summary: Uninstall a plugin
2925       security:
2926         - OAuth2:
2927           - admin
2928       requestBody:
2929         content:
2930           application/json:
2931             schema:
2932               type: object
2933               properties:
2934                 npmName:
2935                   type: string
2936                   description: name of the plugin/theme in its package.json
2937                   example: peertube-plugin-auth-ldap
2938               required:
2939                 - npmName
2940       responses:
2941         '204':
2942           description: successful operation
2943         '404':
2944           description: existing plugin not found
2945   /plugins/{npmName}:
2946     get:
2947       tags:
2948         - Plugins
2949       summary: Get a plugin
2950       security:
2951         - OAuth2:
2952           - admin
2953       parameters:
2954         - $ref: '#/components/parameters/npmName'
2955       responses:
2956         '200':
2957           description: successful operation
2958           content:
2959             application/json:
2960               schema:
2961                 $ref: '#/components/schemas/Plugin'
2962         '404':
2963           description: plugin not found
2964   /plugins/{npmName}/settings:
2965     put:
2966       tags:
2967         - Plugins
2968       summary: Set a plugin's settings
2969       security:
2970         - OAuth2:
2971           - admin
2972       parameters:
2973         - $ref: '#/components/parameters/npmName'
2974       requestBody:
2975         content:
2976           application/json:
2977             schema:
2978               type: object
2979               properties:
2980                 settings:
2981                   type: object
2982                   additionalProperties: true
2983       responses:
2984         '204':
2985           description: successful operation
2986         '404':
2987           description: plugin not found
2988   /plugins/{npmName}/public-settings:
2989     get:
2990       tags:
2991         - Plugins
2992       summary: Get a plugin's public settings
2993       parameters:
2994         - $ref: '#/components/parameters/npmName'
2995       responses:
2996         '200':
2997           description: successful operation
2998           content:
2999             application/json:
3000               schema:
3001                 type: object
3002                 additionalProperties: true
3003         '404':
3004           description: plugin not found
3005   /plugins/{npmName}/registered-settings:
3006     get:
3007       tags:
3008         - Plugins
3009       summary: Get a plugin's registered settings
3010       security:
3011         - OAuth2:
3012           - admin
3013       parameters:
3014         - $ref: '#/components/parameters/npmName'
3015       responses:
3016         '200':
3017           description: successful operation
3018           content:
3019             application/json:
3020               schema:
3021                 type: object
3022                 additionalProperties: true
3023         '404':
3024           description: plugin not found
3025 servers:
3026   - url: 'https://peertube2.cpy.re/api/v1'
3027     description: Live Test Server (live data - latest nightly version)
3028   - url: 'https://peertube3.cpy.re/api/v1'
3029     description: Live Test Server (live data - latest RC version)
3030   - url: 'https://peertube.cpy.re/api/v1'
3031     description: Live Test Server (live data - stable version)
3032 components:
3033   parameters:
3034     start:
3035       name: start
3036       in: query
3037       required: false
3038       description: Offset used to paginate results
3039       schema:
3040         type: integer
3041         minimum: 0
3042     count:
3043       name: count
3044       in: query
3045       required: false
3046       description: "Number of items to return"
3047       schema:
3048         type: integer
3049         default: 15
3050         maximum: 100
3051         minimum: 1
3052     sort:
3053       name: sort
3054       in: query
3055       required: false
3056       description: Sort column
3057       schema:
3058         type: string
3059         example: -createdAt
3060     searchTarget:
3061       name: searchTarget
3062       in: query
3063       required: false
3064       description: >
3065         If the administrator enabled search index support, you can override the default search target.
3066
3067
3068         **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
3069         It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
3070           * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3071           then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3072           After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
3073           * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch
3074           the data from the origin instance API
3075       schema:
3076         type: string
3077         enum:
3078           - 'local'
3079           - 'search-index'
3080     videosSort:
3081       name: sort
3082       in: query
3083       required: false
3084       description: Sort videos by criteria
3085       schema:
3086         type: string
3087         enum:
3088         - name
3089         - -duration
3090         - -createdAt
3091         - -publishedAt
3092         - -views
3093         - -likes
3094         - -trending
3095     videosSearchSort:
3096       name: sort
3097       in: query
3098       required: false
3099       description: Sort videos by criteria
3100       schema:
3101         type: string
3102         enum:
3103         - name
3104         - -duration
3105         - -createdAt
3106         - -publishedAt
3107         - -views
3108         - -likes
3109         - -match
3110     commentsSort:
3111       name: sort
3112       in: query
3113       required: false
3114       description: Sort comments by criteria
3115       schema:
3116         type: string
3117         enum:
3118         - -createdAt
3119         - -totalReplies
3120     blacklistsSort:
3121       name: sort
3122       in: query
3123       required: false
3124       description: Sort blacklists by criteria
3125       schema:
3126         type: string
3127         enum:
3128         - -id
3129         - name
3130         - -duration
3131         - -views
3132         - -likes
3133         - -dislikes
3134         - -uuid
3135         - -createdAt
3136     usersSort:
3137       name: sort
3138       in: query
3139       required: false
3140       description: Sort users by criteria
3141       schema:
3142         type: string
3143         enum:
3144         - -id
3145         - -username
3146         - -createdAt
3147     abusesSort:
3148       name: sort
3149       in: query
3150       required: false
3151       description: Sort abuses by criteria
3152       schema:
3153         type: string
3154         enum:
3155         - -id
3156         - -createdAt
3157         - -state
3158     videoRedundanciesSort:
3159       name: sort
3160       in: query
3161       required: false
3162       description: Sort abuses by criteria
3163       schema:
3164         type: string
3165         enum:
3166         - name
3167     name:
3168       name: name
3169       in: path
3170       required: true
3171       description: The name of the account
3172       schema:
3173         type: string
3174         example: chocobozzz | chocobozzz@example.org
3175     id:
3176       name: id
3177       in: path
3178       required: true
3179       description: The user id
3180       schema:
3181         type: integer
3182         minimum: 0
3183         example: 42
3184     idOrUUID:
3185       name: id
3186       in: path
3187       required: true
3188       description: The object id or uuid
3189       schema:
3190         oneOf:
3191           - type: integer
3192             minimum: 0
3193             example: 42
3194           - type: string
3195             format: uuid
3196             example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3197     playlistElementId:
3198       name: playlistElementId
3199       in: path
3200       required: true
3201       description: Playlist element id
3202       schema:
3203         type: integer
3204     abuseId:
3205       name: abuseId
3206       in: path
3207       required: true
3208       description: Video abuse id
3209       schema:
3210         type: integer
3211     captionLanguage:
3212       name: captionLanguage
3213       in: path
3214       required: true
3215       description: The caption language
3216       schema:
3217         type: string
3218     channelHandle:
3219       name: channelHandle
3220       in: path
3221       required: true
3222       description: The video channel handle
3223       schema:
3224         type: string
3225         example: my_username | my_username@example.com
3226     subscriptionHandle:
3227       name: subscriptionHandle
3228       in: path
3229       required: true
3230       description: The subscription handle
3231       schema:
3232         type: string
3233         example: my_username | my_username@example.com
3234     threadId:
3235       name: threadId
3236       in: path
3237       required: true
3238       description: The thread id (root comment id)
3239       schema:
3240         type: integer
3241     commentId:
3242       name: commentId
3243       in: path
3244       required: true
3245       description: The comment id
3246       schema:
3247         type: integer
3248     categoryOneOf:
3249       name: categoryOneOf
3250       in: query
3251       required: false
3252       description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
3253       schema:
3254         oneOf:
3255         - type: integer
3256         - type: array
3257           items:
3258             type: integer
3259       style: form
3260       explode: false
3261     tagsOneOf:
3262       name: tagsOneOf
3263       in: query
3264       required: false
3265       description: tag(s) of the video
3266       schema:
3267         oneOf:
3268         - type: string
3269         - type: array
3270           items:
3271             type: string
3272       style: form
3273       explode: false
3274     tagsAllOf:
3275       name: tagsAllOf
3276       in: query
3277       required: false
3278       description: tag(s) of the video, where all should be present in the video
3279       schema:
3280         oneOf:
3281         - type: string
3282         - type: array
3283           items:
3284             type: string
3285       style: form
3286       explode: false
3287     languageOneOf:
3288       name: languageOneOf
3289       in: query
3290       required: false
3291       description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get)). Use `_unknown` to filter on videos that don't have a video language
3292       schema:
3293         oneOf:
3294         - type: string
3295         - type: array
3296           items:
3297             type: string
3298       style: form
3299       explode: false
3300     licenceOneOf:
3301       name: licenceOneOf
3302       in: query
3303       required: false
3304       description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
3305       schema:
3306         oneOf:
3307         - type: integer
3308         - type: array
3309           items:
3310             type: integer
3311       style: form
3312       explode: false
3313     skipCount:
3314       name: skipCount
3315       in: query
3316       required: false
3317       description: if you don't need the `total` in the response
3318       schema:
3319         type: string
3320         enum:
3321           - 'true'
3322           - 'false'
3323         default: 'false'
3324     nsfw:
3325       name: nsfw
3326       in: query
3327       required: false
3328       description: whether to include nsfw videos, if any
3329       schema:
3330         type: string
3331         enum:
3332         - 'true'
3333         - 'false'
3334     filter:
3335       name: filter
3336       in: query
3337       required: false
3338       description: >
3339         Special filters (local for instance) which might require special rights:
3340          * `local` - only videos local to the instance
3341          * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
3342       schema:
3343         type: string
3344         enum:
3345         - local
3346         - all-local
3347     subscriptionsUris:
3348       name: uris
3349       in: query
3350       required: true
3351       description: list of uris to check if each is part of the user subscriptions
3352       schema:
3353         type: array
3354         items:
3355           type: string
3356           format: uri
3357     npmName:
3358       name: npmName
3359       in: path
3360       required: true
3361       description: name of the plugin/theme on npmjs.com or in its package.json
3362       schema:
3363         type: string
3364         example: peertube-plugin-auth-ldap
3365   securitySchemes:
3366     OAuth2:
3367       description: >
3368         In the header: *Authorization: Bearer <token\>*
3369
3370
3371         Authenticating via OAuth requires the following steps:
3372
3373
3374         - Have an account with sufficient authorization levels
3375
3376         - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
3377         Bearer Token
3378
3379         - Make Authenticated Requests
3380       type: oauth2
3381       flows:
3382         password:
3383           tokenUrl: 'https://peertube.example.com/api/v1/users/token'
3384           scopes:
3385             admin: Admin scope
3386             moderator: Moderator scope
3387             user: User scope
3388   schemas:
3389     VideoConstantNumber:
3390       properties:
3391         id:
3392           type: integer
3393         label:
3394           type: string
3395     VideoConstantString:
3396       properties:
3397         id:
3398           type: string
3399         label:
3400           type: string
3401
3402     VideoPlaylistPrivacySet:
3403       type: integer
3404       enum:
3405         - 1
3406         - 2
3407         - 3
3408       description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
3409     VideoPlaylistPrivacyConstant:
3410       properties:
3411         id:
3412           $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3413         label:
3414           type: string
3415
3416     VideoPlaylistTypeSet:
3417       type: integer
3418       enum:
3419         - 1
3420         - 2
3421       description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
3422     VideoPlaylistTypeConstant:
3423       properties:
3424         id:
3425           $ref: '#/components/schemas/VideoPlaylistTypeSet'
3426         label:
3427           type: string
3428
3429     VideoPrivacySet:
3430       type: integer
3431       enum:
3432         - 1
3433         - 2
3434         - 3
3435         - 4
3436       description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
3437     VideoPrivacyConstant:
3438       properties:
3439         id:
3440           $ref: '#/components/schemas/VideoPrivacySet'
3441         label:
3442           type: string
3443
3444     NSFWPolicy:
3445       type: string
3446       enum:
3447         - display
3448         - blur
3449         - do_not_list
3450
3451     UserRole:
3452       type: integer
3453       enum:
3454         - 0
3455         - 1
3456         - 2
3457       description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
3458
3459     VideoStateConstant:
3460       properties:
3461         id:
3462           type: integer
3463           enum:
3464             - 1
3465             - 2
3466             - 3
3467           description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
3468         label:
3469           type: string
3470
3471     VideoAbuseStateSet:
3472       type: integer
3473       enum:
3474         - 1
3475         - 2
3476         - 3
3477       description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)'
3478     VideoAbuseStateConstant:
3479       properties:
3480         id:
3481           $ref: '#/components/schemas/VideoAbuseStateSet'
3482         label:
3483           type: string
3484     VideoAbusePredefinedReasons:
3485       type: array
3486       items:
3487         type: string
3488         enum:
3489         - violentOrAbusive
3490         - hatefulOrAbusive
3491         - spamOrMisleading
3492         - privacy
3493         - rights
3494         - serverRules
3495         - thumbnails
3496         - captions
3497       example: [spamOrMisleading]
3498
3499     VideoResolutionConstant:
3500       properties:
3501         id:
3502           type: integer
3503           description: 'Video resolution (240, 360, 720 ...)'
3504           example: 240
3505         label:
3506           type: string
3507           example: 240p
3508     VideoScheduledUpdate:
3509       properties:
3510         privacy:
3511           $ref: '#/components/schemas/VideoPrivacySet'
3512         updateAt:
3513           type: string
3514           format: date
3515           description: When to update the video
3516       required:
3517         - updateAt
3518     AccountSummary:
3519       properties:
3520         id:
3521           type: integer
3522         name:
3523           type: string
3524         displayName:
3525           type: string
3526         url:
3527           type: string
3528           format: url
3529         host:
3530           type: string
3531           format: hostname
3532         avatar:
3533           nullable: true
3534           allOf:
3535             - $ref: '#/components/schemas/Avatar'
3536     VideoChannelSummary:
3537       properties:
3538         id:
3539           type: integer
3540         name:
3541           type: string
3542         displayName:
3543           type: string
3544         url:
3545           type: string
3546           format: url
3547         host:
3548           type: string
3549           format: hostname
3550         avatar:
3551           nullable: true
3552           allOf:
3553             - $ref: '#/components/schemas/Avatar'
3554     PlaylistElement:
3555       properties:
3556         position:
3557           type: integer
3558         startTimestamp:
3559           type: integer
3560         stopTimestamp:
3561           type: integer
3562         video:
3563           nullable: true
3564           allOf:
3565             - $ref: '#/components/schemas/Video'
3566     VideoFile:
3567       properties:
3568         magnetUri:
3569           type: string
3570         resolution:
3571           $ref: '#/components/schemas/VideoResolutionConstant'
3572         size:
3573           type: integer
3574           description: 'Video file size in bytes'
3575         torrentUrl:
3576           type: string
3577           format: url
3578         torrentDownloadUrl:
3579           type: string
3580           format: url
3581         fileUrl:
3582           type: string
3583           format: url
3584         fileDownloadUrl:
3585           type: string
3586           format: url
3587         fps:
3588           type: number
3589         metadataUrl:
3590           type: string
3591           format: url
3592     VideoStreamingPlaylists:
3593       properties:
3594         id:
3595           type: integer
3596         type:
3597           type: integer
3598           enum:
3599             - 1
3600           description: 'Playlist type (HLS = `1`)'
3601         playlistUrl:
3602           type: string
3603           format: url
3604         segmentsSha256Url:
3605           type: string
3606           format: url
3607         files:
3608           type: array
3609           items:
3610             $ref: '#/components/schemas/VideoFile'
3611         redundancies:
3612           type: array
3613           items:
3614             type: object
3615             properties:
3616               baseUrl:
3617                 type: string
3618                 format: url
3619     VideoInfo:
3620       properties:
3621         id:
3622           type: integer
3623         uuid:
3624           type: string
3625           format: uuid
3626           example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3627         name:
3628           type: string
3629     Video:
3630       properties:
3631         id:
3632           type: integer
3633           example: 8
3634         uuid:
3635           type: string
3636           format: uuid
3637           example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3638         createdAt:
3639           type: string
3640           format: date-time
3641         publishedAt:
3642           type: string
3643           format: date-time
3644         updatedAt:
3645           type: string
3646           format: date-time
3647         originallyPublishedAt:
3648           type: string
3649           format: date-time
3650         category:
3651           $ref: '#/components/schemas/VideoConstantNumber'
3652         licence:
3653           $ref: '#/components/schemas/VideoConstantNumber'
3654         language:
3655           $ref: '#/components/schemas/VideoConstantString'
3656         privacy:
3657           $ref: '#/components/schemas/VideoPrivacyConstant'
3658         description:
3659           type: string
3660         duration:
3661           type: integer
3662           example: 1419
3663         isLocal:
3664           type: boolean
3665         name:
3666           type: string
3667           example: What is PeerTube?
3668         thumbnailPath:
3669           type: string
3670           example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3671         previewPath:
3672           type: string
3673           example: /static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3674         embedPath:
3675           type: string
3676           example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
3677         views:
3678           type: integer
3679           example: 1337
3680         likes:
3681           type: integer
3682           example: 42
3683         dislikes:
3684           type: integer
3685           example: 7
3686         nsfw:
3687           type: boolean
3688         waitTranscoding:
3689           type: boolean
3690           nullable: true
3691         state:
3692           $ref: '#/components/schemas/VideoStateConstant'
3693         scheduledUpdate:
3694           nullable: true
3695           allOf:
3696             - $ref: '#/components/schemas/VideoScheduledUpdate'
3697         blacklisted:
3698           nullable: true
3699           type: boolean
3700         blacklistedReason:
3701           nullable: true
3702           type: string
3703         account:
3704           $ref: '#/components/schemas/AccountSummary'
3705         channel:
3706           $ref: '#/components/schemas/VideoChannelSummary'
3707         userHistory:
3708           nullable: true
3709           type: object
3710           properties:
3711             currentTime:
3712               type: integer
3713     VideoDetails:
3714       allOf:
3715         - $ref: '#/components/schemas/Video'
3716         - type: object
3717           properties:
3718             descriptionPath:
3719               type: string
3720             support:
3721               type: string
3722               example: Please support my work on <insert crowdfunding plateform>! <3
3723             channel:
3724               $ref: '#/components/schemas/VideoChannel'
3725             account:
3726               $ref: '#/components/schemas/Account'
3727             tags:
3728               type: array
3729               items:
3730                 type: string
3731               example: [flowers, gardening]
3732             files:
3733               type: array
3734               items:
3735                 $ref: '#/components/schemas/VideoFile'
3736             commentsEnabled:
3737               type: boolean
3738             downloadEnabled:
3739               type: boolean
3740             trackerUrls:
3741               type: array
3742               items:
3743                 type: string
3744                 format: url
3745             streamingPlaylists:
3746               type: array
3747               items:
3748                 $ref: '#/components/schemas/VideoStreamingPlaylists'
3749     FileRedundancyInformation:
3750       properties:
3751         id:
3752           type: integer
3753         fileUrl:
3754           type: string
3755           format: url
3756         strategy:
3757           type: string
3758           enum:
3759             - manual
3760             - most-views
3761             - trending
3762             - recently-added
3763         size:
3764           type: integer
3765         createdAt:
3766           type: string
3767           format: date-time
3768         updatedAt:
3769           type: string
3770           format: date-time
3771         expiresOn:
3772           type: string
3773           format: date-time
3774     VideoRedundancy:
3775       properties:
3776         id:
3777           type: integer
3778         name:
3779           type: string
3780         url:
3781           type: string
3782           format: url
3783         uuid:
3784           type: string
3785           format: uuid
3786           example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3787         redundancies:
3788           type: object
3789           properties:
3790             files:
3791               type: array
3792               items:
3793                 $ref: '#/components/schemas/FileRedundancyInformation' 
3794             streamingPlaylists:
3795               type: array
3796               items:
3797                 $ref: '#/components/schemas/FileRedundancyInformation' 
3798     VideoImportStateConstant:
3799       properties:
3800         id:
3801           type: integer
3802           enum:
3803             - 1
3804             - 2
3805             - 3
3806           description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
3807         label:
3808           type: string
3809           example: Pending
3810     VideoImport:
3811       properties:
3812         id:
3813           type: integer
3814           example: 2
3815         targetUrl:
3816           type: string
3817           format: url
3818           example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
3819         magnetUri:
3820           type: string
3821           format: uri
3822           example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
3823         torrentName:
3824           type: string
3825         state:
3826           $ref: '#/components/schemas/VideoImportStateConstant'
3827         error:
3828           type: string
3829         createdAt:
3830           type: string
3831           format: date-time
3832         updatedAt:
3833           type: string
3834           format: date-time
3835         video:
3836           $ref: '#/components/schemas/Video'
3837     VideoAbuse:
3838       properties:
3839         id:
3840           type: integer
3841           example: 7
3842         reason:
3843           type: string
3844           example: The video is a spam
3845         predefinedReasons:
3846           $ref: '#/components/schemas/VideoAbusePredefinedReasons'
3847         reporterAccount:
3848           $ref: '#/components/schemas/Account'
3849         state:
3850           $ref: '#/components/schemas/VideoAbuseStateConstant'
3851         moderationComment:
3852           type: string
3853           example: Decided to ban the server since it spams us regularly
3854         video:
3855           type: object
3856           properties:
3857             id:
3858               type: integer
3859             name:
3860               type: string
3861             uuid:
3862               type: string
3863               format: uuid
3864               example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3865         createdAt:
3866           type: string
3867           format: date-time
3868     VideoBlacklist:
3869       properties:
3870         id:
3871           type: integer
3872         videoId:
3873           type: integer
3874         createdAt:
3875           type: string
3876           format: date-time
3877         updatedAt:
3878           type: string
3879           format: date-time
3880         name:
3881           type: string
3882         uuid:
3883           type: string
3884           format: uuid
3885           example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3886         description:
3887           type: string
3888         duration:
3889           type: integer
3890         views:
3891           type: integer
3892         likes:
3893           type: integer
3894         dislikes:
3895           type: integer
3896         nsfw:
3897           type: boolean
3898     VideoChannel:
3899       properties:
3900         displayName:
3901           type: string
3902         description:
3903           type: string
3904         isLocal:
3905           type: boolean
3906         ownerAccount:
3907           type: object
3908           properties:
3909             id:
3910               type: integer
3911             uuid:
3912               type: string
3913               format: uuid
3914               example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3915     VideoPlaylist:
3916       properties:
3917         id:
3918           type: integer
3919         createdAt:
3920           type: string
3921           format: date-time
3922         updatedAt:
3923           type: string
3924           format: date-time
3925         description:
3926           type: string
3927         uuid:
3928           type: string
3929           format: uuid
3930           example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3931         displayName:
3932           type: string
3933         isLocal:
3934           type: boolean
3935         videoLength:
3936           type: integer
3937         thumbnailPath:
3938           type: string
3939         privacy:
3940           $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
3941         type:
3942           $ref: '#/components/schemas/VideoPlaylistTypeConstant'
3943         ownerAccount:
3944           $ref: '#/components/schemas/AccountSummary'
3945         videoChannel:
3946           $ref: '#/components/schemas/VideoChannelSummary'
3947     VideoComment:
3948       properties:
3949         id:
3950           type: integer
3951         url:
3952           type: string
3953           format: url
3954         text:
3955           type: string
3956         threadId:
3957           type: integer
3958         inReplyToCommentId:
3959           type: integer
3960         videoId:
3961           type: integer
3962         createdAt:
3963           type: string
3964           format: date-time
3965         updatedAt:
3966           type: string
3967           format: date-time
3968         totalRepliesFromVideoAuthor:
3969           type: integer
3970         totalReplies:
3971           type: integer
3972         account:
3973           $ref: '#/components/schemas/Account'
3974     VideoCommentThreadTree:
3975       properties:
3976         comment:
3977           $ref: '#/components/schemas/VideoComment'
3978         children:
3979           type: array
3980           items:
3981             $ref: '#/components/schemas/VideoCommentThreadTree'
3982     VideoCaption:
3983       properties:
3984         language:
3985           $ref: '#/components/schemas/VideoConstantString'
3986         captionPath:
3987           type: string
3988     Avatar:
3989       properties:
3990         path:
3991           type: string
3992         createdAt:
3993           type: string
3994           format: date-time
3995         updatedAt:
3996           type: string
3997           format: date-time
3998     ActorInfo:
3999       properties:
4000         id:
4001           type: integer
4002           example: 11
4003         name:
4004           type: string
4005         displayName:
4006           type: string
4007         host:
4008           type: string
4009           format: hostname
4010         avatar:
4011           nullable: true
4012           type: object
4013           properties:
4014             path:
4015               type: string
4016     Actor:
4017       properties:
4018         id:
4019           type: integer
4020           example: 11
4021         url:
4022           type: string
4023           format: url
4024         name:
4025           type: string
4026         host:
4027           type: string
4028           format: hostname
4029         followingCount:
4030           type: integer
4031         followersCount:
4032           type: integer
4033         createdAt:
4034           type: string
4035           format: date-time
4036         updatedAt:
4037           type: string
4038           format: date-time
4039         avatar:
4040           $ref: '#/components/schemas/Avatar'
4041     Account:
4042       allOf:
4043         - $ref: '#/components/schemas/Actor'
4044         - properties:
4045             userId:
4046               type: string
4047               example: 2
4048             displayName:
4049               type: string
4050             description:
4051               type: string
4052     UserWatchingVideo:
4053       properties:
4054         currentTime:
4055           type: integer
4056           description: timestamp within the video, in seconds
4057           example: 5
4058     ServerConfig:
4059       properties:
4060         instance:
4061           type: object
4062           properties:
4063             name:
4064               type: string
4065             shortDescription:
4066               type: string
4067             defaultClientRoute:
4068               type: string
4069             isNSFW:
4070               type: boolean
4071             defaultNSFWPolicy:
4072               type: string
4073             customizations:
4074               type: object
4075               properties:
4076                 javascript:
4077                   type: string
4078                 css:
4079                   type: string
4080         search:
4081           type: object
4082           properties:
4083             remoteUri:
4084               type: object
4085               properties:
4086                 users:
4087                   type: boolean
4088                 anonymous:
4089                   type: boolean
4090         plugin:
4091           type: object
4092           properties:
4093             registered:
4094               type: array
4095               items:
4096                 type: string
4097         theme:
4098           type: object
4099           properties:
4100             registered:
4101               type: array
4102               items:
4103                 type: string
4104         email:
4105           type: object
4106           properties:
4107             enabled:
4108               type: boolean
4109         contactForm:
4110           type: object
4111           properties:
4112             enabled:
4113               type: boolean
4114         serverVersion:
4115           type: string
4116         serverCommit:
4117           type: string
4118         signup:
4119           type: object
4120           properties:
4121             allowed:
4122               type: boolean
4123             allowedForCurrentIP:
4124               type: boolean
4125             requiresEmailVerification:
4126               type: boolean
4127         transcoding:
4128           type: object
4129           properties:
4130             hls:
4131               type: object
4132               properties:
4133                 enabled:
4134                   type: boolean
4135             webtorrent:
4136               type: object
4137               properties:
4138                 enabled:
4139                   type: boolean
4140             enabledResolutions:
4141               type: array
4142               items:
4143                 type: integer
4144         import:
4145           type: object
4146           properties:
4147             videos:
4148               type: object
4149               properties:
4150                 http:
4151                   type: object
4152                   properties:
4153                     enabled:
4154                       type: boolean
4155                 torrent:
4156                   type: object
4157                   properties:
4158                     enabled:
4159                       type: boolean
4160         autoBlacklist:
4161           type: object
4162           properties:
4163             videos:
4164               type: object
4165               properties:
4166                 ofUsers:
4167                   type: object
4168                   properties:
4169                     enabled:
4170                       type: boolean
4171         avatar:
4172           type: object
4173           properties:
4174             file:
4175               type: object
4176               properties:
4177                 size:
4178                   type: object
4179                   properties:
4180                     max:
4181                       type: integer
4182             extensions:
4183               type: array
4184               items:
4185                 type: string
4186         video:
4187           type: object
4188           properties:
4189             image:
4190               type: object
4191               properties:
4192                 extensions:
4193                   type: array
4194                   items:
4195                     type: string
4196                 size:
4197                   type: object
4198                   properties:
4199                     max:
4200                       type: integer
4201             file:
4202               type: object
4203               properties:
4204                 extensions:
4205                   type: array
4206                   items:
4207                     type: string
4208         videoCaption:
4209           type: object
4210           properties:
4211             file:
4212               type: object
4213               properties:
4214                 size:
4215                   type: object
4216                   properties:
4217                     max:
4218                       type: integer
4219                 extensions:
4220                   type: array
4221                   items:
4222                     type: string
4223         user:
4224           type: object
4225           properties:
4226             videoQuota:
4227               type: integer
4228             videoQuotaDaily:
4229               type: integer
4230         trending:
4231           type: object
4232           properties:
4233             videos:
4234               type: object
4235               properties:
4236                 intervalDays:
4237                   type: integer
4238         tracker:
4239           type: object
4240           properties:
4241             enabled:
4242               type: boolean
4243         followings:
4244           type: object
4245           properties:
4246             instance:
4247               type: object
4248               properties:
4249                 autoFollowIndex:
4250                   type: object
4251                   properties:
4252                     indexUrl:
4253                       type: string
4254                       format: url
4255     ServerConfigAbout:
4256       properties:
4257         instance:
4258           type: object
4259           properties:
4260             name:
4261               type: string
4262             shortDescription:
4263               type: string
4264             description:
4265               type: string
4266             terms:
4267               type: string
4268     ServerConfigCustom:
4269       properties:
4270         instance:
4271           type: object
4272           properties:
4273             name:
4274               type: string
4275             shortDescription:
4276               type: string
4277             description:
4278               type: string
4279             terms:
4280               type: string
4281             defaultClientRoute:
4282               type: string
4283             isNSFW:
4284               type: boolean
4285             defaultNSFWPolicy:
4286               type: string
4287             customizations:
4288               type: object
4289               properties:
4290                 javascript:
4291                   type: string
4292                 css:
4293                   type: string
4294         theme:
4295           type: object
4296           properties:
4297             default:
4298               type: string
4299         services:
4300           type: object
4301           properties:
4302             twitter:
4303               type: object
4304               properties:
4305                 username:
4306                   type: string
4307                 whitelisted:
4308                   type: boolean
4309         cache:
4310           type: object
4311           properties:
4312             previews:
4313               type: object
4314               properties:
4315                 size:
4316                   type: integer
4317             captions:
4318               type: object
4319               properties:
4320                 size:
4321                   type: integer
4322         signup:
4323           type: object
4324           properties:
4325             enabled:
4326               type: boolean
4327             limit:
4328               type: integer
4329             requiresEmailVerification:
4330               type: boolean
4331         admin:
4332           type: object
4333           properties:
4334             email:
4335               type: string
4336               format: email
4337         contactForm:
4338           type: object
4339           properties:
4340             enabled:
4341               type: boolean
4342         user:
4343           type: object
4344           properties:
4345             videoQuota:
4346               type: integer
4347             videoQuotaDaily:
4348               type: integer
4349         transcoding:
4350           type: object
4351           properties:
4352             enabled:
4353               type: boolean
4354             allowAdditionalExtensions:
4355               type: boolean
4356             allowAudioFiles:
4357               type: boolean
4358             threads:
4359               type: integer
4360             resolutions:
4361               type: object
4362               properties:
4363                 240p:
4364                   type: boolean
4365                 360p:
4366                   type: boolean
4367                 480p:
4368                   type: boolean
4369                 720p:
4370                   type: boolean
4371                 1080p:
4372                   type: boolean
4373                 2160p:
4374                   type: boolean
4375             hls:
4376               type: object
4377               properties:
4378                 enabled:
4379                   type: boolean
4380         import:
4381           type: object
4382           properties:
4383             videos:
4384               type: object
4385               properties:
4386                 http:
4387                   type: object
4388                   properties:
4389                     enabled:
4390                       type: boolean
4391                 torrent:
4392                   type: object
4393                   properties:
4394                     enabled:
4395                       type: boolean
4396         autoBlacklist:
4397           type: object
4398           properties:
4399             videos:
4400               type: object
4401               properties:
4402                 ofUsers:
4403                   type: object
4404                   properties:
4405                     enabled:
4406                       type: boolean
4407         followers:
4408           type: object
4409           properties:
4410             instance:
4411               type: object
4412               properties:
4413                 enabled:
4414                   type: boolean
4415                 manualApproval:
4416                   type: boolean
4417     Follow:
4418       properties:
4419         id:
4420           type: integer
4421         follower:
4422           $ref: '#/components/schemas/Actor'
4423         following:
4424           $ref: '#/components/schemas/Actor'
4425         score:
4426           type: number
4427           description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
4428         state:
4429           type: string
4430           enum:
4431             - pending
4432             - accepted
4433         createdAt:
4434           type: string
4435           format: date-time
4436         updatedAt:
4437           type: string
4438           format: date-time
4439     Job:
4440       properties:
4441         id:
4442           type: integer
4443           minimum: 0
4444           example: 42
4445         state:
4446           type: string
4447           enum:
4448             - active
4449             - completed
4450             - failed
4451             - waiting
4452             - delayed
4453         type:
4454           type: string
4455           enum:
4456             - activitypub-http-unicast
4457             - activitypub-http-broadcast
4458             - activitypub-http-fetcher
4459             - activitypub-follow
4460             - video-file-import
4461             - video-transcoding
4462             - email
4463             - video-import
4464             - videos-views
4465             - activitypub-refresher
4466             - video-redundancy
4467         data:
4468           type: object
4469           additionalProperties: true
4470         error:
4471           type: object
4472           additionalProperties: true
4473         createdAt:
4474           type: string
4475           format: date-time
4476         finishedOn:
4477           type: string
4478           format: date-time
4479         processedOn:
4480           type: string
4481           format: date-time
4482     AddUserResponse:
4483       properties:
4484         id:
4485           type: integer
4486         uuid:
4487           type: string
4488           format: uuid
4489           example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4490     VideoUploadResponse:
4491       properties:
4492         video:
4493           type: object
4494           properties:
4495             id:
4496               type: integer
4497               example: 8
4498             uuid:
4499               type: string
4500               format: uuid
4501               example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4502     CommentThreadResponse:
4503       properties:
4504         total:
4505           type: integer
4506           example: 1
4507         data:
4508           type: array
4509           maxItems: 100
4510           items:
4511             $ref: '#/components/schemas/VideoComment'
4512     CommentThreadPostResponse:
4513       properties:
4514         comment:
4515           $ref: '#/components/schemas/VideoComment'
4516     VideoListResponse:
4517       properties:
4518         total:
4519           type: integer
4520           example: 1
4521         data:
4522           type: array
4523           maxItems: 100
4524           items:
4525             $ref: '#/components/schemas/Video'
4526     User:
4527       properties:
4528         id:
4529           type: integer
4530           readOnly: true
4531         username:
4532           type: string
4533           description: The user username
4534           minLength: 1
4535           maxLength: 50
4536         email:
4537           type: string
4538           format: email
4539           description: The user email
4540         theme:
4541           type: string
4542           description: Theme enabled by this user
4543         emailVerified:
4544           type: boolean
4545           description: Has the user confirmed their email address?
4546         nsfwPolicy:
4547           $ref: '#/components/schemas/NSFWPolicy'
4548         webtorrentEnabled:
4549           type: boolean
4550           description: Enable P2P in the player
4551         autoPlayVideo:
4552           type: boolean
4553           description: Automatically start playing the video on the watch page
4554         role:
4555           $ref: '#/components/schemas/UserRole'
4556         roleLabel:
4557           type: string
4558           enum:
4559             - User
4560             - Moderator
4561             - Administrator
4562         videoQuota:
4563           type: integer
4564           description: The user video quota
4565         videoQuotaDaily:
4566           type: integer
4567           description: The user daily video quota
4568         videosCount:
4569           type: integer
4570         videoAbusesCount:
4571           type: integer
4572         videoAbusesAcceptedCount:
4573           type: integer
4574         videoAbusesCreatedCount:
4575           type: integer
4576         videoCommentsCount:
4577           type: integer
4578         noInstanceConfigWarningModal:
4579           type: boolean
4580         noWelcomeModal:
4581           type: boolean
4582         blocked:
4583           type: boolean
4584         blockedReason:
4585           type: string
4586         createdAt:
4587           type: string
4588         account:
4589           $ref: '#/components/schemas/Account'
4590         videoChannels:
4591           type: array
4592           items:
4593             $ref: '#/components/schemas/VideoChannel'
4594     AddUser:
4595       properties:
4596         username:
4597           type: string
4598           description: The user username
4599           minLength: 1
4600           maxLength: 50
4601         password:
4602           type: string
4603           format: password
4604           description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
4605           minLength: 6
4606           maxLength: 255
4607         email:
4608           type: string
4609           format: email
4610           description: The user email
4611         videoQuota:
4612           type: integer
4613           description: The user video quota
4614         videoQuotaDaily:
4615           type: integer
4616           description: The user daily video quota
4617         role:
4618           $ref: '#/components/schemas/UserRole'
4619       required:
4620         - username
4621         - password
4622         - email
4623         - videoQuota
4624         - videoQuotaDaily
4625         - role
4626     UpdateUser:
4627       properties:
4628         id:
4629           type: string
4630           description: The user id
4631         email:
4632           type: string
4633           format: email
4634           description: The updated email of the user
4635         videoQuota:
4636           type: integer
4637           description: The updated video quota of the user
4638         videoQuotaDaily:
4639           type: integer
4640           description: The updated daily video quota of the user
4641         role:
4642           $ref: '#/components/schemas/UserRole'
4643       required:
4644         - id
4645         - email
4646         - videoQuota
4647         - videoQuotaDaily
4648         - role
4649     UpdateMe:
4650       properties:
4651         password:
4652           type: string
4653           format: password
4654           description: Your new password
4655           minLength: 6
4656           maxLength: 255
4657         email:
4658           type: string
4659           format: email
4660           description: Your new email
4661         displayNSFW:
4662           type: string
4663           description: Your new displayNSFW
4664           enum:
4665             - 'true'
4666             - 'false'
4667             - both
4668         autoPlayVideo:
4669           type: boolean
4670           description: Your new autoPlayVideo
4671       required:
4672         - password
4673         - email
4674         - displayNSFW
4675         - autoPlayVideo
4676     GetMeVideoRating:
4677       properties:
4678         id:
4679           type: string
4680           description: Id of the video
4681         rating:
4682           type: number
4683           description: Rating of the video
4684       required:
4685         - id
4686         - rating
4687     VideoRating:
4688       properties:
4689         video:
4690           $ref: '#/components/schemas/Video'
4691         rating:
4692           type: number
4693           description: 'Rating of the video'
4694       required:
4695         - video
4696         - rating
4697     RegisterUser:
4698       properties:
4699         username:
4700           type: string
4701           description: The username of the user
4702           minLength: 1
4703           maxLength: 50
4704           pattern: '/^[a-z0-9._]{1,50}$/'
4705         password:
4706           type: string
4707           format: password
4708           description: The password of the user
4709           minLength: 6
4710           maxLength: 255
4711         email:
4712           type: string
4713           format: email
4714           description: The email of the user
4715         displayName:
4716           type: string
4717           description: The user display name
4718           minLength: 1
4719           maxLength: 120
4720         channel:
4721           type: object
4722           properties:
4723             name:
4724               type: string
4725               description: The name for the default channel
4726               pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
4727             displayName:
4728               type: string
4729               description: The display name for the default channel
4730               minLength: 1
4731               maxLength: 120
4732       required:
4733         - username
4734         - password
4735         - email
4736     VideoChannelCreate:
4737       properties:
4738         name:
4739           type: string
4740         displayName:
4741           type: string
4742         description:
4743           type: string
4744         support:
4745           type: string
4746           description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4747       required:
4748         - name
4749         - displayName
4750     VideoChannelUpdate:
4751       properties:
4752         displayName:
4753           type: string
4754         description:
4755           type: string
4756         support:
4757           type: string
4758           description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4759         bulkVideosSupportUpdate:
4760           type: boolean
4761           description: 'Update the support field for all videos of this channel'
4762
4763     MRSSPeerLink:
4764       type: object
4765       xml:
4766         name: 'media:peerLink'
4767       properties:
4768         href:
4769           type: string
4770           xml:
4771             attribute: true
4772         type:
4773           type: string
4774           enum:
4775             - application/x-bittorrent
4776           xml:
4777             attribute: true
4778     MRSSGroupContent:
4779       type: object
4780       xml:
4781         name: 'media:content'
4782       properties:
4783         url:
4784           type: string
4785           format: url
4786           xml:
4787             attribute: true
4788         fileSize:
4789           type: integer
4790           xml:
4791             attribute: true
4792         type:
4793           type: string
4794           xml:
4795             attribute: true
4796         framerate:
4797           type: integer
4798           xml:
4799             attribute: true
4800         duration:
4801           type: integer
4802           xml:
4803             attribute: true
4804         height:
4805           type: integer
4806           xml:
4807             attribute: true
4808         lang:
4809           type: string
4810           xml:
4811             attribute: true
4812     VideoCommentsForXML:
4813       type: array
4814       xml:
4815         wrapped: true
4816         name: 'channel'
4817       items:
4818         type: object
4819         xml:
4820           name: 'item'
4821         properties:
4822           link:
4823             type: string
4824             format: url
4825           guid:
4826             type: string
4827           pubDate:
4828             type: string
4829             format: date-time
4830           'content:encoded':
4831             type: string
4832           'dc:creator':
4833             type: string
4834     VideosForXML:
4835       type: array
4836       xml:
4837         wrapped: true
4838         name: 'channel'
4839       items:
4840         type: object
4841         xml:
4842           name: 'item'
4843         properties:
4844           link:
4845             type: string
4846             format: url
4847             description: video watch page URL
4848           guid:
4849             type: string
4850             description: video canonical URL
4851           pubDate:
4852             type: string
4853             format: date-time
4854             description: video publication date
4855           description:
4856             type: string
4857             description: video description
4858           'content:encoded':
4859             type: string
4860             description: video description
4861           'dc:creator':
4862             type: string
4863             description: publisher user name
4864           'media:category':
4865             type: integer
4866             description: video category (MRSS)
4867           'media:community':
4868             type: object
4869             description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
4870             properties:
4871               'media:statistics':
4872                 type: object
4873                 properties:
4874                   views:
4875                     type: integer
4876                     xml:
4877                       attribute: true
4878           'media:embed':
4879             type: object
4880             properties:
4881               url:
4882                 type: string
4883                 format: url
4884                 description: video embed path, relative to the canonical URL domain (MRSS)
4885                 xml:
4886                   attribute: true
4887           'media:player':
4888             type: object
4889             properties:
4890               url:
4891                 type: string
4892                 format: url
4893                 description: video watch path, relative to the canonical URL domain (MRSS)
4894                 xml:
4895                   attribute: true
4896           'media:thumbnail':
4897             type: object
4898             properties:
4899               url:
4900                 type: string
4901                 format: url
4902                 xml:
4903                   attribute: true
4904               height:
4905                 type: integer
4906                 xml:
4907                   attribute: true
4908               width:
4909                 type: integer
4910                 xml:
4911                   attribute: true
4912           'media:title':
4913             type: string
4914             description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
4915           'media:description':
4916             type: string
4917           'media:rating':
4918             type: string
4919             enum:
4920               - nonadult
4921               - adult
4922             description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
4923           'enclosure':
4924             type: object
4925             description: main streamable file for the video
4926             properties:
4927               url:
4928                 type: string
4929                 format: url
4930                 xml:
4931                   attribute: true
4932               type:
4933                 type: string
4934                 enum:
4935                   - application/x-bittorrent
4936                 xml:
4937                   attribute: true
4938               length:
4939                 type: integer
4940                 xml:
4941                   attribute: true
4942           'media:group':
4943             type: array
4944             description: list of streamable files for the video. see [media:peerLink](https://www.rssboard.org/media-rss#media-peerlink) and [media:content](https://www.rssboard.org/media-rss#media-content) or  (MRSS)
4945             items:
4946               anyOf:
4947                 - $ref: '#/components/schemas/MRSSPeerLink'
4948                 - $ref: '#/components/schemas/MRSSGroupContent'
4949     NotificationSettingValue:
4950       type: integer
4951       description: >
4952         Notification type
4953
4954         - `0` NONE
4955
4956         - `1` WEB
4957
4958         - `2` EMAIL
4959       enum:
4960         - 0
4961         - 1
4962         - 3
4963     Notification:
4964       properties:
4965         id:
4966           type: integer
4967         type:
4968           type: integer
4969           description: >
4970             Notification type, following the `UserNotificationType` enum:
4971
4972             - `1` NEW_VIDEO_FROM_SUBSCRIPTION
4973
4974             - `2` NEW_COMMENT_ON_MY_VIDEO
4975
4976             - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS
4977
4978             - `4` BLACKLIST_ON_MY_VIDEO
4979
4980             - `5` UNBLACKLIST_ON_MY_VIDEO
4981
4982             - `6` MY_VIDEO_PUBLISHED
4983
4984             - `7` MY_VIDEO_IMPORT_SUCCESS
4985
4986             - `8` MY_VIDEO_IMPORT_ERROR
4987
4988             - `9` NEW_USER_REGISTRATION
4989
4990             - `10` NEW_FOLLOW
4991
4992             - `11` COMMENT_MENTION
4993
4994             - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
4995
4996             - `13` NEW_INSTANCE_FOLLOWER
4997
4998             - `14` AUTO_INSTANCE_FOLLOWING
4999         read:
5000           type: boolean
5001         video:
5002           nullable: true
5003           allOf:
5004             - $ref: '#/components/schemas/VideoInfo'
5005             - type: object
5006               properties:
5007                 channel:
5008                   $ref: '#/components/schemas/ActorInfo'
5009         videoImport:
5010           nullable: true
5011           type: object
5012           properties:
5013             id:
5014               type: integer
5015             video:
5016               nullable: true
5017               $ref: '#/components/schemas/VideoInfo'
5018             torrentName:
5019               type: string
5020               nullable: true
5021             magnetUri:
5022               type: string
5023               format: uri
5024               nullable: true
5025             targetUri:
5026               type: string
5027               format: uri
5028               nullable: true
5029         comment:
5030           nullable: true
5031           type: object
5032           properties:
5033             id:
5034               type: integer
5035             threadId:
5036               type: integer
5037             video:
5038               $ref: '#/components/schemas/VideoInfo'
5039             account:
5040               $ref: '#/components/schemas/ActorInfo'
5041         videoAbuse:
5042           nullable: true
5043           type: object
5044           properties:
5045             id:
5046               type: integer
5047             video:
5048               allOf:
5049                 - $ref: '#/components/schemas/VideoInfo'
5050         videoBlacklist:
5051           nullable: true
5052           type: object
5053           properties:
5054             id:
5055               type: integer
5056             video:
5057               allOf:
5058                 - $ref: '#/components/schemas/VideoInfo'
5059         account:
5060           nullable: true
5061           allOf:
5062             - $ref: '#/components/schemas/ActorInfo'
5063         actorFollow:
5064           type: object
5065           nullable: true
5066           properties:
5067             id:
5068               type: integer
5069             follower:
5070               $ref: '#/components/schemas/ActorInfo'
5071             state:
5072               type: string
5073               enum:
5074                 - pending
5075                 - accepted
5076             following:
5077               type: object
5078               properties:
5079                 type:
5080                   type: string
5081                   enum:
5082                     - account
5083                     - channel
5084                     - instance
5085                 name:
5086                   type: string
5087                 displayName:
5088                   type: string
5089                 host:
5090                   type: string
5091                   format: hostname
5092         createdAt:
5093           type: string
5094           format: date-time
5095         updatedAt:
5096           type: string
5097           format: date-time
5098     NotificationListResponse:
5099       properties:
5100         total:
5101           type: integer
5102           example: 1
5103         data:
5104           type: array
5105           maxItems: 100
5106           items:
5107             $ref: '#/components/schemas/Notification'
5108     Plugin:
5109       properties:
5110         name:
5111           type: string
5112           example: peertube-plugin-auth-ldap
5113         type:
5114           type: integer
5115           description: >
5116             - `1`: PLUGIN
5117
5118             - `2`: THEME
5119           enum:
5120             - 1
5121             - 2
5122         latestVersion:
5123           type: string
5124           example: 0.0.3
5125         version:
5126           type: string
5127           example: 0.0.1
5128         enabled:
5129           type: boolean
5130         uninstalled:
5131           type: boolean
5132         peertubeEngine:
5133           type: string
5134           example: 2.2.0
5135         description:
5136           type: string
5137         homepage:
5138           type: string
5139           format: url
5140           example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
5141         settings:
5142           type: object
5143           additionalProperties: true
5144         createdAt:
5145           type: string
5146           format: date-time
5147         updatedAt:
5148           type: string
5149           format: date-time
5150     PluginResponse:
5151       properties:
5152         total:
5153           type: integer
5154           example: 1
5155         data:
5156           type: array
5157           maxItems: 100
5158           items:
5159             $ref: '#/components/schemas/Plugin'