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