]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
9fe98b8dfd6df1f96ab89966a74d53ec4b4d0605
[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 requestBody:
1812 content:
1813 application/json:
1814 schema:
1815 type: object
1816 properties:
1817 text:
1818 type: string
1819 description: 'Text comment'
1820 required:
1821 - text
1822
1823 '/videos/{id}/comment-threads/{threadId}':
1824 get:
1825 summary: Get a thread
1826 tags:
1827 - Video Comments
1828 parameters:
1829 - $ref: '#/components/parameters/idOrUUID'
1830 - $ref: '#/components/parameters/threadId'
1831 responses:
1832 '200':
1833 description: successful operation
1834 content:
1835 application/json:
1836 schema:
1837 $ref: '#/components/schemas/VideoCommentThreadTree'
1838 '/videos/{id}/comments/{commentId}':
1839 post:
1840 summary: Reply to a thread of a video
1841 security:
1842 - OAuth2: []
1843 tags:
1844 - Video Comments
1845 parameters:
1846 - $ref: '#/components/parameters/idOrUUID'
1847 - $ref: '#/components/parameters/commentId'
1848 responses:
1849 '200':
1850 description: successful operation
1851 content:
1852 application/json:
1853 schema:
1854 $ref: '#/components/schemas/CommentThreadPostResponse'
1855 requestBody:
1856 content:
1857 application/json:
1858 schema:
1859 type: object
1860 properties:
1861 text:
1862 type: string
1863 description: 'Text comment'
1864 required:
1865 - text
1866
1867 delete:
1868 summary: Delete a comment or a reply
1869 security:
1870 - OAuth2: []
1871 tags:
1872 - Video Comments
1873 parameters:
1874 - $ref: '#/components/parameters/idOrUUID'
1875 - $ref: '#/components/parameters/commentId'
1876 responses:
1877 '204':
1878 description: successful operation
1879 '/videos/{id}/rate':
1880 put:
1881 summary: Like/dislike a video
1882 security:
1883 - OAuth2: []
1884 tags:
1885 - Video Rates
1886 parameters:
1887 - $ref: '#/components/parameters/idOrUUID'
1888 responses:
1889 '204':
1890 description: successful operation
1891 /search/videos:
1892 get:
1893 tags:
1894 - Search
1895 summary: Search videos
1896 parameters:
1897 - $ref: '#/components/parameters/start'
1898 - $ref: '#/components/parameters/count'
1899 - $ref: '#/components/parameters/videosSearchSort'
1900 - name: search
1901 in: query
1902 required: true
1903 description: String to search
1904 schema:
1905 type: string
1906 responses:
1907 '200':
1908 description: successful operation
1909 content:
1910 application/json:
1911 schema:
1912 $ref: '#/components/schemas/VideoListResponse'
1913 servers:
1914 - url: 'https://peertube.cpy.re/api/v1'
1915 description: Live Test Server (live data - stable version)
1916 - url: 'https://peertube2.cpy.re/api/v1'
1917 description: Live Test Server (live data - latest nighlty version)
1918 - url: 'https://peertube3.cpy.re/api/v1'
1919 description: Live Test Server (live data - latest RC version)
1920 components:
1921 parameters:
1922 start:
1923 name: start
1924 in: query
1925 required: false
1926 description: Offset
1927 schema:
1928 type: number
1929 count:
1930 name: count
1931 in: query
1932 required: false
1933 description: Number of items
1934 schema:
1935 type: number
1936 sort:
1937 name: sort
1938 in: query
1939 required: false
1940 description: Sort column (-createdAt for example)
1941 schema:
1942 type: string
1943 videosSort:
1944 name: sort
1945 in: query
1946 required: false
1947 description: Sort videos by criteria
1948 schema:
1949 type: string
1950 enum:
1951 - -name
1952 - -duration
1953 - -createdAt
1954 - -publishedAt
1955 - -views
1956 - -likes
1957 - -trending
1958 videosSearchSort:
1959 name: sort
1960 in: query
1961 required: false
1962 description: Sort videos by criteria
1963 schema:
1964 type: string
1965 enum:
1966 - -name
1967 - -duration
1968 - -createdAt
1969 - -publishedAt
1970 - -views
1971 - -likes
1972 - -match
1973 commentsSort:
1974 name: sort
1975 in: query
1976 required: false
1977 description: Sort comments by criteria
1978 schema:
1979 type: string
1980 enum:
1981 - -createdAt
1982 - -totalReplies
1983 blacklistsSort:
1984 name: sort
1985 in: query
1986 required: false
1987 description: Sort blacklists by criteria
1988 schema:
1989 type: string
1990 enum:
1991 - -id
1992 - -name
1993 - -duration
1994 - -views
1995 - -likes
1996 - -dislikes
1997 - -uuid
1998 - -createdAt
1999 usersSort:
2000 name: sort
2001 in: query
2002 required: false
2003 description: Sort users by criteria
2004 schema:
2005 type: string
2006 enum:
2007 - -id
2008 - -username
2009 - -createdAt
2010 abusesSort:
2011 name: sort
2012 in: query
2013 required: false
2014 description: Sort abuses by criteria
2015 schema:
2016 type: string
2017 enum:
2018 - -id
2019 - -createdAt
2020 - -state
2021 name:
2022 name: name
2023 in: path
2024 required: true
2025 description: >-
2026 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
2027 example)
2028 schema:
2029 type: string
2030 id:
2031 name: id
2032 in: path
2033 required: true
2034 description: The user id
2035 schema:
2036 type: number
2037 idOrUUID:
2038 name: id
2039 in: path
2040 required: true
2041 description: The object id or uuid
2042 schema:
2043 type: string
2044 playlistElementId:
2045 name: playlistElementId
2046 in: path
2047 required: true
2048 description: Playlist element id
2049 schema:
2050 type: number
2051 abuseId:
2052 name: abuseId
2053 in: path
2054 required: true
2055 description: Video abuse id
2056 schema:
2057 type: number
2058 captionLanguage:
2059 name: captionLanguage
2060 in: path
2061 required: true
2062 description: The caption language
2063 schema:
2064 type: string
2065 channelHandle:
2066 name: channelHandle
2067 in: path
2068 required: true
2069 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
2070 schema:
2071 type: string
2072 subscriptionHandle:
2073 name: subscriptionHandle
2074 in: path
2075 required: true
2076 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
2077 schema:
2078 type: string
2079 threadId:
2080 name: threadId
2081 in: path
2082 required: true
2083 description: The thread id (root comment id)
2084 schema:
2085 type: number
2086 commentId:
2087 name: commentId
2088 in: path
2089 required: true
2090 description: The comment id
2091 schema:
2092 type: number
2093 categoryOneOf:
2094 name: categoryOneOf
2095 in: query
2096 required: false
2097 description: category id of the video
2098 schema:
2099 oneOf:
2100 - type: number
2101 - type: array
2102 items:
2103 type: number
2104 style: form
2105 explode: false
2106 tagsOneOf:
2107 name: tagsOneOf
2108 in: query
2109 required: false
2110 description: tag(s) of the video
2111 schema:
2112 oneOf:
2113 - type: string
2114 - type: array
2115 items:
2116 type: string
2117 style: form
2118 explode: false
2119 tagsAllOf:
2120 name: tagsAllOf
2121 in: query
2122 required: false
2123 description: tag(s) of the video, where all should be present in the video
2124 schema:
2125 oneOf:
2126 - type: string
2127 - type: array
2128 items:
2129 type: string
2130 style: form
2131 explode: false
2132 languageOneOf:
2133 name: languageOneOf
2134 in: query
2135 required: false
2136 description: language id of the video
2137 schema:
2138 oneOf:
2139 - type: string
2140 - type: array
2141 items:
2142 type: string
2143 style: form
2144 explode: false
2145 licenceOneOf:
2146 name: licenceOneOf
2147 in: query
2148 required: false
2149 description: licence id of the video
2150 schema:
2151 oneOf:
2152 - type: number
2153 - type: array
2154 items:
2155 type: number
2156 style: form
2157 explode: false
2158 nsfw:
2159 name: nsfw
2160 in: query
2161 required: false
2162 description: whether to include nsfw videos, if any
2163 schema:
2164 type: string
2165 enum:
2166 - 'true'
2167 - 'false'
2168 filter:
2169 name: filter
2170 in: query
2171 required: false
2172 description: >
2173 Special filters (local for instance) which might require special rights:
2174 * `local` - only videos local to the instance
2175 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
2176 schema:
2177 type: string
2178 enum:
2179 - local
2180 - all-local
2181 subscriptionsUris:
2182 name: uris
2183 in: query
2184 required: true
2185 description: list of uris to check if each is part of the user subscriptions
2186 schema:
2187 type: array
2188 items:
2189 type: string
2190 securitySchemes:
2191 OAuth2:
2192 description: >
2193 In the header: *Authorization: Bearer <token\>*
2194
2195
2196 Authenticating via OAuth requires the following steps:
2197
2198
2199 - Have an account with sufficient authorization levels
2200
2201 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
2202 Bearer Token
2203
2204 - Make Authenticated Requests
2205 type: oauth2
2206 flows:
2207 password:
2208 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
2209 scopes:
2210 admin: Admin scope
2211 moderator: Moderator scope
2212 user: User scope
2213 schemas:
2214 VideoConstantNumber:
2215 properties:
2216 id:
2217 type: number
2218 label:
2219 type: string
2220 VideoConstantString:
2221 properties:
2222 id:
2223 type: string
2224 label:
2225 type: string
2226
2227 VideoPlaylistPrivacySet:
2228 type: integer
2229 enum:
2230 - 1
2231 - 2
2232 - 3
2233 description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)'
2234 VideoPlaylistPrivacyConstant:
2235 properties:
2236 id:
2237 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2238 label:
2239 type: string
2240
2241 VideoPlaylistTypeSet:
2242 type: integer
2243 enum:
2244 - 1
2245 - 2
2246 description: 'The video playlist type (Regular = 1, Watch Later = 2)'
2247 VideoPlaylistTypeConstant:
2248 properties:
2249 id:
2250 $ref: '#/components/schemas/VideoPlaylistTypeSet'
2251 label:
2252 type: string
2253
2254 VideoPrivacySet:
2255 type: integer
2256 enum:
2257 - 1
2258 - 2
2259 - 3
2260 - 4
2261 description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)'
2262 VideoPrivacyConstant:
2263 properties:
2264 id:
2265 $ref: '#/components/schemas/VideoPrivacySet'
2266 label:
2267 type: string
2268
2269 VideoStateConstant:
2270 properties:
2271 id:
2272 type: integer
2273 enum:
2274 - 1
2275 - 2
2276 - 3
2277 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
2278 label:
2279 type: string
2280
2281 VideoAbuseStateSet:
2282 type: integer
2283 enum:
2284 - 1
2285 - 2
2286 - 3
2287 description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)'
2288 VideoAbuseStateConstant:
2289 properties:
2290 id:
2291 $ref: '#/components/schemas/VideoAbuseStateSet'
2292 label:
2293 type: string
2294
2295 VideoResolutionConstant:
2296 properties:
2297 id:
2298 type: integer
2299 description: 'Video resolution (240, 360, 720 ...)'
2300 label:
2301 type: string
2302 VideoScheduledUpdate:
2303 properties:
2304 privacy:
2305 $ref: '#/components/schemas/VideoPrivacySet'
2306 updateAt:
2307 type: string
2308 format: date
2309 description: When to update the video
2310 required:
2311 - updateAt
2312 AccountSummary:
2313 properties:
2314 id:
2315 type: number
2316 name:
2317 type: string
2318 displayName:
2319 type: string
2320 url:
2321 type: string
2322 host:
2323 type: string
2324 avatar:
2325 nullable: true
2326 allOf:
2327 - $ref: '#/components/schemas/Avatar'
2328 VideoChannelSummary:
2329 properties:
2330 id:
2331 type: number
2332 name:
2333 type: string
2334 displayName:
2335 type: string
2336 url:
2337 type: string
2338 host:
2339 type: string
2340 avatar:
2341 nullable: true
2342 allOf:
2343 - $ref: '#/components/schemas/Avatar'
2344 PlaylistElement:
2345 properties:
2346 position:
2347 type: number
2348 startTimestamp:
2349 type: number
2350 stopTimestamp:
2351 type: number
2352 video:
2353 nullable: true
2354 allOf:
2355 - $ref: '#/components/schemas/Video'
2356 VideoFile:
2357 properties:
2358 magnetUri:
2359 type: string
2360 resolution:
2361 $ref: '#/components/schemas/VideoResolutionConstant'
2362 size:
2363 type: number
2364 description: 'Video file size in bytes'
2365 torrentUrl:
2366 type: string
2367 torrentDownloadUrl:
2368 type: string
2369 fileUrl:
2370 type: string
2371 fileDownloadUrl:
2372 type: string
2373 fps:
2374 type: number
2375 VideoStreamingPlaylists:
2376 properties:
2377 id:
2378 type: number
2379 type:
2380 type: number
2381 enum:
2382 - 1
2383 description: 'Playlist type (HLS = 1)'
2384 playlistUrl:
2385 type: string
2386 segmentsSha256Url:
2387 type: string
2388 redundancies:
2389 type: array
2390 items:
2391 type: object
2392 properties:
2393 baseUrl:
2394 type: string
2395 Video:
2396 properties:
2397 id:
2398 type: number
2399 uuid:
2400 type: string
2401 createdAt:
2402 type: string
2403 publishedAt:
2404 type: string
2405 updatedAt:
2406 type: string
2407 originallyPublishedAt:
2408 type: string
2409 category:
2410 $ref: '#/components/schemas/VideoConstantNumber'
2411 licence:
2412 $ref: '#/components/schemas/VideoConstantNumber'
2413 language:
2414 $ref: '#/components/schemas/VideoConstantString'
2415 privacy:
2416 $ref: '#/components/schemas/VideoPrivacyConstant'
2417 description:
2418 type: string
2419 duration:
2420 type: number
2421 isLocal:
2422 type: boolean
2423 name:
2424 type: string
2425 thumbnailPath:
2426 type: string
2427 previewPath:
2428 type: string
2429 embedPath:
2430 type: string
2431 views:
2432 type: number
2433 likes:
2434 type: number
2435 dislikes:
2436 type: number
2437 nsfw:
2438 type: boolean
2439 waitTranscoding:
2440 type: boolean
2441 nullable: true
2442 state:
2443 $ref: '#/components/schemas/VideoStateConstant'
2444 scheduledUpdate:
2445 nullable: true
2446 allOf:
2447 - $ref: '#/components/schemas/VideoScheduledUpdate'
2448 blacklisted:
2449 nullable: true
2450 type: boolean
2451 blacklistedReason:
2452 nullable: true
2453 type: string
2454 account:
2455 $ref: '#/components/schemas/AccountSummary'
2456 channel:
2457 $ref: '#/components/schemas/VideoChannelSummary'
2458 userHistory:
2459 nullable: true
2460 type: object
2461 properties:
2462 currentTime:
2463 type: number
2464 VideoDetails:
2465 allOf:
2466 - $ref: '#/components/schemas/Video'
2467 - type: object
2468 properties:
2469 descriptionPath:
2470 type: string
2471 support:
2472 type: string
2473 channel:
2474 $ref: '#/components/schemas/VideoChannel'
2475 account:
2476 $ref: '#/components/schemas/Account'
2477 tags:
2478 type: array
2479 items:
2480 type: string
2481 files:
2482 type: array
2483 items:
2484 $ref: '#/components/schemas/VideoFile'
2485 commentsEnabled:
2486 type: boolean
2487 downloadEnabled:
2488 type: boolean
2489 trackerUrls:
2490 type: array
2491 items:
2492 type: string
2493 streamingPlaylists:
2494 type: array
2495 items:
2496 $ref: '#/components/schemas/VideoStreamingPlaylists'
2497 VideoImportStateConstant:
2498 properties:
2499 id:
2500 type: integer
2501 enum:
2502 - 1
2503 - 2
2504 - 3
2505 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2506 label:
2507 type: string
2508 VideoImport:
2509 properties:
2510 id:
2511 type: number
2512 targetUrl:
2513 type: string
2514 magnetUri:
2515 type: string
2516 torrentName:
2517 type: string
2518 state:
2519 type: object
2520 properties:
2521 id:
2522 $ref: '#/components/schemas/VideoImportStateConstant'
2523 label:
2524 type: string
2525 error:
2526 type: string
2527 createdAt:
2528 type: string
2529 updatedAt:
2530 type: string
2531 video:
2532 $ref: '#/components/schemas/Video'
2533 VideoAbuse:
2534 properties:
2535 id:
2536 type: number
2537 reason:
2538 type: string
2539 reporterAccount:
2540 $ref: '#/components/schemas/Account'
2541 state:
2542 $ref: '#/components/schemas/VideoAbuseStateConstant'
2543 moderationComment:
2544 type: string
2545 video:
2546 type: object
2547 properties:
2548 id:
2549 type: number
2550 name:
2551 type: string
2552 uuid:
2553 type: string
2554 createdAt:
2555 type: string
2556 VideoBlacklist:
2557 properties:
2558 id:
2559 type: number
2560 videoId:
2561 type: number
2562 createdAt:
2563 type: string
2564 updatedAt:
2565 type: string
2566 name:
2567 type: string
2568 uuid:
2569 type: string
2570 description:
2571 type: string
2572 duration:
2573 type: number
2574 views:
2575 type: number
2576 likes:
2577 type: number
2578 dislikes:
2579 type: number
2580 nsfw:
2581 type: boolean
2582 VideoChannel:
2583 properties:
2584 displayName:
2585 type: string
2586 description:
2587 type: string
2588 isLocal:
2589 type: boolean
2590 ownerAccount:
2591 type: object
2592 properties:
2593 id:
2594 type: number
2595 uuid:
2596 type: string
2597 VideoPlaylist:
2598 properties:
2599 id:
2600 type: number
2601 createdAt:
2602 type: string
2603 updatedAt:
2604 type: string
2605 description:
2606 type: string
2607 uuid:
2608 type: string
2609 displayName:
2610 type: string
2611 isLocal:
2612 type: boolean
2613 videoLength:
2614 type: number
2615 thumbnailPath:
2616 type: string
2617 privacy:
2618 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
2619 type:
2620 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
2621 ownerAccount:
2622 $ref: '#/components/schemas/AccountSummary'
2623 videoChannel:
2624 $ref: '#/components/schemas/VideoChannelSummary'
2625 VideoComment:
2626 properties:
2627 id:
2628 type: number
2629 url:
2630 type: string
2631 text:
2632 type: string
2633 threadId:
2634 type: number
2635 inReplyToCommentId:
2636 type: number
2637 videoId:
2638 type: number
2639 createdAt:
2640 type: string
2641 updatedAt:
2642 type: string
2643 totalRepliesFromVideoAuthor:
2644 type: number
2645 totalReplies:
2646 type: number
2647 account:
2648 $ref: '#/components/schemas/Account'
2649 VideoCommentThreadTree:
2650 properties:
2651 comment:
2652 $ref: '#/components/schemas/VideoComment'
2653 children:
2654 type: array
2655 items:
2656 $ref: '#/components/schemas/VideoCommentThreadTree'
2657 VideoCaption:
2658 properties:
2659 language:
2660 $ref: '#/components/schemas/VideoConstantString'
2661 captionPath:
2662 type: string
2663 Avatar:
2664 properties:
2665 path:
2666 type: string
2667 createdAt:
2668 type: string
2669 updatedAt:
2670 type: string
2671 Actor:
2672 properties:
2673 id:
2674 type: number
2675 url:
2676 type: string
2677 name:
2678 type: string
2679 host:
2680 type: string
2681 followingCount:
2682 type: number
2683 followersCount:
2684 type: number
2685 createdAt:
2686 type: string
2687 updatedAt:
2688 type: string
2689 avatar:
2690 $ref: '#/components/schemas/Avatar'
2691 Account:
2692 allOf:
2693 - $ref: '#/components/schemas/Actor'
2694 - properties:
2695 userId:
2696 type: string
2697 displayName:
2698 type: string
2699 description:
2700 type: string
2701 User:
2702 properties:
2703 id:
2704 type: number
2705 username:
2706 type: string
2707 email:
2708 type: string
2709 displayNSFW:
2710 type: boolean
2711 autoPlayVideo:
2712 type: boolean
2713 role:
2714 type: integer
2715 enum:
2716 - 0
2717 - 1
2718 - 2
2719 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2720 roleLabel:
2721 type: string
2722 enum:
2723 - User
2724 - Moderator
2725 - Administrator
2726 videoQuota:
2727 type: number
2728 videoQuotaDaily:
2729 type: number
2730 createdAt:
2731 type: string
2732 account:
2733 $ref: '#/components/schemas/Account'
2734 videoChannels:
2735 type: array
2736 items:
2737 $ref: '#/components/schemas/VideoChannel'
2738 UserWatchingVideo:
2739 properties:
2740 currentTime:
2741 type: number
2742 ServerConfig:
2743 properties:
2744 instance:
2745 type: object
2746 properties:
2747 name:
2748 type: string
2749 shortDescription:
2750 type: string
2751 defaultClientRoute:
2752 type: string
2753 isNSFW:
2754 type: boolean
2755 defaultNSFWPolicy:
2756 type: string
2757 customizations:
2758 type: object
2759 properties:
2760 javascript:
2761 type: string
2762 css:
2763 type: string
2764 search:
2765 type: object
2766 properties:
2767 remoteUri:
2768 type: object
2769 properties:
2770 users:
2771 type: boolean
2772 anonymous:
2773 type: boolean
2774 plugin:
2775 type: object
2776 properties:
2777 registered:
2778 type: array
2779 items:
2780 type: string
2781 theme:
2782 type: object
2783 properties:
2784 registered:
2785 type: array
2786 items:
2787 type: string
2788 email:
2789 type: object
2790 properties:
2791 enabled:
2792 type: boolean
2793 contactForm:
2794 type: object
2795 properties:
2796 enabled:
2797 type: boolean
2798 serverVersion:
2799 type: string
2800 serverCommit:
2801 type: string
2802 signup:
2803 type: object
2804 properties:
2805 allowed:
2806 type: boolean
2807 allowedForCurrentIP:
2808 type: boolean
2809 requiresEmailVerification:
2810 type: boolean
2811 transcoding:
2812 type: object
2813 properties:
2814 hls:
2815 type: object
2816 properties:
2817 enabled:
2818 type: boolean
2819 webtorrent:
2820 type: object
2821 properties:
2822 enabled:
2823 type: boolean
2824 enabledResolutions:
2825 type: array
2826 items:
2827 type: number
2828 import:
2829 type: object
2830 properties:
2831 videos:
2832 type: object
2833 properties:
2834 http:
2835 type: object
2836 properties:
2837 enabled:
2838 type: boolean
2839 torrent:
2840 type: object
2841 properties:
2842 enabled:
2843 type: boolean
2844 autoBlacklist:
2845 type: object
2846 properties:
2847 videos:
2848 type: object
2849 properties:
2850 ofUsers:
2851 type: object
2852 properties:
2853 enabled:
2854 type: boolean
2855 avatar:
2856 type: object
2857 properties:
2858 file:
2859 type: object
2860 properties:
2861 size:
2862 type: object
2863 properties:
2864 max:
2865 type: number
2866 extensions:
2867 type: array
2868 items:
2869 type: string
2870 video:
2871 type: object
2872 properties:
2873 image:
2874 type: object
2875 properties:
2876 extensions:
2877 type: array
2878 items:
2879 type: string
2880 size:
2881 type: object
2882 properties:
2883 max:
2884 type: number
2885 file:
2886 type: object
2887 properties:
2888 extensions:
2889 type: array
2890 items:
2891 type: string
2892 videoCaption:
2893 type: object
2894 properties:
2895 file:
2896 type: object
2897 properties:
2898 size:
2899 type: object
2900 properties:
2901 max:
2902 type: number
2903 extensions:
2904 type: array
2905 items:
2906 type: string
2907 user:
2908 type: object
2909 properties:
2910 videoQuota:
2911 type: number
2912 videoQuotaDaily:
2913 type: number
2914 trending:
2915 type: object
2916 properties:
2917 videos:
2918 type: object
2919 properties:
2920 intervalDays:
2921 type: number
2922 tracker:
2923 type: object
2924 properties:
2925 enabled:
2926 type: boolean
2927 followings:
2928 type: object
2929 properties:
2930 instance:
2931 type: object
2932 properties:
2933 autoFollowIndex:
2934 type: object
2935 properties:
2936 indexUrl:
2937 type: string
2938 ServerConfigAbout:
2939 properties:
2940 instance:
2941 type: object
2942 properties:
2943 name:
2944 type: string
2945 shortDescription:
2946 type: string
2947 description:
2948 type: string
2949 terms:
2950 type: string
2951 ServerConfigCustom:
2952 properties:
2953 instance:
2954 type: object
2955 properties:
2956 name:
2957 type: string
2958 shortDescription:
2959 type: string
2960 description:
2961 type: string
2962 terms:
2963 type: string
2964 defaultClientRoute:
2965 type: string
2966 isNSFW:
2967 type: boolean
2968 defaultNSFWPolicy:
2969 type: string
2970 customizations:
2971 type: object
2972 properties:
2973 javascript:
2974 type: string
2975 css:
2976 type: string
2977 theme:
2978 type: object
2979 properties:
2980 default:
2981 type: string
2982 services:
2983 type: object
2984 properties:
2985 twitter:
2986 type: object
2987 properties:
2988 username:
2989 type: string
2990 whitelisted:
2991 type: boolean
2992 cache:
2993 type: object
2994 properties:
2995 previews:
2996 type: object
2997 properties:
2998 size:
2999 type: number
3000 captions:
3001 type: object
3002 properties:
3003 size:
3004 type: number
3005 signup:
3006 type: object
3007 properties:
3008 enabled:
3009 type: boolean
3010 limit:
3011 type: number
3012 requiresEmailVerification:
3013 type: boolean
3014 admin:
3015 type: object
3016 properties:
3017 email:
3018 type: string
3019 contactForm:
3020 type: object
3021 properties:
3022 enabled:
3023 type: boolean
3024 user:
3025 type: object
3026 properties:
3027 videoQuota:
3028 type: number
3029 videoQuotaDaily:
3030 type: number
3031 transcoding:
3032 type: object
3033 properties:
3034 enabled:
3035 type: boolean
3036 allowAdditionalExtensions:
3037 type: boolean
3038 allowAudioFiles:
3039 type: boolean
3040 threads:
3041 type: number
3042 resolutions:
3043 type: object
3044 properties:
3045 240p:
3046 type: boolean
3047 360p:
3048 type: boolean
3049 480p:
3050 type: boolean
3051 720p:
3052 type: boolean
3053 1080p:
3054 type: boolean
3055 2160p:
3056 type: boolean
3057 hls:
3058 type: object
3059 properties:
3060 enabled:
3061 type: boolean
3062 import:
3063 type: object
3064 properties:
3065 videos:
3066 type: object
3067 properties:
3068 http:
3069 type: object
3070 properties:
3071 enabled:
3072 type: boolean
3073 torrent:
3074 type: object
3075 properties:
3076 enabled:
3077 type: boolean
3078 autoBlacklist:
3079 type: object
3080 properties:
3081 videos:
3082 type: object
3083 properties:
3084 ofUsers:
3085 type: object
3086 properties:
3087 enabled:
3088 type: boolean
3089 followers:
3090 type: object
3091 properties:
3092 instance:
3093 type: object
3094 properties:
3095 enabled:
3096 type: boolean
3097 manualApproval:
3098 type: boolean
3099 Follow:
3100 properties:
3101 id:
3102 type: number
3103 follower:
3104 $ref: '#/components/schemas/Actor'
3105 following:
3106 $ref: '#/components/schemas/Actor'
3107 score:
3108 type: number
3109 state:
3110 type: string
3111 enum:
3112 - pending
3113 - accepted
3114 createdAt:
3115 type: string
3116 updatedAt:
3117 type: string
3118 Job:
3119 properties:
3120 id:
3121 type: number
3122 state:
3123 type: string
3124 enum:
3125 - pending
3126 - processing
3127 - error
3128 - success
3129 category:
3130 type: string
3131 enum:
3132 - transcoding
3133 - activitypub-http
3134 handlerName:
3135 type: string
3136 handlerInputData:
3137 type: string
3138 createdAt:
3139 type: string
3140 updatedAt:
3141 type: string
3142 AddUserResponse:
3143 properties:
3144 id:
3145 type: number
3146 uuid:
3147 type: string
3148 VideoUploadResponse:
3149 properties:
3150 video:
3151 type: object
3152 properties:
3153 id:
3154 type: number
3155 uuid:
3156 type: string
3157 CommentThreadResponse:
3158 properties:
3159 total:
3160 type: number
3161 data:
3162 type: array
3163 items:
3164 $ref: '#/components/schemas/VideoComment'
3165 CommentThreadPostResponse:
3166 properties:
3167 comment:
3168 $ref: '#/components/schemas/VideoComment'
3169 VideoListResponse:
3170 properties:
3171 total:
3172 type: number
3173 data:
3174 type: array
3175 items:
3176 $ref: '#/components/schemas/Video'
3177 AddUser:
3178 properties:
3179 username:
3180 type: string
3181 description: 'The user username '
3182 password:
3183 type: string
3184 description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent '
3185 email:
3186 type: string
3187 description: 'The user email '
3188 videoQuota:
3189 type: string
3190 description: 'The user videoQuota '
3191 videoQuotaDaily:
3192 type: string
3193 description: 'The user daily video quota '
3194 role:
3195 type: integer
3196 enum:
3197 - 0
3198 - 1
3199 - 2
3200 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3201 required:
3202 - username
3203 - password
3204 - email
3205 - videoQuota
3206 - videoQuotaDaily
3207 - role
3208 UpdateUser:
3209 properties:
3210 id:
3211 type: string
3212 description: 'The user id '
3213 email:
3214 type: string
3215 description: 'The updated email of the user '
3216 videoQuota:
3217 type: string
3218 description: 'The updated videoQuota of the user '
3219 videoQuotaDaily:
3220 type: string
3221 description: 'The updated daily video quota of the user '
3222 role:
3223 type: integer
3224 enum:
3225 - 0
3226 - 1
3227 - 2
3228 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3229 required:
3230 - id
3231 - email
3232 - videoQuota
3233 - videoQuotaDaily
3234 - role
3235 UpdateMe:
3236 properties:
3237 password:
3238 type: string
3239 description: 'Your new password '
3240 email:
3241 type: string
3242 description: 'Your new email '
3243 displayNSFW:
3244 type: string
3245 description: 'Your new displayNSFW '
3246 autoPlayVideo:
3247 type: string
3248 description: 'Your new autoPlayVideo '
3249 required:
3250 - password
3251 - email
3252 - displayNSFW
3253 - autoPlayVideo
3254 GetMeVideoRating:
3255 properties:
3256 id:
3257 type: string
3258 description: 'Id of the video '
3259 rating:
3260 type: number
3261 description: 'Rating of the video '
3262 required:
3263 - id
3264 - rating
3265 VideoRating:
3266 properties:
3267 video:
3268 $ref: '#/components/schemas/Video'
3269 rating:
3270 type: number
3271 description: 'Rating of the video'
3272 required:
3273 - video
3274 - rating
3275 RegisterUser:
3276 properties:
3277 username:
3278 type: string
3279 description: 'The username of the user '
3280 password:
3281 type: string
3282 description: 'The password of the user '
3283 email:
3284 type: string
3285 description: 'The email of the user '
3286 displayName:
3287 type: string
3288 description: 'The user display name'
3289 channel:
3290 type: object
3291 properties:
3292 name:
3293 type: string
3294 description: 'The default channel name'
3295 displayName:
3296 type: string
3297 description: 'The default channel display name'
3298
3299 required:
3300 - username
3301 - password
3302 - email
3303 VideoChannelCreate:
3304 properties:
3305 name:
3306 type: string
3307 displayName:
3308 type: string
3309 description:
3310 type: string
3311 support:
3312 type: string
3313 required:
3314 - name
3315 - displayName
3316 VideoChannelUpdate:
3317 properties:
3318 displayName:
3319 type: string
3320 description:
3321 type: string
3322 support:
3323 type: string
3324 bulkVideosSupportUpdate:
3325 type: boolean
3326 description: 'Update all videos support field of this channel'
3327