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