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