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