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