]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
8de9c65058e0397ace5be89a131c25b0fe1f720f
[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 Abuse
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 Abuse
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 of 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 Abuse
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 Abuse
1221 parameters:
1222 - $ref: '#/components/parameters/idOrUUID'
1223 responses:
1224 '204':
1225 description: successful operation
1226 '/videos/{id}/blacklist':
1227 post:
1228 summary: Blacklist a video
1229 security:
1230 - OAuth2:
1231 - admin
1232 - moderator
1233 tags:
1234 - Video Blacklist
1235 parameters:
1236 - $ref: '#/components/parameters/idOrUUID'
1237 responses:
1238 '204':
1239 description: successful operation
1240 delete:
1241 summary: Delete an entry of the blacklist of a video by its id
1242 security:
1243 - OAuth2:
1244 - admin
1245 - moderator
1246 tags:
1247 - Video Blacklist
1248 parameters:
1249 - $ref: '#/components/parameters/idOrUUID'
1250 responses:
1251 '204':
1252 description: successful operation
1253 /videos/blacklist:
1254 get:
1255 summary: List blacklisted videos
1256 security:
1257 - OAuth2:
1258 - admin
1259 - moderator
1260 tags:
1261 - Video Blacklist
1262 parameters:
1263 - $ref: '#/components/parameters/start'
1264 - $ref: '#/components/parameters/count'
1265 - $ref: '#/components/parameters/blacklistsSort'
1266 responses:
1267 '200':
1268 description: successful operation
1269 content:
1270 application/json:
1271 schema:
1272 type: array
1273 items:
1274 $ref: '#/components/schemas/VideoBlacklist'
1275 /videos/{id}/captions:
1276 get:
1277 summary: List captions of a video
1278 tags:
1279 - Video Caption
1280 parameters:
1281 - $ref: '#/components/parameters/idOrUUID'
1282 responses:
1283 '200':
1284 description: successful operation
1285 content:
1286 application/json:
1287 schema:
1288 type: object
1289 properties:
1290 total:
1291 type: integer
1292 data:
1293 type: array
1294 items:
1295 $ref: '#/components/schemas/VideoCaption'
1296 /videos/{id}/captions/{captionLanguage}:
1297 put:
1298 summary: Add or replace a video caption
1299 tags:
1300 - Video Caption
1301 parameters:
1302 - $ref: '#/components/parameters/idOrUUID'
1303 - $ref: '#/components/parameters/captionLanguage'
1304 requestBody:
1305 content:
1306 multipart/form-data:
1307 schema:
1308 type: object
1309 properties:
1310 captionfile:
1311 description: The file to upload.
1312 type: string
1313 format: binary
1314 encoding:
1315 captionfile:
1316 contentType: text/vtt, application/x-subrip, text/plain
1317 responses:
1318 '204':
1319 description: successful operation
1320 delete:
1321 summary: Delete a video caption
1322 tags:
1323 - Video Caption
1324 parameters:
1325 - $ref: '#/components/parameters/idOrUUID'
1326 - $ref: '#/components/parameters/captionLanguage'
1327 responses:
1328 '204':
1329 description: successful operation
1330 /video-channels:
1331 get:
1332 summary: List video channels
1333 tags:
1334 - Video Channels
1335 parameters:
1336 - $ref: '#/components/parameters/start'
1337 - $ref: '#/components/parameters/count'
1338 - $ref: '#/components/parameters/sort'
1339 responses:
1340 '200':
1341 description: successful operation
1342 content:
1343 application/json:
1344 schema:
1345 type: array
1346 items:
1347 $ref: '#/components/schemas/VideoChannel'
1348 post:
1349 summary: Create a video channel
1350 security:
1351 - OAuth2: []
1352 tags:
1353 - Video Channels
1354 responses:
1355 '204':
1356 description: successful operation
1357 requestBody:
1358 content:
1359 application/json:
1360 schema:
1361 $ref: '#/components/schemas/VideoChannelCreate'
1362 '/video-channels/{channelHandle}':
1363 get:
1364 summary: Get a video channel
1365 tags:
1366 - Video Channels
1367 parameters:
1368 - $ref: '#/components/parameters/channelHandle'
1369 responses:
1370 '200':
1371 description: successful operation
1372 content:
1373 application/json:
1374 schema:
1375 $ref: '#/components/schemas/VideoChannel'
1376 put:
1377 summary: Update a video channel
1378 security:
1379 - OAuth2: []
1380 tags:
1381 - Video Channels
1382 parameters:
1383 - $ref: '#/components/parameters/channelHandle'
1384 responses:
1385 '204':
1386 description: successful operation
1387 requestBody:
1388 content:
1389 application/json:
1390 schema:
1391 $ref: '#/components/schemas/VideoChannelUpdate'
1392 delete:
1393 summary: Delete a video channel
1394 security:
1395 - OAuth2: []
1396 tags:
1397 - Video Channels
1398 parameters:
1399 - $ref: '#/components/parameters/channelHandle'
1400 responses:
1401 '204':
1402 description: successful operation
1403 '/video-channels/{channelHandle}/videos':
1404 get:
1405 summary: List videos of a video channel
1406 tags:
1407 - Video
1408 - Video Channels
1409 parameters:
1410 - $ref: '#/components/parameters/channelHandle'
1411 responses:
1412 '200':
1413 description: successful operation
1414 content:
1415 application/json:
1416 schema:
1417 $ref: '#/components/schemas/VideoListResponse'
1418
1419 /video-playlists/privacies:
1420 get:
1421 summary: List available playlist privacies
1422 tags:
1423 - Video Playlists
1424 responses:
1425 '200':
1426 description: successful operation
1427 content:
1428 application/json:
1429 schema:
1430 type: array
1431 items:
1432 type: string
1433
1434 /video-playlists:
1435 get:
1436 summary: List video playlists
1437 tags:
1438 - Video Playlists
1439 parameters:
1440 - $ref: '#/components/parameters/start'
1441 - $ref: '#/components/parameters/count'
1442 - $ref: '#/components/parameters/sort'
1443 responses:
1444 '200':
1445 description: successful operation
1446 content:
1447 application/json:
1448 schema:
1449 type: array
1450 items:
1451 $ref: '#/components/schemas/VideoPlaylist'
1452 post:
1453 summary: Create a video playlist
1454 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
1455 security:
1456 - OAuth2: []
1457 tags:
1458 - Video Playlists
1459 responses:
1460 '200':
1461 description: successful operation
1462 content:
1463 application/json:
1464 schema:
1465 type: object
1466 properties:
1467 videoPlaylist:
1468 type: object
1469 properties:
1470 id:
1471 type: number
1472 uuid:
1473 type: string
1474 requestBody:
1475 content:
1476 multipart/form-data:
1477 schema:
1478 type: object
1479 properties:
1480 displayName:
1481 description: Video playlist display name
1482 type: string
1483 thumbnailfile:
1484 description: Video playlist thumbnail file
1485 type: string
1486 format: binary
1487 privacy:
1488 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1489 description:
1490 description: Video playlist description
1491 type: string
1492 videoChannelId:
1493 description: Video channel in which the playlist will be published
1494 type: number
1495 required:
1496 - displayName
1497
1498 /video-playlists/{id}:
1499 get:
1500 summary: Get a video playlist
1501 tags:
1502 - Video Playlists
1503 parameters:
1504 - $ref: '#/components/parameters/idOrUUID'
1505 responses:
1506 '200':
1507 description: successful operation
1508 content:
1509 application/json:
1510 schema:
1511 $ref: '#/components/schemas/VideoPlaylist'
1512 put:
1513 summary: Update a video playlist
1514 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
1515 security:
1516 - OAuth2: []
1517 tags:
1518 - Video Playlists
1519 responses:
1520 '204':
1521 description: successful operation
1522 parameters:
1523 - $ref: '#/components/parameters/idOrUUID'
1524 requestBody:
1525 content:
1526 multipart/form-data:
1527 schema:
1528 type: object
1529 properties:
1530 displayName:
1531 description: Video playlist display name
1532 type: string
1533 thumbnailfile:
1534 description: Video playlist thumbnail file
1535 type: string
1536 format: binary
1537 privacy:
1538 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
1539 description:
1540 description: Video playlist description
1541 type: string
1542 videoChannelId:
1543 description: Video channel in which the playlist will be published
1544 type: number
1545 delete:
1546 summary: Delete a video playlist
1547 security:
1548 - OAuth2: []
1549 tags:
1550 - Video Playlists
1551 parameters:
1552 - $ref: '#/components/parameters/idOrUUID'
1553 responses:
1554 '204':
1555 description: successful operation
1556
1557 /video-playlists/{id}/videos:
1558 get:
1559 summary: 'List videos of a playlist'
1560 tags:
1561 - Videos
1562 - Video Playlists
1563 parameters:
1564 - $ref: '#/components/parameters/idOrUUID'
1565 responses:
1566 '200':
1567 description: successful operation
1568 content:
1569 application/json:
1570 schema:
1571 $ref: '#/components/schemas/VideoListResponse'
1572 post:
1573 summary: 'Add a video in a playlist'
1574 security:
1575 - OAuth2: []
1576 tags:
1577 - Videos
1578 - Video Playlists
1579 parameters:
1580 - $ref: '#/components/parameters/idOrUUID'
1581 responses:
1582 '200':
1583 description: successful operation
1584 content:
1585 application/json:
1586 schema:
1587 type: object
1588 properties:
1589 videoPlaylistElement:
1590 type: object
1591 properties:
1592 id:
1593 type: number
1594 requestBody:
1595 content:
1596 application/json:
1597 schema:
1598 type: object
1599 properties:
1600 videoId:
1601 type: number
1602 description: 'Video to add in the playlist'
1603 startTimestamp:
1604 type: number
1605 description: 'Start the video at this specific timestamp (in seconds)'
1606 stopTimestamp:
1607 type: number
1608 description: 'Stop the video at this specific timestamp (in seconds)'
1609 required:
1610 - videoId
1611
1612 /video-playlists/{id}/videos/reorder:
1613 post:
1614 summary: 'Reorder a playlist'
1615 security:
1616 - OAuth2: []
1617 tags:
1618 - Video Playlists
1619 parameters:
1620 - $ref: '#/components/parameters/idOrUUID'
1621 responses:
1622 '204':
1623 description: successful operation
1624 requestBody:
1625 content:
1626 application/json:
1627 schema:
1628 type: object
1629 properties:
1630 startPosition:
1631 type: number
1632 description: 'Start position of the element to reorder (starts from 1)'
1633 insertAfterPosition:
1634 type: number
1635 description: 'New position for the block to reorder (starts from 0, to add the block before the first element)'
1636 reorderLength:
1637 type: number
1638 description: 'How many element from startPosition to reorder (minimum length is 1)'
1639 required:
1640 - startPosition
1641 - insertAfterPosition
1642
1643 /video-playlists/{id}/videos/:playlistElementId:
1644 put:
1645 summary: 'Update a playlist element'
1646 security:
1647 - OAuth2: []
1648 tags:
1649 - Video Playlists
1650 parameters:
1651 - $ref: '#/components/parameters/idOrUUID'
1652 - $ref: '#/components/parameters/playlistElementId'
1653 responses:
1654 '204':
1655 description: successful operation
1656 requestBody:
1657 content:
1658 application/json:
1659 schema:
1660 type: object
1661 properties:
1662 startTimestamp:
1663 type: number
1664 description: 'Start the video at this specific timestamp (in seconds)'
1665 stopTimestamp:
1666 type: number
1667 description: 'Stop the video at this specific timestamp (in seconds)'
1668 delete:
1669 summary: 'Delete an element from a playlist'
1670 security:
1671 - OAuth2: []
1672 tags:
1673 - Video Playlists
1674 parameters:
1675 - $ref: '#/components/parameters/idOrUUID'
1676 - $ref: '#/components/parameters/playlistElementId'
1677 responses:
1678 '204':
1679 description: successful operation
1680
1681 '/accounts/{name}/video-channels':
1682 get:
1683 summary: List video channels of an account
1684 tags:
1685 - Video Channels
1686 - Accounts
1687 parameters:
1688 - $ref: '#/components/parameters/name'
1689 responses:
1690 '200':
1691 description: successful operation
1692 content:
1693 application/json:
1694 schema:
1695 type: array
1696 items:
1697 $ref: '#/components/schemas/VideoChannel'
1698 '/accounts/{name}/ratings':
1699 get:
1700 summary: List ratings of an account
1701 security:
1702 - OAuth2: []
1703 tags:
1704 - Accounts
1705 parameters:
1706 - $ref: '#/components/parameters/name'
1707 - $ref: '#/components/parameters/start'
1708 - $ref: '#/components/parameters/count'
1709 - $ref: '#/components/parameters/sort'
1710 - name: rating
1711 in: query
1712 required: false
1713 description: Optionally filter which ratings to retrieve
1714 schema:
1715 type: string
1716 enum:
1717 - like
1718 - dislike
1719 responses:
1720 '200':
1721 description: successful operation
1722 content:
1723 application/json:
1724 schema:
1725 type: array
1726 items:
1727 $ref: '#/components/schemas/VideoRating'
1728 '/videos/{id}/comment-threads':
1729 get:
1730 summary: List threads of a video
1731 tags:
1732 - Video Comments
1733 parameters:
1734 - $ref: '#/components/parameters/idOrUUID'
1735 - $ref: '#/components/parameters/start'
1736 - $ref: '#/components/parameters/count'
1737 - $ref: '#/components/parameters/commentsSort'
1738 responses:
1739 '200':
1740 description: successful operation
1741 content:
1742 application/json:
1743 schema:
1744 $ref: '#/components/schemas/CommentThreadResponse'
1745 post:
1746 summary: Create a thread
1747 security:
1748 - OAuth2: []
1749 tags:
1750 - Video Comments
1751 parameters:
1752 - $ref: '#/components/parameters/idOrUUID'
1753 responses:
1754 '200':
1755 description: successful operation
1756 content:
1757 application/json:
1758 schema:
1759 $ref: '#/components/schemas/CommentThreadPostResponse'
1760 '/videos/{id}/comment-threads/{threadId}':
1761 get:
1762 summary: Get a thread
1763 tags:
1764 - Video Comments
1765 parameters:
1766 - $ref: '#/components/parameters/idOrUUID'
1767 - $ref: '#/components/parameters/threadId'
1768 responses:
1769 '200':
1770 description: successful operation
1771 content:
1772 application/json:
1773 schema:
1774 $ref: '#/components/schemas/VideoCommentThreadTree'
1775 '/videos/{id}/comments/{commentId}':
1776 post:
1777 summary: Reply to a thread of a video
1778 security:
1779 - OAuth2: []
1780 tags:
1781 - Video Comments
1782 parameters:
1783 - $ref: '#/components/parameters/idOrUUID'
1784 - $ref: '#/components/parameters/commentId'
1785 responses:
1786 '200':
1787 description: successful operation
1788 content:
1789 application/json:
1790 schema:
1791 $ref: '#/components/schemas/CommentThreadPostResponse'
1792 delete:
1793 summary: Delete a comment or a reply
1794 security:
1795 - OAuth2: []
1796 tags:
1797 - Video Comments
1798 parameters:
1799 - $ref: '#/components/parameters/idOrUUID'
1800 - $ref: '#/components/parameters/commentId'
1801 responses:
1802 '204':
1803 description: successful operation
1804 '/videos/{id}/rate':
1805 put:
1806 summary: Like/dislike a video
1807 security:
1808 - OAuth2: []
1809 tags:
1810 - Video Rates
1811 parameters:
1812 - $ref: '#/components/parameters/idOrUUID'
1813 responses:
1814 '204':
1815 description: successful operation
1816 /search/videos:
1817 get:
1818 tags:
1819 - Search
1820 summary: Search videos
1821 parameters:
1822 - $ref: '#/components/parameters/start'
1823 - $ref: '#/components/parameters/count'
1824 - $ref: '#/components/parameters/videosSearchSort'
1825 - name: search
1826 in: query
1827 required: true
1828 description: String to search
1829 schema:
1830 type: string
1831 responses:
1832 '200':
1833 description: successful operation
1834 content:
1835 application/json:
1836 schema:
1837 $ref: '#/components/schemas/VideoListResponse'
1838 servers:
1839 - url: 'https://peertube.cpy.re/api/v1'
1840 description: Live Test Server (live data - stable version)
1841 - url: 'https://peertube2.cpy.re/api/v1'
1842 description: Live Test Server (live data - latest nighlty version)
1843 - url: 'https://peertube3.cpy.re/api/v1'
1844 description: Live Test Server (live data - latest RC version)
1845 components:
1846 parameters:
1847 start:
1848 name: start
1849 in: query
1850 required: false
1851 description: Offset
1852 schema:
1853 type: number
1854 count:
1855 name: count
1856 in: query
1857 required: false
1858 description: Number of items
1859 schema:
1860 type: number
1861 sort:
1862 name: sort
1863 in: query
1864 required: false
1865 description: Sort column (-createdAt for example)
1866 schema:
1867 type: string
1868 videosSort:
1869 name: sort
1870 in: query
1871 required: false
1872 description: Sort videos by criteria
1873 schema:
1874 type: string
1875 enum:
1876 - -name
1877 - -duration
1878 - -createdAt
1879 - -publishedAt
1880 - -views
1881 - -likes
1882 - -trending
1883 videosSearchSort:
1884 name: sort
1885 in: query
1886 required: false
1887 description: Sort videos by criteria
1888 schema:
1889 type: string
1890 enum:
1891 - -name
1892 - -duration
1893 - -createdAt
1894 - -publishedAt
1895 - -views
1896 - -likes
1897 - -match
1898 commentsSort:
1899 name: sort
1900 in: query
1901 required: false
1902 description: Sort comments by criteria
1903 schema:
1904 type: string
1905 enum:
1906 - -createdAt
1907 - -totalReplies
1908 blacklistsSort:
1909 name: sort
1910 in: query
1911 required: false
1912 description: Sort blacklists by criteria
1913 schema:
1914 type: string
1915 enum:
1916 - -id
1917 - -name
1918 - -duration
1919 - -views
1920 - -likes
1921 - -dislikes
1922 - -uuid
1923 - -createdAt
1924 usersSort:
1925 name: sort
1926 in: query
1927 required: false
1928 description: Sort users by criteria
1929 schema:
1930 type: string
1931 enum:
1932 - -id
1933 - -username
1934 - -createdAt
1935 abusesSort:
1936 name: sort
1937 in: query
1938 required: false
1939 description: Sort abuses by criteria
1940 schema:
1941 type: string
1942 enum:
1943 - -id
1944 - -createdAt
1945 - -state
1946 name:
1947 name: name
1948 in: path
1949 required: true
1950 description: >-
1951 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
1952 example)
1953 schema:
1954 type: string
1955 id:
1956 name: id
1957 in: path
1958 required: true
1959 description: The user id
1960 schema:
1961 type: number
1962 idOrUUID:
1963 name: id
1964 in: path
1965 required: true
1966 description: The object id or uuid
1967 schema:
1968 type: string
1969 playlistElementId:
1970 name: playlistElementId
1971 in: path
1972 required: true
1973 description: Playlist element id
1974 schema:
1975 type: number
1976 captionLanguage:
1977 name: captionLanguage
1978 in: path
1979 required: true
1980 description: The caption language
1981 schema:
1982 type: string
1983 channelHandle:
1984 name: channelHandle
1985 in: path
1986 required: true
1987 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
1988 schema:
1989 type: string
1990 subscriptionHandle:
1991 name: subscriptionHandle
1992 in: path
1993 required: true
1994 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
1995 schema:
1996 type: string
1997 threadId:
1998 name: threadId
1999 in: path
2000 required: true
2001 description: The thread id (root comment id)
2002 schema:
2003 type: number
2004 commentId:
2005 name: commentId
2006 in: path
2007 required: true
2008 description: The comment id
2009 schema:
2010 type: number
2011 categoryOneOf:
2012 name: categoryOneOf
2013 in: query
2014 required: false
2015 description: category id of the video
2016 schema:
2017 oneOf:
2018 - type: number
2019 - type: array
2020 items:
2021 type: number
2022 style: form
2023 explode: false
2024 tagsOneOf:
2025 name: tagsOneOf
2026 in: query
2027 required: false
2028 description: tag(s) of the video
2029 schema:
2030 oneOf:
2031 - type: string
2032 - type: array
2033 items:
2034 type: string
2035 style: form
2036 explode: false
2037 tagsAllOf:
2038 name: tagsAllOf
2039 in: query
2040 required: false
2041 description: tag(s) of the video, where all should be present in the video
2042 schema:
2043 oneOf:
2044 - type: string
2045 - type: array
2046 items:
2047 type: string
2048 style: form
2049 explode: false
2050 languageOneOf:
2051 name: languageOneOf
2052 in: query
2053 required: false
2054 description: language id of the video
2055 schema:
2056 oneOf:
2057 - type: string
2058 - type: array
2059 items:
2060 type: string
2061 style: form
2062 explode: false
2063 licenceOneOf:
2064 name: licenceOneOf
2065 in: query
2066 required: false
2067 description: licence id of the video
2068 schema:
2069 oneOf:
2070 - type: number
2071 - type: array
2072 items:
2073 type: number
2074 style: form
2075 explode: false
2076 nsfw:
2077 name: nsfw
2078 in: query
2079 required: false
2080 description: whether to include nsfw videos, if any
2081 schema:
2082 type: string
2083 enum:
2084 - 'true'
2085 - 'false'
2086 filter:
2087 name: filter
2088 in: query
2089 required: false
2090 description: >
2091 Special filters (local for instance) which might require special rights:
2092 * `local` - only videos local to the instance
2093 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2094 schema:
2095 type: string
2096 enum:
2097 - local
2098 - all-local
2099 subscriptionsUris:
2100 name: uris
2101 in: query
2102 required: true
2103 description: list of uris to check if each is part of the user subscriptions
2104 schema:
2105 type: array
2106 items:
2107 type: string
2108 securitySchemes:
2109 OAuth2:
2110 description: >
2111 In the header: *Authorization: Bearer <token\>*
2112
2113
2114 Authenticating via OAuth requires the following steps:
2115
2116
2117 - Have an account with sufficient authorization levels
2118
2119 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2120 Bearer Token
2121
2122 - Make Authenticated Requests
2123 type: oauth2
2124 flows:
2125 password:
2126 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2127 scopes:
2128 admin: Admin scope
2129 moderator: Moderator scope
2130 user: User scope
2131 schemas:
2132 VideoConstantNumber:
2133 properties:
2134 id:
2135 type: number
2136 label:
2137 type: string
2138 VideoConstantString:
2139 properties:
2140 id:
2141 type: string
2142 label:
2143 type: string
2144
2145 VideoPlaylistPrivacySet:
2146 type: integer
2147 enum:
2148 - 1
2149 - 2
2150 - 3
2151 description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)'
2152 VideoPlaylistPrivacyConstant:
2153 properties:
2154 id:
2155 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2156 label:
2157 type: string
2158
2159 VideoPlaylistTypeSet:
2160 type: integer
2161 enum:
2162 - 1
2163 - 2
2164 description: 'The video playlist type (Regular = 1, Watch Later = 2)'
2165 VideoPlaylistTypeConstant:
2166 properties:
2167 id:
2168 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2169 label:
2170 type: string
2171
2172 VideoPrivacySet:
2173 type: integer
2174 enum:
2175 - 1
2176 - 2
2177 - 3
2178 - 4
2179 description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)'
2180 VideoPrivacyConstant:
2181 properties:
2182 id:
2183 $ref: '#/components/schemas/VideoPrivacySet'
2184 label:
2185 type: string
2186 VideoStateConstant:
2187 properties:
2188 id:
2189 type: integer
2190 enum:
2191 - 1
2192 - 2
2193 - 3
2194 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
2195 label:
2196 type: string
2197 VideoResolutionConstant:
2198 properties:
2199 id:
2200 type: integer
2201 description: 'Video resolution (240, 360, 720 ...)'
2202 label:
2203 type: string
2204 VideoScheduledUpdate:
2205 properties:
2206 privacy:
2207 $ref: '#/components/schemas/VideoPrivacySet'
2208 updateAt:
2209 type: string
2210 format: date
2211 description: When to update the video
2212 required:
2213 - updateAt
2214 AccountSummary:
2215 properties:
2216 id:
2217 type: number
2218 name:
2219 type: string
2220 displayName:
2221 type: string
2222 url:
2223 type: string
2224 host:
2225 type: string
2226 avatar:
2227 nullable: true
2228 allOf:
2229 - $ref: '#/components/schemas/Avatar'
2230 VideoChannelSummary:
2231 properties:
2232 id:
2233 type: number
2234 name:
2235 type: string
2236 displayName:
2237 type: string
2238 url:
2239 type: string
2240 host:
2241 type: string
2242 avatar:
2243 nullable: true
2244 allOf:
2245 - $ref: '#/components/schemas/Avatar'
2246 PlaylistElement:
2247 properties:
2248 position:
2249 type: number
2250 startTimestamp:
2251 type: number
2252 stopTimestamp:
2253 type: number
2254 video:
2255 nullable: true
2256 allOf:
2257 - $ref: '#/components/schemas/Video'
2258 VideoFile:
2259 properties:
2260 magnetUri:
2261 type: string
2262 resolution:
2263 $ref: '#/components/schemas/VideoResolutionConstant'
2264 size:
2265 type: number
2266 description: 'Video file size in bytes'
2267 torrentUrl:
2268 type: string
2269 torrentDownloadUrl:
2270 type: string
2271 fileUrl:
2272 type: string
2273 fileDownloadUrl:
2274 type: string
2275 fps:
2276 type: number
2277 VideoStreamingPlaylists:
2278 properties:
2279 id:
2280 type: number
2281 type:
2282 type: number
2283 enum:
2284 - 1
2285 description: 'Playlist type (HLS = 1)'
2286 playlistUrl:
2287 type: string
2288 segmentsSha256Url:
2289 type: string
2290 redundancies:
2291 type: array
2292 items:
2293 type: object
2294 properties:
2295 baseUrl:
2296 type: string
2297 Video:
2298 properties:
2299 id:
2300 type: number
2301 uuid:
2302 type: string
2303 createdAt:
2304 type: string
2305 publishedAt:
2306 type: string
2307 updatedAt:
2308 type: string
2309 originallyPublishedAt:
2310 type: string
2311 category:
2312 $ref: '#/components/schemas/VideoConstantNumber'
2313 licence:
2314 $ref: '#/components/schemas/VideoConstantNumber'
2315 language:
2316 $ref: '#/components/schemas/VideoConstantString'
2317 privacy:
2318 $ref: '#/components/schemas/VideoPrivacyConstant'
2319 description:
2320 type: string
2321 duration:
2322 type: number
2323 isLocal:
2324 type: boolean
2325 name:
2326 type: string
2327 thumbnailPath:
2328 type: string
2329 previewPath:
2330 type: string
2331 embedPath:
2332 type: string
2333 views:
2334 type: number
2335 likes:
2336 type: number
2337 dislikes:
2338 type: number
2339 nsfw:
2340 type: boolean
2341 waitTranscoding:
2342 type: boolean
2343 nullable: true
2344 state:
2345 $ref: '#/components/schemas/VideoStateConstant'
2346 scheduledUpdate:
2347 nullable: true
2348 allOf:
2349 - $ref: '#/components/schemas/VideoScheduledUpdate'
2350 blacklisted:
2351 nullable: true
2352 type: boolean
2353 blacklistedReason:
2354 nullable: true
2355 type: string
2356 account:
2357 $ref: '#/components/schemas/AccountSummary'
2358 channel:
2359 $ref: '#/components/schemas/VideoChannelSummary'
2360 userHistory:
2361 nullable: true
2362 type: object
2363 properties:
2364 currentTime:
2365 type: number
2366 VideoDetails:
2367 allOf:
2368 - $ref: '#/components/schemas/Video'
2369 - type: object
2370 properties:
2371 descriptionPath:
2372 type: string
2373 support:
2374 type: string
2375 channel:
2376 $ref: '#/components/schemas/VideoChannel'
2377 account:
2378 $ref: '#/components/schemas/Account'
2379 tags:
2380 type: array
2381 items:
2382 type: string
2383 files:
2384 type: array
2385 items:
2386 $ref: '#/components/schemas/VideoFile'
2387 commentsEnabled:
2388 type: boolean
2389 downloadEnabled:
2390 type: boolean
2391 trackerUrls:
2392 type: array
2393 items:
2394 type: string
2395 streamingPlaylists:
2396 type: array
2397 items:
2398 $ref: '#/components/schemas/VideoStreamingPlaylists'
2399 VideoImportStateConstant:
2400 properties:
2401 id:
2402 type: integer
2403 enum:
2404 - 1
2405 - 2
2406 - 3
2407 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2408 label:
2409 type: string
2410 VideoImport:
2411 properties:
2412 id:
2413 type: number
2414 targetUrl:
2415 type: string
2416 magnetUri:
2417 type: string
2418 torrentName:
2419 type: string
2420 state:
2421 type: object
2422 properties:
2423 id:
2424 $ref: '#/components/schemas/VideoImportStateConstant'
2425 label:
2426 type: string
2427 error:
2428 type: string
2429 createdAt:
2430 type: string
2431 updatedAt:
2432 type: string
2433 video:
2434 $ref: '#/components/schemas/Video'
2435 VideoAbuse:
2436 properties:
2437 id:
2438 type: number
2439 reason:
2440 type: string
2441 reporterAccount:
2442 $ref: '#/components/schemas/Account'
2443 video:
2444 type: object
2445 properties:
2446 id:
2447 type: number
2448 name:
2449 type: string
2450 uuid:
2451 type: string
2452 url:
2453 type: string
2454 createdAt:
2455 type: string
2456 VideoBlacklist:
2457 properties:
2458 id:
2459 type: number
2460 videoId:
2461 type: number
2462 createdAt:
2463 type: string
2464 updatedAt:
2465 type: string
2466 name:
2467 type: string
2468 uuid:
2469 type: string
2470 description:
2471 type: string
2472 duration:
2473 type: number
2474 views:
2475 type: number
2476 likes:
2477 type: number
2478 dislikes:
2479 type: number
2480 nsfw:
2481 type: boolean
2482 VideoChannel:
2483 properties:
2484 displayName:
2485 type: string
2486 description:
2487 type: string
2488 isLocal:
2489 type: boolean
2490 ownerAccount:
2491 type: object
2492 properties:
2493 id:
2494 type: number
2495 uuid:
2496 type: string
2497 VideoPlaylist:
2498 properties:
2499 id:
2500 type: number
2501 createdAt:
2502 type: string
2503 updatedAt:
2504 type: string
2505 description:
2506 type: string
2507 uuid:
2508 type: string
2509 displayName:
2510 type: string
2511 isLocal:
2512 type: boolean
2513 videoLength:
2514 type: number
2515 thumbnailPath:
2516 type: string
2517 privacy:
2518 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
2519 type:
2520 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
2521 ownerAccount:
2522 $ref: '#/components/schemas/AccountSummary'
2523 videoChannel:
2524 $ref: '#/components/schemas/VideoChannelSummary'
2525 VideoComment:
2526 properties:
2527 id:
2528 type: number
2529 url:
2530 type: string
2531 text:
2532 type: string
2533 threadId:
2534 type: number
2535 inReplyToCommentId:
2536 type: number
2537 videoId:
2538 type: number
2539 createdAt:
2540 type: string
2541 updatedAt:
2542 type: string
2543 totalRepliesFromVideoAuthor:
2544 type: number
2545 totalReplies:
2546 type: number
2547 account:
2548 $ref: '#/components/schemas/Account'
2549 VideoCommentThreadTree:
2550 properties:
2551 comment:
2552 $ref: '#/components/schemas/VideoComment'
2553 children:
2554 type: array
2555 items:
2556 $ref: '#/components/schemas/VideoCommentThreadTree'
2557 VideoCaption:
2558 properties:
2559 language:
2560 $ref: '#/components/schemas/VideoConstantString'
2561 captionPath:
2562 type: string
2563 Avatar:
2564 properties:
2565 path:
2566 type: string
2567 createdAt:
2568 type: string
2569 updatedAt:
2570 type: string
2571 Actor:
2572 properties:
2573 id:
2574 type: number
2575 url:
2576 type: string
2577 name:
2578 type: string
2579 host:
2580 type: string
2581 followingCount:
2582 type: number
2583 followersCount:
2584 type: number
2585 createdAt:
2586 type: string
2587 updatedAt:
2588 type: string
2589 avatar:
2590 $ref: '#/components/schemas/Avatar'
2591 Account:
2592 allOf:
2593 - $ref: '#/components/schemas/Actor'
2594 - properties:
2595 userId:
2596 type: string
2597 displayName:
2598 type: string
2599 description:
2600 type: string
2601 User:
2602 properties:
2603 id:
2604 type: number
2605 username:
2606 type: string
2607 email:
2608 type: string
2609 displayNSFW:
2610 type: boolean
2611 autoPlayVideo:
2612 type: boolean
2613 role:
2614 type: integer
2615 enum:
2616 - 0
2617 - 1
2618 - 2
2619 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2620 roleLabel:
2621 type: string
2622 enum:
2623 - User
2624 - Moderator
2625 - Administrator
2626 videoQuota:
2627 type: number
2628 videoQuotaDaily:
2629 type: number
2630 createdAt:
2631 type: string
2632 account:
2633 $ref: '#/components/schemas/Account'
2634 videoChannels:
2635 type: array
2636 items:
2637 $ref: '#/components/schemas/VideoChannel'
2638 UserWatchingVideo:
2639 properties:
2640 currentTime:
2641 type: number
2642 ServerConfig:
2643 properties:
2644 instance:
2645 type: object
2646 properties:
2647 name:
2648 type: string
2649 shortDescription:
2650 type: string
2651 defaultClientRoute:
2652 type: string
2653 isNSFW:
2654 type: boolean
2655 defaultNSFWPolicy:
2656 type: string
2657 customizations:
2658 type: object
2659 properties:
2660 javascript:
2661 type: string
2662 css:
2663 type: string
2664 search:
2665 type: object
2666 properties:
2667 remoteUri:
2668 type: object
2669 properties:
2670 users:
2671 type: boolean
2672 anonymous:
2673 type: boolean
2674 plugin:
2675 type: object
2676 properties:
2677 registered:
2678 type: array
2679 items:
2680 type: string
2681 theme:
2682 type: object
2683 properties:
2684 registered:
2685 type: array
2686 items:
2687 type: string
2688 email:
2689 type: object
2690 properties:
2691 enabled:
2692 type: boolean
2693 contactForm:
2694 type: object
2695 properties:
2696 enabled:
2697 type: boolean
2698 serverVersion:
2699 type: string
2700 serverCommit:
2701 type: string
2702 signup:
2703 type: object
2704 properties:
2705 allowed:
2706 type: boolean
2707 allowedForCurrentIP:
2708 type: boolean
2709 requiresEmailVerification:
2710 type: boolean
2711 transcoding:
2712 type: object
2713 properties:
2714 hls:
2715 type: object
2716 properties:
2717 enabled:
2718 type: boolean
2719 webtorrent:
2720 type: object
2721 properties:
2722 enabled:
2723 type: boolean
2724 enabledResolutions:
2725 type: array
2726 items:
2727 type: number
2728 import:
2729 type: object
2730 properties:
2731 videos:
2732 type: object
2733 properties:
2734 http:
2735 type: object
2736 properties:
2737 enabled:
2738 type: boolean
2739 torrent:
2740 type: object
2741 properties:
2742 enabled:
2743 type: boolean
2744 autoBlacklist:
2745 type: object
2746 properties:
2747 videos:
2748 type: object
2749 properties:
2750 ofUsers:
2751 type: object
2752 properties:
2753 enabled:
2754 type: boolean
2755 avatar:
2756 type: object
2757 properties:
2758 file:
2759 type: object
2760 properties:
2761 size:
2762 type: object
2763 properties:
2764 max:
2765 type: number
2766 extensions:
2767 type: array
2768 items:
2769 type: string
2770 video:
2771 type: object
2772 properties:
2773 image:
2774 type: object
2775 properties:
2776 extensions:
2777 type: array
2778 items:
2779 type: string
2780 size:
2781 type: object
2782 properties:
2783 max:
2784 type: number
2785 file:
2786 type: object
2787 properties:
2788 extensions:
2789 type: array
2790 items:
2791 type: string
2792 videoCaption:
2793 type: object
2794 properties:
2795 file:
2796 type: object
2797 properties:
2798 size:
2799 type: object
2800 properties:
2801 max:
2802 type: number
2803 extensions:
2804 type: array
2805 items:
2806 type: string
2807 user:
2808 type: object
2809 properties:
2810 videoQuota:
2811 type: number
2812 videoQuotaDaily:
2813 type: number
2814 trending:
2815 type: object
2816 properties:
2817 videos:
2818 type: object
2819 properties:
2820 intervalDays:
2821 type: number
2822 tracker:
2823 type: object
2824 properties:
2825 enabled:
2826 type: boolean
2827 followings:
2828 type: object
2829 properties:
2830 instance:
2831 type: object
2832 properties:
2833 autoFollowIndex:
2834 type: object
2835 properties:
2836 indexUrl:
2837 type: string
2838 ServerConfigAbout:
2839 properties:
2840 instance:
2841 type: object
2842 properties:
2843 name:
2844 type: string
2845 shortDescription:
2846 type: string
2847 description:
2848 type: string
2849 terms:
2850 type: string
2851 ServerConfigCustom:
2852 properties:
2853 instance:
2854 type: object
2855 properties:
2856 name:
2857 type: string
2858 shortDescription:
2859 type: string
2860 description:
2861 type: string
2862 terms:
2863 type: string
2864 defaultClientRoute:
2865 type: string
2866 isNSFW:
2867 type: boolean
2868 defaultNSFWPolicy:
2869 type: string
2870 customizations:
2871 type: object
2872 properties:
2873 javascript:
2874 type: string
2875 css:
2876 type: string
2877 theme:
2878 type: object
2879 properties:
2880 default:
2881 type: string
2882 services:
2883 type: object
2884 properties:
2885 twitter:
2886 type: object
2887 properties:
2888 username:
2889 type: string
2890 whitelisted:
2891 type: boolean
2892 cache:
2893 type: object
2894 properties:
2895 previews:
2896 type: object
2897 properties:
2898 size:
2899 type: number
2900 captions:
2901 type: object
2902 properties:
2903 size:
2904 type: number
2905 signup:
2906 type: object
2907 properties:
2908 enabled:
2909 type: boolean
2910 limit:
2911 type: number
2912 requiresEmailVerification:
2913 type: boolean
2914 admin:
2915 type: object
2916 properties:
2917 email:
2918 type: string
2919 contactForm:
2920 type: object
2921 properties:
2922 enabled:
2923 type: boolean
2924 user:
2925 type: object
2926 properties:
2927 videoQuota:
2928 type: number
2929 videoQuotaDaily:
2930 type: number
2931 transcoding:
2932 type: object
2933 properties:
2934 enabled:
2935 type: boolean
2936 allowAdditionalExtensions:
2937 type: boolean
2938 allowAudioFiles:
2939 type: boolean
2940 threads:
2941 type: number
2942 resolutions:
2943 type: object
2944 properties:
2945 240p:
2946 type: boolean
2947 360p:
2948 type: boolean
2949 480p:
2950 type: boolean
2951 720p:
2952 type: boolean
2953 1080p:
2954 type: boolean
2955 2160p:
2956 type: boolean
2957 hls:
2958 type: object
2959 properties:
2960 enabled:
2961 type: boolean
2962 import:
2963 type: object
2964 properties:
2965 videos:
2966 type: object
2967 properties:
2968 http:
2969 type: object
2970 properties:
2971 enabled:
2972 type: boolean
2973 torrent:
2974 type: object
2975 properties:
2976 enabled:
2977 type: boolean
2978 autoBlacklist:
2979 type: object
2980 properties:
2981 videos:
2982 type: object
2983 properties:
2984 ofUsers:
2985 type: object
2986 properties:
2987 enabled:
2988 type: boolean
2989 followers:
2990 type: object
2991 properties:
2992 instance:
2993 type: object
2994 properties:
2995 enabled:
2996 type: boolean
2997 manualApproval:
2998 type: boolean
2999 Follow:
3000 properties:
3001 id:
3002 type: number
3003 follower:
3004 $ref: '#/components/schemas/Actor'
3005 following:
3006 $ref: '#/components/schemas/Actor'
3007 score:
3008 type: number
3009 state:
3010 type: string
3011 enum:
3012 - pending
3013 - accepted
3014 createdAt:
3015 type: string
3016 updatedAt:
3017 type: string
3018 Job:
3019 properties:
3020 id:
3021 type: number
3022 state:
3023 type: string
3024 enum:
3025 - pending
3026 - processing
3027 - error
3028 - success
3029 category:
3030 type: string
3031 enum:
3032 - transcoding
3033 - activitypub-http
3034 handlerName:
3035 type: string
3036 handlerInputData:
3037 type: string
3038 createdAt:
3039 type: string
3040 updatedAt:
3041 type: string
3042 AddUserResponse:
3043 properties:
3044 id:
3045 type: number
3046 uuid:
3047 type: string
3048 VideoUploadResponse:
3049 properties:
3050 video:
3051 type: object
3052 properties:
3053 id:
3054 type: number
3055 uuid:
3056 type: string
3057 CommentThreadResponse:
3058 properties:
3059 total:
3060 type: number
3061 data:
3062 type: array
3063 items:
3064 $ref: '#/components/schemas/VideoComment'
3065 CommentThreadPostResponse:
3066 properties:
3067 comment:
3068 $ref: '#/components/schemas/VideoComment'
3069 VideoListResponse:
3070 properties:
3071 total:
3072 type: number
3073 data:
3074 type: array
3075 items:
3076 $ref: '#/components/schemas/Video'
3077 AddUser:
3078 properties:
3079 username:
3080 type: string
3081 description: 'The user username '
3082 password:
3083 type: string
3084 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent '
3085 email:
3086 type: string
3087 description: 'The user email '
3088 videoQuota:
3089 type: string
3090 description: 'The user videoQuota '
3091 videoQuotaDaily:
3092 type: string
3093 description: 'The user daily video quota '
3094 role:
3095 type: integer
3096 enum:
3097 - 0
3098 - 1
3099 - 2
3100 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3101 required:
3102 - username
3103 - password
3104 - email
3105 - videoQuota
3106 - videoQuotaDaily
3107 - role
3108 UpdateUser:
3109 properties:
3110 id:
3111 type: string
3112 description: 'The user id '
3113 email:
3114 type: string
3115 description: 'The updated email of the user '
3116 videoQuota:
3117 type: string
3118 description: 'The updated videoQuota of the user '
3119 videoQuotaDaily:
3120 type: string
3121 description: 'The updated daily video quota of the user '
3122 role:
3123 type: integer
3124 enum:
3125 - 0
3126 - 1
3127 - 2
3128 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3129 required:
3130 - id
3131 - email
3132 - videoQuota
3133 - videoQuotaDaily
3134 - role
3135 UpdateMe:
3136 properties:
3137 password:
3138 type: string
3139 description: 'Your new password '
3140 email:
3141 type: string
3142 description: 'Your new email '
3143 displayNSFW:
3144 type: string
3145 description: 'Your new displayNSFW '
3146 autoPlayVideo:
3147 type: string
3148 description: 'Your new autoPlayVideo '
3149 required:
3150 - password
3151 - email
3152 - displayNSFW
3153 - autoPlayVideo
3154 GetMeVideoRating:
3155 properties:
3156 id:
3157 type: string
3158 description: 'Id of the video '
3159 rating:
3160 type: number
3161 description: 'Rating of the video '
3162 required:
3163 - id
3164 - rating
3165 VideoRating:
3166 properties:
3167 video:
3168 $ref: '#/components/schemas/Video'
3169 rating:
3170 type: number
3171 description: 'Rating of the video'
3172 required:
3173 - video
3174 - rating
3175 RegisterUser:
3176 properties:
3177 username:
3178 type: string
3179 description: 'The username of the user '
3180 password:
3181 type: string
3182 description: 'The password of the user '
3183 email:
3184 type: string
3185 description: 'The email of the user '
3186 displayName:
3187 type: string
3188 description: 'The user display name'
3189 channel:
3190 type: object
3191 properties:
3192 name:
3193 type: string
3194 description: 'The default channel name'
3195 displayName:
3196 type: string
3197 description: 'The default channel display name'
3198
3199 required:
3200 - username
3201 - password
3202 - email
3203 VideoChannelCreate:
3204 properties:
3205 name:
3206 type: string
3207 displayName:
3208 type: string
3209 description:
3210 type: string
3211 support:
3212 type: string
3213 required:
3214 - name
3215 - displayName
3216 VideoChannelUpdate:
3217 properties:
3218 displayName:
3219 type: string
3220 description:
3221 type: string
3222 support:
3223 type: string
3224 bulkVideosSupportUpdate:
3225 type: boolean
3226 description: 'Update all videos support field of this channel'
3227