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