]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
6197a431faba4a0276b685bd37f07c3c49b2eae8
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
1 openapi: 3.0.0
2 info:
3 title: PeerTube
4 version: 2.1.1
5 contact:
6 name: PeerTube Community
7 url: 'https://joinpeertube.org'
8 license:
9 name: AGPLv3.0
10 url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'
11 x-logo:
12 url: 'https://joinpeertube.org/img/brand.png'
13 altText: PeerTube Project Homepage
14 description: |
15 # Introduction
16
17 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
18 HTTP/REST library for your programming language to use PeerTube. No official
19 SDK is currently provided, but the spec API is fully compatible with
20 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
21 which generates a client SDK in the language of your choice.
22
23 See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API.
24
25 # Authentication
26
27 When you sign up for an account, you are given the possibility to generate
28 sessions, and authenticate using this session token. One session token can
29 currently be used at a time.
30
31 # Errors
32
33 The API uses standard HTTP status codes to indicate the success or failure
34 of the API call. The body of the response will be JSON in the following
35 format.
36
37 ```
38 {
39 "code": "unauthorized_request", // example inner error code
40 "error": "Token is invalid." // example exposed error message
41 }
42 ```
43 externalDocs:
44 url: https://docs.joinpeertube.org/api-rest-reference.html
45 tags:
46 - name: Accounts
47 description: >
48 Using some features of PeerTube require authentication, for which Accounts
49 provide different levels of permission as well as associated user
50 information. Accounts also encompass remote accounts discovered across the federation.
51 - name: Config
52 description: >
53 Each server exposes public information regarding supported videos and
54 options.
55 - name: Job
56 description: >
57 Jobs are long-running tasks enqueued and processed by the instance
58 itself. No additional worker registration is currently available.
59 - name: Instance Follows
60 description: >
61 Managing servers which the instance interacts with is crucial to the
62 concept of federation in PeerTube and external video indexation. The PeerTube
63 server then deals with inter-server ActivityPub operations and propagates
64 information across its social graph by posting activities to actors' inbox
65 endpoints.
66 - name: Video Abuses
67 description: |
68 Video abuses deal with reports of local or remote videos alike.
69 - name: Video
70 description: |
71 Operations dealing with listing, uploading, fetching or modifying videos.
72 - name: Search
73 description: |
74 The search helps to find _videos_ from within the instance and beyond.
75 Videos from other instances federated by the instance (that is, instances
76 followed by the instance) can be found via keywords and other criteria of
77 the advanced search.
78 - name: Video Comments
79 description: >
80 Operations dealing with comments to a video. Comments are organized in
81 threads.
82 - name: Video Playlists
83 description: >
84 Operations dealing with playlists of videos. Playlists are bound to users
85 and/or channels.
86 - name: Video Channels
87 description: >
88 Operations dealing with creation, modification and video listing of a
89 user's channels.
90 - name: Video Blacklist
91 description: >
92 Operations dealing with blacklisting videos (removing them from view and
93 preventing interactions).
94 - name: Video Rates
95 description: >
96 Like/dislike a video.
97 x-tagGroups:
98 - name: Accounts
99 tags:
100 - Accounts
101 - Users
102 - My User
103 - My Subscriptions
104 - name: Videos
105 tags:
106 - Video
107 - Video Caption
108 - Video Channels
109 - Video Comments
110 - Video Following
111 - Video Rates
112 - Video Playlists
113 - Video Ownership Change
114 - name: Search
115 tags:
116 - Search
117 - name: Moderation
118 tags:
119 - Video Abuses
120 - Video Blacklist
121 - name: Instance Configuration
122 tags:
123 - Config
124 - Instance Follows
125 - name: Jobs
126 tags:
127 - Job
128 paths:
129 '/accounts/{name}':
130 get:
131 tags:
132 - Accounts
133 summary: Get an account
134 parameters:
135 - $ref: '#/components/parameters/name'
136 responses:
137 '200':
138 description: successful operation
139 content:
140 application/json:
141 schema:
142 $ref: '#/components/schemas/Account'
143 '/accounts/{name}/videos':
144 get:
145 tags:
146 - Accounts
147 - Video
148 summary: 'List videos of an account'
149 parameters:
150 - $ref: '#/components/parameters/name'
151 responses:
152 '200':
153 description: successful operation
154 content:
155 application/json:
156 schema:
157 $ref: '#/components/schemas/VideoListResponse'
158 x-code-samples:
159 - lang: JavaScript
160 source: |
161 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
162 .then(function(response) {
163 return response.json()
164 }).then(function(data) {
165 console.log(data)
166 })
167 - lang: Shell
168 source: |
169 # pip install httpie
170 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
171 - lang: Ruby
172 source: |
173 require 'net/http'
174 require 'json'
175
176 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
177
178 http = Net::HTTP.new(uri.host, uri.port)
179 http.use_ssl = true
180
181 response = http.get(uri.request_uri)
182
183 puts JSON.parse(response.read_body)
184 - lang: Python
185 source: |
186 import requests
187
188 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
189 json = r.json()
190
191 print(json)
192 /accounts:
193 get:
194 tags:
195 - Accounts
196 summary: List accounts
197 parameters:
198 - $ref: '#/components/parameters/start'
199 - $ref: '#/components/parameters/count'
200 - $ref: '#/components/parameters/sort'
201 responses:
202 '200':
203 description: successful operation
204 content:
205 'application/json':
206 schema:
207 type: array
208 items:
209 $ref: '#/components/schemas/Account'
210 /config:
211 get:
212 tags:
213 - Config
214 summary: Get instance public configuration
215 responses:
216 '200':
217 description: successful operation
218 content:
219 application/json:
220 schema:
221 $ref: '#/components/schemas/ServerConfig'
222 /config/about:
223 get:
224 summary: Get instance "About" information
225 tags:
226 - Config
227 responses:
228 '200':
229 description: successful operation
230 content:
231 application/json:
232 schema:
233 $ref: '#/components/schemas/ServerConfigAbout'
234 /config/custom:
235 get:
236 summary: Get instance runtime configuration
237 tags:
238 - Config
239 security:
240 - OAuth2:
241 - admin
242 responses:
243 '200':
244 description: successful operation
245 content:
246 application/json:
247 schema:
248 $ref: '#/components/schemas/ServerConfigCustom'
249 put:
250 summary: Set instance runtime configuration
251 tags:
252 - Config
253 security:
254 - OAuth2:
255 - admin
256 responses:
257 '200':
258 description: successful operation
259 delete:
260 summary: Delete instance runtime configuration
261 tags:
262 - Config
263 security:
264 - OAuth2:
265 - admin
266 responses:
267 '200':
268 description: successful operation
269 /jobs/{state}:
270 get:
271 summary: List instance jobs
272 security:
273 - OAuth2:
274 - admin
275 tags:
276 - Job
277 parameters:
278 - name: state
279 in: path
280 required: true
281 description: The state of the job
282 schema:
283 type: string
284 enum:
285 - active
286 - completed
287 - failed
288 - waiting
289 - delayed
290 - $ref: '#/components/parameters/start'
291 - $ref: '#/components/parameters/count'
292 - $ref: '#/components/parameters/sort'
293 responses:
294 '200':
295 description: successful operation
296 content:
297 application/json:
298 schema:
299 type: array
300 items:
301 $ref: '#/components/schemas/Job'
302 '/server/following/{host}':
303 delete:
304 security:
305 - OAuth2:
306 - admin
307 tags:
308 - Instance Follows
309 summary: Unfollow a server
310 parameters:
311 - name: host
312 in: path
313 required: true
314 description: 'The host to unfollow '
315 schema:
316 type: string
317 responses:
318 '201':
319 description: successful operation
320 /server/followers:
321 get:
322 tags:
323 - Instance Follows
324 summary: List instance followers
325 parameters:
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/Follow'
338 /server/following:
339 get:
340 tags:
341 - Instance Follows
342 summary: List instance followings
343 parameters:
344 - $ref: '#/components/parameters/start'
345 - $ref: '#/components/parameters/count'
346 - $ref: '#/components/parameters/sort'
347 responses:
348 '200':
349 description: successful operation
350 content:
351 application/json:
352 schema:
353 type: array
354 items:
355 $ref: '#/components/schemas/Follow'
356 post:
357 security:
358 - OAuth2:
359 - admin
360 tags:
361 - Instance Follows
362 summary: Follow a server
363 responses:
364 '204':
365 description: successful operation
366 requestBody:
367 content:
368 application/json:
369 schema:
370 $ref: '#/components/schemas/Follow'
371 /users:
372 post:
373 summary: Create a user
374 security:
375 - OAuth2:
376 - admin
377 tags:
378 - Users
379 responses:
380 '200':
381 description: successful operation
382 content:
383 application/json:
384 schema:
385 $ref: '#/components/schemas/AddUserResponse'
386 requestBody:
387 content:
388 application/json:
389 schema:
390 $ref: '#/components/schemas/AddUser'
391 description: User to create
392 required: true
393 get:
394 summary: List users
395 security:
396 - OAuth2: []
397 tags:
398 - Users
399 parameters:
400 - $ref: '#/components/parameters/start'
401 - $ref: '#/components/parameters/count'
402 - $ref: '#/components/parameters/usersSort'
403 responses:
404 '200':
405 description: successful operation
406 content:
407 application/json:
408 schema:
409 type: array
410 items:
411 $ref: '#/components/schemas/User'
412 '/users/{id}':
413 delete:
414 summary: Delete a user
415 security:
416 - OAuth2:
417 - admin
418 tags:
419 - Users
420 parameters:
421 - $ref: '#/components/parameters/id'
422 responses:
423 '204':
424 description: successful operation
425 get:
426 summary: Get a user
427 security:
428 - OAuth2: []
429 tags:
430 - Users
431 parameters:
432 - $ref: '#/components/parameters/id'
433 responses:
434 '200':
435 description: successful operation
436 content:
437 application/json:
438 schema:
439 $ref: '#/components/schemas/User'
440 put:
441 summary: Update a user
442 security:
443 - OAuth2: []
444 tags:
445 - Users
446 parameters:
447 - $ref: '#/components/parameters/id'
448 responses:
449 '204':
450 description: successful operation
451 requestBody:
452 content:
453 application/json:
454 schema:
455 $ref: '#/components/schemas/UpdateUser'
456 required: true
457 /users/register:
458 post:
459 summary: Register a user
460 tags:
461 - Users
462 responses:
463 '204':
464 description: successful operation
465 requestBody:
466 content:
467 application/json:
468 schema:
469 $ref: '#/components/schemas/RegisterUser'
470 required: true
471 /users/me:
472 get:
473 summary: Get my user information
474 security:
475 - OAuth2:
476 - user
477 tags:
478 - My User
479 responses:
480 '200':
481 description: successful operation
482 content:
483 application/json:
484 schema:
485 type: array
486 items:
487 $ref: '#/components/schemas/User'
488 put:
489 summary: Update my user information
490 security:
491 - OAuth2:
492 - user
493 tags:
494 - My User
495 responses:
496 '204':
497 description: successful operation
498 requestBody:
499 content:
500 application/json:
501 schema:
502 $ref: '#/components/schemas/UpdateMe'
503 required: true
504 /users/me/videos/imports:
505 get:
506 summary: Get video imports of my user
507 security:
508 - OAuth2:
509 - user
510 tags:
511 - Videos
512 - My User
513 parameters:
514 - $ref: '#/components/parameters/start'
515 - $ref: '#/components/parameters/count'
516 - $ref: '#/components/parameters/sort'
517 responses:
518 '200':
519 description: successful operation
520 content:
521 application/json:
522 schema:
523 $ref: '#/components/schemas/VideoImport'
524 /users/me/video-quota-used:
525 get:
526 summary: Get my user used quota
527 security:
528 - OAuth2:
529 - user
530 tags:
531 - My User
532 responses:
533 '200':
534 description: successful operation
535 content:
536 application/json:
537 schema:
538 type: number
539 '/users/me/videos/{videoId}/rating':
540 get:
541 summary: Get rate of my user for a video
542 security:
543 - OAuth2: []
544 tags:
545 - My User
546 - Video Rates
547 parameters:
548 - name: videoId
549 in: path
550 required: true
551 description: 'The video id '
552 schema:
553 type: string
554 responses:
555 '200':
556 description: successful operation
557 content:
558 application/json:
559 schema:
560 $ref: '#/components/schemas/GetMeVideoRating'
561 /users/me/videos:
562 get:
563 summary: Get videos of my user
564 security:
565 - OAuth2:
566 - user
567 tags:
568 - My User
569 - Videos
570 parameters:
571 - $ref: '#/components/parameters/start'
572 - $ref: '#/components/parameters/count'
573 - $ref: '#/components/parameters/sort'
574 responses:
575 '200':
576 description: successful operation
577 content:
578 application/json:
579 schema:
580 $ref: '#/components/schemas/VideoListResponse'
581 /users/me/subscriptions:
582 get:
583 summary: Get my user subscriptions
584 security:
585 - OAuth2:
586 - user
587 tags:
588 - My Subscriptions
589 parameters:
590 - $ref: '#/components/parameters/start'
591 - $ref: '#/components/parameters/count'
592 - $ref: '#/components/parameters/sort'
593 responses:
594 '200':
595 description: successful operation
596 post:
597 summary: Add subscription to my user
598 security:
599 - OAuth2:
600 - user
601 tags:
602 - My Subscriptions
603 responses:
604 '200':
605 description: successful operation
606 /users/me/subscriptions/exist:
607 get:
608 summary: Get if subscriptions exist for my user
609 security:
610 - OAuth2:
611 - user
612 tags:
613 - My Subscriptions
614 parameters:
615 - $ref: '#/components/parameters/subscriptionsUris'
616 responses:
617 '200':
618 description: successful operation
619 content:
620 application/json:
621 schema:
622 type: object
623 /users/me/subscriptions/videos:
624 get:
625 summary: List videos of subscriptions of my user
626 security:
627 - OAuth2:
628 - user
629 tags:
630 - My Subscriptions
631 - Videos
632 parameters:
633 - $ref: '#/components/parameters/start'
634 - $ref: '#/components/parameters/count'
635 - $ref: '#/components/parameters/sort'
636 responses:
637 '200':
638 description: successful operation
639 content:
640 application/json:
641 schema:
642 $ref: '#/components/schemas/VideoListResponse'
643 '/users/me/subscriptions/{subscriptionHandle}':
644 get:
645 summary: Get subscription of my user
646 security:
647 - OAuth2:
648 - user
649 tags:
650 - My Subscriptions
651 parameters:
652 - $ref: '#/components/parameters/subscriptionHandle'
653 responses:
654 '200':
655 description: successful operation
656 content:
657 application/json:
658 schema:
659 $ref: '#/components/schemas/VideoChannel'
660 delete:
661 summary: Delete subscription of my user
662 security:
663 - OAuth2:
664 - user
665 tags:
666 - My Subscriptions
667 parameters:
668 - $ref: '#/components/parameters/subscriptionHandle'
669 responses:
670 '200':
671 description: successful operation
672 /users/me/avatar/pick:
673 post:
674 summary: Update my user avatar
675 security:
676 - OAuth2: []
677 tags:
678 - My User
679 responses:
680 '200':
681 description: successful operation
682 content:
683 application/json:
684 schema:
685 $ref: '#/components/schemas/Avatar'
686 requestBody:
687 content:
688 multipart/form-data:
689 schema:
690 type: object
691 properties:
692 avatarfile:
693 description: The file to upload.
694 type: string
695 format: binary
696 encoding:
697 avatarfile:
698 contentType: image/png, image/jpeg
699 /videos/ownership:
700 get:
701 summary: List video ownership changes
702 tags:
703 - Video Ownership Change
704 security:
705 - OAuth2: []
706 responses:
707 '200':
708 description: successful operation
709 '/videos/ownership/{id}/accept':
710 post:
711 summary: Accept ownership change request
712 tags:
713 - Video Ownership Change
714 security:
715 - OAuth2: []
716 parameters:
717 - $ref: '#/components/parameters/idOrUUID'
718 responses:
719 '204':
720 description: successful operation
721 '/videos/ownership/{id}/refuse':
722 post:
723 summary: Refuse ownership change request
724 tags:
725 - Video Ownership Change
726 security:
727 - OAuth2: []
728 parameters:
729 - $ref: '#/components/parameters/idOrUUID'
730 responses:
731 '204':
732 description: successful operation
733 '/videos/{id}/give-ownership':
734 post:
735 summary: Request ownership change
736 tags:
737 - Video Ownership Change
738 security:
739 - OAuth2: []
740 parameters:
741 - $ref: '#/components/parameters/idOrUUID'
742 requestBody:
743 required: true
744 content:
745 application/x-www-form-urlencoded:
746 schema:
747 type: object
748 properties:
749 username:
750 type: string
751 required:
752 - username
753 responses:
754 '204':
755 description: successful operation
756 '400':
757 description: 'Changing video ownership to a remote account is not supported yet'
758 /videos:
759 get:
760 summary: List videos
761 tags:
762 - Video
763 parameters:
764 - $ref: '#/components/parameters/categoryOneOf'
765 - $ref: '#/components/parameters/tagsOneOf'
766 - $ref: '#/components/parameters/tagsAllOf'
767 - $ref: '#/components/parameters/licenceOneOf'
768 - $ref: '#/components/parameters/languageOneOf'
769 - $ref: '#/components/parameters/nsfw'
770 - $ref: '#/components/parameters/filter'
771 - $ref: '#/components/parameters/start'
772 - $ref: '#/components/parameters/count'
773 - $ref: '#/components/parameters/videosSort'
774 responses:
775 '200':
776 description: successful operation
777 content:
778 application/json:
779 schema:
780 $ref: '#/components/schemas/VideoListResponse'
781 /videos/categories:
782 get:
783 summary: List available video categories
784 tags:
785 - Video
786 responses:
787 '200':
788 description: successful operation
789 content:
790 application/json:
791 schema:
792 type: array
793 items:
794 type: string
795 /videos/licences:
796 get:
797 summary: List available video licences
798 tags:
799 - Video
800 responses:
801 '200':
802 description: successful operation
803 content:
804 application/json:
805 schema:
806 type: array
807 items:
808 type: string
809 /videos/languages:
810 get:
811 summary: List available video languages
812 tags:
813 - Video
814 responses:
815 '200':
816 description: successful operation
817 content:
818 application/json:
819 schema:
820 type: array
821 items:
822 type: string
823 /videos/privacies:
824 get:
825 summary: List available video privacies
826 tags:
827 - Video
828 responses:
829 '200':
830 description: successful operation
831 content:
832 application/json:
833 schema:
834 type: array
835 items:
836 type: string
837 '/videos/{id}':
838 put:
839 summary: Update a video
840 security:
841 - OAuth2: []
842 tags:
843 - Video
844 parameters:
845 - $ref: '#/components/parameters/idOrUUID'
846 responses:
847 '204':
848 description: successful operation
849 requestBody:
850 content:
851 multipart/form-data:
852 schema:
853 type: object
854 properties:
855 thumbnailfile:
856 description: Video thumbnail file
857 type: string
858 format: binary
859 previewfile:
860 description: Video preview file
861 type: string
862 format: binary
863 category:
864 description: Video category
865 type: string
866 licence:
867 description: Video licence
868 type: string
869 language:
870 description: Video language
871 type: string
872 privacy:
873 $ref: '#/components/schemas/VideoPrivacySet'
874 description:
875 description: Video description
876 type: string
877 waitTranscoding:
878 description: Whether or not we wait transcoding before publish the video
879 type: string
880 support:
881 description: Text describing how to support the video uploader
882 type: string
883 nsfw:
884 description: Whether or not this video contains sensitive content
885 type: string
886 name:
887 description: Video name
888 type: string
889 tags:
890 description: Video tags (maximum 5 tags each between 2 and 30 characters)
891 type: array
892 minItems: 1
893 maxItems: 5
894 items:
895 type: string
896 minLength: 2
897 maxLength: 30
898 commentsEnabled:
899 description: Enable or disable comments for this video
900 type: string
901 originallyPublishedAt:
902 description: Date when the content was originally published
903 type: string
904 format: date-time
905 scheduleUpdate:
906 $ref: '#/components/schemas/VideoScheduledUpdate'
907 encoding:
908 thumbnailfile:
909 contentType: image/jpeg
910 previewfile:
911 contentType: image/jpeg
912 get:
913 summary: Get a video
914 tags:
915 - Video
916 parameters:
917 - $ref: '#/components/parameters/idOrUUID'
918 responses:
919 '200':
920 description: successful operation
921 content:
922 application/json:
923 schema:
924 $ref: '#/components/schemas/VideoDetails'
925 delete:
926 summary: Delete a video
927 security:
928 - OAuth2: []
929 tags:
930 - Video
931 parameters:
932 - $ref: '#/components/parameters/idOrUUID'
933 responses:
934 '204':
935 description: successful operation
936 '/videos/{id}/description':
937 get:
938 summary: Get complete video description
939 tags:
940 - Video
941 parameters:
942 - $ref: '#/components/parameters/idOrUUID'
943 responses:
944 '200':
945 description: successful operation
946 content:
947 application/json:
948 schema:
949 type: string
950 '/videos/{id}/views':
951 post:
952 summary: Add a view to a video
953 tags:
954 - Video
955 parameters:
956 - $ref: '#/components/parameters/idOrUUID'
957 responses:
958 '204':
959 description: successful operation
960 '/videos/{id}/watching':
961 put:
962 summary: Set watching progress of a video
963 tags:
964 - Video
965 security:
966 - OAuth2: []
967 parameters:
968 - $ref: '#/components/parameters/idOrUUID'
969 requestBody:
970 content:
971 application/json:
972 schema:
973 $ref: '#/components/schemas/UserWatchingVideo'
974 required: true
975 responses:
976 '204':
977 description: successful operation
978 /videos/upload:
979 post:
980 summary: Upload a video
981 security:
982 - OAuth2: []
983 tags:
984 - Video
985 responses:
986 '200':
987 description: successful operation
988 content:
989 application/json:
990 schema:
991 $ref: '#/components/schemas/VideoUploadResponse'
992 '403':
993 description: 'The user video quota is exceeded with this video.'
994 '408':
995 description: 'Upload has timed out'
996 '422':
997 description: 'Invalid input file.'
998 requestBody:
999 content:
1000 multipart/form-data:
1001 schema:
1002 type: object
1003 properties:
1004 videofile:
1005 description: Video file
1006 type: string
1007 format: binary
1008 channelId:
1009 description: Channel id that will contain this video
1010 type: number
1011 thumbnailfile:
1012 description: Video thumbnail file
1013 type: string
1014 format: binary
1015 previewfile:
1016 description: Video preview file
1017 type: string
1018 format: binary
1019 privacy:
1020 $ref: '#/components/schemas/VideoPrivacySet'
1021 category:
1022 description: Video category
1023 type: string
1024 licence:
1025 description: Video licence
1026 type: string
1027 language:
1028 description: Video language
1029 type: string
1030 description:
1031 description: Video description
1032 type: string
1033 waitTranscoding:
1034 description: Whether or not we wait transcoding before publish the video
1035 type: string
1036 support:
1037 description: Text describing how to support the video uploader
1038 type: string
1039 nsfw:
1040 description: Whether or not this video contains sensitive content
1041 type: string
1042 name:
1043 description: Video name
1044 type: string
1045 tags:
1046 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1047 type: array
1048 minItems: 1
1049 maxItems: 5
1050 items:
1051 type: string
1052 minLength: 2
1053 maxLength: 30
1054 commentsEnabled:
1055 description: Enable or disable comments for this video
1056 type: string
1057 originallyPublishedAt:
1058 description: Date when the content was originally published
1059 type: string
1060 format: date-time
1061 scheduleUpdate:
1062 $ref: '#/components/schemas/VideoScheduledUpdate'
1063 required:
1064 - videofile
1065 - channelId
1066 - name
1067 encoding:
1068 videofile:
1069 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1070 thumbnailfile:
1071 contentType: image/jpeg
1072 previewfile:
1073 contentType: image/jpeg
1074 x-code-samples:
1075 - lang: Shell
1076 source: |
1077 ## DEPENDENCIES: httpie, jq
1078 # pip install httpie
1079 USERNAME="<your_username>"
1080 PASSWORD="<your_password>"
1081 FILE_PATH="<your_file_path>"
1082 CHANNEL_ID="<your_channel_id>"
1083 NAME="<video_name>"
1084
1085 API_PATH="https://peertube2.cpy.re/api/v1"
1086 ## AUTH
1087 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1088 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1089 token=$(http -b --form POST "$API_PATH/users/token" \
1090 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1091 username=$USERNAME \
1092 password=$PASSWORD \
1093 | jq -r ".access_token")
1094 ## VIDEO UPLOAD
1095 http -b --form POST "$API_PATH/videos/upload" \
1096 videofile@$FILE_PATH \
1097 channelId=$CHANNEL_ID \
1098 name=$NAME \
1099 "Authorization:Bearer $token"
1100 /videos/imports:
1101 post:
1102 summary: Import a video
1103 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1104 security:
1105 - OAuth2: []
1106 tags:
1107 - Video
1108 responses:
1109 '200':
1110 description: successful operation
1111 content:
1112 application/json:
1113 schema:
1114 $ref: '#/components/schemas/VideoUploadResponse'
1115 requestBody:
1116 content:
1117 multipart/form-data:
1118 schema:
1119 type: object
1120 properties:
1121 torrentfile:
1122 description: Torrent File
1123 type: string
1124 format: binary
1125 targetUrl:
1126 description: HTTP target URL
1127 type: string
1128 magnetUri:
1129 description: Magnet URI
1130 type: string
1131 channelId:
1132 description: Channel id that will contain this video
1133 type: number
1134 thumbnailfile:
1135 description: Video thumbnail file
1136 type: string
1137 format: binary
1138 previewfile:
1139 description: Video preview file
1140 type: string
1141 format: binary
1142 privacy:
1143 $ref: '#/components/schemas/VideoPrivacySet'
1144 category:
1145 description: Video category
1146 type: string
1147 licence:
1148 description: Video licence
1149 type: string
1150 language:
1151 description: Video language
1152 type: string
1153 description:
1154 description: Video description
1155 type: string
1156 waitTranscoding:
1157 description: Whether or not we wait transcoding before publish the video
1158 type: string
1159 support:
1160 description: Text describing how to support the video uploader
1161 type: string
1162 nsfw:
1163 description: Whether or not this video contains sensitive content
1164 type: string
1165 name:
1166 description: Video name
1167 type: string
1168 tags:
1169 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1170 type: array
1171 minItems: 1
1172 maxItems: 5
1173 items:
1174 type: string
1175 minLength: 2
1176 maxLength: 30
1177 commentsEnabled:
1178 description: Enable or disable comments for this video
1179 type: string
1180 scheduleUpdate:
1181 $ref: '#/components/schemas/VideoScheduledUpdate'
1182 required:
1183 - channelId
1184 - name
1185 encoding:
1186 torrentfile:
1187 contentType: application/x-bittorrent
1188 thumbnailfile:
1189 contentType: image/jpeg
1190 previewfile:
1191 contentType: image/jpeg
1192 /videos/abuse:
1193 get:
1194 summary: List video abuses
1195 security:
1196 - OAuth2:
1197 - admin
1198 - moderator
1199 tags:
1200 - Video Abuses
1201 parameters:
1202 - $ref: '#/components/parameters/start'
1203 - $ref: '#/components/parameters/count'
1204 - $ref: '#/components/parameters/abusesSort'
1205 responses:
1206 '200':
1207 description: successful operation
1208 content:
1209 application/json:
1210 schema:
1211 type: array
1212 items:
1213 $ref: '#/components/schemas/VideoAbuse'
1214 '/videos/{id}/abuse':
1215 post:
1216 summary: Report an abuse
1217 security:
1218 - OAuth2: []
1219 tags:
1220 - Video Abuses
1221 - Videos
1222 parameters:
1223 - $ref: '#/components/parameters/idOrUUID'
1224 requestBody:
1225 content:
1226 application/json:
1227 schema:
1228 type: object
1229 properties:
1230 reason:
1231 description: Reason why the user reports this video
1232 type: string
1233 responses:
1234 '204':
1235 description: successful operation
1236 '/videos/{id}/abuse/{abuseId}':
1237 put:
1238 summary: Update an abuse
1239 security:
1240 - OAuth2:
1241 - admin
1242 - moderator
1243 tags:
1244 - Video Abuses
1245 responses:
1246 '204':
1247 description: successful operation
1248 parameters:
1249 - $ref: '#/components/parameters/idOrUUID'
1250 - $ref: '#/components/parameters/abuseId'
1251 requestBody:
1252 content:
1253 application/json:
1254 schema:
1255 type: object
1256 properties:
1257 state:
1258 $ref: '#/components/schemas/VideoAbuseStateSet'
1259 moderationComment:
1260 type: string
1261 description: 'Update the comment of the video abuse for other admin/moderators'
1262 delete:
1263 summary: Delete an abuse
1264 security:
1265 - OAuth2:
1266 - admin
1267 - moderator
1268 tags:
1269 - Video Abuses
1270 responses:
1271 '204':
1272 description: successful operation
1273 parameters:
1274 - $ref: '#/components/parameters/idOrUUID'
1275 - $ref: '#/components/parameters/abuseId'
1276
1277 '/videos/{id}/blacklist':
1278 post:
1279 summary: Blacklist a video
1280 security:
1281 - OAuth2:
1282 - admin
1283 - moderator
1284 tags:
1285 - Video Blacklist
1286 parameters:
1287 - $ref: '#/components/parameters/idOrUUID'
1288 responses:
1289 '204':
1290 description: successful operation
1291 delete:
1292 summary: Delete an entry of the blacklist of a video by its id
1293 security:
1294 - OAuth2:
1295 - admin
1296 - moderator
1297 tags:
1298 - Video Blacklist
1299 parameters:
1300 - $ref: '#/components/parameters/idOrUUID'
1301 responses:
1302 '204':
1303 description: successful operation
1304 /videos/blacklist:
1305 get:
1306 summary: List blacklisted videos
1307 security:
1308 - OAuth2:
1309 - admin
1310 - moderator
1311 tags:
1312 - Video Blacklist
1313 parameters:
1314 - $ref: '#/components/parameters/start'
1315 - $ref: '#/components/parameters/count'
1316 - $ref: '#/components/parameters/blacklistsSort'
1317 responses:
1318 '200':
1319 description: successful operation
1320 content:
1321 application/json:
1322 schema:
1323 type: array
1324 items:
1325 $ref: '#/components/schemas/VideoBlacklist'
1326 /videos/{id}/captions:
1327 get:
1328 summary: List captions of a video
1329 tags:
1330 - Video Caption
1331 parameters:
1332 - $ref: '#/components/parameters/idOrUUID'
1333 responses:
1334 '200':
1335 description: successful operation
1336 content:
1337 application/json:
1338 schema:
1339 type: object
1340 properties:
1341 total:
1342 type: integer
1343 data:
1344 type: array
1345 items:
1346 $ref: '#/components/schemas/VideoCaption'
1347 /videos/{id}/captions/{captionLanguage}:
1348 put:
1349 summary: Add or replace a video caption
1350 tags:
1351 - Video Caption
1352 parameters:
1353 - $ref: '#/components/parameters/idOrUUID'
1354 - $ref: '#/components/parameters/captionLanguage'
1355 requestBody:
1356 content:
1357 multipart/form-data:
1358 schema:
1359 type: object
1360 properties:
1361 captionfile:
1362 description: The file to upload.
1363 type: string
1364 format: binary
1365 encoding:
1366 captionfile:
1367 contentType: text/vtt, application/x-subrip, text/plain
1368 responses:
1369 '204':
1370 description: successful operation
1371 delete:
1372 summary: Delete a video caption
1373 tags:
1374 - Video Caption
1375 parameters:
1376 - $ref: '#/components/parameters/idOrUUID'
1377 - $ref: '#/components/parameters/captionLanguage'
1378 responses:
1379 '204':
1380 description: successful operation
1381 /video-channels:
1382 get:
1383 summary: List video channels
1384 tags:
1385 - Video Channels
1386 parameters:
1387 - $ref: '#/components/parameters/start'
1388 - $ref: '#/components/parameters/count'
1389 - $ref: '#/components/parameters/sort'
1390 responses:
1391 '200':
1392 description: successful operation
1393 content:
1394 application/json:
1395 schema:
1396 type: array
1397 items:
1398 $ref: '#/components/schemas/VideoChannel'
1399 post:
1400 summary: Create a video channel
1401 security:
1402 - OAuth2: []
1403 tags:
1404 - Video Channels
1405 responses:
1406 '204':
1407 description: successful operation
1408 requestBody:
1409 content:
1410 application/json:
1411 schema:
1412 $ref: '#/components/schemas/VideoChannelCreate'
1413 '/video-channels/{channelHandle}':
1414 get:
1415 summary: Get a video channel
1416 tags:
1417 - Video Channels
1418 parameters:
1419 - $ref: '#/components/parameters/channelHandle'
1420 responses:
1421 '200':
1422 description: successful operation
1423 content:
1424 application/json:
1425 schema:
1426 $ref: '#/components/schemas/VideoChannel'
1427 put:
1428 summary: Update a video channel
1429 security:
1430 - OAuth2: []
1431 tags:
1432 - Video Channels
1433 parameters:
1434 - $ref: '#/components/parameters/channelHandle'
1435 responses:
1436 '204':
1437 description: successful operation
1438 requestBody:
1439 content:
1440 application/json:
1441 schema:
1442 $ref: '#/components/schemas/VideoChannelUpdate'
1443 delete:
1444 summary: Delete a video channel
1445 security:
1446 - OAuth2: []
1447 tags:
1448 - Video Channels
1449 parameters:
1450 - $ref: '#/components/parameters/channelHandle'
1451 responses:
1452 '204':
1453 description: successful operation
1454 '/video-channels/{channelHandle}/videos':
1455 get:
1456 summary: List videos of a video channel
1457 tags:
1458 - Video
1459 - Video Channels
1460 parameters:
1461 - $ref: '#/components/parameters/channelHandle'
1462 responses:
1463 '200':
1464 description: successful operation
1465 content:
1466 application/json:
1467 schema:
1468 $ref: '#/components/schemas/VideoListResponse'
1469
1470 /video-playlists/privacies:
1471 get:
1472 summary: List available playlist privacies
1473 tags:
1474 - Video Playlists
1475 responses:
1476 '200':
1477 description: successful operation
1478 content:
1479 application/json:
1480 schema:
1481 type: array
1482 items:
1483 type: string
1484
1485 /video-playlists:
1486 get:
1487 summary: List video playlists
1488 tags:
1489 - Video Playlists
1490 parameters:
1491 - $ref: '#/components/parameters/start'
1492 - $ref: '#/components/parameters/count'
1493 - $ref: '#/components/parameters/sort'
1494 responses:
1495 '200':
1496 description: successful operation
1497 content:
1498 application/json:
1499 schema:
1500 type: array
1501 items:
1502 $ref: '#/components/schemas/VideoPlaylist'
1503 post:
1504 summary: Create a video playlist
1505 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1506 security:
1507 - OAuth2: []
1508 tags:
1509 - Video Playlists
1510 responses:
1511 '200':
1512 description: successful operation
1513 content:
1514 application/json:
1515 schema:
1516 type: object
1517 properties:
1518 videoPlaylist:
1519 type: object
1520 properties:
1521 id:
1522 type: number
1523 uuid:
1524 type: string
1525 requestBody:
1526 content:
1527 multipart/form-data:
1528 schema:
1529 type: object
1530 properties:
1531 displayName:
1532 description: Video playlist display name
1533 type: string
1534 thumbnailfile:
1535 description: Video playlist thumbnail file
1536 type: string
1537 format: binary
1538 privacy:
1539 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1540 description:
1541 description: Video playlist description
1542 type: string
1543 videoChannelId:
1544 description: Video channel in which the playlist will be published
1545 type: number
1546 required:
1547 - displayName
1548
1549 /video-playlists/{id}:
1550 get:
1551 summary: Get a video playlist
1552 tags:
1553 - Video Playlists
1554 parameters:
1555 - $ref: '#/components/parameters/idOrUUID'
1556 responses:
1557 '200':
1558 description: successful operation
1559 content:
1560 application/json:
1561 schema:
1562 $ref: '#/components/schemas/VideoPlaylist'
1563 put:
1564 summary: Update a video playlist
1565 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1566 security:
1567 - OAuth2: []
1568 tags:
1569 - Video Playlists
1570 responses:
1571 '204':
1572 description: successful operation
1573 parameters:
1574 - $ref: '#/components/parameters/idOrUUID'
1575 requestBody:
1576 content:
1577 multipart/form-data:
1578 schema:
1579 type: object
1580 properties:
1581 displayName:
1582 description: Video playlist display name
1583 type: string
1584 thumbnailfile:
1585 description: Video playlist thumbnail file
1586 type: string
1587 format: binary
1588 privacy:
1589 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1590 description:
1591 description: Video playlist description
1592 type: string
1593 videoChannelId:
1594 description: Video channel in which the playlist will be published
1595 type: number
1596 delete:
1597 summary: Delete a video playlist
1598 security:
1599 - OAuth2: []
1600 tags:
1601 - Video Playlists
1602 parameters:
1603 - $ref: '#/components/parameters/idOrUUID'
1604 responses:
1605 '204':
1606 description: successful operation
1607
1608 /video-playlists/{id}/videos:
1609 get:
1610 summary: 'List videos of a playlist'
1611 tags:
1612 - Videos
1613 - Video Playlists
1614 parameters:
1615 - $ref: '#/components/parameters/idOrUUID'
1616 responses:
1617 '200':
1618 description: successful operation
1619 content:
1620 application/json:
1621 schema:
1622 $ref: '#/components/schemas/VideoListResponse'
1623 post:
1624 summary: 'Add a video in a playlist'
1625 security:
1626 - OAuth2: []
1627 tags:
1628 - Videos
1629 - Video Playlists
1630 parameters:
1631 - $ref: '#/components/parameters/idOrUUID'
1632 responses:
1633 '200':
1634 description: successful operation
1635 content:
1636 application/json:
1637 schema:
1638 type: object
1639 properties:
1640 videoPlaylistElement:
1641 type: object
1642 properties:
1643 id:
1644 type: number
1645 requestBody:
1646 content:
1647 application/json:
1648 schema:
1649 type: object
1650 properties:
1651 videoId:
1652 type: number
1653 description: 'Video to add in the playlist'
1654 startTimestamp:
1655 type: number
1656 description: 'Start the video at this specific timestamp (in seconds)'
1657 stopTimestamp:
1658 type: number
1659 description: 'Stop the video at this specific timestamp (in seconds)'
1660 required:
1661 - videoId
1662
1663 /video-playlists/{id}/videos/reorder:
1664 post:
1665 summary: 'Reorder a playlist'
1666 security:
1667 - OAuth2: []
1668 tags:
1669 - Video Playlists
1670 parameters:
1671 - $ref: '#/components/parameters/idOrUUID'
1672 responses:
1673 '204':
1674 description: successful operation
1675 requestBody:
1676 content:
1677 application/json:
1678 schema:
1679 type: object
1680 properties:
1681 startPosition:
1682 type: number
1683 description: 'Start position of the element to reorder (starts from 1)'
1684 insertAfterPosition:
1685 type: number
1686 description: 'New position for the block to reorder (starts from 0, to add the block before the first element)'
1687 reorderLength:
1688 type: number
1689 description: 'How many element from startPosition to reorder (minimum length is 1)'
1690 required:
1691 - startPosition
1692 - insertAfterPosition
1693
1694 /video-playlists/{id}/videos/:playlistElementId:
1695 put:
1696 summary: 'Update a playlist element'
1697 security:
1698 - OAuth2: []
1699 tags:
1700 - Video Playlists
1701 parameters:
1702 - $ref: '#/components/parameters/idOrUUID'
1703 - $ref: '#/components/parameters/playlistElementId'
1704 responses:
1705 '204':
1706 description: successful operation
1707 requestBody:
1708 content:
1709 application/json:
1710 schema:
1711 type: object
1712 properties:
1713 startTimestamp:
1714 type: number
1715 description: 'Start the video at this specific timestamp (in seconds)'
1716 stopTimestamp:
1717 type: number
1718 description: 'Stop the video at this specific timestamp (in seconds)'
1719 delete:
1720 summary: 'Delete an element from a playlist'
1721 security:
1722 - OAuth2: []
1723 tags:
1724 - Video Playlists
1725 parameters:
1726 - $ref: '#/components/parameters/idOrUUID'
1727 - $ref: '#/components/parameters/playlistElementId'
1728 responses:
1729 '204':
1730 description: successful operation
1731
1732 '/accounts/{name}/video-channels':
1733 get:
1734 summary: List video channels of an account
1735 tags:
1736 - Video Channels
1737 - Accounts
1738 parameters:
1739 - $ref: '#/components/parameters/name'
1740 responses:
1741 '200':
1742 description: successful operation
1743 content:
1744 application/json:
1745 schema:
1746 type: array
1747 items:
1748 $ref: '#/components/schemas/VideoChannel'
1749 '/accounts/{name}/ratings':
1750 get:
1751 summary: List ratings of an account
1752 security:
1753 - OAuth2: []
1754 tags:
1755 - Accounts
1756 parameters:
1757 - $ref: '#/components/parameters/name'
1758 - $ref: '#/components/parameters/start'
1759 - $ref: '#/components/parameters/count'
1760 - $ref: '#/components/parameters/sort'
1761 - name: rating
1762 in: query
1763 required: false
1764 description: Optionally filter which ratings to retrieve
1765 schema:
1766 type: string
1767 enum:
1768 - like
1769 - dislike
1770 responses:
1771 '200':
1772 description: successful operation
1773 content:
1774 application/json:
1775 schema:
1776 type: array
1777 items:
1778 $ref: '#/components/schemas/VideoRating'
1779 '/videos/{id}/comment-threads':
1780 get:
1781 summary: List threads of a video
1782 tags:
1783 - Video Comments
1784 parameters:
1785 - $ref: '#/components/parameters/idOrUUID'
1786 - $ref: '#/components/parameters/start'
1787 - $ref: '#/components/parameters/count'
1788 - $ref: '#/components/parameters/commentsSort'
1789 responses:
1790 '200':
1791 description: successful operation
1792 content:
1793 application/json:
1794 schema:
1795 $ref: '#/components/schemas/CommentThreadResponse'
1796 post:
1797 summary: Create a thread
1798 security:
1799 - OAuth2: []
1800 tags:
1801 - Video Comments
1802 parameters:
1803 - $ref: '#/components/parameters/idOrUUID'
1804 responses:
1805 '200':
1806 description: successful operation
1807 content:
1808 application/json:
1809 schema:
1810 $ref: '#/components/schemas/CommentThreadPostResponse'
1811 '/videos/{id}/comment-threads/{threadId}':
1812 get:
1813 summary: Get a thread
1814 tags:
1815 - Video Comments
1816 parameters:
1817 - $ref: '#/components/parameters/idOrUUID'
1818 - $ref: '#/components/parameters/threadId'
1819 responses:
1820 '200':
1821 description: successful operation
1822 content:
1823 application/json:
1824 schema:
1825 $ref: '#/components/schemas/VideoCommentThreadTree'
1826 '/videos/{id}/comments/{commentId}':
1827 post:
1828 summary: Reply to a thread of a video
1829 security:
1830 - OAuth2: []
1831 tags:
1832 - Video Comments
1833 parameters:
1834 - $ref: '#/components/parameters/idOrUUID'
1835 - $ref: '#/components/parameters/commentId'
1836 responses:
1837 '200':
1838 description: successful operation
1839 content:
1840 application/json:
1841 schema:
1842 $ref: '#/components/schemas/CommentThreadPostResponse'
1843 delete:
1844 summary: Delete a comment or a reply
1845 security:
1846 - OAuth2: []
1847 tags:
1848 - Video Comments
1849 parameters:
1850 - $ref: '#/components/parameters/idOrUUID'
1851 - $ref: '#/components/parameters/commentId'
1852 responses:
1853 '204':
1854 description: successful operation
1855 '/videos/{id}/rate':
1856 put:
1857 summary: Like/dislike a video
1858 security:
1859 - OAuth2: []
1860 tags:
1861 - Video Rates
1862 parameters:
1863 - $ref: '#/components/parameters/idOrUUID'
1864 responses:
1865 '204':
1866 description: successful operation
1867 /search/videos:
1868 get:
1869 tags:
1870 - Search
1871 summary: Search videos
1872 parameters:
1873 - $ref: '#/components/parameters/start'
1874 - $ref: '#/components/parameters/count'
1875 - $ref: '#/components/parameters/videosSearchSort'
1876 - name: search
1877 in: query
1878 required: true
1879 description: String to search
1880 schema:
1881 type: string
1882 responses:
1883 '200':
1884 description: successful operation
1885 content:
1886 application/json:
1887 schema:
1888 $ref: '#/components/schemas/VideoListResponse'
1889 servers:
1890 - url: 'https://peertube.cpy.re/api/v1'
1891 description: Live Test Server (live data - stable version)
1892 - url: 'https://peertube2.cpy.re/api/v1'
1893 description: Live Test Server (live data - latest nighlty version)
1894 - url: 'https://peertube3.cpy.re/api/v1'
1895 description: Live Test Server (live data - latest RC version)
1896 components:
1897 parameters:
1898 start:
1899 name: start
1900 in: query
1901 required: false
1902 description: Offset
1903 schema:
1904 type: number
1905 count:
1906 name: count
1907 in: query
1908 required: false
1909 description: Number of items
1910 schema:
1911 type: number
1912 sort:
1913 name: sort
1914 in: query
1915 required: false
1916 description: Sort column (-createdAt for example)
1917 schema:
1918 type: string
1919 videosSort:
1920 name: sort
1921 in: query
1922 required: false
1923 description: Sort videos by criteria
1924 schema:
1925 type: string
1926 enum:
1927 - -name
1928 - -duration
1929 - -createdAt
1930 - -publishedAt
1931 - -views
1932 - -likes
1933 - -trending
1934 videosSearchSort:
1935 name: sort
1936 in: query
1937 required: false
1938 description: Sort videos by criteria
1939 schema:
1940 type: string
1941 enum:
1942 - -name
1943 - -duration
1944 - -createdAt
1945 - -publishedAt
1946 - -views
1947 - -likes
1948 - -match
1949 commentsSort:
1950 name: sort
1951 in: query
1952 required: false
1953 description: Sort comments by criteria
1954 schema:
1955 type: string
1956 enum:
1957 - -createdAt
1958 - -totalReplies
1959 blacklistsSort:
1960 name: sort
1961 in: query
1962 required: false
1963 description: Sort blacklists by criteria
1964 schema:
1965 type: string
1966 enum:
1967 - -id
1968 - -name
1969 - -duration
1970 - -views
1971 - -likes
1972 - -dislikes
1973 - -uuid
1974 - -createdAt
1975 usersSort:
1976 name: sort
1977 in: query
1978 required: false
1979 description: Sort users by criteria
1980 schema:
1981 type: string
1982 enum:
1983 - -id
1984 - -username
1985 - -createdAt
1986 abusesSort:
1987 name: sort
1988 in: query
1989 required: false
1990 description: Sort abuses by criteria
1991 schema:
1992 type: string
1993 enum:
1994 - -id
1995 - -createdAt
1996 - -state
1997 name:
1998 name: name
1999 in: path
2000 required: true
2001 description: >-
2002 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
2003 example)
2004 schema:
2005 type: string
2006 id:
2007 name: id
2008 in: path
2009 required: true
2010 description: The user id
2011 schema:
2012 type: number
2013 idOrUUID:
2014 name: id
2015 in: path
2016 required: true
2017 description: The object id or uuid
2018 schema:
2019 type: string
2020 playlistElementId:
2021 name: playlistElementId
2022 in: path
2023 required: true
2024 description: Playlist element id
2025 schema:
2026 type: number
2027 abuseId:
2028 name: abuseId
2029 in: path
2030 required: true
2031 description: Video abuse id
2032 schema:
2033 type: number
2034 captionLanguage:
2035 name: captionLanguage
2036 in: path
2037 required: true
2038 description: The caption language
2039 schema:
2040 type: string
2041 channelHandle:
2042 name: channelHandle
2043 in: path
2044 required: true
2045 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
2046 schema:
2047 type: string
2048 subscriptionHandle:
2049 name: subscriptionHandle
2050 in: path
2051 required: true
2052 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
2053 schema:
2054 type: string
2055 threadId:
2056 name: threadId
2057 in: path
2058 required: true
2059 description: The thread id (root comment id)
2060 schema:
2061 type: number
2062 commentId:
2063 name: commentId
2064 in: path
2065 required: true
2066 description: The comment id
2067 schema:
2068 type: number
2069 categoryOneOf:
2070 name: categoryOneOf
2071 in: query
2072 required: false
2073 description: category id of the video
2074 schema:
2075 oneOf:
2076 - type: number
2077 - type: array
2078 items:
2079 type: number
2080 style: form
2081 explode: false
2082 tagsOneOf:
2083 name: tagsOneOf
2084 in: query
2085 required: false
2086 description: tag(s) of the video
2087 schema:
2088 oneOf:
2089 - type: string
2090 - type: array
2091 items:
2092 type: string
2093 style: form
2094 explode: false
2095 tagsAllOf:
2096 name: tagsAllOf
2097 in: query
2098 required: false
2099 description: tag(s) of the video, where all should be present in the video
2100 schema:
2101 oneOf:
2102 - type: string
2103 - type: array
2104 items:
2105 type: string
2106 style: form
2107 explode: false
2108 languageOneOf:
2109 name: languageOneOf
2110 in: query
2111 required: false
2112 description: language id of the video
2113 schema:
2114 oneOf:
2115 - type: string
2116 - type: array
2117 items:
2118 type: string
2119 style: form
2120 explode: false
2121 licenceOneOf:
2122 name: licenceOneOf
2123 in: query
2124 required: false
2125 description: licence id of the video
2126 schema:
2127 oneOf:
2128 - type: number
2129 - type: array
2130 items:
2131 type: number
2132 style: form
2133 explode: false
2134 nsfw:
2135 name: nsfw
2136 in: query
2137 required: false
2138 description: whether to include nsfw videos, if any
2139 schema:
2140 type: string
2141 enum:
2142 - 'true'
2143 - 'false'
2144 filter:
2145 name: filter
2146 in: query
2147 required: false
2148 description: >
2149 Special filters (local for instance) which might require special rights:
2150 * `local` - only videos local to the instance
2151 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2152 schema:
2153 type: string
2154 enum:
2155 - local
2156 - all-local
2157 subscriptionsUris:
2158 name: uris
2159 in: query
2160 required: true
2161 description: list of uris to check if each is part of the user subscriptions
2162 schema:
2163 type: array
2164 items:
2165 type: string
2166 securitySchemes:
2167 OAuth2:
2168 description: >
2169 In the header: *Authorization: Bearer <token\>*
2170
2171
2172 Authenticating via OAuth requires the following steps:
2173
2174
2175 - Have an account with sufficient authorization levels
2176
2177 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2178 Bearer Token
2179
2180 - Make Authenticated Requests
2181 type: oauth2
2182 flows:
2183 password:
2184 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2185 scopes:
2186 admin: Admin scope
2187 moderator: Moderator scope
2188 user: User scope
2189 schemas:
2190 VideoConstantNumber:
2191 properties:
2192 id:
2193 type: number
2194 label:
2195 type: string
2196 VideoConstantString:
2197 properties:
2198 id:
2199 type: string
2200 label:
2201 type: string
2202
2203 VideoPlaylistPrivacySet:
2204 type: integer
2205 enum:
2206 - 1
2207 - 2
2208 - 3
2209 description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)'
2210 VideoPlaylistPrivacyConstant:
2211 properties:
2212 id:
2213 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2214 label:
2215 type: string
2216
2217 VideoPlaylistTypeSet:
2218 type: integer
2219 enum:
2220 - 1
2221 - 2
2222 description: 'The video playlist type (Regular = 1, Watch Later = 2)'
2223 VideoPlaylistTypeConstant:
2224 properties:
2225 id:
2226 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2227 label:
2228 type: string
2229
2230 VideoPrivacySet:
2231 type: integer
2232 enum:
2233 - 1
2234 - 2
2235 - 3
2236 - 4
2237 description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)'
2238 VideoPrivacyConstant:
2239 properties:
2240 id:
2241 $ref: '#/components/schemas/VideoPrivacySet'
2242 label:
2243 type: string
2244
2245 VideoStateConstant:
2246 properties:
2247 id:
2248 type: integer
2249 enum:
2250 - 1
2251 - 2
2252 - 3
2253 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
2254 label:
2255 type: string
2256
2257 VideoAbuseStateSet:
2258 type: integer
2259 enum:
2260 - 1
2261 - 2
2262 - 3
2263 description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)'
2264 VideoAbuseStateConstant:
2265 properties:
2266 id:
2267 $ref: '#/components/schemas/VideoAbuseStateSet'
2268 label:
2269 type: string
2270
2271 VideoResolutionConstant:
2272 properties:
2273 id:
2274 type: integer
2275 description: 'Video resolution (240, 360, 720 ...)'
2276 label:
2277 type: string
2278 VideoScheduledUpdate:
2279 properties:
2280 privacy:
2281 $ref: '#/components/schemas/VideoPrivacySet'
2282 updateAt:
2283 type: string
2284 format: date
2285 description: When to update the video
2286 required:
2287 - updateAt
2288 AccountSummary:
2289 properties:
2290 id:
2291 type: number
2292 name:
2293 type: string
2294 displayName:
2295 type: string
2296 url:
2297 type: string
2298 host:
2299 type: string
2300 avatar:
2301 nullable: true
2302 allOf:
2303 - $ref: '#/components/schemas/Avatar'
2304 VideoChannelSummary:
2305 properties:
2306 id:
2307 type: number
2308 name:
2309 type: string
2310 displayName:
2311 type: string
2312 url:
2313 type: string
2314 host:
2315 type: string
2316 avatar:
2317 nullable: true
2318 allOf:
2319 - $ref: '#/components/schemas/Avatar'
2320 PlaylistElement:
2321 properties:
2322 position:
2323 type: number
2324 startTimestamp:
2325 type: number
2326 stopTimestamp:
2327 type: number
2328 video:
2329 nullable: true
2330 allOf:
2331 - $ref: '#/components/schemas/Video'
2332 VideoFile:
2333 properties:
2334 magnetUri:
2335 type: string
2336 resolution:
2337 $ref: '#/components/schemas/VideoResolutionConstant'
2338 size:
2339 type: number
2340 description: 'Video file size in bytes'
2341 torrentUrl:
2342 type: string
2343 torrentDownloadUrl:
2344 type: string
2345 fileUrl:
2346 type: string
2347 fileDownloadUrl:
2348 type: string
2349 fps:
2350 type: number
2351 VideoStreamingPlaylists:
2352 properties:
2353 id:
2354 type: number
2355 type:
2356 type: number
2357 enum:
2358 - 1
2359 description: 'Playlist type (HLS = 1)'
2360 playlistUrl:
2361 type: string
2362 segmentsSha256Url:
2363 type: string
2364 redundancies:
2365 type: array
2366 items:
2367 type: object
2368 properties:
2369 baseUrl:
2370 type: string
2371 Video:
2372 properties:
2373 id:
2374 type: number
2375 uuid:
2376 type: string
2377 createdAt:
2378 type: string
2379 publishedAt:
2380 type: string
2381 updatedAt:
2382 type: string
2383 originallyPublishedAt:
2384 type: string
2385 category:
2386 $ref: '#/components/schemas/VideoConstantNumber'
2387 licence:
2388 $ref: '#/components/schemas/VideoConstantNumber'
2389 language:
2390 $ref: '#/components/schemas/VideoConstantString'
2391 privacy:
2392 $ref: '#/components/schemas/VideoPrivacyConstant'
2393 description:
2394 type: string
2395 duration:
2396 type: number
2397 isLocal:
2398 type: boolean
2399 name:
2400 type: string
2401 thumbnailPath:
2402 type: string
2403 previewPath:
2404 type: string
2405 embedPath:
2406 type: string
2407 views:
2408 type: number
2409 likes:
2410 type: number
2411 dislikes:
2412 type: number
2413 nsfw:
2414 type: boolean
2415 waitTranscoding:
2416 type: boolean
2417 nullable: true
2418 state:
2419 $ref: '#/components/schemas/VideoStateConstant'
2420 scheduledUpdate:
2421 nullable: true
2422 allOf:
2423 - $ref: '#/components/schemas/VideoScheduledUpdate'
2424 blacklisted:
2425 nullable: true
2426 type: boolean
2427 blacklistedReason:
2428 nullable: true
2429 type: string
2430 account:
2431 $ref: '#/components/schemas/AccountSummary'
2432 channel:
2433 $ref: '#/components/schemas/VideoChannelSummary'
2434 userHistory:
2435 nullable: true
2436 type: object
2437 properties:
2438 currentTime:
2439 type: number
2440 VideoDetails:
2441 allOf:
2442 - $ref: '#/components/schemas/Video'
2443 - type: object
2444 properties:
2445 descriptionPath:
2446 type: string
2447 support:
2448 type: string
2449 channel:
2450 $ref: '#/components/schemas/VideoChannel'
2451 account:
2452 $ref: '#/components/schemas/Account'
2453 tags:
2454 type: array
2455 items:
2456 type: string
2457 files:
2458 type: array
2459 items:
2460 $ref: '#/components/schemas/VideoFile'
2461 commentsEnabled:
2462 type: boolean
2463 downloadEnabled:
2464 type: boolean
2465 trackerUrls:
2466 type: array
2467 items:
2468 type: string
2469 streamingPlaylists:
2470 type: array
2471 items:
2472 $ref: '#/components/schemas/VideoStreamingPlaylists'
2473 VideoImportStateConstant:
2474 properties:
2475 id:
2476 type: integer
2477 enum:
2478 - 1
2479 - 2
2480 - 3
2481 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2482 label:
2483 type: string
2484 VideoImport:
2485 properties:
2486 id:
2487 type: number
2488 targetUrl:
2489 type: string
2490 magnetUri:
2491 type: string
2492 torrentName:
2493 type: string
2494 state:
2495 type: object
2496 properties:
2497 id:
2498 $ref: '#/components/schemas/VideoImportStateConstant'
2499 label:
2500 type: string
2501 error:
2502 type: string
2503 createdAt:
2504 type: string
2505 updatedAt:
2506 type: string
2507 video:
2508 $ref: '#/components/schemas/Video'
2509 VideoAbuse:
2510 properties:
2511 id:
2512 type: number
2513 reason:
2514 type: string
2515 reporterAccount:
2516 $ref: '#/components/schemas/Account'
2517 state:
2518 $ref: '#/components/schemas/VideoAbuseStateConstant'
2519 moderationComment:
2520 type: string
2521 video:
2522 type: object
2523 properties:
2524 id:
2525 type: number
2526 name:
2527 type: string
2528 uuid:
2529 type: string
2530 createdAt:
2531 type: string
2532 VideoBlacklist:
2533 properties:
2534 id:
2535 type: number
2536 videoId:
2537 type: number
2538 createdAt:
2539 type: string
2540 updatedAt:
2541 type: string
2542 name:
2543 type: string
2544 uuid:
2545 type: string
2546 description:
2547 type: string
2548 duration:
2549 type: number
2550 views:
2551 type: number
2552 likes:
2553 type: number
2554 dislikes:
2555 type: number
2556 nsfw:
2557 type: boolean
2558 VideoChannel:
2559 properties:
2560 displayName:
2561 type: string
2562 description:
2563 type: string
2564 isLocal:
2565 type: boolean
2566 ownerAccount:
2567 type: object
2568 properties:
2569 id:
2570 type: number
2571 uuid:
2572 type: string
2573 VideoPlaylist:
2574 properties:
2575 id:
2576 type: number
2577 createdAt:
2578 type: string
2579 updatedAt:
2580 type: string
2581 description:
2582 type: string
2583 uuid:
2584 type: string
2585 displayName:
2586 type: string
2587 isLocal:
2588 type: boolean
2589 videoLength:
2590 type: number
2591 thumbnailPath:
2592 type: string
2593 privacy:
2594 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
2595 type:
2596 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
2597 ownerAccount:
2598 $ref: '#/components/schemas/AccountSummary'
2599 videoChannel:
2600 $ref: '#/components/schemas/VideoChannelSummary'
2601 VideoComment:
2602 properties:
2603 id:
2604 type: number
2605 url:
2606 type: string
2607 text:
2608 type: string
2609 threadId:
2610 type: number
2611 inReplyToCommentId:
2612 type: number
2613 videoId:
2614 type: number
2615 createdAt:
2616 type: string
2617 updatedAt:
2618 type: string
2619 totalRepliesFromVideoAuthor:
2620 type: number
2621 totalReplies:
2622 type: number
2623 account:
2624 $ref: '#/components/schemas/Account'
2625 VideoCommentThreadTree:
2626 properties:
2627 comment:
2628 $ref: '#/components/schemas/VideoComment'
2629 children:
2630 type: array
2631 items:
2632 $ref: '#/components/schemas/VideoCommentThreadTree'
2633 VideoCaption:
2634 properties:
2635 language:
2636 $ref: '#/components/schemas/VideoConstantString'
2637 captionPath:
2638 type: string
2639 Avatar:
2640 properties:
2641 path:
2642 type: string
2643 createdAt:
2644 type: string
2645 updatedAt:
2646 type: string
2647 Actor:
2648 properties:
2649 id:
2650 type: number
2651 url:
2652 type: string
2653 name:
2654 type: string
2655 host:
2656 type: string
2657 followingCount:
2658 type: number
2659 followersCount:
2660 type: number
2661 createdAt:
2662 type: string
2663 updatedAt:
2664 type: string
2665 avatar:
2666 $ref: '#/components/schemas/Avatar'
2667 Account:
2668 allOf:
2669 - $ref: '#/components/schemas/Actor'
2670 - properties:
2671 userId:
2672 type: string
2673 displayName:
2674 type: string
2675 description:
2676 type: string
2677 User:
2678 properties:
2679 id:
2680 type: number
2681 username:
2682 type: string
2683 email:
2684 type: string
2685 displayNSFW:
2686 type: boolean
2687 autoPlayVideo:
2688 type: boolean
2689 role:
2690 type: integer
2691 enum:
2692 - 0
2693 - 1
2694 - 2
2695 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2696 roleLabel:
2697 type: string
2698 enum:
2699 - User
2700 - Moderator
2701 - Administrator
2702 videoQuota:
2703 type: number
2704 videoQuotaDaily:
2705 type: number
2706 createdAt:
2707 type: string
2708 account:
2709 $ref: '#/components/schemas/Account'
2710 videoChannels:
2711 type: array
2712 items:
2713 $ref: '#/components/schemas/VideoChannel'
2714 UserWatchingVideo:
2715 properties:
2716 currentTime:
2717 type: number
2718 ServerConfig:
2719 properties:
2720 instance:
2721 type: object
2722 properties:
2723 name:
2724 type: string
2725 shortDescription:
2726 type: string
2727 defaultClientRoute:
2728 type: string
2729 isNSFW:
2730 type: boolean
2731 defaultNSFWPolicy:
2732 type: string
2733 customizations:
2734 type: object
2735 properties:
2736 javascript:
2737 type: string
2738 css:
2739 type: string
2740 search:
2741 type: object
2742 properties:
2743 remoteUri:
2744 type: object
2745 properties:
2746 users:
2747 type: boolean
2748 anonymous:
2749 type: boolean
2750 plugin:
2751 type: object
2752 properties:
2753 registered:
2754 type: array
2755 items:
2756 type: string
2757 theme:
2758 type: object
2759 properties:
2760 registered:
2761 type: array
2762 items:
2763 type: string
2764 email:
2765 type: object
2766 properties:
2767 enabled:
2768 type: boolean
2769 contactForm:
2770 type: object
2771 properties:
2772 enabled:
2773 type: boolean
2774 serverVersion:
2775 type: string
2776 serverCommit:
2777 type: string
2778 signup:
2779 type: object
2780 properties:
2781 allowed:
2782 type: boolean
2783 allowedForCurrentIP:
2784 type: boolean
2785 requiresEmailVerification:
2786 type: boolean
2787 transcoding:
2788 type: object
2789 properties:
2790 hls:
2791 type: object
2792 properties:
2793 enabled:
2794 type: boolean
2795 webtorrent:
2796 type: object
2797 properties:
2798 enabled:
2799 type: boolean
2800 enabledResolutions:
2801 type: array
2802 items:
2803 type: number
2804 import:
2805 type: object
2806 properties:
2807 videos:
2808 type: object
2809 properties:
2810 http:
2811 type: object
2812 properties:
2813 enabled:
2814 type: boolean
2815 torrent:
2816 type: object
2817 properties:
2818 enabled:
2819 type: boolean
2820 autoBlacklist:
2821 type: object
2822 properties:
2823 videos:
2824 type: object
2825 properties:
2826 ofUsers:
2827 type: object
2828 properties:
2829 enabled:
2830 type: boolean
2831 avatar:
2832 type: object
2833 properties:
2834 file:
2835 type: object
2836 properties:
2837 size:
2838 type: object
2839 properties:
2840 max:
2841 type: number
2842 extensions:
2843 type: array
2844 items:
2845 type: string
2846 video:
2847 type: object
2848 properties:
2849 image:
2850 type: object
2851 properties:
2852 extensions:
2853 type: array
2854 items:
2855 type: string
2856 size:
2857 type: object
2858 properties:
2859 max:
2860 type: number
2861 file:
2862 type: object
2863 properties:
2864 extensions:
2865 type: array
2866 items:
2867 type: string
2868 videoCaption:
2869 type: object
2870 properties:
2871 file:
2872 type: object
2873 properties:
2874 size:
2875 type: object
2876 properties:
2877 max:
2878 type: number
2879 extensions:
2880 type: array
2881 items:
2882 type: string
2883 user:
2884 type: object
2885 properties:
2886 videoQuota:
2887 type: number
2888 videoQuotaDaily:
2889 type: number
2890 trending:
2891 type: object
2892 properties:
2893 videos:
2894 type: object
2895 properties:
2896 intervalDays:
2897 type: number
2898 tracker:
2899 type: object
2900 properties:
2901 enabled:
2902 type: boolean
2903 followings:
2904 type: object
2905 properties:
2906 instance:
2907 type: object
2908 properties:
2909 autoFollowIndex:
2910 type: object
2911 properties:
2912 indexUrl:
2913 type: string
2914 ServerConfigAbout:
2915 properties:
2916 instance:
2917 type: object
2918 properties:
2919 name:
2920 type: string
2921 shortDescription:
2922 type: string
2923 description:
2924 type: string
2925 terms:
2926 type: string
2927 ServerConfigCustom:
2928 properties:
2929 instance:
2930 type: object
2931 properties:
2932 name:
2933 type: string
2934 shortDescription:
2935 type: string
2936 description:
2937 type: string
2938 terms:
2939 type: string
2940 defaultClientRoute:
2941 type: string
2942 isNSFW:
2943 type: boolean
2944 defaultNSFWPolicy:
2945 type: string
2946 customizations:
2947 type: object
2948 properties:
2949 javascript:
2950 type: string
2951 css:
2952 type: string
2953 theme:
2954 type: object
2955 properties:
2956 default:
2957 type: string
2958 services:
2959 type: object
2960 properties:
2961 twitter:
2962 type: object
2963 properties:
2964 username:
2965 type: string
2966 whitelisted:
2967 type: boolean
2968 cache:
2969 type: object
2970 properties:
2971 previews:
2972 type: object
2973 properties:
2974 size:
2975 type: number
2976 captions:
2977 type: object
2978 properties:
2979 size:
2980 type: number
2981 signup:
2982 type: object
2983 properties:
2984 enabled:
2985 type: boolean
2986 limit:
2987 type: number
2988 requiresEmailVerification:
2989 type: boolean
2990 admin:
2991 type: object
2992 properties:
2993 email:
2994 type: string
2995 contactForm:
2996 type: object
2997 properties:
2998 enabled:
2999 type: boolean
3000 user:
3001 type: object
3002 properties:
3003 videoQuota:
3004 type: number
3005 videoQuotaDaily:
3006 type: number
3007 transcoding:
3008 type: object
3009 properties:
3010 enabled:
3011 type: boolean
3012 allowAdditionalExtensions:
3013 type: boolean
3014 allowAudioFiles:
3015 type: boolean
3016 threads:
3017 type: number
3018 resolutions:
3019 type: object
3020 properties:
3021 240p:
3022 type: boolean
3023 360p:
3024 type: boolean
3025 480p:
3026 type: boolean
3027 720p:
3028 type: boolean
3029 1080p:
3030 type: boolean
3031 2160p:
3032 type: boolean
3033 hls:
3034 type: object
3035 properties:
3036 enabled:
3037 type: boolean
3038 import:
3039 type: object
3040 properties:
3041 videos:
3042 type: object
3043 properties:
3044 http:
3045 type: object
3046 properties:
3047 enabled:
3048 type: boolean
3049 torrent:
3050 type: object
3051 properties:
3052 enabled:
3053 type: boolean
3054 autoBlacklist:
3055 type: object
3056 properties:
3057 videos:
3058 type: object
3059 properties:
3060 ofUsers:
3061 type: object
3062 properties:
3063 enabled:
3064 type: boolean
3065 followers:
3066 type: object
3067 properties:
3068 instance:
3069 type: object
3070 properties:
3071 enabled:
3072 type: boolean
3073 manualApproval:
3074 type: boolean
3075 Follow:
3076 properties:
3077 id:
3078 type: number
3079 follower:
3080 $ref: '#/components/schemas/Actor'
3081 following:
3082 $ref: '#/components/schemas/Actor'
3083 score:
3084 type: number
3085 state:
3086 type: string
3087 enum:
3088 - pending
3089 - accepted
3090 createdAt:
3091 type: string
3092 updatedAt:
3093 type: string
3094 Job:
3095 properties:
3096 id:
3097 type: number
3098 state:
3099 type: string
3100 enum:
3101 - pending
3102 - processing
3103 - error
3104 - success
3105 category:
3106 type: string
3107 enum:
3108 - transcoding
3109 - activitypub-http
3110 handlerName:
3111 type: string
3112 handlerInputData:
3113 type: string
3114 createdAt:
3115 type: string
3116 updatedAt:
3117 type: string
3118 AddUserResponse:
3119 properties:
3120 id:
3121 type: number
3122 uuid:
3123 type: string
3124 VideoUploadResponse:
3125 properties:
3126 video:
3127 type: object
3128 properties:
3129 id:
3130 type: number
3131 uuid:
3132 type: string
3133 CommentThreadResponse:
3134 properties:
3135 total:
3136 type: number
3137 data:
3138 type: array
3139 items:
3140 $ref: '#/components/schemas/VideoComment'
3141 CommentThreadPostResponse:
3142 properties:
3143 comment:
3144 $ref: '#/components/schemas/VideoComment'
3145 VideoListResponse:
3146 properties:
3147 total:
3148 type: number
3149 data:
3150 type: array
3151 items:
3152 $ref: '#/components/schemas/Video'
3153 AddUser:
3154 properties:
3155 username:
3156 type: string
3157 description: 'The user username '
3158 password:
3159 type: string
3160 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent '
3161 email:
3162 type: string
3163 description: 'The user email '
3164 videoQuota:
3165 type: string
3166 description: 'The user videoQuota '
3167 videoQuotaDaily:
3168 type: string
3169 description: 'The user daily video quota '
3170 role:
3171 type: integer
3172 enum:
3173 - 0
3174 - 1
3175 - 2
3176 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3177 required:
3178 - username
3179 - password
3180 - email
3181 - videoQuota
3182 - videoQuotaDaily
3183 - role
3184 UpdateUser:
3185 properties:
3186 id:
3187 type: string
3188 description: 'The user id '
3189 email:
3190 type: string
3191 description: 'The updated email of the user '
3192 videoQuota:
3193 type: string
3194 description: 'The updated videoQuota of the user '
3195 videoQuotaDaily:
3196 type: string
3197 description: 'The updated daily video quota of the user '
3198 role:
3199 type: integer
3200 enum:
3201 - 0
3202 - 1
3203 - 2
3204 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3205 required:
3206 - id
3207 - email
3208 - videoQuota
3209 - videoQuotaDaily
3210 - role
3211 UpdateMe:
3212 properties:
3213 password:
3214 type: string
3215 description: 'Your new password '
3216 email:
3217 type: string
3218 description: 'Your new email '
3219 displayNSFW:
3220 type: string
3221 description: 'Your new displayNSFW '
3222 autoPlayVideo:
3223 type: string
3224 description: 'Your new autoPlayVideo '
3225 required:
3226 - password
3227 - email
3228 - displayNSFW
3229 - autoPlayVideo
3230 GetMeVideoRating:
3231 properties:
3232 id:
3233 type: string
3234 description: 'Id of the video '
3235 rating:
3236 type: number
3237 description: 'Rating of the video '
3238 required:
3239 - id
3240 - rating
3241 VideoRating:
3242 properties:
3243 video:
3244 $ref: '#/components/schemas/Video'
3245 rating:
3246 type: number
3247 description: 'Rating of the video'
3248 required:
3249 - video
3250 - rating
3251 RegisterUser:
3252 properties:
3253 username:
3254 type: string
3255 description: 'The username of the user '
3256 password:
3257 type: string
3258 description: 'The password of the user '
3259 email:
3260 type: string
3261 description: 'The email of the user '
3262 displayName:
3263 type: string
3264 description: 'The user display name'
3265 channel:
3266 type: object
3267 properties:
3268 name:
3269 type: string
3270 description: 'The default channel name'
3271 displayName:
3272 type: string
3273 description: 'The default channel display name'
3274
3275 required:
3276 - username
3277 - password
3278 - email
3279 VideoChannelCreate:
3280 properties:
3281 name:
3282 type: string
3283 displayName:
3284 type: string
3285 description:
3286 type: string
3287 support:
3288 type: string
3289 required:
3290 - name
3291 - displayName
3292 VideoChannelUpdate:
3293 properties:
3294 displayName:
3295 type: string
3296 description:
3297 type: string
3298 support:
3299 type: string
3300 bulkVideosSupportUpdate:
3301 type: boolean
3302 description: 'Update all videos support field of this channel'
3303