]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
Fix role documentation in rest api
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
1 openapi: 3.0.0
2 info:
3 title: PeerTube
4 version: 1.3.0-rc.2
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'
13 altText: PeerTube Project Homepage
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
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.
23
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.
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 ```
40 externalDocs:
41 url: https://docs.joinpeertube.org/#/api-rest-reference.html
42 tags:
43 - name: Accounts
44 description: >
45 Using some features of PeerTube require authentication, for which Accounts
46 provide different levels of permission as well as associated user
47 information. Accounts also encompass remote accounts discovered across the federation.
48 - name: Config
49 description: >
50 Each server exposes public information regarding supported videos and
51 options.
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
57 description: >
58 Jobs are long-running tasks enqueued and processed by the instance
59 itself. No additional worker registration is currently available.
60 - name: Server Following
61 description: >
62 Managing servers which the instance interacts with is crucial to the
63 concept of federation in PeerTube and external video indexation. The PeerTube
64 server then deals with inter-server ActivityPub operations and propagates
65 information across its social graph by posting activities to actors' inbox
66 endpoints.
67 - name: Video Abuse
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.
79 - name: Video Comment
80 description: >
81 Operations dealing with comments to a video. Comments are organized in
82 threads.
83 - name: Video Channel
84 description: >
85 Operations dealing with creation, modification and video listing of a
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.
94 x-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 Following
105 - Video Rate
106 - name: Moderation
107 tags:
108 - Video Abuse
109 - Video Blacklist
110 - name: Instance Configuration
111 tags:
112 - Config
113 - Server Following
114 - name: Notifications
115 tags:
116 - Feeds
117 - name: Jobs
118 tags:
119 - Job
120 - name: Search
121 tags:
122 - Search
123 paths:
124 '/accounts/{name}':
125 get:
126 tags:
127 - Accounts
128 summary: Get the account by name
129 parameters:
130 - $ref: '#/components/parameters/name'
131 - $ref: '#/components/parameters/start'
132 - $ref: '#/components/parameters/count'
133 - $ref: '#/components/parameters/sort'
134 responses:
135 '200':
136 description: successful operation
137 content:
138 application/json:
139 schema:
140 $ref: '#/components/schemas/Account'
141 '/accounts/{name}/videos':
142 get:
143 tags:
144 - Accounts
145 - Video
146 summary: 'Get videos for an account, provided the name of that account'
147 parameters:
148 - $ref: '#/components/parameters/name'
149 responses:
150 '200':
151 description: successful operation
152 content:
153 application/json:
154 schema:
155 $ref: '#/components/schemas/Video'
156 x-code-samples:
157 - lang: JavaScript
158 source: |
159 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
160 .then(function(response) {
161 return response.json()
162 }).then(function(data) {
163 console.log(data)
164 })
165 - lang: Shell
166 source: |
167 # pip install httpie
168 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
169 - lang: Ruby
170 source: |
171 require 'uri'
172 require 'net/http'
173
174 url = URI("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
175
176 http = Net::HTTP.new(url.host, url.port)
177 http.use_ssl = true
178 http.verify_mode = OpenSSL::SSL::VERIFY_NONE
179
180 request = Net::HTTP::Post.new(url)
181 request["content-type"] = 'application/json'
182 response = http.request(request)
183 puts response.read_body
184 - lang: Python
185 source: |
186 import http.client
187
188 conn = http.client.HTTPSConnection("https://peertube2.cpy.re/api/v1")
189
190 headers = {
191 'content-type': "application/json"
192 }
193
194 conn.request("POST", "/accounts/{name}/videos", None, headers)
195
196 res = conn.getresponse()
197 data = res.read()
198
199 print(data.decode("utf-8"))
200 /accounts:
201 get:
202 tags:
203 - Accounts
204 summary: Get all accounts
205 responses:
206 '200':
207 description: successful operation
208 content:
209 'application/json':
210 schema:
211 type: array
212 items:
213 $ref: '#/components/schemas/Account'
214 /config:
215 get:
216 tags:
217 - Config
218 summary: Get the public configuration of the server
219 responses:
220 '200':
221 description: successful operation
222 content:
223 application/json:
224 schema:
225 $ref: '#/components/schemas/ServerConfig'
226 /config/about:
227 get:
228 summary: Get the instance about page content
229 tags:
230 - Config
231 responses:
232 '200':
233 description: successful operation
234 /config/custom:
235 get:
236 summary: Get the runtime configuration of the server
237 tags:
238 - Config
239 security:
240 - OAuth2:
241 - admin
242 responses:
243 '200':
244 description: successful operation
245 put:
246 summary: Set the runtime configuration of the server
247 tags:
248 - Config
249 security:
250 - OAuth2:
251 - admin
252 responses:
253 '200':
254 description: successful operation
255 delete:
256 summary: Delete the runtime configuration of the server
257 tags:
258 - Config
259 security:
260 - OAuth2:
261 - admin
262 responses:
263 '200':
264 description: successful operation
265 '/feeds/videos.{format}':
266 get:
267 summary: >-
268 Get the feed of videos for the server, with optional filter by account
269 name or id
270 tags:
271 - Feeds
272 parameters:
273 - name: format
274 in: path
275 required: true
276 description: >-
277 The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and
278 json to JSON FEED 1.0
279 schema:
280 type: string
281 enum:
282 - xml
283 - atom
284 - json
285 default: xml
286 - name: accountId
287 in: query
288 required: false
289 description: >-
290 The id of the local account to filter to (beware, users IDs and not
291 actors IDs which will return empty feeds
292 schema:
293 type: number
294 - name: accountName
295 in: query
296 required: false
297 description: The name of the local account to filter to
298 schema:
299 type: string
300 responses:
301 '200':
302 description: successful operation
303 /jobs/{state}:
304 get:
305 summary: Get list of jobs
306 security:
307 - OAuth2:
308 - admin
309 tags:
310 - Job
311 parameters:
312 - name: state
313 in: path
314 required: true
315 description: The state of the job
316 schema:
317 type: string
318 enum:
319 - active
320 - completed
321 - failed
322 - waiting
323 - delayed
324 - $ref: '#/components/parameters/start'
325 - $ref: '#/components/parameters/count'
326 - $ref: '#/components/parameters/sort'
327 responses:
328 '200':
329 description: successful operation
330 content:
331 application/json:
332 schema:
333 type: array
334 items:
335 $ref: '#/components/schemas/Job'
336 '/server/following/{host}':
337 delete:
338 security:
339 - OAuth2:
340 - admin
341 tags:
342 - Server Following
343 summary: Unfollow a server by hostname
344 parameters:
345 - name: host
346 in: path
347 required: true
348 description: 'The host to unfollow '
349 schema:
350 type: string
351 responses:
352 '201':
353 description: successful operation
354 /server/followers:
355 get:
356 tags:
357 - Server Following
358 summary: Get followers of the server
359 parameters:
360 - $ref: '#/components/parameters/start'
361 - $ref: '#/components/parameters/count'
362 - $ref: '#/components/parameters/sort'
363 responses:
364 '200':
365 description: successful operation
366 content:
367 application/json:
368 schema:
369 type: array
370 items:
371 $ref: '#/components/schemas/Follow'
372 /server/following:
373 get:
374 tags:
375 - Server Following
376 summary: Get servers followed by the server
377 parameters:
378 - $ref: '#/components/parameters/start'
379 - $ref: '#/components/parameters/count'
380 - $ref: '#/components/parameters/sort'
381 responses:
382 '200':
383 description: successful operation
384 content:
385 application/json:
386 schema:
387 type: array
388 items:
389 $ref: '#/components/schemas/Follow'
390 post:
391 security:
392 - OAuth2:
393 - admin
394 tags:
395 - Server Following
396 summary: Follow a server
397 responses:
398 '204':
399 $ref: '#/paths/~1users~1me/put/responses/204'
400 requestBody:
401 content:
402 application/json:
403 schema:
404 $ref: '#/components/schemas/Follow'
405 /users:
406 post:
407 summary: Creates user
408 security:
409 - OAuth2:
410 - admin
411 tags:
412 - User
413 responses:
414 '200':
415 description: successful operation
416 content:
417 application/json:
418 schema:
419 $ref: '#/components/schemas/AddUserResponse'
420 requestBody:
421 content:
422 application/json:
423 schema:
424 $ref: '#/components/schemas/AddUser'
425 description: User to create
426 required: true
427 get:
428 summary: Get a list of users
429 security:
430 - OAuth2: []
431 tags:
432 - User
433 parameters:
434 - $ref: '#/components/parameters/start'
435 - $ref: '#/components/parameters/count'
436 - $ref: '#/components/parameters/usersSort'
437 responses:
438 '200':
439 description: successful operation
440 content:
441 application/json:
442 schema:
443 type: array
444 items:
445 $ref: '#/components/schemas/User'
446 '/users/{id}':
447 delete:
448 summary: Delete a user by its id
449 security:
450 - OAuth2:
451 - admin
452 tags:
453 - User
454 parameters:
455 - $ref: '#/components/parameters/id'
456 responses:
457 '204':
458 $ref: '#/paths/~1users~1me/put/responses/204'
459 get:
460 summary: Get user by its id
461 security:
462 - OAuth2: []
463 tags:
464 - User
465 parameters:
466 - $ref: '#/components/parameters/id'
467 responses:
468 '200':
469 description: successful operation
470 content:
471 application/json:
472 schema:
473 $ref: '#/components/schemas/User'
474 put:
475 summary: Update user profile by its id
476 security:
477 - OAuth2: []
478 tags:
479 - User
480 parameters:
481 - $ref: '#/components/parameters/id'
482 responses:
483 '204':
484 $ref: '#/paths/~1users~1me/put/responses/204'
485 requestBody:
486 content:
487 application/json:
488 schema:
489 $ref: '#/components/schemas/UpdateUser'
490 required: true
491 /users/me:
492 get:
493 summary: Get current user information
494 security:
495 - OAuth2:
496 - user
497 tags:
498 - User
499 responses:
500 '200':
501 description: successful operation
502 content:
503 application/json:
504 schema:
505 type: array
506 items:
507 $ref: '#/components/schemas/User'
508 put:
509 summary: Update current user information
510 security:
511 - OAuth2:
512 - user
513 tags:
514 - User
515 responses:
516 '204':
517 description: Successful operation
518 requestBody:
519 content:
520 application/json:
521 schema:
522 $ref: '#/components/schemas/UpdateMe'
523 required: true
524 /users/me/video-quota-used:
525 get:
526 summary: Get current user used quota
527 security:
528 - OAuth2:
529 - user
530 tags:
531 - User
532 responses:
533 '200':
534 description: successful operation
535 content:
536 application/json:
537 schema:
538 type: number
539 '/users/me/videos/{videoId}/rating':
540 get:
541 summary: 'Get rating of video by its id, among those of the current user'
542 security:
543 - OAuth2: []
544 tags:
545 - User
546 parameters:
547 - name: videoId
548 in: path
549 required: true
550 description: 'The video id '
551 schema:
552 type: string
553 responses:
554 '200':
555 description: successful operation
556 content:
557 application/json:
558 schema:
559 $ref: '#/components/schemas/GetMeVideoRating'
560 /users/me/videos:
561 get:
562 summary: Get videos of the current user
563 security:
564 - OAuth2:
565 - user
566 tags:
567 - User
568 parameters:
569 - $ref: '#/components/parameters/start'
570 - $ref: '#/components/parameters/count'
571 - $ref: '#/components/parameters/sort'
572 responses:
573 '200':
574 description: successful operation
575 content:
576 application/json:
577 schema:
578 type: array
579 items:
580 $ref: '#/components/schemas/Video'
581 /users/me/subscriptions:
582 get:
583 summary: Get subscriptions of the current user
584 security:
585 - OAuth2:
586 - user
587 tags:
588 - User
589 parameters:
590 - $ref: '#/components/parameters/start'
591 - $ref: '#/components/parameters/count'
592 - $ref: '#/components/parameters/sort'
593 responses:
594 '200':
595 description: successful operation
596 post:
597 summary: Add subscription to the current user
598 security:
599 - OAuth2:
600 - user
601 tags:
602 - User
603 responses:
604 '200':
605 description: successful operation
606 /users/me/subscriptions/exist:
607 get:
608 summary: Get if subscriptions exist for the current user
609 security:
610 - OAuth2:
611 - user
612 tags:
613 - User
614 parameters:
615 - $ref: '#/components/parameters/subscriptionsUris'
616 responses:
617 '200':
618 description: successful operation
619 content:
620 application/json:
621 schema:
622 type: object
623 /users/me/subscriptions/videos:
624 get:
625 summary: Get videos of subscriptions of the current user
626 security:
627 - OAuth2:
628 - user
629 tags:
630 - User
631 parameters:
632 - $ref: '#/components/parameters/start'
633 - $ref: '#/components/parameters/count'
634 - $ref: '#/components/parameters/sort'
635 responses:
636 '200':
637 description: successful operation
638 content:
639 application/json:
640 schema:
641 type: array
642 items:
643 $ref: '#/components/schemas/Video'
644 '/users/me/subscriptions/{uri}':
645 get:
646 summary: Get subscription of the current user for a given uri
647 security:
648 - OAuth2:
649 - user
650 tags:
651 - User
652 responses:
653 '200':
654 description: successful operation
655 content:
656 application/json:
657 schema:
658 $ref: '#/components/schemas/VideoChannel'
659 delete:
660 summary: Delete subscription of the current user for a given uri
661 security:
662 - OAuth2:
663 - user
664 tags:
665 - User
666 responses:
667 '200':
668 description: successful operation
669 /users/register:
670 post:
671 summary: Register a user
672 tags:
673 - User
674 responses:
675 '204':
676 $ref: '#/paths/~1users~1me/put/responses/204'
677 requestBody:
678 content:
679 application/json:
680 schema:
681 $ref: '#/components/schemas/RegisterUser'
682 required: true
683 /users/me/avatar/pick:
684 post:
685 summary: Update current user avatar
686 security:
687 - OAuth2: []
688 tags:
689 - User
690 responses:
691 '200':
692 description: successful operation
693 content:
694 application/json:
695 schema:
696 $ref: '#/components/schemas/Avatar'
697 requestBody:
698 content:
699 multipart/form-data:
700 schema:
701 type: object
702 properties:
703 avatarfile:
704 description: The file to upload.
705 type: string
706 format: binary
707 encoding:
708 profileImage:
709 # only accept png/jpeg
710 contentType: image/png, image/jpeg
711 /videos:
712 get:
713 summary: Get list of videos
714 tags:
715 - Video
716 parameters:
717 - $ref: '#/components/parameters/categoryOneOf'
718 - $ref: '#/components/parameters/tagsOneOf'
719 - $ref: '#/components/parameters/tagsAllOf'
720 - $ref: '#/components/parameters/licenceOneOf'
721 - $ref: '#/components/parameters/languageOneOf'
722 - $ref: '#/components/parameters/nsfw'
723 - $ref: '#/components/parameters/filter'
724 - $ref: '#/components/parameters/start'
725 - $ref: '#/components/parameters/count'
726 - $ref: '#/components/parameters/videosSort'
727 responses:
728 '200':
729 description: successful operation
730 content:
731 application/json:
732 schema:
733 type: array
734 items:
735 $ref: '#/components/schemas/Video'
736 /videos/categories:
737 get:
738 summary: Get list of video licences known by the server
739 tags:
740 - Video
741 responses:
742 '200':
743 description: successful operation
744 content:
745 application/json:
746 schema:
747 type: array
748 items:
749 type: string
750 /videos/licences:
751 get:
752 summary: Get list of video licences known by the server
753 tags:
754 - Video
755 responses:
756 '200':
757 description: successful operation
758 content:
759 application/json:
760 schema:
761 type: array
762 items:
763 type: string
764 /videos/languages:
765 get:
766 summary: Get list of languages known by the server
767 tags:
768 - Video
769 responses:
770 '200':
771 description: successful operation
772 content:
773 application/json:
774 schema:
775 type: array
776 items:
777 type: string
778 /videos/privacies:
779 get:
780 summary: Get list of privacy policies supported by the server
781 tags:
782 - Video
783 responses:
784 '200':
785 description: successful operation
786 content:
787 application/json:
788 schema:
789 type: array
790 items:
791 type: string
792 '/videos/{id}':
793 put:
794 summary: Update metadata for a video by its id
795 security:
796 - OAuth2: []
797 tags:
798 - Video
799 parameters:
800 - $ref: '#/components/parameters/id2'
801 responses:
802 '200':
803 description: successful operation
804 content:
805 application/json:
806 schema:
807 $ref: '#/components/schemas/Video'
808 requestBody:
809 content:
810 multipart/form-data:
811 schema:
812 type: object
813 properties:
814 thumbnailfile:
815 description: Video thumbnail file
816 type: string
817 previewfile:
818 description: Video preview file
819 type: string
820 category:
821 description: Video category
822 type: string
823 licence:
824 description: Video licence
825 type: string
826 language:
827 description: Video language
828 type: string
829 description:
830 description: Video description
831 type: string
832 waitTranscoding:
833 description: Whether or not we wait transcoding before publish the video
834 type: string
835 support:
836 description: Text describing how to support the video uploader
837 type: string
838 nsfw:
839 description: Whether or not this video contains sensitive content
840 type: string
841 name:
842 description: Video name
843 type: string
844 tags:
845 description: Video tags (maximum 5 tags each between 2 and 30 characters)
846 type: array
847 items:
848 type: string
849 commentsEnabled:
850 description: Enable or disable comments for this video
851 type: string
852 scheduleUpdate: &ref_0
853 type: object
854 properties:
855 privacy:
856 type: string
857 enum:
858 - Public
859 - Unlisted
860 description: Video privacy target
861 updateAt:
862 type: string
863 format: date
864 description: When to update the video
865 required:
866 - updateAt
867 get:
868 summary: Get a video by its id
869 tags:
870 - Video
871 parameters:
872 - $ref: '#/components/parameters/id2'
873 responses:
874 '200':
875 description: successful operation
876 content:
877 application/json:
878 schema:
879 $ref: '#/components/schemas/Video'
880 delete:
881 summary: Delete a video by its id
882 security:
883 - OAuth2: []
884 tags:
885 - Video
886 parameters:
887 - $ref: '#/components/parameters/id2'
888 responses:
889 '204':
890 $ref: '#/paths/~1users~1me/put/responses/204'
891 '/videos/{id}/description':
892 get:
893 summary: Get a video description by its id
894 tags:
895 - Video
896 parameters:
897 - $ref: '#/components/parameters/id2'
898 responses:
899 '200':
900 description: successful operation
901 content:
902 application/json:
903 schema:
904 type: string
905 '/videos/{id}/views':
906 post:
907 summary: Add a view to the video by its id
908 tags:
909 - Video
910 parameters:
911 - $ref: '#/components/parameters/id2'
912 responses:
913 '204':
914 $ref: '#/paths/~1users~1me/put/responses/204'
915 '/videos/{id}/watching':
916 put:
917 summary: Set watching progress of a video by its id for a user
918 tags:
919 - Video
920 security:
921 - OAuth2: []
922 parameters:
923 - $ref: '#/components/parameters/id2'
924 requestBody:
925 content:
926 application/json:
927 schema:
928 $ref: '#/components/schemas/UserWatchingVideo'
929 required: true
930 responses:
931 '204':
932 $ref: '#/paths/~1users~1me/put/responses/204'
933 /videos/ownership:
934 get:
935 summary: Get list of video ownership changes requests
936 tags:
937 - Video
938 security:
939 - OAuth2: []
940 parameters:
941 - $ref: '#/components/parameters/id2'
942 responses:
943 '200':
944 description: successful operation
945 '/videos/ownership/{id}/accept':
946 post:
947 summary: Refuse ownership change request for video by its id
948 tags:
949 - Video
950 security:
951 - OAuth2: []
952 parameters:
953 - $ref: '#/components/parameters/id2'
954 responses:
955 '204':
956 $ref: '#/paths/~1users~1me/put/responses/204'
957 '/videos/ownership/{id}/refuse':
958 post:
959 summary: Accept ownership change request for video by its id
960 tags:
961 - Video
962 security:
963 - OAuth2: []
964 parameters:
965 - $ref: '#/components/parameters/id2'
966 responses:
967 '204':
968 $ref: '#/paths/~1users~1me/put/responses/204'
969 '/videos/{id}/give-ownership':
970 post:
971 summary: Request change of ownership for a video you own, by its id
972 tags:
973 - Video
974 security:
975 - OAuth2: []
976 parameters:
977 - $ref: '#/components/parameters/id2'
978 requestBody:
979 required: true
980 content:
981 application/x-www-form-urlencoded:
982 schema:
983 type: object
984 properties:
985 username:
986 type: string
987 required:
988 - username
989 responses:
990 '204':
991 $ref: '#/paths/~1users~1me/put/responses/204'
992 '400':
993 description: 'Changing video ownership to a remote account is not supported yet'
994 /videos/upload:
995 post:
996 summary: Upload a video file with its metadata
997 security:
998 - OAuth2: []
999 tags:
1000 - Video
1001 responses:
1002 '200':
1003 description: successful operation
1004 content:
1005 application/json:
1006 schema:
1007 $ref: '#/components/schemas/VideoUploadResponse'
1008 requestBody:
1009 content:
1010 multipart/form-data:
1011 schema:
1012 type: object
1013 properties:
1014 videofile:
1015 description: Video file
1016 type: string
1017 format: binary
1018 channelId:
1019 description: Channel id that will contain this video
1020 type: number
1021 thumbnailfile:
1022 description: Video thumbnail file
1023 type: string
1024 previewfile:
1025 description: Video preview file
1026 type: string
1027 privacy:
1028 $ref: '#/components/schemas/VideoPrivacy'
1029 category:
1030 description: Video category
1031 type: string
1032 licence:
1033 description: Video licence
1034 type: string
1035 language:
1036 description: Video language
1037 type: string
1038 description:
1039 description: Video description
1040 type: string
1041 waitTranscoding:
1042 description: Whether or not we wait transcoding before publish the video
1043 type: string
1044 support:
1045 description: Text describing how to support the video uploader
1046 type: string
1047 nsfw:
1048 description: Whether or not this video contains sensitive content
1049 type: string
1050 name:
1051 description: Video name
1052 type: string
1053 tags:
1054 description: Video tags
1055 type: array
1056 items:
1057 type: string
1058 commentsEnabled:
1059 description: Enable or disable comments for this video
1060 type: string
1061 scheduleUpdate: *ref_0
1062 required:
1063 - videofile
1064 - channelId
1065 - name
1066 x-code-samples:
1067 - lang: Shell
1068 source: |
1069 ## DEPENDENCIES: httpie, jq
1070 # pip install httpie
1071 USERNAME="<your_username>"
1072 PASSWORD="<your_password>"
1073 FILE_PATH="<your_file_path>"
1074 CHANNEL_ID="<your_channel_id>"
1075 NAME="<video_name>"
1076
1077 API_PATH="https://peertube2.cpy.re/api/v1"
1078 ## AUTH
1079 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1080 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1081 token=$(http -b --form POST "$API_PATH/users/token" \
1082 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1083 username=$USERNAME \
1084 password=$PASSWORD \
1085 | jq -r ".access_token")
1086 ## VIDEO UPLOAD
1087 http -b --form POST "$API_PATH/videos/upload" \
1088 videofile@$FILE_PATH \
1089 channelId=$CHANNEL_ID \
1090 name=$NAME \
1091 "Authorization:Bearer $token"
1092 /videos/imports:
1093 post:
1094 summary: Import a torrent or magnetURI or HTTP ressource (if enabled by the instance administrator)
1095 security:
1096 - OAuth2: []
1097 tags:
1098 - Video
1099 responses:
1100 '200':
1101 description: successful operation
1102 content:
1103 application/json:
1104 schema:
1105 $ref: '#/components/schemas/VideoUploadResponse'
1106 requestBody:
1107 content:
1108 multipart/form-data:
1109 schema:
1110 type: object
1111 properties:
1112 torrentfile:
1113 description: Torrent File
1114 type: string
1115 format: binary
1116 targetUrl:
1117 description: HTTP target URL
1118 type: string
1119 magnetUri:
1120 description: Magnet URI
1121 type: string
1122 channelId:
1123 description: Channel id that will contain this video
1124 type: number
1125 thumbnailfile:
1126 description: Video thumbnail file
1127 type: string
1128 previewfile:
1129 description: Video preview file
1130 type: string
1131 privacy:
1132 $ref: '#/components/schemas/VideoPrivacy'
1133 category:
1134 description: Video category
1135 type: string
1136 licence:
1137 description: Video licence
1138 type: string
1139 language:
1140 description: Video language
1141 type: string
1142 description:
1143 description: Video description
1144 type: string
1145 waitTranscoding:
1146 description: Whether or not we wait transcoding before publish the video
1147 type: string
1148 support:
1149 description: Text describing how to support the video uploader
1150 type: string
1151 nsfw:
1152 description: Whether or not this video contains sensitive content
1153 type: string
1154 name:
1155 description: Video name
1156 type: string
1157 tags:
1158 description: Video tags
1159 type: array
1160 items:
1161 type: string
1162 commentsEnabled:
1163 description: Enable or disable comments for this video
1164 type: string
1165 scheduleUpdate: *ref_0
1166 required:
1167 - channelId
1168 - name
1169 /videos/abuse:
1170 get:
1171 summary: Get list of reported video abuses
1172 security:
1173 - OAuth2: []
1174 tags:
1175 - Video Abuse
1176 parameters:
1177 - $ref: '#/components/parameters/start'
1178 - $ref: '#/components/parameters/count'
1179 - $ref: '#/components/parameters/abusesSort'
1180 responses:
1181 '200':
1182 description: successful operation
1183 content:
1184 application/json:
1185 schema:
1186 type: array
1187 items:
1188 $ref: '#/components/schemas/VideoAbuse'
1189 '/videos/{id}/abuse':
1190 post:
1191 summary: 'Report an abuse, on a video by its id'
1192 security:
1193 - OAuth2: []
1194 tags:
1195 - Video Abuse
1196 parameters:
1197 - $ref: '#/components/parameters/id2'
1198 responses:
1199 '204':
1200 $ref: '#/paths/~1users~1me/put/responses/204'
1201 '/videos/{id}/blacklist':
1202 post:
1203 summary: Put on blacklist a video by its id
1204 security:
1205 - OAuth2:
1206 - admin
1207 - moderator
1208 tags:
1209 - Video Blacklist
1210 parameters:
1211 - $ref: '#/components/parameters/id2'
1212 responses:
1213 '204':
1214 $ref: '#/paths/~1users~1me/put/responses/204'
1215 delete:
1216 summary: Delete an entry of the blacklist of a video by its id
1217 security:
1218 - OAuth2:
1219 - admin
1220 - moderator
1221 tags:
1222 - Video Blacklist
1223 parameters:
1224 - $ref: '#/components/parameters/id2'
1225 responses:
1226 '204':
1227 $ref: '#/paths/~1users~1me/put/responses/204'
1228 /videos/blacklist:
1229 get:
1230 summary: Get list of videos on blacklist
1231 security:
1232 - OAuth2:
1233 - admin
1234 - moderator
1235 tags:
1236 - Video Blacklist
1237 parameters:
1238 - $ref: '#/components/parameters/start'
1239 - $ref: '#/components/parameters/count'
1240 - $ref: '#/components/parameters/blacklistsSort'
1241 responses:
1242 '200':
1243 description: successful operation
1244 content:
1245 application/json:
1246 schema:
1247 type: array
1248 items:
1249 $ref: '#/components/schemas/VideoBlacklist'
1250 /video-channels:
1251 get:
1252 summary: Get list of video channels
1253 tags:
1254 - Video Channel
1255 parameters:
1256 - $ref: '#/components/parameters/start'
1257 - $ref: '#/components/parameters/count'
1258 - $ref: '#/components/parameters/sort'
1259 responses:
1260 '200':
1261 description: successful operation
1262 content:
1263 application/json:
1264 schema:
1265 type: array
1266 items:
1267 $ref: '#/components/schemas/VideoChannel'
1268 post:
1269 summary: Creates a video channel for the current user
1270 security:
1271 - OAuth2: []
1272 tags:
1273 - Video Channel
1274 responses:
1275 '204':
1276 $ref: '#/paths/~1users~1me/put/responses/204'
1277 requestBody:
1278 $ref: '#/components/requestBodies/VideoChannelInput'
1279 '/video-channels/{channelHandle}':
1280 get:
1281 summary: Get a video channel by its id
1282 tags:
1283 - Video Channel
1284 parameters:
1285 - $ref: '#/components/parameters/channelHandle'
1286 responses:
1287 '200':
1288 description: successful operation
1289 content:
1290 application/json:
1291 schema:
1292 $ref: '#/components/schemas/VideoChannel'
1293 put:
1294 summary: Update a video channel by its id
1295 security:
1296 - OAuth2: []
1297 tags:
1298 - Video Channel
1299 parameters:
1300 - $ref: '#/components/parameters/channelHandle'
1301 responses:
1302 '204':
1303 $ref: '#/paths/~1users~1me/put/responses/204'
1304 requestBody:
1305 $ref: '#/components/requestBodies/VideoChannelInput'
1306 delete:
1307 summary: Delete a video channel by its id
1308 security:
1309 - OAuth2: []
1310 tags:
1311 - Video Channel
1312 parameters:
1313 - $ref: '#/components/parameters/channelHandle'
1314 responses:
1315 '204':
1316 $ref: '#/paths/~1users~1me/put/responses/204'
1317 '/video-channels/{channelHandle}/videos':
1318 get:
1319 summary: Get videos of a video channel by its id
1320 tags:
1321 - Video Channel
1322 parameters:
1323 - $ref: '#/components/parameters/channelHandle'
1324 responses:
1325 '200':
1326 description: successful operation
1327 content:
1328 application/json:
1329 schema:
1330 $ref: '#/components/schemas/Video'
1331 '/accounts/{name}/video-channels':
1332 get:
1333 summary: Get video channels of an account by its name
1334 tags:
1335 - Video Channel
1336 parameters:
1337 - $ref: '#/components/parameters/name'
1338 responses:
1339 '200':
1340 description: successful operation
1341 content:
1342 application/json:
1343 schema:
1344 type: array
1345 items:
1346 $ref: '#/components/schemas/VideoChannel'
1347 '/accounts/{name}/ratings':
1348 get:
1349 summary: Get ratings of an account by its name
1350 security:
1351 - OAuth2: []
1352 tags:
1353 - User
1354 parameters:
1355 - $ref: '#/components/parameters/start'
1356 - $ref: '#/components/parameters/count'
1357 - $ref: '#/components/parameters/sort'
1358 - name: rating
1359 in: query
1360 required: false
1361 description: Optionaly filter which ratings to retrieve
1362 schema:
1363 type: string
1364 enum:
1365 - like
1366 - dislike
1367 responses:
1368 '200':
1369 description: successful operation
1370 content:
1371 application/json:
1372 schema:
1373 type: array
1374 items:
1375 $ref: '#/components/schemas/VideoRating'
1376 '/videos/{id}/comment-threads':
1377 get:
1378 summary: Get the comment threads of a video by its id
1379 tags:
1380 - Video Comment
1381 parameters:
1382 - $ref: '#/components/parameters/id2'
1383 - $ref: '#/components/parameters/start'
1384 - $ref: '#/components/parameters/count'
1385 - $ref: '#/components/parameters/sort'
1386 responses:
1387 '200':
1388 description: successful operation
1389 content:
1390 application/json:
1391 schema:
1392 $ref: '#/components/schemas/CommentThreadResponse'
1393 post:
1394 summary: 'Creates a comment thread, on a video by its id'
1395 security:
1396 - OAuth2: []
1397 tags:
1398 - Video Comment
1399 parameters:
1400 - $ref: '#/components/parameters/id2'
1401 responses:
1402 '200':
1403 description: successful operation
1404 content:
1405 application/json:
1406 schema:
1407 $ref: '#/components/schemas/CommentThreadPostResponse'
1408 '/videos/{id}/comment-threads/{threadId}':
1409 get:
1410 summary: 'Get the comment thread by its id, of a video by its id'
1411 tags:
1412 - Video Comment
1413 parameters:
1414 - $ref: '#/components/parameters/id2'
1415 - name: threadId
1416 in: path
1417 required: true
1418 description: The thread id (root comment id)
1419 schema:
1420 type: number
1421 responses:
1422 '200':
1423 description: successful operation
1424 content:
1425 application/json:
1426 schema:
1427 $ref: '#/components/schemas/VideoCommentThreadTree'
1428 '/videos/{id}/comments/{commentId}':
1429 post:
1430 summary: 'Creates a comment in a comment thread by its id, of a video by its id'
1431 security:
1432 - OAuth2: []
1433 tags:
1434 - Video Comment
1435 parameters:
1436 - $ref: '#/components/parameters/id2'
1437 - $ref: '#/components/parameters/commentId'
1438 responses:
1439 '200':
1440 description: successful operation
1441 content:
1442 application/json:
1443 schema:
1444 $ref: '#/components/schemas/CommentThreadPostResponse'
1445 delete:
1446 summary: 'Delete a comment in a comment therad by its id, of a video by its id'
1447 security:
1448 - OAuth2: []
1449 tags:
1450 - Video Comment
1451 parameters:
1452 - $ref: '#/components/parameters/id2'
1453 - $ref: '#/components/parameters/commentId'
1454 responses:
1455 '204':
1456 $ref: '#/paths/~1users~1me/put/responses/204'
1457 '/videos/{id}/rate':
1458 put:
1459 summary: Vote for a video by its id
1460 security:
1461 - OAuth2: []
1462 tags:
1463 - Video Rate
1464 parameters:
1465 - $ref: '#/components/parameters/id2'
1466 responses:
1467 '204':
1468 $ref: '#/paths/~1users~1me/put/responses/204'
1469 /search/videos:
1470 get:
1471 tags:
1472 - Search
1473 summary: Get the videos corresponding to a given query
1474 parameters:
1475 - $ref: '#/components/parameters/start'
1476 - $ref: '#/components/parameters/count'
1477 - $ref: '#/components/parameters/videosSearchSort'
1478 - name: search
1479 in: query
1480 required: true
1481 description: String to search
1482 schema:
1483 type: string
1484 responses:
1485 '200':
1486 description: successful operation
1487 content:
1488 application/json:
1489 schema:
1490 type: array
1491 items:
1492 $ref: '#/components/schemas/Video'
1493 servers:
1494 - url: 'https://peertube.cpy.re/api/v1'
1495 description: Live Test Server (live data - stable version)
1496 - url: 'https://peertube2.cpy.re/api/v1'
1497 description: Live Test Server (live data - bleeding edge version)
1498 - url: 'https://peertube3.cpy.re/api/v1'
1499 description: Live Test Server (live data - bleeding edge version)
1500 components:
1501 parameters:
1502 start:
1503 name: start
1504 in: query
1505 required: false
1506 description: Offset
1507 schema:
1508 type: number
1509 count:
1510 name: count
1511 in: query
1512 required: false
1513 description: Number of items
1514 schema:
1515 type: number
1516 sort:
1517 name: sort
1518 in: query
1519 required: false
1520 description: Sort column (-createdAt for example)
1521 schema:
1522 type: string
1523 videosSort:
1524 name: sort
1525 in: query
1526 required: false
1527 description: Sort videos by criteria
1528 schema:
1529 type: string
1530 enum:
1531 - -name
1532 - -duration
1533 - -createdAt
1534 - -publishedAt
1535 - -views
1536 - -likes
1537 - -trending
1538 videosSearchSort:
1539 name: sort
1540 in: query
1541 required: false
1542 description: Sort videos by criteria
1543 schema:
1544 type: string
1545 enum:
1546 - -name
1547 - -duration
1548 - -createdAt
1549 - -publishedAt
1550 - -views
1551 - -likes
1552 - -match
1553 blacklistsSort:
1554 name: sort
1555 in: query
1556 required: false
1557 description: Sort blacklists by criteria
1558 schema:
1559 type: string
1560 enum:
1561 - -id
1562 - -name
1563 - -duration
1564 - -views
1565 - -likes
1566 - -dislikes
1567 - -uuid
1568 - -createdAt
1569 usersSort:
1570 name: sort
1571 in: query
1572 required: false
1573 description: Sort users by criteria
1574 schema:
1575 type: string
1576 enum:
1577 - -id
1578 - -username
1579 - -createdAt
1580 abusesSort:
1581 name: sort
1582 in: query
1583 required: false
1584 description: Sort abuses by criteria
1585 schema:
1586 type: string
1587 enum:
1588 - -id
1589 - -createdAt
1590 - -state
1591 name:
1592 name: name
1593 in: path
1594 required: true
1595 description: >-
1596 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
1597 example)
1598 schema:
1599 type: string
1600 id:
1601 name: id
1602 in: path
1603 required: true
1604 description: The user id
1605 schema:
1606 type: number
1607 id2:
1608 name: id
1609 in: path
1610 required: true
1611 description: The video id or uuid
1612 schema:
1613 type: string
1614 channelHandle:
1615 name: channelHandle
1616 in: path
1617 required: true
1618 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
1619 schema:
1620 type: string
1621 commentId:
1622 name: threadId
1623 in: path
1624 required: true
1625 description: The comment id
1626 schema:
1627 type: number
1628 categoryOneOf:
1629 name: categoryOneOf
1630 in: query
1631 required: false
1632 description: category id of the video
1633 schema:
1634 oneOf:
1635 - type: number
1636 - type: array
1637 items:
1638 type: number
1639 style: form
1640 explode: false
1641 tagsOneOf:
1642 name: tagsOneOf
1643 in: query
1644 required: false
1645 description: tag(s) of the video
1646 schema:
1647 oneOf:
1648 - type: string
1649 - type: array
1650 items:
1651 type: string
1652 style: form
1653 explode: false
1654 tagsAllOf:
1655 name: tagsAllOf
1656 in: query
1657 required: false
1658 description: tag(s) of the video, where all should be present in the video
1659 schema:
1660 oneOf:
1661 - type: string
1662 - type: array
1663 items:
1664 type: string
1665 style: form
1666 explode: false
1667 languageOneOf:
1668 name: languageOneOf
1669 in: query
1670 required: false
1671 description: language id of the video
1672 schema:
1673 oneOf:
1674 - type: string
1675 - type: array
1676 items:
1677 type: string
1678 style: form
1679 explode: false
1680 licenceOneOf:
1681 name: licenceOneOf
1682 in: query
1683 required: false
1684 description: licence id of the video
1685 schema:
1686 oneOf:
1687 - type: number
1688 - type: array
1689 items:
1690 type: number
1691 style: form
1692 explode: false
1693 nsfw:
1694 name: nsfw
1695 in: query
1696 required: false
1697 description: whether to include nsfw videos, if any
1698 schema:
1699 type: string
1700 enum:
1701 - 'true'
1702 - 'false'
1703 filter:
1704 name: filter
1705 in: query
1706 required: false
1707 description: >
1708 Special filters (local for instance) which might require special rights:
1709 * `local` - only videos local to the instance
1710 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
1711 schema:
1712 type: string
1713 enum:
1714 - local
1715 - all-local
1716 subscriptionsUris:
1717 name: uris
1718 in: query
1719 required: true
1720 description: list of uris to check if each is part of the user subscriptions
1721 schema:
1722 type: array
1723 items:
1724 type: string
1725 requestBodies:
1726 VideoChannelInput:
1727 content:
1728 application/json:
1729 schema:
1730 $ref: '#/components/schemas/VideoChannelInput'
1731 securitySchemes:
1732 OAuth2:
1733 description: >
1734 In the header: *Authorization: Bearer <token\>*
1735
1736
1737 Authenticating via OAuth requires the following steps:
1738
1739
1740 - Have an account with sufficient authorization levels
1741
1742 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
1743 Bearer Token
1744
1745 - Make Authenticated Requests
1746 type: oauth2
1747 flows:
1748 password:
1749 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
1750 scopes:
1751 admin: Admin scope
1752 moderator: Moderator scope
1753 user: User scope
1754 schemas:
1755 VideoConstantNumber:
1756 properties:
1757 id:
1758 type: number
1759 label:
1760 type: string
1761 VideoConstantString:
1762 properties:
1763 id:
1764 type: string
1765 label:
1766 type: string
1767 VideoPrivacy:
1768 type: string
1769 enum:
1770 - Public
1771 - Unlisted
1772 - Private
1773 Video:
1774 properties:
1775 id:
1776 type: number
1777 uuid:
1778 type: string
1779 createdAt:
1780 type: string
1781 publishedAt:
1782 type: string
1783 updatedAt:
1784 type: string
1785 category:
1786 $ref: '#/components/schemas/VideoConstantNumber'
1787 licence:
1788 $ref: '#/components/schemas/VideoConstantNumber'
1789 language:
1790 $ref: '#/components/schemas/VideoConstantString'
1791 privacy:
1792 $ref: '#/components/schemas/VideoPrivacy'
1793 description:
1794 type: string
1795 duration:
1796 type: number
1797 isLocal:
1798 type: boolean
1799 name:
1800 type: string
1801 thumbnailPath:
1802 type: string
1803 previewPath:
1804 type: string
1805 embedPath:
1806 type: string
1807 views:
1808 type: number
1809 likes:
1810 type: number
1811 dislikes:
1812 type: number
1813 nsfw:
1814 type: boolean
1815 account:
1816 type: object
1817 properties:
1818 name:
1819 type: string
1820 displayName:
1821 type: string
1822 url:
1823 type: string
1824 host:
1825 type: string
1826 avatar:
1827 $ref: '#/components/schemas/Avatar'
1828 VideoAbuse:
1829 properties:
1830 id:
1831 type: number
1832 reason:
1833 type: string
1834 reporterAccount:
1835 $ref: '#/components/schemas/Account'
1836 video:
1837 type: object
1838 properties:
1839 id:
1840 type: number
1841 name:
1842 type: string
1843 uuid:
1844 type: string
1845 url:
1846 type: string
1847 createdAt:
1848 type: string
1849 VideoBlacklist:
1850 properties:
1851 id:
1852 type: number
1853 videoId:
1854 type: number
1855 createdAt:
1856 type: string
1857 updatedAt:
1858 type: string
1859 name:
1860 type: string
1861 uuid:
1862 type: string
1863 description:
1864 type: string
1865 duration:
1866 type: number
1867 views:
1868 type: number
1869 likes:
1870 type: number
1871 dislikes:
1872 type: number
1873 nsfw:
1874 type: boolean
1875 VideoChannel:
1876 properties:
1877 displayName:
1878 type: string
1879 description:
1880 type: string
1881 isLocal:
1882 type: boolean
1883 ownerAccount:
1884 type: object
1885 properties:
1886 id:
1887 type: number
1888 uuid:
1889 type: string
1890 VideoComment:
1891 properties:
1892 id:
1893 type: number
1894 url:
1895 type: string
1896 text:
1897 type: string
1898 threadId:
1899 type: number
1900 inReplyToCommentId:
1901 type: number
1902 videoId:
1903 type: number
1904 createdAt:
1905 type: string
1906 updatedAt:
1907 type: string
1908 totalReplies:
1909 type: number
1910 account:
1911 $ref: '#/components/schemas/Account'
1912 VideoCommentThreadTree:
1913 properties:
1914 comment:
1915 $ref: '#/components/schemas/VideoComment'
1916 children:
1917 type: array
1918 items:
1919 $ref: '#/components/schemas/VideoCommentThreadTree'
1920 Avatar:
1921 properties:
1922 path:
1923 type: string
1924 createdAt:
1925 type: string
1926 updatedAt:
1927 type: string
1928 Actor:
1929 properties:
1930 id:
1931 type: number
1932 uuid:
1933 type: string
1934 url:
1935 type: string
1936 name:
1937 type: string
1938 host:
1939 type: string
1940 followingCount:
1941 type: number
1942 followersCount:
1943 type: number
1944 createdAt:
1945 type: string
1946 updatedAt:
1947 type: string
1948 avatar:
1949 $ref: '#/components/schemas/Avatar'
1950 Account:
1951 allOf:
1952 - $ref: '#/components/schemas/Actor'
1953 - properties:
1954 displayName:
1955 type: string
1956 User:
1957 properties:
1958 id:
1959 type: number
1960 username:
1961 type: string
1962 email:
1963 type: string
1964 displayNSFW:
1965 type: boolean
1966 autoPlayVideo:
1967 type: boolean
1968 role:
1969 type: integer
1970 enum:
1971 - 0
1972 - 1
1973 - 2
1974 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
1975 roleLabel:
1976 type: string
1977 enum:
1978 - User
1979 - Moderator
1980 - Administrator
1981 videoQuota:
1982 type: number
1983 videoQuotaDaily:
1984 type: number
1985 createdAt:
1986 type: string
1987 account:
1988 $ref: '#/components/schemas/Account'
1989 videoChannels:
1990 type: array
1991 items:
1992 $ref: '#/components/schemas/VideoChannel'
1993 UserWatchingVideo:
1994 properties:
1995 currentTime:
1996 type: number
1997 ServerConfig:
1998 properties:
1999 signup:
2000 type: object
2001 properties:
2002 allowed:
2003 type: boolean
2004 transcoding:
2005 type: object
2006 properties:
2007 enabledResolutions:
2008 type: array
2009 items:
2010 type: number
2011 avatar:
2012 type: object
2013 properties:
2014 file:
2015 type: object
2016 properties:
2017 size:
2018 type: object
2019 properties:
2020 max:
2021 type: number
2022 extensions:
2023 type: array
2024 items:
2025 type: string
2026 video:
2027 type: object
2028 properties:
2029 file:
2030 type: object
2031 properties:
2032 extensions:
2033 type: array
2034 items:
2035 type: string
2036 Follow:
2037 properties:
2038 id:
2039 type: number
2040 follower:
2041 $ref: '#/components/schemas/Actor'
2042 following:
2043 $ref: '#/components/schemas/Actor'
2044 score:
2045 type: number
2046 state:
2047 type: string
2048 enum:
2049 - pending
2050 - accepted
2051 createdAt:
2052 type: string
2053 updatedAt:
2054 type: string
2055 Job:
2056 properties:
2057 id:
2058 type: number
2059 state:
2060 type: string
2061 enum:
2062 - pending
2063 - processing
2064 - error
2065 - success
2066 category:
2067 type: string
2068 enum:
2069 - transcoding
2070 - activitypub-http
2071 handlerName:
2072 type: string
2073 handlerInputData:
2074 type: string
2075 createdAt:
2076 type: string
2077 updatedAt:
2078 type: string
2079 AddUserResponse:
2080 properties:
2081 id:
2082 type: number
2083 uuid:
2084 type: string
2085 VideoUploadResponse:
2086 properties:
2087 video:
2088 type: object
2089 properties:
2090 id:
2091 type: number
2092 uuid:
2093 type: string
2094 CommentThreadResponse:
2095 properties:
2096 total:
2097 type: number
2098 data:
2099 type: array
2100 items:
2101 $ref: '#/components/schemas/VideoComment'
2102 CommentThreadPostResponse:
2103 properties:
2104 comment:
2105 $ref: '#/components/schemas/VideoComment'
2106 AddUser:
2107 properties:
2108 username:
2109 type: string
2110 description: 'The user username '
2111 password:
2112 type: string
2113 description: 'The user password '
2114 email:
2115 type: string
2116 description: 'The user email '
2117 videoQuota:
2118 type: string
2119 description: 'The user videoQuota '
2120 videoQuotaDaily:
2121 type: string
2122 description: 'The user daily video quota '
2123 role:
2124 type: integer
2125 enum:
2126 - 0
2127 - 1
2128 - 2
2129 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2130 required:
2131 - username
2132 - password
2133 - email
2134 - videoQuota
2135 - videoQuotaDaily
2136 - role
2137 UpdateUser:
2138 properties:
2139 id:
2140 type: string
2141 description: 'The user id '
2142 email:
2143 type: string
2144 description: 'The updated email of the user '
2145 videoQuota:
2146 type: string
2147 description: 'The updated videoQuota of the user '
2148 videoQuotaDaily:
2149 type: string
2150 description: 'The updated daily video quota of the user '
2151 role:
2152 type: integer
2153 enum:
2154 - 0
2155 - 1
2156 - 2
2157 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2158 required:
2159 - id
2160 - email
2161 - videoQuota
2162 - videoQuotaDaily
2163 - role
2164 UpdateMe:
2165 properties:
2166 password:
2167 type: string
2168 description: 'Your new password '
2169 email:
2170 type: string
2171 description: 'Your new email '
2172 displayNSFW:
2173 type: string
2174 description: 'Your new displayNSFW '
2175 autoPlayVideo:
2176 type: string
2177 description: 'Your new autoPlayVideo '
2178 required:
2179 - password
2180 - email
2181 - displayNSFW
2182 - autoPlayVideo
2183 GetMeVideoRating:
2184 properties:
2185 id:
2186 type: string
2187 description: 'Id of the video '
2188 rating:
2189 type: number
2190 description: 'Rating of the video '
2191 required:
2192 - id
2193 - rating
2194 VideoRating:
2195 properties:
2196 video:
2197 $ref: '#/components/schemas/Video'
2198 rating:
2199 type: number
2200 description: 'Rating of the video'
2201 required:
2202 - video
2203 - rating
2204 RegisterUser:
2205 properties:
2206 username:
2207 type: string
2208 description: 'The username of the user '
2209 password:
2210 type: string
2211 description: 'The password of the user '
2212 email:
2213 type: string
2214 description: 'The email of the user '
2215 required:
2216 - username
2217 - password
2218 - email
2219 VideoChannelInput:
2220 properties:
2221 name:
2222 type: string
2223 description:
2224 type: string
2225