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