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