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