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