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