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