]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
10f60175dd7b3b0dd84f0dfe7a8a0e97321e5fd0
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
1 swagger: '2.0'
2 info:
3 title: PeerTube
4 version: 1.0.0-beta
5 description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
6 host: peertube.example.com
7 securityDefinitions:
8 OAuth2:
9 description: 'In the header: *Authorization: Bearer mytoken*'
10 type: oauth2
11 flow: password
12 # Not implemented yet
13 # authorizationUrl: https://example.com/oauth/authorize
14 tokenUrl: https://peertube.example.com/api/v1/users/token
15 basePath: '/api/v1'
16 schemes:
17 - https
18 paths:
19 '/accounts/{id}':
20 get:
21 tags:
22 - Accounts
23 consumes:
24 - application/json
25 produces:
26 - application/json
27 parameters:
28 - name: id
29 in: path
30 required: true
31 type: string
32 description: 'The id of the account'
33 - name: start
34 in: query
35 required: false
36 type: number
37 description: 'starting page'
38 - name: stop
39 in: query
40 required: false
41 type: number
42 description: 'stopping page'
43 - name: sort
44 in: query
45 required: false
46 type: number
47 description: 'sorting'
48 responses:
49 '200':
50 description: successful operation
51 schema:
52 $ref: '#/definitions/Account'
53 /accounts:
54 get:
55 tags:
56 - Accounts
57 consumes:
58 - application/json
59 produces:
60 - application/json
61 responses:
62 '200':
63 description: successful operation
64 schema:
65 type: array
66 items:
67 $ref: '#/definitions/Account'
68 /config:
69 get:
70 tags:
71 - Config
72 consumes:
73 - application/json
74 produces:
75 - application/json
76 responses:
77 '200':
78 description: successful operation
79 schema:
80 $ref: '#/definitions/ServerConfig'
81 /feeds/videos.{format}:
82 get:
83 tags:
84 - Feeds
85 produces:
86 - application/atom+xml
87 - application/rss+xml
88 - application/json
89 parameters:
90 - name: format
91 in: path
92 required: true
93 type: string
94 enum: ['xml', 'atom' 'json']
95 default: 'xml'
96 description: 'The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and json to JSON FEED 1.0'
97 - name: accountId
98 in: query
99 required: false
100 type: number
101 description: 'The id of the local account to filter to (beware, users IDs and not actors IDs which will return empty feeds'
102 - name: accountName
103 in: query
104 required: false
105 type: string
106 description: 'The name of the local account to filter to'
107 responses:
108 '200':
109 description: successful operation
110 /jobs:
111 get:
112 security:
113 - OAuth2: [ ]
114 tags:
115 - Job
116 consumes:
117 - application/json
118 produces:
119 - application/json
120 parameters:
121 - name: state
122 in: path
123 required: true
124 type: string
125 description: 'The id of the account'
126 - name: start
127 in: query
128 required: false
129 type: number
130 description: 'starting page'
131 - name: count
132 in: query
133 required: false
134 type: number
135 description: ''
136 - name: sort
137 in: query
138 required: false
139 type: number
140 description: 'sorting'
141 responses:
142 '200':
143 description: successful operation
144 schema:
145 type: array
146 items:
147 $ref: '#/definitions/Job'
148 '/server/following/{host}':
149 delete:
150 security:
151 - OAuth2: [ ]
152 tags:
153 - ServerFollowing
154 consumes:
155 - application/json
156 produces:
157 - application/json
158 parameters:
159 - name: host
160 in: path
161 required: true
162 type: string
163 description: 'The host to unfollow '
164 responses:
165 '201':
166 description: successful operation
167 /server/followers:
168 get:
169 tags:
170 - ServerFollowing
171 consumes:
172 - application/json
173 produces:
174 - application/json
175 parameters:
176 - name: start
177 in: query
178 required: false
179 type: number
180 description: 'starting page'
181 - name: stop
182 in: query
183 required: false
184 type: number
185 description: 'stopping page'
186 - name: sort
187 in: query
188 required: false
189 type: number
190 description: 'sorting'
191 responses:
192 '200':
193 description: successful operation
194 schema:
195 type: array
196 items:
197 $ref: '#/definitions/Follow'
198 /server/following:
199 get:
200 tags:
201 - ServerFollowing
202 consumes:
203 - application/json
204 produces:
205 - application/json
206 parameters:
207 - name: start
208 in: query
209 required: false
210 type: number
211 description: 'starting page'
212 - name: stop
213 in: query
214 required: false
215 type: number
216 description: 'stopping page'
217 - name: sort
218 in: query
219 required: false
220 type: number
221 description: 'sorting'
222 responses:
223 '200':
224 description: successful operation
225 schema:
226 type: array
227 items:
228 $ref: '#/definitions/Follow'
229 post:
230 security:
231 - OAuth2: [ ]
232 tags:
233 - ServerFollowing
234 consumes:
235 - application/json
236 produces:
237 - application/json
238 parameters:
239 - in: body
240 name: body
241 schema:
242 $ref: '#/definitions/Follow'
243 responses:
244 '204':
245 description: successful operation
246 /users:
247 post:
248 security:
249 - OAuth2: [ ]
250 tags:
251 - User
252 consumes:
253 - application/json
254 produces:
255 - application/json
256 parameters:
257 - in: body
258 name: body
259 required: true
260 description: 'User to create'
261 schema:
262 $ref: '#/definitions/AddUser'
263 responses:
264 '200':
265 description: successful operation
266 schema:
267 $ref: '#/definitions/AddUserResponse'
268 get:
269 security:
270 - OAuth2: [ ]
271 tags:
272 - User
273 consumes:
274 - application/json
275 produces:
276 - application/json
277 parameters:
278 - name: start
279 in: query
280 required: false
281 type: number
282 description: 'starting page'
283 - name: stop
284 in: query
285 required: false
286 type: number
287 description: 'stopping page'
288 - name: sort
289 in: query
290 required: false
291 type: number
292 description: 'sorting'
293 responses:
294 '200':
295 description: successful operation
296 schema:
297 type: array
298 items:
299 $ref: '#/definitions/User'
300 '/users/{id}':
301 delete:
302 security:
303 - OAuth2: [ ]
304 tags:
305 - User
306 consumes:
307 - application/json
308 produces:
309 - application/json
310 parameters:
311 - name: id
312 in: path
313 required: true
314 type: string
315 description: 'The user id '
316 responses:
317 '204':
318 description: successful operation
319 get:
320 security:
321 - OAuth2: [ ]
322 tags:
323 - User
324 consumes:
325 - application/json
326 produces:
327 - application/json
328 parameters:
329 - name: id
330 in: path
331 required: true
332 type: string
333 description: 'The user id '
334 responses:
335 '200':
336 description: successful operation
337 schema:
338 $ref: '#/definitions/User'
339 put:
340 security:
341 - OAuth2: [ ]
342 tags:
343 - User
344 consumes:
345 - application/json
346 produces:
347 - application/json
348 parameters:
349 - name: id
350 in: path
351 required: true
352 type: string
353 description: 'The user id '
354 - in: body
355 name: body
356 required: true
357 schema:
358 $ref: '#/definitions/UpdateUser'
359 responses:
360 '204':
361 description: successful operation
362 /users/me:
363 get:
364 security:
365 - OAuth2: [ ]
366 tags:
367 - User
368 consumes:
369 - application/json
370 produces:
371 - application/json
372 responses:
373 '200':
374 description: successful operation
375 schema:
376 type: array
377 items:
378 $ref: '#/definitions/User'
379 put:
380 security:
381 - OAuth2: [ ]
382 tags:
383 - User
384 consumes:
385 - application/json
386 produces:
387 - application/json
388 parameters:
389 - in: body
390 name: body
391 required: true
392 schema:
393 $ref: '#/definitions/UpdateMe'
394 responses:
395 '204':
396 description: successful operation
397 /users/me/video-quota-used:
398 get:
399 security:
400 - OAuth2: [ ]
401 tags:
402 - User
403 consumes:
404 - application/json
405 produces:
406 - application/json
407 parameters: []
408 responses:
409 '200':
410 description: successful operation
411 schema:
412 type: number
413 '/users/me/videos/{videoId}/rating':
414 get:
415 security:
416 - OAuth2: [ ]
417 tags:
418 - User
419 consumes:
420 - application/json
421 produces:
422 - application/json
423 parameters:
424 - name: videoId
425 in: path
426 required: true
427 type: string
428 description: 'The video id '
429 responses:
430 '200':
431 description: successful operation
432 schema:
433 $ref: '#/definitions/GetMeVideoRating'
434 /users/me/videos:
435 get:
436 security:
437 - OAuth2: [ ]
438 tags:
439 - User
440 consumes:
441 - application/json
442 produces:
443 - application/json
444 parameters:
445 - name: start
446 in: query
447 required: false
448 type: number
449 description: 'starting page'
450 - name: stop
451 in: query
452 required: false
453 type: number
454 description: 'stopping page'
455 - name: sort
456 in: query
457 required: false
458 type: number
459 description: 'sorting'
460 responses:
461 '200':
462 description: successful operation
463 schema:
464 type: array
465 items:
466 $ref: '#/definitions/Video'
467 /users/register:
468 post:
469 tags:
470 - User
471 consumes:
472 - application/json
473 produces:
474 - application/json
475 parameters:
476 - in: body
477 name: body
478 required: true
479 schema:
480 $ref: '#/definitions/RegisterUser'
481 responses:
482 '204':
483 description: successful operation
484 /users/me/avatar/pick:
485 post:
486 security:
487 - OAuth2: [ ]
488 tags:
489 - User
490 consumes:
491 - multipart/form-data
492 produces:
493 - application/json
494 parameters:
495 - in: formData
496 name: avatarfile
497 type: file
498 description: The file to upload.
499 responses:
500 '200':
501 description: successful operation
502 schema:
503 $ref: '#/definitions/Avatar'
504 /videos:
505 get:
506 tags:
507 - Video
508 consumes:
509 - application/json
510 produces:
511 - application/json
512 parameters:
513 - name: start
514 in: query
515 required: false
516 type: number
517 description: 'starting page'
518 - name: stop
519 in: query
520 required: false
521 type: number
522 description: 'stopping page'
523 - name: sort
524 in: query
525 required: false
526 type: number
527 description: 'sorting'
528 responses:
529 '200':
530 description: successful operation
531 schema:
532 type: array
533 items:
534 $ref: '#/definitions/Video'
535 /videos/categories:
536 get:
537 tags:
538 - Video
539 consumes:
540 - application/json
541 produces:
542 - application/json
543 responses:
544 '200':
545 description: successful operation
546 schema:
547 type: array
548 items:
549 type: string
550 /videos/licences:
551 get:
552 tags:
553 - Video
554 consumes:
555 - application/json
556 produces:
557 - application/json
558 responses:
559 '200':
560 description: successful operation
561 schema:
562 type: array
563 items:
564 type: string
565 /videos/languages:
566 get:
567 tags:
568 - Video
569 consumes:
570 - application/json
571 produces:
572 - application/json
573 responses:
574 '200':
575 description: successful operation
576 schema:
577 type: array
578 items:
579 type: string
580 /videos/privacies:
581 get:
582 tags:
583 - Video
584 consumes:
585 - application/json
586 produces:
587 - application/json
588 responses:
589 '200':
590 description: successful operation
591 schema:
592 type: array
593 items:
594 type: string
595 /videos/search:
596 get:
597 tags:
598 - Video
599 consumes:
600 - application/json
601 produces:
602 - application/json
603 parameters:
604 - name: start
605 in: query
606 required: false
607 type: number
608 description: 'starting page'
609 - name: stop
610 in: query
611 required: false
612 type: number
613 description: 'stopping page'
614 - name: sort
615 in: query
616 required: false
617 type: number
618 description: 'sorting'
619 responses:
620 '200':
621 description: successful operation
622 schema:
623 type: array
624 items:
625 $ref: '#/definitions/Video'
626 "/videos/{id}":
627 put:
628 security:
629 - OAuth2: [ ]
630 tags:
631 - Video
632 consumes:
633 - multipart/form-data
634 produces:
635 - application/json
636 parameters:
637 - name: id
638 in: path
639 required: true
640 type: string
641 description: 'The video id'
642 - name: thumbnailfile
643 in: formData
644 type: file
645 description: 'Video thumbnail file'
646 - name: previewfile
647 in: formData
648 type: file
649 description: 'Video preview file'
650 - name: category
651 in: formData
652 type: number
653 description: 'Video category'
654 - name: licence
655 in: formData
656 type: number
657 description: 'Video licence'
658 - name: language
659 in: formData
660 type: string
661 description: 'Video language'
662 - name: description
663 in: formData
664 type: string
665 description: 'Video description'
666 - name: support
667 in: formData
668 type: string
669 description: 'Text describing how to support the video uploader'
670 - name: nsfw
671 in: formData
672 type: boolean
673 description: 'Whether or not this video contains sensitive content'
674 - name: name
675 in: formData
676 type: string
677 description: 'Video name'
678 - name: tags
679 in: formData
680 type: string[]
681 description: 'Video tags'
682 - name: commentsEnabled
683 in: formData
684 type: boolean
685 description: 'Enable or disable comments for this video'
686 - name: privacy
687 in: formData
688 type: string
689 enum: [Public, Unlisted]
690 description: 'Video privacy'
691 responses:
692 '200':
693 description: successful operation
694 schema:
695 $ref: '#/definitions/Video'
696 get:
697 tags:
698 - Video
699 consumes:
700 - application/json
701 produces:
702 - application/json
703 parameters:
704 - name: id
705 in: path
706 required: true
707 type: string
708 description: 'The video id '
709 responses:
710 '200':
711 description: successful operation
712 schema:
713 $ref: '#/definitions/Video'
714 delete:
715 security:
716 - OAuth2: [ ]
717 tags:
718 - Video
719 consumes:
720 - application/json
721 produces:
722 - application/json
723 parameters:
724 - name: id
725 in: path
726 required: true
727 type: string
728 description: 'The video id '
729 responses:
730 '204':
731 description: successful operation
732 "/videos/{id}/description":
733 get:
734 tags:
735 - Video
736 consumes:
737 - application/json
738 produces:
739 - application/json
740 parameters:
741 - name: id
742 in: path
743 required: true
744 type: string
745 description: 'The video id '
746 responses:
747 '200':
748 description: successful operation
749 schema:
750 type: string
751 "/videos/{id}/views":
752 post:
753 tags:
754 - Video
755 consumes:
756 - application/json
757 produces:
758 - application/json
759 parameters:
760 - name: id
761 in: path
762 required: true
763 type: string
764 description: 'The video id '
765 responses:
766 '204':
767 description: successful operation
768 /videos/upload:
769 post:
770 security:
771 - OAuth2: [ ]
772 tags:
773 - Video
774 consumes:
775 - multipart/form-data
776 produces:
777 - application/json
778 parameters:
779 - name: videofile
780 in: formData
781 type: file
782 required: true
783 description: 'Video file'
784 - name: thumbnailfile
785 in: formData
786 type: file
787 required: true
788 description: 'Video thumbnail file'
789 - name: previewfile
790 in: formData
791 type: file
792 required: true
793 description: 'Video preview file'
794 - name: category
795 in: formData
796 type: number
797 description: 'Video category'
798 - name: licence
799 in: formData
800 type: number
801 description: 'Video licence'
802 - name: language
803 in: formData
804 type: string
805 description: 'Video language'
806 - name: description
807 in: formData
808 type: string
809 description: 'Video description'
810 - name: support
811 in: formData
812 type: string
813 description: 'Text describing how to support the video uploader'
814 - name: channelId
815 in: formData
816 required: true
817 type: number
818 description: 'Channel id that will contain this video'
819 - name: nsfw
820 in: formData
821 required: true
822 type: boolean
823 description: 'Whether or not this video contains sensitive content'
824 - name: name
825 in: formData
826 required: true
827 type: string
828 description: 'Video name'
829 - name: tags
830 in: formData
831 type: string[]
832 description: 'Video tags'
833 - name: commentsEnabled
834 in: formData
835 type: boolean
836 description: 'Enable or disable comments for this video'
837 - name: privacy
838 in: formData
839 required: true
840 type: string
841 enum: [Public, Unlisted, Private]
842 description: 'Video privacy'
843 responses:
844 '200':
845 description: successful operation
846 schema:
847 $ref: '#/definitions/VideoUploadResponse'
848 /videos/abuse:
849 get:
850 security:
851 - OAuth2: [ ]
852 tags:
853 - VideoAbuse
854 consumes:
855 - application/json
856 produces:
857 - application/json
858 parameters:
859 - name: start
860 in: query
861 required: false
862 type: number
863 description: 'starting page'
864 - name: stop
865 in: query
866 required: false
867 type: number
868 description: 'stopping page'
869 - name: sort
870 in: query
871 required: false
872 type: number
873 description: 'sorting'
874 responses:
875 '200':
876 description: successful operation
877 schema:
878 type: array
879 items:
880 $ref: '#/definitions/VideoAbuse'
881 "/videos/{id}/abuse":
882 post:
883 security:
884 - OAuth2: [ ]
885 tags:
886 - VideoAbuse
887 consumes:
888 - application/json
889 produces:
890 - application/json
891 parameters:
892 - name: id
893 in: path
894 required: true
895 type: string
896 description: 'The video id '
897 responses:
898 '204':
899 description: successful operation
900 "/videos/{videoId}/blacklist":
901 post:
902 security:
903 - OAuth2: [ ]
904 tags:
905 - VideoBlacklist
906 consumes:
907 - application/json
908 produces:
909 - application/json
910 parameters:
911 - name: videoId
912 in: path
913 required: true
914 type: string
915 description: 'The video id '
916 responses:
917 '204':
918 description: successful operation
919 delete:
920 security:
921 - OAuth2: [ ]
922 tags:
923 - VideoBlacklist
924 consumes:
925 - application/json
926 produces:
927 - application/json
928 parameters:
929 - name: videoId
930 in: path
931 required: true
932 type: string
933 description: 'The video id '
934 responses:
935 '204':
936 description: successful operation
937 /videos/blacklist:
938 get:
939 security:
940 - OAuth2: [ ]
941 tags:
942 - VideoBlacklist
943 consumes:
944 - application/json
945 produces:
946 - application/json
947 parameters:
948 - name: start
949 in: query
950 required: false
951 type: number
952 description: 'starting page'
953 - name: stop
954 in: query
955 required: false
956 type: number
957 description: 'stopping page'
958 - name: sort
959 in: query
960 required: false
961 type: number
962 description: 'sorting'
963 responses:
964 '200':
965 description: successful operation
966 schema:
967 type: array
968 items:
969 $ref: '#/definitions/VideoBlacklist'
970 /videos/channels:
971 get:
972 tags:
973 - VideoChannel
974 consumes:
975 - application/json
976 produces:
977 - application/json
978 parameters:
979 - name: start
980 in: query
981 required: false
982 type: number
983 description: 'starting page'
984 - name: stop
985 in: query
986 required: false
987 type: number
988 description: 'stopping page'
989 - name: sort
990 in: query
991 required: false
992 type: number
993 description: 'sorting'
994 responses:
995 '200':
996 description: successful operation
997 schema:
998 type: array
999 items:
1000 $ref: '#/definitions/VideoChannel'
1001 post:
1002 security:
1003 - OAuth2: [ ]
1004 tags:
1005 - VideoChannel
1006 consumes:
1007 - application/json
1008 produces:
1009 - application/json
1010 parameters:
1011 - in: body
1012 name: body
1013 schema:
1014 $ref: '#/definitions/VideoChannelInput'
1015 responses:
1016 '204':
1017 description: successful operation
1018 "/videos/channels/{id}":
1019 get:
1020 tags:
1021 - VideoChannel
1022 consumes:
1023 - application/json
1024 produces:
1025 - application/json
1026 parameters:
1027 - name: id
1028 in: path
1029 required: true
1030 type: string
1031 description: 'The video id '
1032 responses:
1033 '200':
1034 description: successful operation
1035 schema:
1036 $ref: '#/definitions/VideoChannel'
1037 put:
1038 security:
1039 - OAuth2: [ ]
1040 tags:
1041 - VideoChannel
1042 consumes:
1043 - application/json
1044 produces:
1045 - application/json
1046 parameters:
1047 - name: id
1048 in: path
1049 required: true
1050 type: string
1051 description: 'The video id '
1052 - in: body
1053 name: body
1054 schema:
1055 $ref: '#/definitions/VideoChannelInput'
1056 responses:
1057 '204':
1058 description: successful operation
1059 delete:
1060 security:
1061 - OAuth2: [ ]
1062 tags:
1063 - VideoChannel
1064 consumes:
1065 - application/json
1066 produces:
1067 - application/json
1068 parameters:
1069 - name: id
1070 in: path
1071 required: true
1072 type: string
1073 description: 'The video id '
1074 responses:
1075 '204':
1076 description: successful operation
1077 /videos/accounts/{accountId}/channels:
1078 get:
1079 tags:
1080 - VideoChannel
1081 consumes:
1082 - application/json
1083 produces:
1084 - application/json
1085 parameters:
1086 - name: accountId
1087 in: path
1088 required: true
1089 type: string
1090 description: 'The account id '
1091 responses:
1092 '200':
1093 description: successful operation
1094 schema:
1095 type: array
1096 items:
1097 $ref: '#/definitions/VideoChannel'
1098 "/videos/{videoId}/comment-threads":
1099 get:
1100 tags:
1101 - VideoComment
1102 consumes:
1103 - application/json
1104 produces:
1105 - application/json
1106 parameters:
1107 - name: videoId
1108 in: path
1109 required: true
1110 type: string
1111 description: 'The video id '
1112 - name: start
1113 in: query
1114 required: false
1115 type: number
1116 description: 'starting page'
1117 - name: stop
1118 in: query
1119 required: false
1120 type: number
1121 description: 'stopping page'
1122 - name: sort
1123 in: query
1124 required: false
1125 type: number
1126 description: 'sorting'
1127 responses:
1128 '200':
1129 description: successful operation
1130 schema:
1131 $ref: '#/definitions/CommentThreadResponse'
1132 post:
1133 security:
1134 - OAuth2: [ ]
1135 tags:
1136 - VideoComment
1137 consumes:
1138 - application/json
1139 produces:
1140 - application/json
1141 parameters:
1142 - name: videoId
1143 in: path
1144 required: true
1145 type: string
1146 description: 'The video id '
1147 responses:
1148 '200':
1149 description: successful operation
1150 schema:
1151 $ref: '#/definitions/CommentThreadPostResponse'
1152 "/videos/{videoId}/comment-threads/{threadId}":
1153 get:
1154 tags:
1155 - VideoComment
1156 consumes:
1157 - application/json
1158 produces:
1159 - application/json
1160 parameters:
1161 - name: videoId
1162 in: path
1163 required: true
1164 type: string
1165 description: 'The video id '
1166 - name: threadId
1167 in: path
1168 required: true
1169 type: string
1170 description: 'The thread id '
1171 responses:
1172 '200':
1173 description: successful operation
1174 schema:
1175 $ref: '#/definitions/VideoCommentThreadTree'
1176 "/videos/{videoId}/comments/{commentId}":
1177 post:
1178 security:
1179 - OAuth2: [ ]
1180 tags:
1181 - VideoComment
1182 consumes:
1183 - application/json
1184 produces:
1185 - application/json
1186 parameters:
1187 - name: videoId
1188 in: path
1189 required: true
1190 type: string
1191 description: 'The video id '
1192 - name: commentId
1193 in: path
1194 required: true
1195 type: string
1196 description: 'The comment id '
1197 responses:
1198 '200':
1199 description: successful operation
1200 schema:
1201 $ref: '#/definitions/CommentThreadPostResponse'
1202 delete:
1203 security:
1204 - OAuth2: [ ]
1205 tags:
1206 - VideoComment
1207 consumes:
1208 - application/json
1209 produces:
1210 - application/json
1211 parameters:
1212 - name: videoId
1213 in: path
1214 required: true
1215 type: string
1216 description: 'The video id '
1217 - name: commentId
1218 in: path
1219 required: true
1220 type: string
1221 description: 'The comment id '
1222 responses:
1223 '204':
1224 description: successful operation
1225 "/videos/{id}/rate":
1226 put:
1227 security:
1228 - OAuth2: [ ]
1229 tags:
1230 - VideoRate
1231 consumes:
1232 - application/json
1233 produces:
1234 - application/json
1235 parameters:
1236 - name: id
1237 in: path
1238 required: true
1239 type: string
1240 description: 'The video id '
1241 responses:
1242 '204':
1243 description: successful operation
1244 definitions:
1245 VideoConstantNumber:
1246 properties:
1247 id:
1248 type: number
1249 label:
1250 type: string
1251 VideoConstantString:
1252 properties:
1253 id:
1254 type: string
1255 label:
1256 type: string
1257 VideoPrivacy:
1258 type: string
1259 enum: [Public, Unlisted, Private]
1260 Video:
1261 properties:
1262 id:
1263 type: number
1264 uuid:
1265 type: string
1266 createdAt:
1267 type: string
1268 publishedAt:
1269 type: string
1270 updatedAt:
1271 type: string
1272 category:
1273 $ref: "#/definitions/VideoConstantNumber"
1274 licence:
1275 $ref: "#/definitions/VideoConstantNumber"
1276 language:
1277 $ref: "#/definitions/VideoConstantString"
1278 privacy:
1279 $ref: "#/definitions/VideoPrivacy"
1280 description:
1281 type: string
1282 duration:
1283 type: number
1284 isLocal:
1285 type: boolean
1286 name:
1287 type: string
1288 thumbnailPath:
1289 type: string
1290 previewPath:
1291 type: string
1292 embedPath:
1293 type: string
1294 views:
1295 type: number
1296 likes:
1297 type: number
1298 dislikes:
1299 type: number
1300 nsfw:
1301 type: boolean
1302 account:
1303 type: object
1304 properties:
1305 name:
1306 type: string
1307 displayName:
1308 type: string
1309 url:
1310 type: string
1311 host:
1312 type: string
1313 avatar:
1314 $ref: "#/definitions/Avatar"
1315 VideoAbuse:
1316 properties:
1317 id:
1318 type: number
1319 reason:
1320 type: string
1321 reporterAccount:
1322 $ref: "#/definitions/Account"
1323 video:
1324 type: object
1325 properties:
1326 id:
1327 type: number
1328 name:
1329 type: string
1330 uuid:
1331 type: string
1332 url:
1333 type: string
1334 createdAt:
1335 type: string
1336 VideoBlacklist:
1337 properties:
1338 id:
1339 type: number
1340 videoId:
1341 type: number
1342 createdAt:
1343 type: string
1344 updatedAt:
1345 type: string
1346 name:
1347 type: string
1348 uuid:
1349 type: string
1350 description:
1351 type: string
1352 duration:
1353 type: number
1354 views:
1355 type: number
1356 likes:
1357 type: number
1358 dislikes:
1359 type: number
1360 nsfw:
1361 type: boolean
1362 VideoChannel:
1363 properties:
1364 displayName:
1365 type: string
1366 description:
1367 type: string
1368 isLocal:
1369 type: boolean
1370 owner:
1371 type: object
1372 properties:
1373 name:
1374 type: string
1375 uuid:
1376 type: string
1377 videos:
1378 type: array
1379 items:
1380 $ref: "#/definitions/Video"
1381 VideoComment:
1382 properties:
1383 id:
1384 type: number
1385 url:
1386 type: string
1387 text:
1388 type: string
1389 threadId:
1390 type: number
1391 inReplyToCommentId:
1392 type: number
1393 videoId:
1394 type: number
1395 createdAt:
1396 type: string
1397 updatedAt:
1398 type: string
1399 totalReplies:
1400 type: number
1401 account:
1402 $ref: "#/definitions/Account"
1403 VideoCommentThreadTree:
1404 properties:
1405 comment:
1406 $ref: "#/definitions/VideoComment"
1407 children:
1408 type: array
1409 items:
1410 $ref: "#/definitions/VideoCommentThreadTree"
1411 Avatar:
1412 properties:
1413 path:
1414 type: string
1415 createdAt:
1416 type: string
1417 updatedAt:
1418 type: string
1419 Actor:
1420 properties:
1421 id:
1422 type: number
1423 uuid:
1424 type: string
1425 url:
1426 type: string
1427 name:
1428 type: string
1429 host:
1430 type: string
1431 followingCount:
1432 type: number
1433 followersCount:
1434 type: number
1435 createdAt:
1436 type: string
1437 updatedAt:
1438 type: string
1439 avatar:
1440 $ref: "#/definitions/Avatar"
1441 Account:
1442 allOf:
1443 - $ref: "#/definitions/Actor"
1444 - properties:
1445 displayName:
1446 type: string
1447 User:
1448 properties:
1449 id:
1450 type: number
1451 username:
1452 type: string
1453 email:
1454 type: string
1455 displayNSFW:
1456 type: boolean
1457 autoPlayVideo:
1458 type: boolean
1459 role:
1460 type: string
1461 enum: [User, Moderator, Administrator]
1462 videoQuota:
1463 type: number
1464 createdAt:
1465 type: string
1466 account:
1467 $ref: "#/definitions/Account"
1468 videoChannels:
1469 type: array
1470 items:
1471 $ref: "#/definitions/VideoChannel"
1472 ServerConfig:
1473 properties:
1474 signup:
1475 type: object
1476 properties:
1477 allowed:
1478 type: boolean
1479 transcoding:
1480 type: object
1481 properties:
1482 enabledResolutions:
1483 type: array
1484 items:
1485 type: number
1486 avatar:
1487 type: object
1488 properties:
1489 file:
1490 type: object
1491 properties:
1492 size:
1493 type: object
1494 properties:
1495 max:
1496 type: number
1497 extensions:
1498 type: array
1499 items:
1500 type: string
1501 video:
1502 type: object
1503 properties:
1504 file:
1505 type: object
1506 properties:
1507 extensions:
1508 type: array
1509 items:
1510 type: string
1511 Follow:
1512 properties:
1513 id:
1514 type: number
1515 follower:
1516 $ref: "#/definitions/Actor"
1517 following:
1518 $ref: "#/definitions/Actor"
1519 score:
1520 type: number
1521 state:
1522 type: string
1523 enum: [pending, accepted]
1524 createdAt:
1525 type: string
1526 updatedAt:
1527 type: string
1528 Job:
1529 properties:
1530 id:
1531 type: number
1532 state:
1533 type: string
1534 enum: [pending, processing, error, success]
1535 category:
1536 type: string
1537 enum: [transcoding, activitypub-http]
1538 handlerName:
1539 type: string
1540 handlerInputData:
1541 type: string
1542 createdAt:
1543 type: string
1544 updatedAt:
1545 type: string
1546
1547 # Api responses
1548 AddUserResponse:
1549 properties:
1550 id:
1551 type: number
1552 uuid:
1553 type: string
1554 VideoUploadResponse:
1555 properties:
1556 video:
1557 type: object
1558 properties:
1559 id:
1560 type: number
1561 uuid:
1562 type: string
1563 CommentThreadResponse:
1564 properties:
1565 total:
1566 type: number
1567 data:
1568 type: array
1569 items:
1570 $ref: "#/definitions/VideoComment"
1571 CommentThreadPostResponse:
1572 properties:
1573 comment:
1574 $ref: "#/definitions/VideoComment"
1575
1576 # Request bodies
1577 AddUser:
1578 properties:
1579 username:
1580 type: string
1581 description: 'The user username '
1582 password:
1583 type: string
1584 description: 'The user password '
1585 email:
1586 type: string
1587 description: 'The user email '
1588 videoQuota:
1589 type: string
1590 description: 'The user videoQuota '
1591 role:
1592 type: string
1593 description: 'The user role '
1594 required:
1595 - username
1596 - password
1597 - email
1598 - videoQuota
1599 - role
1600 UpdateUser:
1601 properties:
1602 id:
1603 type: string
1604 description: 'The user id '
1605 email:
1606 type: string
1607 description: 'The updated email of the user '
1608 videoQuota:
1609 type: string
1610 description: 'The updated videoQuota of the user '
1611 role:
1612 type: string
1613 description: 'The updated role of the user '
1614 required:
1615 - id
1616 - email
1617 - videoQuota
1618 - role
1619 UpdateMe:
1620 properties:
1621 password:
1622 type: string
1623 description: 'Your new password '
1624 email:
1625 type: string
1626 description: 'Your new email '
1627 displayNSFW:
1628 type: string
1629 description: 'Your new displayNSFW '
1630 autoPlayVideo:
1631 type: string
1632 description: 'Your new autoPlayVideo '
1633 required:
1634 - password
1635 - email
1636 - displayNSFW
1637 - autoPlayVideo
1638 GetMeVideoRating:
1639 properties:
1640 id:
1641 type: string
1642 description: 'Id of the video '
1643 rating:
1644 type: number
1645 description: 'Rating of the video '
1646 required:
1647 - id
1648 - rating
1649 RegisterUser:
1650 properties:
1651 username:
1652 type: string
1653 description: 'The username of the user '
1654 password:
1655 type: string
1656 description: 'The password of the user '
1657 email:
1658 type: string
1659 description: 'The email of the user '
1660 required:
1661 - username
1662 - password
1663 - email
1664 VideoChannelInput:
1665 properties:
1666 name:
1667 type: string
1668 description:
1669 type: string