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