]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/api/openapi.yaml
grouping moderation endpoints in the RESTĀ API spec
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
CommitLineData
3e9e6f2f 1openapi: 3.0.0
1569a818 2info:
5e1c08eb 3 title: PeerTube
1d859b5a 4 version: 1.1.0-alpha.2
2963c343
RK
5 contact:
6 name: PeerTube Community
7 url: 'https://joinpeertube.org'
8 license:
9 name: AGPLv3.0
10 url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'
11 x-logo:
12 url: 'https://joinpeertube.org/img/brand.png'
5776f78e 13 altText: PeerTube Project Homepage
2963c343
RK
14 description: |
15 # Introduction
16 The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable
17 resource URLs. It returns HTTP response codes to indicate errors. It also
18 accepts and returns JSON in the HTTP body. You can use your favorite
19 HTTP/REST library for your programming language to use PeerTube. No official
5776f78e
RK
20 SDK is currently provided, but the spec API is fully compatible with
21 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
22 which generates a client SDK in the language of your choice.
3e9e6f2f 23
2963c343
RK
24 # Authentication
25 When you sign up for an account, you are given the possibility to generate
26 sessions, and authenticate using this session token. One session token can
27 currently be used at a time.
5776f78e
RK
28
29 # Errors
30 The API uses standard HTTP status codes to indicate the success or failure
31 of the API call. The body of the response will be JSON in the following
32 format.
33
34 ```
35 {
36 "code": "unauthorized_request", // example inner error code
37 "error": "Token is invalid." // example exposed error message
38 }
39 ```
6441981b
RK
40externalDocs:
41 url: https://docs.joinpeertube.org/api.html
2963c343
RK
42tags:
43 - name: Accounts
3e9e6f2f 44 description: >
2963c343 45 Using some features of PeerTube require authentication, for which Accounts
3e9e6f2f 46 provide different levels of permission as well as associated user
5776f78e 47 information. Accounts also encompass remote accounts discovered across the federation.
2963c343 48 - name: Config
3e9e6f2f
RK
49 description: >
50 Each server exposes public information regarding supported videos and
51 options.
2963c343
RK
52 - name: Feeds
53 description: |
54 Feeds of videos and feeds of comments allow to see updates and get them in
55 an aggregator or script of your choice.
56 - name: Job
3e9e6f2f
RK
57 description: >
58 Jobs are long-running tasks enqueued and processed by the instance
5776f78e
RK
59 itself. No additional worker registration is currently available.
60 - name: Server Following
3e9e6f2f
RK
61 description: >
62 Managing servers which the instance interacts with is crucial to the
5776f78e
RK
63 concept of federation in PeerTube and external video indexation. The PeerTube
64 server then deals with inter-server ActivityPub operations and propagates
2963c343
RK
65 information across its social graph by posting activities to actors' inbox
66 endpoints.
5776f78e 67 - name: Video Abuse
2963c343
RK
68 description: |
69 Video abuses deal with reports of local or remote videos alike.
70 - name: Video
71 description: |
72 Operations dealing with listing, uploading, fetching or modifying videos.
73 - name: Search
74 description: |
75 The search helps to find _videos_ from within the instance and beyond.
76 Videos from other instances federated by the instance (that is, instances
77 followed by the instance) can be found via keywords and other criteria of
78 the advanced search.
5776f78e 79 - name: Video Comment
3e9e6f2f
RK
80 description: >
81 Operations dealing with comments to a video. Comments are organized in
82 threads.
5776f78e 83 - name: Video Channel
3e9e6f2f
RK
84 description: >
85 Operations dealing with creation, modification and video listing of a
5776f78e
RK
86 user's channels.
87 - name: Video Blacklist
88 description: >
89 Operations dealing with blacklisting videos (removing them from view and
90 preventing interactions).
91 - name: Video Rate
92 description: >
93 Voting for a video.
94x-tagGroups:
95 - name: Accounts
96 tags:
97 - Accounts
98 - User
99 - name: Videos
100 tags:
101 - Video
102 - Video Channel
103 - Video Comment
104 - Video Abuse
105 - Video Following
106 - Video Rate
107 - name: Moderation
108 tags:
9ab81fc4 109 - Vdieo Abuse
5776f78e
RK
110 - Video Blacklist
111 - name: Public Instance Information
112 tags:
113 - Config
114 - Server Following
115 - name: Notifications
116 tags:
117 - Feeds
118 - name: Jobs
119 tags:
120 - Job
121 - name: Search
122 tags:
123 - Search
1569a818 124paths:
ad9e39fb 125 '/accounts/{name}':
1569a818
DG
126 get:
127 tags:
128 - Accounts
2963c343 129 summary: Get the account by name
1569a818 130 parameters:
3e9e6f2f
RK
131 - $ref: '#/components/parameters/name'
132 - $ref: '#/components/parameters/start'
133 - $ref: '#/components/parameters/count'
134 - $ref: '#/components/parameters/sort'
1569a818
DG
135 responses:
136 '200':
137 description: successful operation
3e9e6f2f
RK
138 content:
139 application/json:
140 schema:
141 $ref: '#/components/schemas/Account'
ad9e39fb 142 '/accounts/{name}/videos':
6b738c7a
C
143 get:
144 tags:
145 - Accounts
2963c343 146 - Video
3e9e6f2f 147 summary: 'Get videos for an account, provided the name of that account'
6b738c7a 148 parameters:
3e9e6f2f 149 - $ref: '#/components/parameters/name'
6b738c7a
C
150 responses:
151 '200':
152 description: successful operation
3e9e6f2f
RK
153 content:
154 application/json:
155 schema:
156 $ref: '#/components/schemas/Video'
2963c343
RK
157 x-code-samples:
158 - lang: JavaScript
159 source: |
8f9e8be1 160 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
2963c343
RK
161 .then(function(response) {
162 return response.json()
163 }).then(function(data) {
164 console.log(data)
165 })
8f9e8be1
RK
166 - lang: Shell
167 source: |
168 # pip install httpie
169 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
5776f78e
RK
170 - lang: Ruby
171 source: |
172 require 'uri'
173 require 'net/http'
174
175 url = URI("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
176
177 http = Net::HTTP.new(url.host, url.port)
178 http.use_ssl = true
179 http.verify_mode = OpenSSL::SSL::VERIFY_NONE
180
181 request = Net::HTTP::Post.new(url)
182 request["content-type"] = 'application/json'
183 response = http.request(request)
184 puts response.read_body
185 - lang: Python
186 source: |
187 import http.client
188
189 conn = http.client.HTTPSConnection("https://peertube2.cpy.re/api/v1")
190
191 headers = {
192 'content-type': "application/json"
193 }
194
195 conn.request("POST", "/accounts/{name}/videos", None, headers)
196
197 res = conn.getresponse()
198 data = res.read()
199
200 print(data.decode("utf-8"))
1569a818
DG
201 /accounts:
202 get:
203 tags:
204 - Accounts
2963c343 205 summary: Get all accounts
1569a818
DG
206 responses:
207 '200':
208 description: successful operation
3e9e6f2f 209 content:
8f9e8be1 210 'application/json':
3e9e6f2f
RK
211 schema:
212 type: array
213 items:
214 $ref: '#/components/schemas/Account'
1569a818
DG
215 /config:
216 get:
217 tags:
218 - Config
6441981b 219 summary: Get the public configuration of the server
1569a818
DG
220 responses:
221 '200':
222 description: successful operation
3e9e6f2f
RK
223 content:
224 application/json:
225 schema:
226 $ref: '#/components/schemas/ServerConfig'
6441981b
RK
227 /config/about:
228 get:
229 summary: Get the instance about page content
230 tags:
231 - Config
232 responses:
233 '200':
234 description: successful operation
235 /config/custom:
236 get:
237 summary: Get the runtime configuration of the server
238 tags:
239 - Config
240 security:
241 - OAuth2:
242 - admin
243 responses:
244 '200':
245 description: successful operation
246 put:
247 summary: Set the runtime configuration of the server
248 tags:
249 - Config
250 security:
251 - OAuth2:
252 - admin
253 responses:
254 '200':
255 description: successful operation
256 delete:
257 summary: Delete the runtime configuration of the server
258 tags:
259 - Config
260 security:
261 - OAuth2:
262 - admin
263 responses:
264 '200':
265 description: successful operation
3e9e6f2f 266 '/feeds/videos.{format}':
244e76a5 267 get:
3e9e6f2f
RK
268 summary: >-
269 Get the feed of videos for the server, with optional filter by account
270 name or id
244e76a5
RK
271 tags:
272 - Feeds
244e76a5
RK
273 parameters:
274 - name: format
275 in: path
276 required: true
3e9e6f2f
RK
277 description: >-
278 The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and
279 json to JSON FEED 1.0
280 schema:
281 type: string
282 enum:
283 - xml
284 - atom
285 - json
286 default: xml
244e76a5
RK
287 - name: accountId
288 in: query
289 required: false
3e9e6f2f
RK
290 description: >-
291 The id of the local account to filter to (beware, users IDs and not
292 actors IDs which will return empty feeds
293 schema:
294 type: number
244e76a5
RK
295 - name: accountName
296 in: query
297 required: false
3e9e6f2f
RK
298 description: The name of the local account to filter to
299 schema:
300 type: string
244e76a5
RK
301 responses:
302 '200':
303 description: successful operation
1569a818
DG
304 /jobs:
305 get:
2963c343 306 summary: Get list of jobs
94ff4c23 307 security:
3e9e6f2f
RK
308 - OAuth2:
309 - admin
1569a818
DG
310 tags:
311 - Job
44cb3b85
DG
312 parameters:
313 - name: state
314 in: path
315 required: true
3e9e6f2f
RK
316 description: The state of the job
317 schema:
318 type: string
319 - $ref: '#/components/parameters/start'
320 - $ref: '#/components/parameters/count'
321 - $ref: '#/components/parameters/sort'
1569a818
DG
322 responses:
323 '200':
324 description: successful operation
3e9e6f2f
RK
325 content:
326 application/json:
327 schema:
328 type: array
329 items:
330 $ref: '#/components/schemas/Job'
1569a818
DG
331 '/server/following/{host}':
332 delete:
94ff4c23 333 security:
3e9e6f2f
RK
334 - OAuth2:
335 - admin
1569a818 336 tags:
5776f78e 337 - Server Following
2963c343 338 summary: Unfollow a server by hostname
1569a818
DG
339 parameters:
340 - name: host
341 in: path
342 required: true
1569a818 343 description: 'The host to unfollow '
3e9e6f2f
RK
344 schema:
345 type: string
1569a818
DG
346 responses:
347 '201':
348 description: successful operation
349 /server/followers:
350 get:
351 tags:
5776f78e 352 - Server Following
2963c343 353 summary: Get followers of the server
44cb3b85 354 parameters:
3e9e6f2f
RK
355 - $ref: '#/components/parameters/start'
356 - $ref: '#/components/parameters/count'
357 - $ref: '#/components/parameters/sort'
1569a818
DG
358 responses:
359 '200':
360 description: successful operation
3e9e6f2f
RK
361 content:
362 application/json:
363 schema:
364 type: array
365 items:
366 $ref: '#/components/schemas/Follow'
1569a818
DG
367 /server/following:
368 get:
369 tags:
5776f78e 370 - Server Following
2963c343 371 summary: Get servers followed by the server
44cb3b85 372 parameters:
3e9e6f2f
RK
373 - $ref: '#/components/parameters/start'
374 - $ref: '#/components/parameters/count'
375 - $ref: '#/components/parameters/sort'
1569a818
DG
376 responses:
377 '200':
378 description: successful operation
3e9e6f2f
RK
379 content:
380 application/json:
381 schema:
382 type: array
383 items:
384 $ref: '#/components/schemas/Follow'
1569a818 385 post:
94ff4c23 386 security:
3e9e6f2f
RK
387 - OAuth2:
388 - admin
1569a818 389 tags:
5776f78e 390 - Server Following
2963c343 391 summary: Follow a server
1569a818
DG
392 responses:
393 '204':
3e9e6f2f
RK
394 $ref: '#/paths/~1users~1me/put/responses/204'
395 requestBody:
396 content:
397 application/json:
398 schema:
399 $ref: '#/components/schemas/Follow'
1569a818
DG
400 /users:
401 post:
2963c343 402 summary: Creates user
94ff4c23 403 security:
3e9e6f2f
RK
404 - OAuth2:
405 - admin
1569a818
DG
406 tags:
407 - User
1569a818
DG
408 responses:
409 '200':
410 description: successful operation
3e9e6f2f
RK
411 content:
412 application/json:
413 schema:
414 $ref: '#/components/schemas/AddUserResponse'
415 requestBody:
416 content:
417 application/json:
418 schema:
419 $ref: '#/components/schemas/AddUser'
420 description: User to create
421 required: true
1569a818 422 get:
2963c343 423 summary: Get a list of users
94ff4c23 424 security:
3e9e6f2f 425 - OAuth2: []
1569a818
DG
426 tags:
427 - User
44cb3b85 428 parameters:
3e9e6f2f
RK
429 - $ref: '#/components/parameters/start'
430 - $ref: '#/components/parameters/count'
431 - $ref: '#/components/parameters/sort'
1569a818
DG
432 responses:
433 '200':
434 description: successful operation
3e9e6f2f
RK
435 content:
436 application/json:
437 schema:
438 type: array
439 items:
440 $ref: '#/components/schemas/User'
1569a818
DG
441 '/users/{id}':
442 delete:
2963c343 443 summary: Delete a user by its id
94ff4c23 444 security:
3e9e6f2f
RK
445 - OAuth2:
446 - admin
1569a818
DG
447 tags:
448 - User
1569a818 449 parameters:
3e9e6f2f 450 - $ref: '#/components/parameters/id'
1569a818
DG
451 responses:
452 '204':
3e9e6f2f 453 $ref: '#/paths/~1users~1me/put/responses/204'
1569a818 454 get:
2963c343 455 summary: Get user by its id
94ff4c23 456 security:
3e9e6f2f 457 - OAuth2: []
1569a818
DG
458 tags:
459 - User
1569a818 460 parameters:
3e9e6f2f 461 - $ref: '#/components/parameters/id'
1569a818
DG
462 responses:
463 '200':
464 description: successful operation
3e9e6f2f
RK
465 content:
466 application/json:
467 schema:
468 $ref: '#/components/schemas/User'
1569a818 469 put:
2963c343 470 summary: Update user profile by its id
94ff4c23 471 security:
3e9e6f2f 472 - OAuth2: []
1569a818
DG
473 tags:
474 - User
1569a818 475 parameters:
3e9e6f2f 476 - $ref: '#/components/parameters/id'
1569a818
DG
477 responses:
478 '204':
3e9e6f2f
RK
479 $ref: '#/paths/~1users~1me/put/responses/204'
480 requestBody:
481 content:
482 application/json:
483 schema:
484 $ref: '#/components/schemas/UpdateUser'
485 required: true
1569a818
DG
486 /users/me:
487 get:
2963c343 488 summary: Get current user information
94ff4c23 489 security:
3e9e6f2f 490 - OAuth2: []
1569a818
DG
491 tags:
492 - User
1569a818
DG
493 responses:
494 '200':
495 description: successful operation
3e9e6f2f
RK
496 content:
497 application/json:
498 schema:
499 type: array
500 items:
501 $ref: '#/components/schemas/User'
1569a818 502 put:
2963c343 503 summary: Update current user information
94ff4c23 504 security:
3e9e6f2f 505 - OAuth2: []
1569a818
DG
506 tags:
507 - User
1569a818
DG
508 responses:
509 '204':
3e9e6f2f
RK
510 description: Successful operation
511 requestBody:
512 content:
513 application/json:
514 schema:
515 $ref: '#/components/schemas/UpdateMe'
516 required: true
1569a818
DG
517 /users/me/video-quota-used:
518 get:
2963c343 519 summary: Get current user used quota
94ff4c23 520 security:
3e9e6f2f 521 - OAuth2: []
1569a818
DG
522 tags:
523 - User
1569a818
DG
524 responses:
525 '200':
526 description: successful operation
3e9e6f2f
RK
527 content:
528 application/json:
529 schema:
530 type: number
1569a818
DG
531 '/users/me/videos/{videoId}/rating':
532 get:
3e9e6f2f 533 summary: 'Get rating of video by its id, among those of the current user'
94ff4c23 534 security:
3e9e6f2f 535 - OAuth2: []
1569a818
DG
536 tags:
537 - User
1569a818
DG
538 parameters:
539 - name: videoId
540 in: path
541 required: true
1569a818 542 description: 'The video id '
3e9e6f2f
RK
543 schema:
544 type: string
1569a818
DG
545 responses:
546 '200':
547 description: successful operation
3e9e6f2f
RK
548 content:
549 application/json:
550 schema:
551 $ref: '#/components/schemas/GetMeVideoRating'
1569a818
DG
552 /users/me/videos:
553 get:
2963c343 554 summary: Get videos of the current user
94ff4c23 555 security:
3e9e6f2f 556 - OAuth2: []
1569a818
DG
557 tags:
558 - User
44cb3b85 559 parameters:
3e9e6f2f
RK
560 - $ref: '#/components/parameters/start'
561 - $ref: '#/components/parameters/count'
562 - $ref: '#/components/parameters/sort'
1569a818
DG
563 responses:
564 '200':
565 description: successful operation
3e9e6f2f
RK
566 content:
567 application/json:
568 schema:
569 type: array
570 items:
571 $ref: '#/components/schemas/Video'
1569a818
DG
572 /users/register:
573 post:
2963c343 574 summary: Register a user
1569a818
DG
575 tags:
576 - User
1569a818
DG
577 responses:
578 '204':
3e9e6f2f
RK
579 $ref: '#/paths/~1users~1me/put/responses/204'
580 requestBody:
581 content:
582 application/json:
583 schema:
584 $ref: '#/components/schemas/RegisterUser'
585 required: true
1569a818
DG
586 /users/me/avatar/pick:
587 post:
2963c343 588 summary: Update current user avatar
94ff4c23 589 security:
3e9e6f2f 590 - OAuth2: []
1569a818
DG
591 tags:
592 - User
1569a818
DG
593 responses:
594 '200':
595 description: successful operation
3e9e6f2f
RK
596 content:
597 application/json:
598 schema:
599 $ref: '#/components/schemas/Avatar'
600 requestBody:
601 content:
602 multipart/form-data:
603 schema:
604 type: object
605 properties:
606 avatarfile:
607 description: The file to upload.
608 type: string
609 format: binary
610 encoding:
611 profileImage:
612 # only accept png/jpeg
613 contentType: image/png, image/jpeg
c360c494 614 /videos:
1569a818 615 get:
2963c343 616 summary: Get list of videos
1569a818
DG
617 tags:
618 - Video
44cb3b85 619 parameters:
61b909b9
P
620 - name: category
621 in: query
622 required: false
61b909b9 623 description: category id of the video
3e9e6f2f
RK
624 schema:
625 type: number
626 - $ref: '#/components/parameters/start'
627 - $ref: '#/components/parameters/count'
628 - $ref: '#/components/parameters/sort'
1569a818
DG
629 responses:
630 '200':
631 description: successful operation
3e9e6f2f
RK
632 content:
633 application/json:
634 schema:
635 type: array
636 items:
637 $ref: '#/components/schemas/Video'
c360c494 638 /videos/categories:
1569a818 639 get:
2963c343 640 summary: Get list of video licences known by the server
1569a818
DG
641 tags:
642 - Video
1569a818
DG
643 responses:
644 '200':
645 description: successful operation
3e9e6f2f
RK
646 content:
647 application/json:
648 schema:
649 type: array
650 items:
651 type: string
c360c494 652 /videos/licences:
1569a818 653 get:
2963c343 654 summary: Get list of video licences known by the server
1569a818
DG
655 tags:
656 - Video
1569a818
DG
657 responses:
658 '200':
659 description: successful operation
3e9e6f2f
RK
660 content:
661 application/json:
662 schema:
663 type: array
664 items:
665 type: string
c360c494 666 /videos/languages:
1569a818 667 get:
2963c343 668 summary: Get list of languages known by the server
1569a818
DG
669 tags:
670 - Video
1569a818
DG
671 responses:
672 '200':
673 description: successful operation
3e9e6f2f
RK
674 content:
675 application/json:
676 schema:
677 type: array
678 items:
679 type: string
c360c494 680 /videos/privacies:
1569a818 681 get:
2963c343 682 summary: Get list of privacy policies supported by the server
1569a818
DG
683 tags:
684 - Video
1569a818
DG
685 responses:
686 '200':
687 description: successful operation
3e9e6f2f
RK
688 content:
689 application/json:
690 schema:
691 type: array
692 items:
693 type: string
694 '/videos/{id}':
1569a818 695 put:
2963c343 696 summary: Update metadata for a video by its id
94ff4c23 697 security:
3e9e6f2f 698 - OAuth2: []
1569a818
DG
699 tags:
700 - Video
1569a818 701 parameters:
3e9e6f2f 702 - $ref: '#/components/parameters/id2'
1569a818
DG
703 responses:
704 '200':
705 description: successful operation
3e9e6f2f
RK
706 content:
707 application/json:
708 schema:
709 $ref: '#/components/schemas/Video'
710 requestBody:
711 content:
712 multipart/form-data:
713 schema:
714 type: object
715 properties:
716 thumbnailfile:
717 description: Video thumbnail file
718 type: string
719 previewfile:
720 description: Video preview file
721 type: string
722 category:
723 description: Video category
724 type: string
725 licence:
726 description: Video licence
727 type: string
728 language:
729 description: Video language
730 type: string
731 description:
732 description: Video description
733 type: string
734 waitTranscoding:
735 description: Whether or not we wait transcoding before publish the video
736 type: string
737 support:
738 description: Text describing how to support the video uploader
739 type: string
740 nsfw:
741 description: Whether or not this video contains sensitive content
742 type: string
743 name:
744 description: Video name
745 type: string
746 tags:
747 description: Video tags
748 type: string
749 commentsEnabled:
750 description: Enable or disable comments for this video
751 type: string
752 scheduleUpdate: &ref_0
753 type: object
754 properties:
755 privacy:
756 type: string
757 enum:
758 - Public
759 - Unlisted
760 description: Video privacy target
761 updateAt:
762 type: string
763 format: date
764 description: When to update the video
765 required:
766 - updateAt
1569a818 767 get:
2963c343 768 summary: Get a video by its id
1569a818
DG
769 tags:
770 - Video
1569a818 771 parameters:
3e9e6f2f 772 - $ref: '#/components/parameters/id2'
1569a818
DG
773 responses:
774 '200':
775 description: successful operation
3e9e6f2f
RK
776 content:
777 application/json:
778 schema:
779 $ref: '#/components/schemas/Video'
1569a818 780 delete:
2963c343 781 summary: Delete a video by its id
94ff4c23 782 security:
3e9e6f2f 783 - OAuth2: []
1569a818
DG
784 tags:
785 - Video
1569a818 786 parameters:
3e9e6f2f 787 - $ref: '#/components/parameters/id2'
1569a818
DG
788 responses:
789 '204':
3e9e6f2f
RK
790 $ref: '#/paths/~1users~1me/put/responses/204'
791 '/videos/{id}/description':
1569a818 792 get:
2963c343 793 summary: Get a video description by its id
1569a818
DG
794 tags:
795 - Video
1569a818 796 parameters:
3e9e6f2f 797 - $ref: '#/components/parameters/id2'
1569a818
DG
798 responses:
799 '200':
800 description: successful operation
3e9e6f2f
RK
801 content:
802 application/json:
803 schema:
804 type: string
805 '/videos/{id}/views':
1569a818 806 post:
2963c343 807 summary: Add a view to the video by its id
1569a818
DG
808 tags:
809 - Video
1569a818 810 parameters:
3e9e6f2f 811 - $ref: '#/components/parameters/id2'
1569a818
DG
812 responses:
813 '204':
3e9e6f2f 814 $ref: '#/paths/~1users~1me/put/responses/204'
6441981b
RK
815 '/videos/{id}/watching':
816 put:
817 summary: Indicate progress of in watching the video by its id for a user
818 tags:
819 - Video
820 security:
821 - OAuth2: []
822 parameters:
823 - $ref: '#/components/parameters/id2'
824 requestBody:
825 content:
826 application/json:
827 schema:
828 $ref: '#/components/schemas/UserWatchingVideo'
829 required: true
830 responses:
831 '204':
832 $ref: '#/paths/~1users~1me/put/responses/204'
833 /videos/ownership:
834 get:
835 summary: Get list of video ownership changes requests
836 tags:
837 - Video
838 security:
839 - OAuth2: []
840 parameters:
841 - $ref: '#/components/parameters/id2'
842 responses:
843 '200':
844 description: successful operation
845 '/videos/ownership/{id}/accept':
846 post:
847 summary: Refuse ownership change request for video by its id
848 tags:
849 - Video
850 security:
851 - OAuth2: []
852 parameters:
853 - $ref: '#/components/parameters/id2'
854 responses:
855 '204':
856 $ref: '#/paths/~1users~1me/put/responses/204'
857 '/videos/ownership/{id}/refuse':
858 post:
859 summary: Accept ownership change request for video by its id
860 tags:
861 - Video
862 security:
863 - OAuth2: []
864 parameters:
865 - $ref: '#/components/parameters/id2'
866 responses:
867 '204':
868 $ref: '#/paths/~1users~1me/put/responses/204'
869 '/videos/{id}/give-ownership':
870 post:
871 summary: Request change of ownership for a video you own, by its id
872 tags:
873 - Video
874 security:
875 - OAuth2: []
876 parameters:
877 - $ref: '#/components/parameters/id2'
878 requestBody:
879 required: true
880 content:
881 application/x-www-form-urlencoded:
882 schema:
883 type: object
884 properties:
885 username:
886 type: string
887 required:
888 - username
889 responses:
890 '204':
891 $ref: '#/paths/~1users~1me/put/responses/204'
892 '400':
893 description: 'Changing video ownership to a remote account is not supported yet'
c360c494 894 /videos/upload:
1569a818 895 post:
2963c343 896 summary: Upload a video file with its metadata
94ff4c23 897 security:
3e9e6f2f 898 - OAuth2: []
1569a818
DG
899 tags:
900 - Video
1569a818
DG
901 responses:
902 '200':
903 description: successful operation
3e9e6f2f
RK
904 content:
905 application/json:
906 schema:
907 $ref: '#/components/schemas/VideoUploadResponse'
908 requestBody:
909 content:
910 multipart/form-data:
911 schema:
912 type: object
913 properties:
914 videofile:
915 description: Video file
916 type: string
917 format: binary
918 channelId:
919 description: Channel id that will contain this video
920 type: number
921 thumbnailfile:
922 description: Video thumbnail file
923 type: string
924 previewfile:
925 description: Video preview file
926 type: string
8f9e8be1
RK
927 privacy:
928 $ref: '#/components/schemas/VideoPrivacy'
3e9e6f2f
RK
929 category:
930 description: Video category
931 type: string
932 licence:
933 description: Video licence
934 type: string
935 language:
936 description: Video language
937 type: string
938 description:
939 description: Video description
940 type: string
941 waitTranscoding:
942 description: Whether or not we wait transcoding before publish the video
943 type: string
944 support:
945 description: Text describing how to support the video uploader
946 type: string
947 nsfw:
948 description: Whether or not this video contains sensitive content
949 type: string
950 name:
951 description: Video name
952 type: string
953 tags:
954 description: Video tags
955 type: string
956 commentsEnabled:
957 description: Enable or disable comments for this video
958 type: string
959 scheduleUpdate: *ref_0
960 required:
961 - videofile
962 - channelId
8f9e8be1 963 - name
8f9e8be1
RK
964 x-code-samples:
965 - lang: Shell
966 source: |
967 ## DEPENDENCIES: httpie, jq
968 # pip install httpie
969 USERNAME="<your_username>"
970 PASSWORD="<your_password>"
971 FILE_PATH="<your_file_path>"
972 CHANNEL_ID="<your_channel_id>"
8f9e8be1
RK
973 NAME="<video_name>"
974
975 API_PATH="https://peertube2.cpy.re/api/v1"
976 ## AUTH
977 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
978 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
979 token=$(http -b --form POST "$API_PATH/users/token" \
980 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
981 username=$USERNAME \
982 password=$PASSWORD \
983 | jq -r ".access_token")
984 ## VIDEO UPLOAD
985 http -b --form POST "$API_PATH/videos/upload" \
986 videofile@$FILE_PATH \
987 channelId=$CHANNEL_ID \
988 name=$NAME \
8f9e8be1 989 "Authorization:Bearer $token"
c360c494 990 /videos/abuse:
1569a818 991 get:
2963c343 992 summary: Get list of reported video abuses
94ff4c23 993 security:
3e9e6f2f 994 - OAuth2: []
1569a818 995 tags:
5776f78e 996 - Video Abuse
44cb3b85 997 parameters:
3e9e6f2f
RK
998 - $ref: '#/components/parameters/start'
999 - $ref: '#/components/parameters/count'
1000 - $ref: '#/components/parameters/sort'
1569a818
DG
1001 responses:
1002 '200':
1003 description: successful operation
3e9e6f2f
RK
1004 content:
1005 application/json:
1006 schema:
1007 type: array
1008 items:
1009 $ref: '#/components/schemas/VideoAbuse'
1010 '/videos/{id}/abuse':
1569a818 1011 post:
3e9e6f2f 1012 summary: 'Report an abuse, on a video by its id'
94ff4c23 1013 security:
3e9e6f2f 1014 - OAuth2: []
1569a818 1015 tags:
5776f78e 1016 - Video Abuse
1569a818 1017 parameters:
3e9e6f2f 1018 - $ref: '#/components/parameters/id2'
1569a818
DG
1019 responses:
1020 '204':
3e9e6f2f
RK
1021 $ref: '#/paths/~1users~1me/put/responses/204'
1022 '/videos/{id}/blacklist':
1569a818 1023 post:
2963c343 1024 summary: Put on blacklist a video by its id
94ff4c23 1025 security:
3e9e6f2f
RK
1026 - OAuth2:
1027 - admin
1028 - moderator
1569a818 1029 tags:
5776f78e 1030 - Video Blacklist
1569a818 1031 parameters:
3e9e6f2f 1032 - $ref: '#/components/parameters/id2'
1569a818
DG
1033 responses:
1034 '204':
3e9e6f2f 1035 $ref: '#/paths/~1users~1me/put/responses/204'
1569a818 1036 delete:
2963c343 1037 summary: Delete an entry of the blacklist of a video by its id
94ff4c23 1038 security:
3e9e6f2f
RK
1039 - OAuth2:
1040 - admin
1041 - moderator
1569a818 1042 tags:
5776f78e 1043 - Video Blacklist
1569a818 1044 parameters:
3e9e6f2f 1045 - $ref: '#/components/parameters/id2'
1569a818
DG
1046 responses:
1047 '204':
3e9e6f2f 1048 $ref: '#/paths/~1users~1me/put/responses/204'
c360c494 1049 /videos/blacklist:
1569a818 1050 get:
2963c343 1051 summary: Get list of videos on blacklist
94ff4c23 1052 security:
3e9e6f2f
RK
1053 - OAuth2:
1054 - admin
1055 - moderator
1569a818 1056 tags:
5776f78e 1057 - Video Blacklist
44cb3b85 1058 parameters:
3e9e6f2f
RK
1059 - $ref: '#/components/parameters/start'
1060 - $ref: '#/components/parameters/count'
1061 - $ref: '#/components/parameters/sort'
1569a818
DG
1062 responses:
1063 '200':
1064 description: successful operation
3e9e6f2f
RK
1065 content:
1066 application/json:
1067 schema:
1068 type: array
1069 items:
1070 $ref: '#/components/schemas/VideoBlacklist'
48dce1c9 1071 /video-channels:
1569a818 1072 get:
2963c343 1073 summary: Get list of video channels
1569a818 1074 tags:
5776f78e 1075 - Video Channel
44cb3b85 1076 parameters:
3e9e6f2f
RK
1077 - $ref: '#/components/parameters/start'
1078 - $ref: '#/components/parameters/count'
1079 - $ref: '#/components/parameters/sort'
1569a818
DG
1080 responses:
1081 '200':
1082 description: successful operation
3e9e6f2f
RK
1083 content:
1084 application/json:
1085 schema:
1086 type: array
1087 items:
1088 $ref: '#/components/schemas/VideoChannel'
1569a818 1089 post:
2963c343 1090 summary: Creates a video channel for the current user
94ff4c23 1091 security:
3e9e6f2f 1092 - OAuth2: []
1569a818 1093 tags:
5776f78e 1094 - Video Channel
1569a818
DG
1095 responses:
1096 '204':
3e9e6f2f
RK
1097 $ref: '#/paths/~1users~1me/put/responses/204'
1098 requestBody:
1099 $ref: '#/components/requestBodies/VideoChannelInput'
1100 '/video-channels/{id}':
1569a818 1101 get:
2963c343 1102 summary: Get a video channel by its id
1569a818 1103 tags:
5776f78e 1104 - Video Channel
1569a818 1105 parameters:
3e9e6f2f 1106 - $ref: '#/components/parameters/id3'
1569a818
DG
1107 responses:
1108 '200':
1109 description: successful operation
3e9e6f2f
RK
1110 content:
1111 application/json:
1112 schema:
1113 $ref: '#/components/schemas/VideoChannel'
1569a818 1114 put:
2963c343 1115 summary: Update a video channel by its id
94ff4c23 1116 security:
3e9e6f2f 1117 - OAuth2: []
1569a818 1118 tags:
5776f78e 1119 - Video Channel
1569a818 1120 parameters:
3e9e6f2f 1121 - $ref: '#/components/parameters/id3'
1569a818
DG
1122 responses:
1123 '204':
3e9e6f2f
RK
1124 $ref: '#/paths/~1users~1me/put/responses/204'
1125 requestBody:
1126 $ref: '#/components/requestBodies/VideoChannelInput'
1569a818 1127 delete:
2963c343 1128 summary: Delete a video channel by its id
94ff4c23 1129 security:
3e9e6f2f 1130 - OAuth2: []
1569a818 1131 tags:
5776f78e 1132 - Video Channel
1569a818 1133 parameters:
3e9e6f2f 1134 - $ref: '#/components/parameters/id3'
cc918ac3
C
1135 responses:
1136 '204':
3e9e6f2f
RK
1137 $ref: '#/paths/~1users~1me/put/responses/204'
1138 '/video-channels/{id}/videos':
cc918ac3 1139 get:
2963c343 1140 summary: Get videos of a video channel by its id
cc918ac3 1141 tags:
5776f78e 1142 - Video Channel
cc918ac3 1143 parameters:
3e9e6f2f 1144 - $ref: '#/components/parameters/id3'
1569a818 1145 responses:
cc918ac3 1146 '200':
1569a818 1147 description: successful operation
3e9e6f2f
RK
1148 content:
1149 application/json:
1150 schema:
1151 $ref: '#/components/schemas/Video'
1152 '/accounts/{name}/video-channels':
6b738c7a 1153 get:
2963c343 1154 summary: Get video channels of an account by its name
6b738c7a 1155 tags:
5776f78e 1156 - Video Channel
6b738c7a 1157 parameters:
3e9e6f2f 1158 - $ref: '#/components/parameters/name'
6b738c7a
C
1159 responses:
1160 '200':
1161 description: successful operation
3e9e6f2f
RK
1162 content:
1163 application/json:
1164 schema:
1165 type: array
1166 items:
1167 $ref: '#/components/schemas/VideoChannel'
1168 '/videos/{id}/comment-threads':
1569a818 1169 get:
2963c343 1170 summary: Get the comment threads of a video by its id
1569a818 1171 tags:
5776f78e 1172 - Video Comment
1569a818 1173 parameters:
3e9e6f2f
RK
1174 - $ref: '#/components/parameters/id2'
1175 - $ref: '#/components/parameters/start'
1176 - $ref: '#/components/parameters/count'
1177 - $ref: '#/components/parameters/sort'
1569a818
DG
1178 responses:
1179 '200':
1180 description: successful operation
3e9e6f2f
RK
1181 content:
1182 application/json:
1183 schema:
1184 $ref: '#/components/schemas/CommentThreadResponse'
1569a818 1185 post:
3e9e6f2f 1186 summary: 'Creates a comment thread, on a video by its id'
94ff4c23 1187 security:
3e9e6f2f 1188 - OAuth2: []
1569a818 1189 tags:
5776f78e 1190 - Video Comment
1569a818 1191 parameters:
3e9e6f2f 1192 - $ref: '#/components/parameters/id2'
1569a818
DG
1193 responses:
1194 '200':
1195 description: successful operation
3e9e6f2f
RK
1196 content:
1197 application/json:
1198 schema:
1199 $ref: '#/components/schemas/CommentThreadPostResponse'
1200 '/videos/{id}/comment-threads/{threadId}':
1569a818 1201 get:
3e9e6f2f 1202 summary: 'Get the comment thread by its id, of a video by its id'
1569a818 1203 tags:
5776f78e 1204 - Video Comment
1569a818 1205 parameters:
3e9e6f2f
RK
1206 - $ref: '#/components/parameters/id2'
1207 - name: threadId
1208 in: path
1209 required: true
1210 description: The thread id (root comment id)
1211 schema:
1212 type: number
1569a818
DG
1213 responses:
1214 '200':
1215 description: successful operation
3e9e6f2f
RK
1216 content:
1217 application/json:
1218 schema:
1219 $ref: '#/components/schemas/VideoCommentThreadTree'
1220 '/videos/{id}/comments/{commentId}':
1569a818 1221 post:
3e9e6f2f 1222 summary: 'Creates a comment in a comment thread by its id, of a video by its id'
94ff4c23 1223 security:
3e9e6f2f 1224 - OAuth2: []
1569a818 1225 tags:
5776f78e 1226 - Video Comment
1569a818 1227 parameters:
3e9e6f2f
RK
1228 - $ref: '#/components/parameters/id2'
1229 - $ref: '#/components/parameters/commentId'
1569a818
DG
1230 responses:
1231 '200':
1232 description: successful operation
3e9e6f2f
RK
1233 content:
1234 application/json:
1235 schema:
1236 $ref: '#/components/schemas/CommentThreadPostResponse'
1569a818 1237 delete:
3e9e6f2f 1238 summary: 'Delete a comment in a comment therad by its id, of a video by its id'
94ff4c23 1239 security:
3e9e6f2f 1240 - OAuth2: []
1569a818 1241 tags:
5776f78e 1242 - Video Comment
1569a818 1243 parameters:
3e9e6f2f
RK
1244 - $ref: '#/components/parameters/id2'
1245 - $ref: '#/components/parameters/commentId'
1569a818
DG
1246 responses:
1247 '204':
3e9e6f2f
RK
1248 $ref: '#/paths/~1users~1me/put/responses/204'
1249 '/videos/{id}/rate':
1569a818 1250 put:
2963c343 1251 summary: Vote for a video by its id
94ff4c23 1252 security:
3e9e6f2f 1253 - OAuth2: []
1569a818 1254 tags:
5776f78e 1255 - Video Rate
1569a818 1256 parameters:
3e9e6f2f 1257 - $ref: '#/components/parameters/id2'
1569a818
DG
1258 responses:
1259 '204':
3e9e6f2f 1260 $ref: '#/paths/~1users~1me/put/responses/204'
fb72c193
DL
1261 /search/videos:
1262 get:
1263 tags:
1264 - Search
2963c343 1265 summary: Get the videos corresponding to a given query
fb72c193 1266 parameters:
3e9e6f2f
RK
1267 - $ref: '#/components/parameters/start'
1268 - $ref: '#/components/parameters/count'
1269 - $ref: '#/components/parameters/sort'
655b5490 1270 - name: search
fb72c193
DL
1271 in: query
1272 required: true
3e9e6f2f
RK
1273 description: String to search
1274 schema:
1275 type: string
fb72c193
DL
1276 responses:
1277 '200':
1278 description: successful operation
3e9e6f2f
RK
1279 content:
1280 application/json:
1281 schema:
1569a818
DG
1282 type: array
1283 items:
3e9e6f2f
RK
1284 $ref: '#/components/schemas/Video'
1285servers:
6441981b
RK
1286 - url: 'https://peertube.cpy.re/api/v1'
1287 description: Live Test Server (live data - stable version)
8f9e8be1 1288 - url: 'https://peertube2.cpy.re/api/v1'
6441981b
RK
1289 description: Live Test Server (live data - bleeding edge version)
1290 - url: 'https://peertube3.cpy.re/api/v1'
1291 description: Live Test Server (live data - bleeding edge version)
3e9e6f2f
RK
1292components:
1293 parameters:
1294 start:
1295 name: start
1296 in: query
1297 required: false
1298 description: Offset
1299 schema:
1569a818 1300 type: number
3e9e6f2f
RK
1301 count:
1302 name: count
1303 in: query
1304 required: false
1305 description: Number of items
1306 schema:
1569a818 1307 type: number
3e9e6f2f
RK
1308 sort:
1309 name: sort
1310 in: query
1311 required: false
1312 description: Sort column (-createdAt for example)
1313 schema:
1314 type: string
1315 name:
1316 name: name
1317 in: path
1318 required: true
1319 description: >-
1320 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
1321 example)
1322 schema:
1323 type: string
1324 id:
1325 name: id
1326 in: path
1327 required: true
1328 description: The user id
1329 schema:
1569a818 1330 type: number
3e9e6f2f
RK
1331 id2:
1332 name: id
1333 in: path
1334 required: true
1335 description: The video id or uuid
1336 schema:
1337 type: string
1338 id3:
1339 name: id
1340 in: path
1341 required: true
1342 description: The video channel id or uuid
1343 schema:
1344 type: string
1345 commentId:
1346 name: threadId
1347 in: path
1348 required: true
1349 description: The comment id
1350 schema:
c360c494 1351 type: number
3e9e6f2f
RK
1352 requestBodies:
1353 VideoChannelInput:
1354 content:
1355 application/json:
1356 schema:
1357 $ref: '#/components/schemas/VideoChannelInput'
1358 securitySchemes:
1359 OAuth2:
1360 description: >
1361 In the header: *Authorization: Bearer <token\>*
1362
1363
1364 Authenticating via OAuth requires the following steps:
1365
1366
1367 - Have an account with sufficient authorization levels
1368
1369 - [Generate](https://docs.joinpeertube.org/lang/en/devdocs/rest.html) a
1370 Bearer Token
1371
1372 - Make Authenticated Requests
1373 type: oauth2
1374 flows:
1375 password:
1376 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
1377 scopes:
1378 admin: Admin scope
1379 moderator: Moderator scope
1380 user: User scope
1381 schemas:
1382 VideoConstantNumber:
1383 properties:
1384 id:
1385 type: number
1386 label:
1387 type: string
1388 VideoConstantString:
1389 properties:
1390 id:
1391 type: string
1392 label:
1393 type: string
1394 VideoPrivacy:
1395 type: string
1396 enum:
1397 - Public
1398 - Unlisted
1399 - Private
1400 Video:
1401 properties:
1402 id:
1403 type: number
1404 uuid:
1405 type: string
1406 createdAt:
1407 type: string
1408 publishedAt:
1409 type: string
1410 updatedAt:
1411 type: string
1412 category:
1413 $ref: '#/components/schemas/VideoConstantNumber'
1414 licence:
1415 $ref: '#/components/schemas/VideoConstantNumber'
1416 language:
1417 $ref: '#/components/schemas/VideoConstantString'
1418 privacy:
1419 $ref: '#/components/schemas/VideoPrivacy'
1420 description:
1421 type: string
1422 duration:
1423 type: number
1424 isLocal:
1425 type: boolean
1426 name:
1427 type: string
1428 thumbnailPath:
1429 type: string
1430 previewPath:
1431 type: string
1432 embedPath:
1433 type: string
1434 views:
1435 type: number
1436 likes:
1437 type: number
1438 dislikes:
1439 type: number
1440 nsfw:
1441 type: boolean
1442 account:
1443 type: object
1444 properties:
1445 name:
1446 type: string
1447 displayName:
1448 type: string
1449 url:
1450 type: string
1451 host:
1452 type: string
1453 avatar:
1454 $ref: '#/components/schemas/Avatar'
1455 VideoAbuse:
1456 properties:
1457 id:
1458 type: number
1459 reason:
1460 type: string
1461 reporterAccount:
1462 $ref: '#/components/schemas/Account'
1463 video:
1464 type: object
1465 properties:
1466 id:
1467 type: number
1468 name:
1469 type: string
1470 uuid:
1471 type: string
1472 url:
1473 type: string
1474 createdAt:
1475 type: string
1476 VideoBlacklist:
1477 properties:
1478 id:
1479 type: number
1480 videoId:
1481 type: number
1482 createdAt:
1483 type: string
1484 updatedAt:
1485 type: string
1486 name:
1487 type: string
1488 uuid:
1489 type: string
1490 description:
1491 type: string
1492 duration:
1493 type: number
1494 views:
1495 type: number
1496 likes:
1497 type: number
1498 dislikes:
1499 type: number
1500 nsfw:
1501 type: boolean
1502 VideoChannel:
1503 properties:
1504 displayName:
1505 type: string
1506 description:
1507 type: string
1508 isLocal:
1509 type: boolean
1510 ownerAccount:
1511 type: object
1512 properties:
1513 id:
1514 type: number
1515 uuid:
1516 type: string
1517 VideoComment:
1518 properties:
1519 id:
1520 type: number
1521 url:
1522 type: string
1523 text:
1524 type: string
1525 threadId:
1526 type: number
1527 inReplyToCommentId:
1528 type: number
1529 videoId:
1530 type: number
1531 createdAt:
1532 type: string
1533 updatedAt:
1534 type: string
1535 totalReplies:
1536 type: number
1537 account:
1538 $ref: '#/components/schemas/Account'
1539 VideoCommentThreadTree:
1540 properties:
1541 comment:
1542 $ref: '#/components/schemas/VideoComment'
1543 children:
1544 type: array
1545 items:
1546 $ref: '#/components/schemas/VideoCommentThreadTree'
1547 Avatar:
1548 properties:
1549 path:
1550 type: string
1551 createdAt:
1552 type: string
1553 updatedAt:
1554 type: string
1555 Actor:
1556 properties:
1557 id:
1558 type: number
1559 uuid:
1560 type: string
1561 url:
1562 type: string
1563 name:
1564 type: string
1565 host:
1566 type: string
1567 followingCount:
1568 type: number
1569 followersCount:
1570 type: number
1571 createdAt:
1572 type: string
1573 updatedAt:
1574 type: string
1575 avatar:
1576 $ref: '#/components/schemas/Avatar'
1577 Account:
1578 allOf:
1579 - $ref: '#/components/schemas/Actor'
1580 - properties:
1581 displayName:
1582 type: string
1583 User:
1584 properties:
1585 id:
1586 type: number
1587 username:
1588 type: string
1589 email:
1590 type: string
1591 displayNSFW:
1592 type: boolean
1593 autoPlayVideo:
1594 type: boolean
1595 role:
1596 type: string
1597 enum:
1598 - User
1599 - Moderator
1600 - Administrator
1601 videoQuota:
1602 type: number
1603 createdAt:
1604 type: string
1605 account:
1606 $ref: '#/components/schemas/Account'
1607 videoChannels:
1608 type: array
1609 items:
1610 $ref: '#/components/schemas/VideoChannel'
6441981b
RK
1611 UserWatchingVideo:
1612 properties:
1613 currentTime:
1614 type: number
3e9e6f2f
RK
1615 ServerConfig:
1616 properties:
1617 signup:
1618 type: object
1619 properties:
1620 allowed:
1621 type: boolean
1622 transcoding:
1623 type: object
1624 properties:
1625 enabledResolutions:
1626 type: array
1627 items:
1628 type: number
1629 avatar:
1630 type: object
1631 properties:
1632 file:
1633 type: object
1634 properties:
1635 size:
1636 type: object
1637 properties:
1638 max:
1639 type: number
1640 extensions:
1641 type: array
1642 items:
1643 type: string
1644 video:
1645 type: object
1646 properties:
1647 file:
1648 type: object
1649 properties:
1650 extensions:
1651 type: array
1652 items:
1653 type: string
1654 Follow:
1655 properties:
1656 id:
1657 type: number
1658 follower:
1659 $ref: '#/components/schemas/Actor'
1660 following:
1661 $ref: '#/components/schemas/Actor'
1662 score:
1663 type: number
1664 state:
1665 type: string
1666 enum:
1667 - pending
1668 - accepted
1669 createdAt:
1670 type: string
1671 updatedAt:
1672 type: string
1673 Job:
1674 properties:
1675 id:
1676 type: number
1677 state:
1678 type: string
1679 enum:
1680 - pending
1681 - processing
1682 - error
1683 - success
1684 category:
1685 type: string
1686 enum:
1687 - transcoding
1688 - activitypub-http
1689 handlerName:
1690 type: string
1691 handlerInputData:
1692 type: string
1693 createdAt:
1694 type: string
1695 updatedAt:
1696 type: string
1697 AddUserResponse:
1698 properties:
1699 id:
1700 type: number
1701 uuid:
1702 type: string
1703 VideoUploadResponse:
1704 properties:
1705 video:
1706 type: object
1707 properties:
1708 id:
1709 type: number
1710 uuid:
1711 type: string
1712 CommentThreadResponse:
1713 properties:
1714 total:
1715 type: number
1716 data:
1717 type: array
1718 items:
1719 $ref: '#/components/schemas/VideoComment'
1720 CommentThreadPostResponse:
1721 properties:
1722 comment:
1723 $ref: '#/components/schemas/VideoComment'
1724 AddUser:
1725 properties:
1726 username:
1727 type: string
1728 description: 'The user username '
1729 password:
1730 type: string
1731 description: 'The user password '
1732 email:
1733 type: string
1734 description: 'The user email '
1735 videoQuota:
1736 type: string
1737 description: 'The user videoQuota '
1738 role:
1739 type: string
1740 description: 'The user role '
1741 required:
1742 - username
1743 - password
1744 - email
1745 - videoQuota
1746 - role
1747 UpdateUser:
1748 properties:
1749 id:
1750 type: string
1751 description: 'The user id '
1752 email:
1753 type: string
1754 description: 'The updated email of the user '
1755 videoQuota:
1756 type: string
1757 description: 'The updated videoQuota of the user '
1758 role:
1759 type: string
1760 description: 'The updated role of the user '
1761 required:
1762 - id
1763 - email
1764 - videoQuota
1765 - role
1766 UpdateMe:
1767 properties:
1768 password:
1769 type: string
1770 description: 'Your new password '
1771 email:
1772 type: string
1773 description: 'Your new email '
1774 displayNSFW:
1775 type: string
1776 description: 'Your new displayNSFW '
1777 autoPlayVideo:
1778 type: string
1779 description: 'Your new autoPlayVideo '
1780 required:
1781 - password
1782 - email
1783 - displayNSFW
1784 - autoPlayVideo
1785 GetMeVideoRating:
1786 properties:
1787 id:
1788 type: string
1789 description: 'Id of the video '
1790 rating:
1791 type: number
1792 description: 'Rating of the video '
1793 required:
1794 - id
1795 - rating
1796 RegisterUser:
1797 properties:
1798 username:
1799 type: string
1800 description: 'The username of the user '
1801 password:
1802 type: string
1803 description: 'The password of the user '
1804 email:
1805 type: string
1806 description: 'The email of the user '
1807 required:
1808 - username
1809 - password
1810 - email
1811 VideoChannelInput:
1812 properties:
1813 name:
1814 type: string
1815 description:
1816 type: string
1569a818 1817