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