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