]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
4a178e4d7fe81fb8e9d26bb492196cee77ad908e
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
1 openapi: 3.0.0
2 info:
3 title: PeerTube
4 version: 2.4.0
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
17 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
18 HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
19 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
20 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
21
22 - [Python](https://framagit.org/framasoft/peertube/clients/python)
23 - [Go](https://framagit.org/framasoft/peertube/clients/go)
24 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
25
26 See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API.
27
28 # Authentication
29
30 When you sign up for an account, you are given the possibility to generate
31 sessions, and authenticate using this session token. One session token can
32 currently be used at a time.
33
34 ## Roles
35
36 Accounts are given permissions based on their role. There are three roles on
37 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) for a detail of their permissions.
38
39 # Errors
40
41 The API uses standard HTTP status codes to indicate the success or failure
42 of the API call. The body of the response will be JSON in the following
43 format.
44
45 ```
46 {
47 "code": "unauthorized_request", // example inner error code
48 "error": "Token is invalid." // example exposed error message
49 }
50 ```
51 externalDocs:
52 url: https://docs.joinpeertube.org/api-rest-reference.html
53 tags:
54 - name: Accounts
55 description: >
56 Accounts encompass remote accounts discovered across the federation,
57 and correspond to the main Actor, along with video channels a user can create, which
58 are also Actors.
59
60 When a comment is posted, it is done with your Account's Actor.
61 - name: Users
62 description: >
63 Using some features of PeerTube require authentication, for which User
64 provide different levels of permission as well as associated user
65 information. Each user has a corresponding local Account for federation.
66 - name: My User
67 description: >
68 Operations related to your own User, when logged-in.
69 - name: My Subscriptions
70 description: >
71 Operations related to your subscriptions to video channels, their
72 new videos, and how to keep up to date with their latest publications!
73 - name: My Notifications
74 description: >
75 Notifications following new videos, follows or reports. They allow you
76 to keep track of the interactions and overall important information that
77 concerns you. You MAY set per-notification type delivery preference, to
78 receive the info either by mail, by in-browser notification or both.
79 - name: Config
80 description: >
81 Each server exposes public information regarding supported videos and
82 options.
83 - name: Job
84 description: >
85 Jobs are long-running tasks enqueued and processed by the instance
86 itself. No additional worker registration is currently available.
87 - name: Instance Follows
88 description: >
89 Managing servers which the instance interacts with is crucial to the
90 concept of federation in PeerTube and external video indexation. The PeerTube
91 server then deals with inter-server ActivityPub operations and propagates
92 information across its social graph by posting activities to actors' inbox
93 endpoints.
94 externalDocs:
95 url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-follows
96 - name: Instance Redundancy
97 description: >
98 Redundancy is part of the inter-server solidarity that PeerTube fosters.
99 Manage the list of instances you wish to help by seeding their videos according
100 to the policy of video selection of your choice. Note that you have a similar functionality
101 to mirror individual videos, see `Video Mirroring`.
102 externalDocs:
103 url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-redundancy
104 - name: Plugins
105 description: >
106 Managing plugins installed from a local path or from NPM, or search for new ones.
107 externalDocs:
108 url: https://docs.joinpeertube.org/#/api-plugins
109 - name: Abuses
110 description: |
111 Abuses deal with reports of local or remote videos/comments/accounts alike.
112 - name: Video
113 description: |
114 Operations dealing with listing, uploading, fetching or modifying videos.
115 - name: Search
116 description: |
117 The search helps to find _videos_ or _channels_ from within the instance and beyond.
118 Videos from other instances federated by the instance (that is, instances
119 followed by the instance) can be found via keywords and other criteria of
120 the advanced search.
121
122 Administrators can also enable the use of a remote search system, indexing
123 videos and channels not could be not federated by the instance.
124 - name: Video Comments
125 description: >
126 Operations dealing with comments to a video. Comments are organized in
127 threads.
128 - name: Video Playlists
129 description: >
130 Operations dealing with playlists of videos. Playlists are bound to users
131 and/or channels.
132 - name: Video Channels
133 description: >
134 Operations dealing with the creation, modification and listing of videos within a channel.
135 - name: Video Blocks
136 description: >
137 Operations dealing with blocking videos (removing them from view and
138 preventing interactions).
139 - name: Video Rates
140 description: >
141 Like/dislike a video.
142 - name: Feeds
143 description: >
144 Server syndication feeds
145 x-tagGroups:
146 - name: Accounts
147 tags:
148 - Accounts
149 - Users
150 - My User
151 - My Subscriptions
152 - My Notifications
153 - name: Videos
154 tags:
155 - Video
156 - Video Captions
157 - Video Channels
158 - Video Comments
159 - Video Rates
160 - Video Playlists
161 - Video Ownership Change
162 - Video Mirroring
163 - Live Videos
164 - Feeds
165 - name: Search
166 tags:
167 - Search
168 - name: Moderation
169 tags:
170 - Abuses
171 - Video Blocks
172 - Account Blocks
173 - Server Blocks
174 - name: Instance Configuration
175 tags:
176 - Config
177 - Instance Follows
178 - Instance Redundancy
179 - Plugins
180 - name: Jobs
181 tags:
182 - Job
183 paths:
184 '/accounts/{name}':
185 get:
186 tags:
187 - Accounts
188 summary: Get an account
189 parameters:
190 - $ref: '#/components/parameters/name'
191 responses:
192 '200':
193 description: successful operation
194 content:
195 application/json:
196 schema:
197 $ref: '#/components/schemas/Account'
198 '404':
199 description: account not found
200 '/accounts/{name}/videos':
201 get:
202 tags:
203 - Accounts
204 - Video
205 summary: 'List videos of an account'
206 parameters:
207 - $ref: '#/components/parameters/name'
208 - $ref: '#/components/parameters/categoryOneOf'
209 - $ref: '#/components/parameters/tagsOneOf'
210 - $ref: '#/components/parameters/tagsAllOf'
211 - $ref: '#/components/parameters/licenceOneOf'
212 - $ref: '#/components/parameters/languageOneOf'
213 - $ref: '#/components/parameters/nsfw'
214 - $ref: '#/components/parameters/filter'
215 - $ref: '#/components/parameters/skipCount'
216 - $ref: '#/components/parameters/start'
217 - $ref: '#/components/parameters/count'
218 - $ref: '#/components/parameters/videosSort'
219 responses:
220 '200':
221 description: successful operation
222 content:
223 application/json:
224 schema:
225 $ref: '#/components/schemas/VideoListResponse'
226 x-code-samples:
227 - lang: JavaScript
228 source: |
229 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
230 .then(function(response) {
231 return response.json()
232 }).then(function(data) {
233 console.log(data)
234 })
235 - lang: Shell
236 source: |
237 ## DEPENDENCIES: jq
238 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
239 - lang: Ruby
240 source: |
241 require 'net/http'
242 require 'json'
243
244 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
245
246 http = Net::HTTP.new(uri.host, uri.port)
247 http.use_ssl = true
248
249 response = http.get(uri.request_uri)
250
251 puts JSON.parse(response.read_body)
252 - lang: Python
253 source: |
254 import requests
255
256 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
257 json = r.json()
258
259 print(json)
260 /accounts:
261 get:
262 tags:
263 - Accounts
264 summary: List accounts
265 parameters:
266 - $ref: '#/components/parameters/start'
267 - $ref: '#/components/parameters/count'
268 - $ref: '#/components/parameters/sort'
269 responses:
270 '200':
271 description: successful operation
272 content:
273 'application/json':
274 schema:
275 type: array
276 items:
277 $ref: '#/components/schemas/Account'
278 /config:
279 get:
280 tags:
281 - Config
282 summary: Get instance public configuration
283 responses:
284 '200':
285 description: successful operation
286 content:
287 application/json:
288 schema:
289 $ref: '#/components/schemas/ServerConfig'
290 /config/about:
291 get:
292 summary: Get instance "About" information
293 tags:
294 - Config
295 responses:
296 '200':
297 description: successful operation
298 content:
299 application/json:
300 schema:
301 $ref: '#/components/schemas/ServerConfigAbout'
302 /config/custom:
303 get:
304 summary: Get instance runtime configuration
305 tags:
306 - Config
307 security:
308 - OAuth2:
309 - admin
310 responses:
311 '200':
312 description: successful operation
313 content:
314 application/json:
315 schema:
316 $ref: '#/components/schemas/ServerConfigCustom'
317 put:
318 summary: Set instance runtime configuration
319 tags:
320 - Config
321 security:
322 - OAuth2:
323 - admin
324 responses:
325 '200':
326 description: successful operation
327 '400':
328 x-summary: field inconsistencies
329 description: >
330 Arises when:
331 - the emailer is disabled and the instance is open to registrations
332 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
333 delete:
334 summary: Delete instance runtime configuration
335 tags:
336 - Config
337 security:
338 - OAuth2:
339 - admin
340 responses:
341 '200':
342 description: successful operation
343 /jobs/{state}:
344 get:
345 summary: List instance jobs
346 security:
347 - OAuth2:
348 - admin
349 tags:
350 - Job
351 parameters:
352 - name: state
353 in: path
354 required: true
355 description: The state of the job
356 schema:
357 type: string
358 enum:
359 - active
360 - completed
361 - failed
362 - waiting
363 - delayed
364 - $ref: '#/components/parameters/start'
365 - $ref: '#/components/parameters/count'
366 - $ref: '#/components/parameters/sort'
367 responses:
368 '200':
369 description: successful operation
370 content:
371 application/json:
372 schema:
373 type: object
374 properties:
375 total:
376 type: integer
377 example: 1
378 data:
379 type: array
380 maxItems: 100
381 items:
382 $ref: '#/components/schemas/Job'
383 '/server/following/{host}':
384 delete:
385 security:
386 - OAuth2:
387 - admin
388 tags:
389 - Instance Follows
390 summary: Unfollow a server
391 parameters:
392 - name: host
393 in: path
394 required: true
395 description: 'The host to unfollow '
396 schema:
397 type: string
398 format: hostname
399 responses:
400 '201':
401 description: successful operation
402 /server/followers:
403 get:
404 tags:
405 - Instance Follows
406 summary: List instance followers
407 parameters:
408 - $ref: '#/components/parameters/start'
409 - $ref: '#/components/parameters/count'
410 - $ref: '#/components/parameters/sort'
411 responses:
412 '200':
413 description: successful operation
414 content:
415 application/json:
416 schema:
417 type: array
418 items:
419 $ref: '#/components/schemas/Follow'
420 /server/following:
421 get:
422 tags:
423 - Instance Follows
424 summary: List instances followed by the server
425 parameters:
426 - name: state
427 in: query
428 schema:
429 type: string
430 enum:
431 - pending
432 - accepted
433 - name: actorType
434 in: query
435 schema:
436 type: string
437 enum:
438 - Person
439 - Application
440 - Group
441 - Service
442 - Organization
443 - $ref: '#/components/parameters/start'
444 - $ref: '#/components/parameters/count'
445 - $ref: '#/components/parameters/sort'
446 responses:
447 '200':
448 description: successful operation
449 content:
450 application/json:
451 schema:
452 type: array
453 items:
454 $ref: '#/components/schemas/Follow'
455 post:
456 security:
457 - OAuth2:
458 - admin
459 tags:
460 - Instance Follows
461 summary: Follow a server
462 responses:
463 '204':
464 description: successful operation
465 '500':
466 description: cannot follow a non-HTTPS server
467 requestBody:
468 content:
469 application/json:
470 schema:
471 type: object
472 properties:
473 hosts:
474 type: array
475 items:
476 type: string
477 format: hostname
478 uniqueItems: true
479 /users:
480 post:
481 summary: Create a user
482 security:
483 - OAuth2:
484 - admin
485 tags:
486 - Users
487 responses:
488 '200':
489 description: user created
490 content:
491 application/json:
492 schema:
493 $ref: '#/components/schemas/AddUserResponse'
494 links:
495 # GET /users/{id}
496 GetUserId:
497 operationId: getUserId
498 parameters:
499 id: '$response.body#/user/id'
500 # PUT /users/{id}
501 PutUserId:
502 operationId: putUserId
503 parameters:
504 id: '$response.body#/user/id'
505 # DELETE /users/{id}
506 DelUserId:
507 operationId: delUserId
508 parameters:
509 id: '$response.body#/user/id'
510 '403':
511 description: insufficient authority to create an admin or moderator
512 requestBody:
513 content:
514 application/json:
515 schema:
516 $ref: '#/components/schemas/AddUser'
517 description: User to create
518 required: true
519 get:
520 summary: List users
521 security:
522 - OAuth2:
523 - admin
524 tags:
525 - Users
526 parameters:
527 - $ref: '#/components/parameters/usersSearch'
528 - $ref: '#/components/parameters/usersBlocked'
529 - $ref: '#/components/parameters/start'
530 - $ref: '#/components/parameters/count'
531 - $ref: '#/components/parameters/usersSort'
532 responses:
533 '200':
534 description: successful operation
535 content:
536 application/json:
537 schema:
538 type: array
539 items:
540 $ref: '#/components/schemas/User'
541 '/users/{id}':
542 parameters:
543 - $ref: '#/components/parameters/id'
544 delete:
545 summary: Delete a user
546 security:
547 - OAuth2:
548 - admin
549 tags:
550 - Users
551 operationId: delUserId
552 responses:
553 '204':
554 description: successful operation
555 get:
556 summary: Get a user
557 security:
558 - OAuth2: []
559 tags:
560 - Users
561 operationId: getUserId
562 responses:
563 '200':
564 description: successful operation
565 content:
566 application/json:
567 schema:
568 $ref: '#/components/schemas/User'
569 put:
570 summary: Update a user
571 security:
572 - OAuth2: []
573 tags:
574 - Users
575 operationId: putUserId
576 responses:
577 '204':
578 description: successful operation
579 requestBody:
580 content:
581 application/json:
582 schema:
583 $ref: '#/components/schemas/UpdateUser'
584 required: true
585 /users/register:
586 post:
587 summary: Register a user
588 tags:
589 - Users
590 responses:
591 '204':
592 description: successful operation
593 requestBody:
594 content:
595 application/json:
596 schema:
597 $ref: '#/components/schemas/RegisterUser'
598 required: true
599 /users/me:
600 get:
601 summary: Get my user information
602 security:
603 - OAuth2:
604 - user
605 tags:
606 - My User
607 responses:
608 '200':
609 description: successful operation
610 content:
611 application/json:
612 schema:
613 type: array
614 items:
615 $ref: '#/components/schemas/User'
616 put:
617 summary: Update my user information
618 security:
619 - OAuth2:
620 - user
621 tags:
622 - My User
623 responses:
624 '204':
625 description: successful operation
626 requestBody:
627 content:
628 application/json:
629 schema:
630 $ref: '#/components/schemas/UpdateMe'
631 required: true
632 /users/me/videos/imports:
633 get:
634 summary: Get video imports of my user
635 security:
636 - OAuth2:
637 - user
638 tags:
639 - Videos
640 - My User
641 parameters:
642 - $ref: '#/components/parameters/start'
643 - $ref: '#/components/parameters/count'
644 - $ref: '#/components/parameters/sort'
645 responses:
646 '200':
647 description: successful operation
648 content:
649 application/json:
650 schema:
651 $ref: '#/components/schemas/VideoImport'
652 /users/me/video-quota-used:
653 get:
654 summary: Get my user used quota
655 security:
656 - OAuth2:
657 - user
658 tags:
659 - My User
660 responses:
661 '200':
662 description: successful operation
663 content:
664 application/json:
665 schema:
666 type: number
667 '/users/me/videos/{videoId}/rating':
668 get:
669 summary: Get rate of my user for a video
670 security:
671 - OAuth2: []
672 tags:
673 - My User
674 - Video Rates
675 parameters:
676 - name: videoId
677 in: path
678 required: true
679 description: 'The video id '
680 schema:
681 type: string
682 responses:
683 '200':
684 description: successful operation
685 content:
686 application/json:
687 schema:
688 $ref: '#/components/schemas/GetMeVideoRating'
689 /users/me/videos:
690 get:
691 summary: Get videos of my user
692 security:
693 - OAuth2:
694 - user
695 tags:
696 - My User
697 - Videos
698 parameters:
699 - $ref: '#/components/parameters/start'
700 - $ref: '#/components/parameters/count'
701 - $ref: '#/components/parameters/sort'
702 responses:
703 '200':
704 description: successful operation
705 content:
706 application/json:
707 schema:
708 $ref: '#/components/schemas/VideoListResponse'
709 /users/me/subscriptions:
710 get:
711 summary: Get my user subscriptions
712 security:
713 - OAuth2:
714 - user
715 tags:
716 - My Subscriptions
717 parameters:
718 - $ref: '#/components/parameters/start'
719 - $ref: '#/components/parameters/count'
720 - $ref: '#/components/parameters/sort'
721 responses:
722 '200':
723 description: successful operation
724 post:
725 tags:
726 - My Subscriptions
727 summary: Add subscription to my user
728 security:
729 - OAuth2:
730 - user
731 requestBody:
732 content:
733 application/json:
734 schema:
735 type: object
736 properties:
737 uri:
738 type: string
739 format: uri
740 description: uri of the video channels to subscribe to
741 required:
742 - uri
743 examples:
744 default:
745 value:
746 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
747 responses:
748 '200':
749 description: successful operation
750 /users/me/subscriptions/exist:
751 get:
752 summary: Get if subscriptions exist for my user
753 security:
754 - OAuth2:
755 - user
756 tags:
757 - My Subscriptions
758 parameters:
759 - $ref: '#/components/parameters/subscriptionsUris'
760 responses:
761 '200':
762 description: successful operation
763 content:
764 application/json:
765 schema:
766 type: object
767 /users/me/subscriptions/videos:
768 get:
769 summary: List videos of subscriptions of my user
770 security:
771 - OAuth2:
772 - user
773 tags:
774 - My Subscriptions
775 - Videos
776 parameters:
777 - $ref: '#/components/parameters/categoryOneOf'
778 - $ref: '#/components/parameters/tagsOneOf'
779 - $ref: '#/components/parameters/tagsAllOf'
780 - $ref: '#/components/parameters/licenceOneOf'
781 - $ref: '#/components/parameters/languageOneOf'
782 - $ref: '#/components/parameters/nsfw'
783 - $ref: '#/components/parameters/filter'
784 - $ref: '#/components/parameters/skipCount'
785 - $ref: '#/components/parameters/start'
786 - $ref: '#/components/parameters/count'
787 - $ref: '#/components/parameters/videosSort'
788 responses:
789 '200':
790 description: successful operation
791 content:
792 application/json:
793 schema:
794 $ref: '#/components/schemas/VideoListResponse'
795 '/users/me/subscriptions/{subscriptionHandle}':
796 get:
797 summary: Get subscription of my user
798 security:
799 - OAuth2:
800 - user
801 tags:
802 - My Subscriptions
803 parameters:
804 - $ref: '#/components/parameters/subscriptionHandle'
805 responses:
806 '200':
807 description: successful operation
808 content:
809 application/json:
810 schema:
811 $ref: '#/components/schemas/VideoChannel'
812 delete:
813 summary: Delete subscription of my user
814 security:
815 - OAuth2:
816 - user
817 tags:
818 - My Subscriptions
819 parameters:
820 - $ref: '#/components/parameters/subscriptionHandle'
821 responses:
822 '200':
823 description: successful operation
824 /users/me/notifications:
825 get:
826 summary: List my notifications
827 security:
828 - OAuth2: []
829 tags:
830 - My Notifications
831 parameters:
832 - name: unread
833 in: query
834 description: only list unread notifications
835 schema:
836 type: boolean
837 - $ref: '#/components/parameters/start'
838 - $ref: '#/components/parameters/count'
839 - $ref: '#/components/parameters/sort'
840 responses:
841 '200':
842 description: successful operation
843 content:
844 application/json:
845 schema:
846 $ref: '#/components/schemas/NotificationListResponse'
847 /users/me/notifications/read:
848 post:
849 summary: Mark notifications as read by their id
850 security:
851 - OAuth2: []
852 tags:
853 - My Notifications
854 requestBody:
855 content:
856 application/json:
857 schema:
858 type: object
859 properties:
860 ids:
861 type: array
862 description: ids of the notifications to mark as read
863 items:
864 type: integer
865 required:
866 - ids
867 responses:
868 '204':
869 description: successful operation
870 /users/me/notifications/read-all:
871 post:
872 summary: Mark all my notification as read
873 security:
874 - OAuth2: []
875 tags:
876 - My Notifications
877 responses:
878 '204':
879 description: successful operation
880 /users/me/notification-settings:
881 put:
882 summary: Update my notification settings
883 security:
884 - OAuth2: []
885 tags:
886 - My Notifications
887 requestBody:
888 content:
889 application/json:
890 schema:
891 type: object
892 properties:
893 newVideoFromSubscription:
894 $ref: '#/components/schemas/NotificationSettingValue'
895 newCommentOnMyVideo:
896 $ref: '#/components/schemas/NotificationSettingValue'
897 abuseAsModerator:
898 $ref: '#/components/schemas/NotificationSettingValue'
899 videoAutoBlacklistAsModerator:
900 $ref: '#/components/schemas/NotificationSettingValue'
901 blacklistOnMyVideo:
902 $ref: '#/components/schemas/NotificationSettingValue'
903 myVideoPublished:
904 $ref: '#/components/schemas/NotificationSettingValue'
905 myVideoImportFinished:
906 $ref: '#/components/schemas/NotificationSettingValue'
907 newFollow:
908 $ref: '#/components/schemas/NotificationSettingValue'
909 newUserRegistration:
910 $ref: '#/components/schemas/NotificationSettingValue'
911 commentMention:
912 $ref: '#/components/schemas/NotificationSettingValue'
913 newInstanceFollower:
914 $ref: '#/components/schemas/NotificationSettingValue'
915 autoInstanceFollowing:
916 $ref: '#/components/schemas/NotificationSettingValue'
917 responses:
918 '204':
919 description: successful operation
920 /users/me/avatar/pick:
921 post:
922 summary: Update my user avatar
923 security:
924 - OAuth2: []
925 tags:
926 - My User
927 responses:
928 '200':
929 description: successful operation
930 content:
931 application/json:
932 schema:
933 $ref: '#/components/schemas/Avatar'
934 requestBody:
935 content:
936 multipart/form-data:
937 schema:
938 type: object
939 properties:
940 avatarfile:
941 description: The file to upload.
942 type: string
943 format: binary
944 encoding:
945 avatarfile:
946 contentType: image/png, image/jpeg
947 /videos/ownership:
948 get:
949 summary: List video ownership changes
950 tags:
951 - Video Ownership Change
952 security:
953 - OAuth2: []
954 responses:
955 '200':
956 description: successful operation
957 '/videos/ownership/{id}/accept':
958 post:
959 summary: Accept ownership change request
960 tags:
961 - Video Ownership Change
962 security:
963 - OAuth2: []
964 parameters:
965 - $ref: '#/components/parameters/idOrUUID'
966 responses:
967 '204':
968 description: successful operation
969 '403':
970 description: cannot terminate an ownership change of another user
971 '404':
972 description: video owneship change not found
973 '/videos/ownership/{id}/refuse':
974 post:
975 summary: Refuse ownership change request
976 tags:
977 - Video Ownership Change
978 security:
979 - OAuth2: []
980 parameters:
981 - $ref: '#/components/parameters/idOrUUID'
982 responses:
983 '204':
984 description: successful operation
985 '403':
986 description: cannot terminate an ownership change of another user
987 '404':
988 description: video owneship change not found
989 '/videos/{id}/give-ownership':
990 post:
991 summary: Request ownership change
992 tags:
993 - Video Ownership Change
994 security:
995 - OAuth2: []
996 parameters:
997 - $ref: '#/components/parameters/idOrUUID'
998 requestBody:
999 required: true
1000 content:
1001 application/x-www-form-urlencoded:
1002 schema:
1003 type: object
1004 properties:
1005 username:
1006 type: string
1007 required:
1008 - username
1009 responses:
1010 '204':
1011 description: successful operation
1012 '400':
1013 description: changing video ownership to a remote account is not supported yet
1014 '404':
1015 description: video not found
1016 /videos:
1017 get:
1018 summary: List videos
1019 tags:
1020 - Video
1021 parameters:
1022 - $ref: '#/components/parameters/categoryOneOf'
1023 - $ref: '#/components/parameters/tagsOneOf'
1024 - $ref: '#/components/parameters/tagsAllOf'
1025 - $ref: '#/components/parameters/licenceOneOf'
1026 - $ref: '#/components/parameters/languageOneOf'
1027 - $ref: '#/components/parameters/nsfw'
1028 - $ref: '#/components/parameters/filter'
1029 - $ref: '#/components/parameters/skipCount'
1030 - $ref: '#/components/parameters/start'
1031 - $ref: '#/components/parameters/count'
1032 - $ref: '#/components/parameters/videosSort'
1033 responses:
1034 '200':
1035 description: successful operation
1036 content:
1037 application/json:
1038 schema:
1039 $ref: '#/components/schemas/VideoListResponse'
1040 /videos/categories:
1041 get:
1042 summary: List available video categories
1043 tags:
1044 - Video
1045 responses:
1046 '200':
1047 description: successful operation
1048 content:
1049 application/json:
1050 schema:
1051 type: array
1052 items:
1053 type: string
1054 examples:
1055 nightly:
1056 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1057 /videos/licences:
1058 get:
1059 summary: List available video licences
1060 tags:
1061 - Video
1062 responses:
1063 '200':
1064 description: successful operation
1065 content:
1066 application/json:
1067 schema:
1068 type: array
1069 items:
1070 type: string
1071 examples:
1072 nightly:
1073 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1074 /videos/languages:
1075 get:
1076 summary: List available video languages
1077 tags:
1078 - Video
1079 responses:
1080 '200':
1081 description: successful operation
1082 content:
1083 application/json:
1084 schema:
1085 type: array
1086 items:
1087 type: string
1088 examples:
1089 nightly:
1090 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1091 /videos/privacies:
1092 get:
1093 summary: List available video privacies
1094 tags:
1095 - Video
1096 responses:
1097 '200':
1098 description: successful operation
1099 content:
1100 application/json:
1101 schema:
1102 type: array
1103 items:
1104 type: string
1105 examples:
1106 nightly:
1107 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1108 '/videos/{id}':
1109 put:
1110 summary: Update a video
1111 security:
1112 - OAuth2: []
1113 tags:
1114 - Video
1115 parameters:
1116 - $ref: '#/components/parameters/idOrUUID'
1117 responses:
1118 '204':
1119 description: successful operation
1120 requestBody:
1121 content:
1122 multipart/form-data:
1123 schema:
1124 type: object
1125 properties:
1126 thumbnailfile:
1127 description: Video thumbnail file
1128 type: string
1129 format: binary
1130 previewfile:
1131 description: Video preview file
1132 type: string
1133 format: binary
1134 category:
1135 description: Video category
1136 type: integer
1137 example: 4
1138 licence:
1139 description: Video licence
1140 type: integer
1141 example: 2
1142 language:
1143 description: Video language
1144 type: string
1145 privacy:
1146 $ref: '#/components/schemas/VideoPrivacySet'
1147 description:
1148 description: Video description
1149 type: string
1150 waitTranscoding:
1151 description: Whether or not we wait transcoding before publish the video
1152 type: string
1153 support:
1154 description: A text tell the audience how to support the video creator
1155 example: Please support my work on <insert crowdfunding plateform>! <3
1156 type: string
1157 nsfw:
1158 description: Whether or not this video contains sensitive content
1159 type: boolean
1160 name:
1161 description: Video name
1162 type: string
1163 tags:
1164 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1165 type: array
1166 minItems: 1
1167 maxItems: 5
1168 items:
1169 type: string
1170 minLength: 2
1171 maxLength: 30
1172 commentsEnabled:
1173 description: Enable or disable comments for this video
1174 type: boolean
1175 originallyPublishedAt:
1176 description: Date when the content was originally published
1177 type: string
1178 format: date-time
1179 scheduleUpdate:
1180 $ref: '#/components/schemas/VideoScheduledUpdate'
1181 encoding:
1182 thumbnailfile:
1183 contentType: image/jpeg
1184 previewfile:
1185 contentType: image/jpeg
1186 get:
1187 summary: Get a video
1188 tags:
1189 - Video
1190 parameters:
1191 - $ref: '#/components/parameters/idOrUUID'
1192 responses:
1193 '200':
1194 description: successful operation
1195 content:
1196 application/json:
1197 schema:
1198 $ref: '#/components/schemas/VideoDetails'
1199 delete:
1200 summary: Delete a video
1201 security:
1202 - OAuth2: []
1203 tags:
1204 - Video
1205 parameters:
1206 - $ref: '#/components/parameters/idOrUUID'
1207 responses:
1208 '204':
1209 description: successful operation
1210 '/videos/{id}/description':
1211 get:
1212 summary: Get complete video description
1213 tags:
1214 - Video
1215 parameters:
1216 - $ref: '#/components/parameters/idOrUUID'
1217 responses:
1218 '200':
1219 description: successful operation
1220 content:
1221 application/json:
1222 schema:
1223 type: string
1224 '/videos/{id}/views':
1225 post:
1226 summary: Add a view to a video
1227 tags:
1228 - Video
1229 parameters:
1230 - $ref: '#/components/parameters/idOrUUID'
1231 responses:
1232 '204':
1233 description: successful operation
1234 '/videos/{id}/watching':
1235 put:
1236 summary: Set watching progress of a video
1237 tags:
1238 - Video
1239 security:
1240 - OAuth2: []
1241 parameters:
1242 - $ref: '#/components/parameters/idOrUUID'
1243 requestBody:
1244 content:
1245 application/json:
1246 schema:
1247 $ref: '#/components/schemas/UserWatchingVideo'
1248 required: true
1249 responses:
1250 '204':
1251 description: successful operation
1252 /videos/upload:
1253 post:
1254 summary: Upload a video
1255 security:
1256 - OAuth2: []
1257 tags:
1258 - Video
1259 responses:
1260 '200':
1261 description: successful operation
1262 content:
1263 application/json:
1264 schema:
1265 $ref: '#/components/schemas/VideoUploadResponse'
1266 '403':
1267 description: user video quota is exceeded with this video
1268 '408':
1269 description: upload has timed out
1270 '422':
1271 description: invalid input file
1272 requestBody:
1273 content:
1274 multipart/form-data:
1275 schema:
1276 type: object
1277 properties:
1278 videofile:
1279 description: Video file
1280 type: string
1281 format: binary
1282 channelId:
1283 description: Channel id that will contain this video
1284 type: integer
1285 thumbnailfile:
1286 description: Video thumbnail file
1287 type: string
1288 format: binary
1289 previewfile:
1290 description: Video preview file
1291 type: string
1292 format: binary
1293 privacy:
1294 $ref: '#/components/schemas/VideoPrivacySet'
1295 category:
1296 description: Video category
1297 type: integer
1298 example: 4
1299 licence:
1300 description: Video licence
1301 type: string
1302 language:
1303 description: Video language
1304 type: integer
1305 example: 2
1306 description:
1307 description: Video description
1308 type: string
1309 waitTranscoding:
1310 description: Whether or not we wait transcoding before publish the video
1311 type: boolean
1312 support:
1313 description: A text tell the audience how to support the video creator
1314 example: Please support my work on <insert crowdfunding plateform>! <3
1315 type: string
1316 nsfw:
1317 description: Whether or not this video contains sensitive content
1318 type: boolean
1319 name:
1320 description: Video name
1321 type: string
1322 tags:
1323 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1324 type: array
1325 minItems: 1
1326 maxItems: 5
1327 uniqueItems: true
1328 items:
1329 type: string
1330 minLength: 2
1331 maxLength: 30
1332 commentsEnabled:
1333 description: Enable or disable comments for this video
1334 type: boolean
1335 downloadEnabled:
1336 description: Enable or disable downloading for this video
1337 type: boolean
1338 originallyPublishedAt:
1339 description: Date when the content was originally published
1340 type: string
1341 format: date-time
1342 scheduleUpdate:
1343 $ref: '#/components/schemas/VideoScheduledUpdate'
1344 required:
1345 - videofile
1346 - channelId
1347 - name
1348 encoding:
1349 videofile:
1350 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1351 thumbnailfile:
1352 contentType: image/jpeg
1353 previewfile:
1354 contentType: image/jpeg
1355 x-code-samples:
1356 - lang: Shell
1357 source: |
1358 ## DEPENDENCIES: jq
1359 USERNAME="<your_username>"
1360 PASSWORD="<your_password>"
1361 FILE_PATH="<your_file_path>"
1362 CHANNEL_ID="<your_channel_id>"
1363 NAME="<video_name>"
1364
1365 API_PATH="https://peertube2.cpy.re/api/v1"
1366 ## AUTH
1367 client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1368 client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1369 token=$(curl -s "$API_PATH/users/token" \
1370 --data client_id="$client_id" \
1371 --data client_secret="$client_secret" \
1372 --data grant_type=password \
1373 --data response_type=code \
1374 --data username="$USERNAME" \
1375 --data password="$PASSWORD" \
1376 | jq -r ".access_token")
1377 ## VIDEO UPLOAD
1378 curl -s "$API_PATH/videos/upload" \
1379 -H "Authorization: Bearer $token" \
1380 --max-time 600 \
1381 --form videofile=@"$FILE_PATH" \
1382 --form channelId=$CHANNEL_ID \
1383 --form name="$NAME"
1384 /videos/imports:
1385 post:
1386 summary: Import a video
1387 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
1388 security:
1389 - OAuth2: []
1390 tags:
1391 - Video
1392 requestBody:
1393 content:
1394 multipart/form-data:
1395 schema:
1396 type: object
1397 properties:
1398 torrentfile:
1399 description: Torrent File
1400 type: string
1401 format: binary
1402 targetUrl:
1403 description: HTTP target URL
1404 type: string
1405 magnetUri:
1406 description: Magnet URI
1407 type: string
1408 channelId:
1409 description: Channel id that will contain this video
1410 type: integer
1411 thumbnailfile:
1412 description: Video thumbnail file
1413 type: string
1414 format: binary
1415 previewfile:
1416 description: Video preview file
1417 type: string
1418 format: binary
1419 privacy:
1420 $ref: '#/components/schemas/VideoPrivacySet'
1421 category:
1422 description: Video category
1423 type: string
1424 licence:
1425 description: Video licence
1426 type: string
1427 language:
1428 description: Video language
1429 type: string
1430 description:
1431 description: Video description
1432 type: string
1433 waitTranscoding:
1434 description: Whether or not we wait transcoding before publish the video
1435 type: boolean
1436 support:
1437 description: A text tell the audience how to support the video creator
1438 example: Please support my work on <insert crowdfunding plateform>! <3
1439 type: string
1440 nsfw:
1441 description: Whether or not this video contains sensitive content
1442 type: boolean
1443 name:
1444 description: Video name
1445 type: string
1446 tags:
1447 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1448 type: array
1449 minItems: 1
1450 maxItems: 5
1451 items:
1452 type: string
1453 minLength: 2
1454 maxLength: 30
1455 commentsEnabled:
1456 description: Enable or disable comments for this video
1457 type: boolean
1458 downloadEnabled:
1459 description: Enable or disable downloading for this video
1460 type: boolean
1461 scheduleUpdate:
1462 $ref: '#/components/schemas/VideoScheduledUpdate'
1463 required:
1464 - channelId
1465 - name
1466 encoding:
1467 torrentfile:
1468 contentType: application/x-bittorrent
1469 thumbnailfile:
1470 contentType: image/jpeg
1471 previewfile:
1472 contentType: image/jpeg
1473 responses:
1474 '200':
1475 description: successful operation
1476 content:
1477 application/json:
1478 schema:
1479 $ref: '#/components/schemas/VideoUploadResponse'
1480 '409':
1481 description: HTTP or Torrent/magnetURI import not enabled
1482 '400':
1483 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1484
1485 /videos/live:
1486 post:
1487 summary: Create a live
1488 security:
1489 - OAuth2: []
1490 tags:
1491 - Live Videos
1492 - Video
1493 responses:
1494 '200':
1495 description: successful operation
1496 content:
1497 application/json:
1498 schema:
1499 $ref: '#/components/schemas/VideoUploadResponse'
1500 '403':
1501 description: Live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
1502 requestBody:
1503 content:
1504 multipart/form-data:
1505 schema:
1506 type: object
1507 properties:
1508 channelId:
1509 description: Channel id that will contain this live video
1510 type: integer
1511 saveReplay:
1512 type: boolean
1513 thumbnailfile:
1514 description: Live video/replay thumbnail file
1515 type: string
1516 format: binary
1517 previewfile:
1518 description: Live video/replay preview file
1519 type: string
1520 format: binary
1521 privacy:
1522 $ref: '#/components/schemas/VideoPrivacySet'
1523 category:
1524 description: Live video/replay category
1525 type: string
1526 licence:
1527 description: Live video/replay licence
1528 type: string
1529 language:
1530 description: Live video/replay language
1531 type: string
1532 description:
1533 description: Live video/replay description
1534 type: string
1535 support:
1536 description: A text tell the audience how to support the creator
1537 example: Please support my work on <insert crowdfunding plateform>! <3
1538 type: string
1539 nsfw:
1540 description: Whether or not this live video/replay contains sensitive content
1541 type: boolean
1542 name:
1543 description: Live video/replay name
1544 type: string
1545 tags:
1546 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
1547 type: array
1548 minItems: 1
1549 maxItems: 5
1550 items:
1551 type: string
1552 minLength: 2
1553 maxLength: 30
1554 commentsEnabled:
1555 description: Enable or disable comments for this live video/replay
1556 type: boolean
1557 downloadEnabled:
1558 description: Enable or disable downloading for the replay of this live
1559 type: boolean
1560 required:
1561 - channelId
1562 - name
1563 encoding:
1564 thumbnailfile:
1565 contentType: image/jpeg
1566 previewfile:
1567 contentType: image/jpeg
1568
1569 /videos/live/{id}:
1570 get:
1571 summary: Get a live information
1572 security:
1573 - OAuth2: []
1574 tags:
1575 - Live Videos
1576 - Video
1577 parameters:
1578 - $ref: '#/components/parameters/idOrUUID'
1579 responses:
1580 '200':
1581 description: successful operation
1582 content:
1583 application/json:
1584 schema:
1585 $ref: '#/components/schemas/LiveVideoResponse'
1586 put:
1587 summary: Update a live information
1588 security:
1589 - OAuth2: []
1590 tags:
1591 - Live Videos
1592 - Video
1593 parameters:
1594 - $ref: '#/components/parameters/idOrUUID'
1595 requestBody:
1596 content:
1597 application/json:
1598 schema:
1599 $ref: '#/components/schemas/LiveVideoUpdate'
1600 responses:
1601 '204':
1602 description: Successful operation
1603 '400':
1604 description: Bad parameters or trying to update a live that has already started
1605 '403':
1606 description: Trying to save replay of the live but saving replay is not enabled on the instance
1607
1608 /users/me/abuses:
1609 get:
1610 summary: List my abuses
1611 security:
1612 - OAuth2: []
1613 tags:
1614 - Abuses
1615 - My User
1616 parameters:
1617 - name: id
1618 in: query
1619 description: only list the report with this id
1620 schema:
1621 type: integer
1622 - name: state
1623 in: query
1624 schema:
1625 $ref: '#/components/schemas/AbuseStateSet'
1626 - $ref: '#/components/parameters/start'
1627 - $ref: '#/components/parameters/count'
1628 - $ref: '#/components/parameters/abusesSort'
1629 responses:
1630 '200':
1631 description: successful operation
1632 content:
1633 application/json:
1634 schema:
1635 type: array
1636 items:
1637 $ref: '#/components/schemas/Abuse'
1638
1639 /abuses:
1640 get:
1641 summary: List abuses
1642 security:
1643 - OAuth2:
1644 - admin
1645 - moderator
1646 tags:
1647 - Abuses
1648 parameters:
1649 - name: id
1650 in: query
1651 description: only list the report with this id
1652 schema:
1653 type: integer
1654 - name: predefinedReason
1655 in: query
1656 description: predefined reason the listed reports should contain
1657 schema:
1658 $ref: '#/components/schemas/PredefinedAbuseReasons'
1659 - name: search
1660 in: query
1661 description: plain search that will match with video titles, reporter names and more
1662 schema:
1663 type: string
1664 - name: state
1665 in: query
1666 schema:
1667 $ref: '#/components/schemas/AbuseStateSet'
1668 - name: searchReporter
1669 in: query
1670 description: only list reports of a specific reporter
1671 schema:
1672 type: string
1673 - name: searchReportee
1674 description: only list reports of a specific reportee
1675 in: query
1676 schema:
1677 type: string
1678 - name: searchVideo
1679 in: query
1680 description: only list reports of a specific video
1681 schema:
1682 type: string
1683 - name: searchVideoChannel
1684 in: query
1685 description: only list reports of a specific video channel
1686 schema:
1687 type: string
1688 - name: videoIs
1689 in: query
1690 description: only list blacklisted or deleted videos
1691 schema:
1692 type: string
1693 enum:
1694 - 'deleted'
1695 - 'blacklisted'
1696 - name: filter
1697 in: query
1698 description: only list account, comment or video reports
1699 schema:
1700 type: string
1701 enum:
1702 - 'video'
1703 - 'comment'
1704 - 'account'
1705 - $ref: '#/components/parameters/start'
1706 - $ref: '#/components/parameters/count'
1707 - $ref: '#/components/parameters/abusesSort'
1708 responses:
1709 '200':
1710 description: successful operation
1711 content:
1712 application/json:
1713 schema:
1714 type: array
1715 items:
1716 $ref: '#/components/schemas/Abuse'
1717
1718 post:
1719 summary: Report an abuse
1720 security:
1721 - OAuth2: []
1722 tags:
1723 - Abuses
1724 requestBody:
1725 required: true
1726 content:
1727 application/json:
1728 schema:
1729 type: object
1730 properties:
1731 reason:
1732 description: Reason why the user reports this video
1733 type: string
1734 minLength: 4
1735 predefinedReasons:
1736 $ref: '#/components/schemas/PredefinedAbuseReasons'
1737
1738 video:
1739 type: object
1740 properties:
1741 id:
1742 description: Video id to report
1743 type: number
1744 startAt:
1745 type: integer
1746 description: Timestamp in the video that marks the beginning of the report
1747 minimum: 0
1748 endAt:
1749 type: integer
1750 description: Timestamp in the video that marks the ending of the report
1751 minimum: 0
1752 comment:
1753 type: object
1754 properties:
1755 id:
1756 description: Comment id to report
1757 type: number
1758 account:
1759 type: object
1760 properties:
1761 id:
1762 description: Account id to report
1763 type: number
1764 required:
1765 - reason
1766 responses:
1767 '204':
1768 description: successful operation
1769 '400':
1770 description: incorrect request parameters
1771 '/abuses/{abuseId}':
1772 put:
1773 summary: Update an abuse
1774 security:
1775 - OAuth2:
1776 - admin
1777 - moderator
1778 tags:
1779 - Abuses
1780 parameters:
1781 - $ref: '#/components/parameters/abuseId'
1782 requestBody:
1783 content:
1784 application/json:
1785 schema:
1786 type: object
1787 properties:
1788 state:
1789 $ref: '#/components/schemas/AbuseStateSet'
1790 moderationComment:
1791 type: string
1792 description: Update the report comment visible only to the moderation team
1793 responses:
1794 '204':
1795 description: successful operation
1796 '404':
1797 description: abuse not found
1798 delete:
1799 tags:
1800 - Abuses
1801 summary: Delete an abuse
1802 security:
1803 - OAuth2:
1804 - admin
1805 - moderator
1806 parameters:
1807 - $ref: '#/components/parameters/abuseId'
1808 responses:
1809 '204':
1810 description: successful operation
1811 '404':
1812 description: block not found
1813 '/abuses/{abuseId}/messages':
1814 get:
1815 summary: List messages of an abuse
1816 security:
1817 - OAuth2: []
1818 tags:
1819 - Abuses
1820 parameters:
1821 - $ref: '#/components/parameters/abuseId'
1822 responses:
1823 '200':
1824 description: successful operation
1825 content:
1826 application/json:
1827 schema:
1828 type: array
1829 items:
1830 $ref: '#/components/schemas/AbuseMessage'
1831
1832 post:
1833 summary: Add message to an abuse
1834 security:
1835 - OAuth2: []
1836 tags:
1837 - Abuses
1838 parameters:
1839 - $ref: '#/components/parameters/abuseId'
1840 requestBody:
1841 required: true
1842 content:
1843 application/json:
1844 schema:
1845 type: object
1846 properties:
1847 message:
1848 description: Message to send
1849 type: string
1850 required:
1851 - message
1852 responses:
1853 '200':
1854 description: successful operation
1855 '400':
1856 description: incorrect request parameters
1857 '/abuses/{abuseId}/messages/{abuseMessageId}':
1858 delete:
1859 summary: Delete an abuse message
1860 security:
1861 - OAuth2: []
1862 tags:
1863 - Abuses
1864 parameters:
1865 - $ref: '#/components/parameters/abuseId'
1866 - $ref: '#/components/parameters/abuseMessageId'
1867 responses:
1868 '204':
1869 description: successful operation
1870
1871 '/videos/{id}/blacklist':
1872 post:
1873 summary: Block a video
1874 security:
1875 - OAuth2:
1876 - admin
1877 - moderator
1878 tags:
1879 - Video Blocks
1880 parameters:
1881 - $ref: '#/components/parameters/idOrUUID'
1882 responses:
1883 '204':
1884 description: successful operation
1885 delete:
1886 summary: Unblock a video by its id
1887 security:
1888 - OAuth2:
1889 - admin
1890 - moderator
1891 tags:
1892 - Video Blocks
1893 parameters:
1894 - $ref: '#/components/parameters/idOrUUID'
1895 responses:
1896 '204':
1897 description: successful operation
1898 '404':
1899 description: block not found
1900 /videos/blacklist:
1901 get:
1902 tags:
1903 - Video Blocks
1904 summary: List video blocks
1905 security:
1906 - OAuth2:
1907 - admin
1908 - moderator
1909 parameters:
1910 - name: type
1911 in: query
1912 description: >
1913 list only blocks that match this type:
1914
1915 - `1`: manual block
1916
1917 - `2`: automatic block that needs review
1918 schema:
1919 type: integer
1920 enum:
1921 - 1
1922 - 2
1923 - name: search
1924 in: query
1925 description: plain search that will match with video titles, and more
1926 schema:
1927 type: string
1928 - $ref: '#/components/parameters/start'
1929 - $ref: '#/components/parameters/count'
1930 - $ref: '#/components/parameters/blacklistsSort'
1931 responses:
1932 '200':
1933 description: successful operation
1934 content:
1935 application/json:
1936 schema:
1937 type: object
1938 properties:
1939 total:
1940 type: integer
1941 example: 1
1942 data:
1943 type: array
1944 items:
1945 $ref: '#/components/schemas/VideoBlacklist'
1946 /videos/{id}/captions:
1947 get:
1948 summary: List captions of a video
1949 tags:
1950 - Video Captions
1951 parameters:
1952 - $ref: '#/components/parameters/idOrUUID'
1953 responses:
1954 '200':
1955 description: successful operation
1956 content:
1957 application/json:
1958 schema:
1959 type: object
1960 properties:
1961 total:
1962 type: integer
1963 example: 1
1964 data:
1965 type: array
1966 items:
1967 $ref: '#/components/schemas/VideoCaption'
1968 /videos/{id}/captions/{captionLanguage}:
1969 put:
1970 summary: Add or replace a video caption
1971 tags:
1972 - Video Captions
1973 parameters:
1974 - $ref: '#/components/parameters/idOrUUID'
1975 - $ref: '#/components/parameters/captionLanguage'
1976 requestBody:
1977 content:
1978 multipart/form-data:
1979 schema:
1980 type: object
1981 properties:
1982 captionfile:
1983 description: The file to upload.
1984 type: string
1985 format: binary
1986 encoding:
1987 captionfile:
1988 contentType: text/vtt, application/x-subrip, text/plain
1989 responses:
1990 '204':
1991 description: successful operation
1992 '404':
1993 description: video or language not found
1994 delete:
1995 summary: Delete a video caption
1996 tags:
1997 - Video Captions
1998 parameters:
1999 - $ref: '#/components/parameters/idOrUUID'
2000 - $ref: '#/components/parameters/captionLanguage'
2001 responses:
2002 '204':
2003 description: successful operation
2004 '404':
2005 description: video or language or caption for that language not found
2006 /video-channels:
2007 get:
2008 summary: List video channels
2009 tags:
2010 - Video Channels
2011 parameters:
2012 - $ref: '#/components/parameters/start'
2013 - $ref: '#/components/parameters/count'
2014 - $ref: '#/components/parameters/sort'
2015 responses:
2016 '200':
2017 description: successful operation
2018 content:
2019 application/json:
2020 schema:
2021 type: object
2022 properties:
2023 total:
2024 type: integer
2025 example: 1
2026 data:
2027 type: array
2028 items:
2029 $ref: '#/components/schemas/VideoChannel'
2030 post:
2031 summary: Create a video channel
2032 security:
2033 - OAuth2: []
2034 tags:
2035 - Video Channels
2036 responses:
2037 '204':
2038 description: successful operation
2039 requestBody:
2040 content:
2041 application/json:
2042 schema:
2043 $ref: '#/components/schemas/VideoChannelCreate'
2044 '/video-channels/{channelHandle}':
2045 get:
2046 summary: Get a video channel
2047 tags:
2048 - Video Channels
2049 parameters:
2050 - $ref: '#/components/parameters/channelHandle'
2051 responses:
2052 '200':
2053 description: successful operation
2054 content:
2055 application/json:
2056 schema:
2057 $ref: '#/components/schemas/VideoChannel'
2058 put:
2059 summary: Update a video channel
2060 security:
2061 - OAuth2: []
2062 tags:
2063 - Video Channels
2064 parameters:
2065 - $ref: '#/components/parameters/channelHandle'
2066 responses:
2067 '204':
2068 description: successful operation
2069 requestBody:
2070 content:
2071 application/json:
2072 schema:
2073 $ref: '#/components/schemas/VideoChannelUpdate'
2074 delete:
2075 summary: Delete a video channel
2076 security:
2077 - OAuth2: []
2078 tags:
2079 - Video Channels
2080 parameters:
2081 - $ref: '#/components/parameters/channelHandle'
2082 responses:
2083 '204':
2084 description: successful operation
2085 '/video-channels/{channelHandle}/videos':
2086 get:
2087 summary: List videos of a video channel
2088 tags:
2089 - Video
2090 - Video Channels
2091 parameters:
2092 - $ref: '#/components/parameters/channelHandle'
2093 - $ref: '#/components/parameters/categoryOneOf'
2094 - $ref: '#/components/parameters/tagsOneOf'
2095 - $ref: '#/components/parameters/tagsAllOf'
2096 - $ref: '#/components/parameters/licenceOneOf'
2097 - $ref: '#/components/parameters/languageOneOf'
2098 - $ref: '#/components/parameters/nsfw'
2099 - $ref: '#/components/parameters/filter'
2100 - $ref: '#/components/parameters/skipCount'
2101 - $ref: '#/components/parameters/start'
2102 - $ref: '#/components/parameters/count'
2103 - $ref: '#/components/parameters/videosSort'
2104 responses:
2105 '200':
2106 description: successful operation
2107 content:
2108 application/json:
2109 schema:
2110 $ref: '#/components/schemas/VideoListResponse'
2111
2112 /video-playlists/privacies:
2113 get:
2114 summary: List available playlist privacies
2115 tags:
2116 - Video Playlists
2117 responses:
2118 '200':
2119 description: successful operation
2120 content:
2121 application/json:
2122 schema:
2123 type: array
2124 items:
2125 type: string
2126 examples:
2127 nightly:
2128 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
2129
2130 /video-playlists:
2131 get:
2132 summary: List video playlists
2133 tags:
2134 - Video Playlists
2135 parameters:
2136 - $ref: '#/components/parameters/start'
2137 - $ref: '#/components/parameters/count'
2138 - $ref: '#/components/parameters/sort'
2139 responses:
2140 '200':
2141 description: successful operation
2142 content:
2143 application/json:
2144 schema:
2145 type: object
2146 properties:
2147 total:
2148 type: integer
2149 example: 1
2150 data:
2151 type: array
2152 items:
2153 $ref: '#/components/schemas/VideoPlaylist'
2154 post:
2155 summary: Create a video playlist
2156 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
2157 security:
2158 - OAuth2: []
2159 tags:
2160 - Video Playlists
2161 responses:
2162 '200':
2163 description: successful operation
2164 content:
2165 application/json:
2166 schema:
2167 type: object
2168 properties:
2169 videoPlaylist:
2170 type: object
2171 properties:
2172 id:
2173 type: integer
2174 uuid:
2175 type: string
2176 requestBody:
2177 content:
2178 multipart/form-data:
2179 schema:
2180 type: object
2181 properties:
2182 displayName:
2183 description: Video playlist display name
2184 type: string
2185 thumbnailfile:
2186 description: Video playlist thumbnail file
2187 type: string
2188 format: binary
2189 privacy:
2190 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2191 description:
2192 description: Video playlist description
2193 type: string
2194 videoChannelId:
2195 description: Video channel in which the playlist will be published
2196 type: integer
2197 required:
2198 - displayName
2199 encoding:
2200 thumbnailfile:
2201 contentType: image/jpeg
2202
2203 /video-playlists/{id}:
2204 get:
2205 summary: Get a video playlist
2206 tags:
2207 - Video Playlists
2208 parameters:
2209 - $ref: '#/components/parameters/idOrUUID'
2210 responses:
2211 '200':
2212 description: successful operation
2213 content:
2214 application/json:
2215 schema:
2216 $ref: '#/components/schemas/VideoPlaylist'
2217 put:
2218 summary: Update a video playlist
2219 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2220 security:
2221 - OAuth2: []
2222 tags:
2223 - Video Playlists
2224 responses:
2225 '204':
2226 description: successful operation
2227 parameters:
2228 - $ref: '#/components/parameters/idOrUUID'
2229 requestBody:
2230 content:
2231 multipart/form-data:
2232 schema:
2233 type: object
2234 properties:
2235 displayName:
2236 description: Video playlist display name
2237 type: string
2238 thumbnailfile:
2239 description: Video playlist thumbnail file
2240 type: string
2241 format: binary
2242 privacy:
2243 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2244 description:
2245 description: Video playlist description
2246 type: string
2247 videoChannelId:
2248 description: Video channel in which the playlist will be published
2249 type: integer
2250 encoding:
2251 thumbnailfile:
2252 contentType: image/jpeg
2253 delete:
2254 summary: Delete a video playlist
2255 security:
2256 - OAuth2: []
2257 tags:
2258 - Video Playlists
2259 parameters:
2260 - $ref: '#/components/parameters/idOrUUID'
2261 responses:
2262 '204':
2263 description: successful operation
2264
2265 /video-playlists/{id}/videos:
2266 get:
2267 summary: 'List videos of a playlist'
2268 tags:
2269 - Videos
2270 - Video Playlists
2271 parameters:
2272 - $ref: '#/components/parameters/idOrUUID'
2273 responses:
2274 '200':
2275 description: successful operation
2276 content:
2277 application/json:
2278 schema:
2279 $ref: '#/components/schemas/VideoListResponse'
2280 post:
2281 summary: 'Add a video in a playlist'
2282 security:
2283 - OAuth2: []
2284 tags:
2285 - Videos
2286 - Video Playlists
2287 parameters:
2288 - $ref: '#/components/parameters/idOrUUID'
2289 responses:
2290 '200':
2291 description: successful operation
2292 content:
2293 application/json:
2294 schema:
2295 type: object
2296 properties:
2297 videoPlaylistElement:
2298 type: object
2299 properties:
2300 id:
2301 type: integer
2302 requestBody:
2303 content:
2304 application/json:
2305 schema:
2306 type: object
2307 properties:
2308 videoId:
2309 type: integer
2310 description: 'Video to add in the playlist'
2311 startTimestamp:
2312 type: integer
2313 description: 'Start the video at this specific timestamp (in seconds)'
2314 stopTimestamp:
2315 type: integer
2316 description: 'Stop the video at this specific timestamp (in seconds)'
2317 required:
2318 - videoId
2319
2320 /video-playlists/{id}/videos/reorder:
2321 post:
2322 summary: 'Reorder a playlist'
2323 security:
2324 - OAuth2: []
2325 tags:
2326 - Video Playlists
2327 parameters:
2328 - $ref: '#/components/parameters/idOrUUID'
2329 responses:
2330 '204':
2331 description: successful operation
2332 requestBody:
2333 content:
2334 application/json:
2335 schema:
2336 type: object
2337 properties:
2338 startPosition:
2339 type: integer
2340 description: 'Start position of the element to reorder'
2341 minimum: 1
2342 insertAfterPosition:
2343 type: integer
2344 description: 'New position for the block to reorder, to add the block before the first element'
2345 minimum: 0
2346 reorderLength:
2347 type: integer
2348 description: 'How many element from `startPosition` to reorder'
2349 minimum: 1
2350 required:
2351 - startPosition
2352 - insertAfterPosition
2353
2354 /video-playlists/{id}/videos/{playlistElementId}:
2355 put:
2356 summary: 'Update a playlist element'
2357 security:
2358 - OAuth2: []
2359 tags:
2360 - Video Playlists
2361 parameters:
2362 - $ref: '#/components/parameters/idOrUUID'
2363 - $ref: '#/components/parameters/playlistElementId'
2364 responses:
2365 '204':
2366 description: successful operation
2367 requestBody:
2368 content:
2369 application/json:
2370 schema:
2371 type: object
2372 properties:
2373 startTimestamp:
2374 type: integer
2375 description: 'Start the video at this specific timestamp (in seconds)'
2376 stopTimestamp:
2377 type: integer
2378 description: 'Stop the video at this specific timestamp (in seconds)'
2379 delete:
2380 summary: 'Delete an element from a playlist'
2381 security:
2382 - OAuth2: []
2383 tags:
2384 - Video Playlists
2385 parameters:
2386 - $ref: '#/components/parameters/idOrUUID'
2387 - $ref: '#/components/parameters/playlistElementId'
2388 responses:
2389 '204':
2390 description: successful operation
2391
2392 '/users/me/video-playlists/videos-exist':
2393 get:
2394 summary: 'Check video exists in my playlists'
2395 security:
2396 - OAuth2: []
2397 tags:
2398 - Video Playlists
2399 parameters:
2400 - name: videoIds
2401 in: query
2402 required: true
2403 description: The video ids to check
2404 schema:
2405 type: array
2406 items:
2407 type: integer
2408 responses:
2409 '200':
2410 description: successful operation
2411 content:
2412 application/json:
2413 schema:
2414 type: object
2415 properties:
2416 videoId:
2417 type: array
2418 items:
2419 type: object
2420 properties:
2421 playlistElementId:
2422 type: integer
2423 playlistId:
2424 type: integer
2425 startTimestamp:
2426 type: integer
2427 stopTimestamp:
2428 type: integer
2429
2430 '/accounts/{name}/video-channels':
2431 get:
2432 summary: List video channels of an account
2433 tags:
2434 - Video Channels
2435 - Accounts
2436 parameters:
2437 - $ref: '#/components/parameters/name'
2438 - name: withStats
2439 in: query
2440 description: include view statistics for the last 30 days (only if authentified as the account user)
2441 schema:
2442 type: boolean
2443 - $ref: '#/components/parameters/start'
2444 - $ref: '#/components/parameters/count'
2445 - $ref: '#/components/parameters/sort'
2446 responses:
2447 '200':
2448 description: successful operation
2449 content:
2450 application/json:
2451 schema:
2452 type: array
2453 items:
2454 $ref: '#/components/schemas/VideoChannel'
2455 '/accounts/{name}/ratings':
2456 get:
2457 summary: List ratings of an account
2458 security:
2459 - OAuth2: []
2460 tags:
2461 - Accounts
2462 parameters:
2463 - $ref: '#/components/parameters/name'
2464 - $ref: '#/components/parameters/start'
2465 - $ref: '#/components/parameters/count'
2466 - $ref: '#/components/parameters/sort'
2467 - name: rating
2468 in: query
2469 required: false
2470 description: Optionally filter which ratings to retrieve
2471 schema:
2472 type: string
2473 enum:
2474 - like
2475 - dislike
2476 responses:
2477 '200':
2478 description: successful operation
2479 content:
2480 application/json:
2481 schema:
2482 type: array
2483 items:
2484 $ref: '#/components/schemas/VideoRating'
2485 '/videos/{id}/comment-threads':
2486 get:
2487 summary: List threads of a video
2488 tags:
2489 - Video Comments
2490 parameters:
2491 - $ref: '#/components/parameters/idOrUUID'
2492 - $ref: '#/components/parameters/start'
2493 - $ref: '#/components/parameters/count'
2494 - $ref: '#/components/parameters/commentsSort'
2495 responses:
2496 '200':
2497 description: successful operation
2498 content:
2499 application/json:
2500 schema:
2501 $ref: '#/components/schemas/CommentThreadResponse'
2502 post:
2503 summary: Create a thread
2504 security:
2505 - OAuth2: []
2506 tags:
2507 - Video Comments
2508 parameters:
2509 - $ref: '#/components/parameters/idOrUUID'
2510 responses:
2511 '200':
2512 description: successful operation
2513 content:
2514 application/json:
2515 schema:
2516 $ref: '#/components/schemas/CommentThreadPostResponse'
2517 '404':
2518 description: video does not exist
2519 requestBody:
2520 content:
2521 application/json:
2522 schema:
2523 type: object
2524 properties:
2525 text:
2526 type: string
2527 description: 'Text comment'
2528 required:
2529 - text
2530
2531 '/videos/{id}/comment-threads/{threadId}':
2532 get:
2533 summary: Get a thread
2534 tags:
2535 - Video Comments
2536 parameters:
2537 - $ref: '#/components/parameters/idOrUUID'
2538 - $ref: '#/components/parameters/threadId'
2539 responses:
2540 '200':
2541 description: successful operation
2542 content:
2543 application/json:
2544 schema:
2545 $ref: '#/components/schemas/VideoCommentThreadTree'
2546 '/videos/{id}/comments/{commentId}':
2547 post:
2548 summary: Reply to a thread of a video
2549 security:
2550 - OAuth2: []
2551 tags:
2552 - Video Comments
2553 parameters:
2554 - $ref: '#/components/parameters/idOrUUID'
2555 - $ref: '#/components/parameters/commentId'
2556 responses:
2557 '200':
2558 description: successful operation
2559 content:
2560 application/json:
2561 schema:
2562 $ref: '#/components/schemas/CommentThreadPostResponse'
2563 '404':
2564 description: thread or video does not exist
2565 requestBody:
2566 content:
2567 application/json:
2568 schema:
2569 type: object
2570 properties:
2571 text:
2572 type: string
2573 description: 'Text comment'
2574 required:
2575 - text
2576
2577 delete:
2578 summary: Delete a comment or a reply
2579 security:
2580 - OAuth2: []
2581 tags:
2582 - Video Comments
2583 parameters:
2584 - $ref: '#/components/parameters/idOrUUID'
2585 - $ref: '#/components/parameters/commentId'
2586 responses:
2587 '204':
2588 description: successful operation
2589 '403':
2590 description: cannot remove comment of another user
2591 '404':
2592 description: comment or video does not exist
2593 '409':
2594 description: comment is already deleted
2595 '/videos/{id}/rate':
2596 put:
2597 summary: Like/dislike a video
2598 security:
2599 - OAuth2: []
2600 tags:
2601 - Video Rates
2602 parameters:
2603 - $ref: '#/components/parameters/idOrUUID'
2604 responses:
2605 '204':
2606 description: successful operation
2607 '404':
2608 description: video does not exist
2609 /search/videos:
2610 get:
2611 tags:
2612 - Search
2613 summary: Search videos
2614 parameters:
2615 - name: search
2616 in: query
2617 required: true
2618 allowEmptyValue: false
2619 description: >
2620 String to search. If the user can make a remote URI search, and the string is an URI then the
2621 PeerTube instance will fetch the remote object and add it to its database. Then,
2622 you can use the REST API to fetch the complete video information and interact with it.
2623 schema:
2624 type: string
2625 - $ref: '#/components/parameters/categoryOneOf'
2626 - $ref: '#/components/parameters/tagsOneOf'
2627 - $ref: '#/components/parameters/tagsAllOf'
2628 - $ref: '#/components/parameters/licenceOneOf'
2629 - $ref: '#/components/parameters/languageOneOf'
2630 - $ref: '#/components/parameters/nsfw'
2631 - $ref: '#/components/parameters/filter'
2632 - $ref: '#/components/parameters/skipCount'
2633 - $ref: '#/components/parameters/start'
2634 - $ref: '#/components/parameters/count'
2635 - $ref: '#/components/parameters/searchTarget'
2636 - $ref: '#/components/parameters/videosSearchSort'
2637 - name: startDate
2638 in: query
2639 description: Get videos that are published after this date
2640 schema:
2641 type: string
2642 format: date-time
2643 - name: endDate
2644 in: query
2645 description: Get videos that are published before this date
2646 schema:
2647 type: string
2648 format: date-time
2649 - name: originallyPublishedStartDate
2650 in: query
2651 description: Get videos that are originally published after this date
2652 schema:
2653 type: string
2654 format: date-time
2655 - name: originallyPublishedEndDate
2656 in: query
2657 description: Get videos that are originally published before this date
2658 schema:
2659 type: string
2660 format: date-time
2661 - name: durationMin
2662 in: query
2663 description: Get videos that have this minimum duration
2664 schema:
2665 type: integer
2666 - name: durationMax
2667 in: query
2668 description: Get videos that have this maximum duration
2669 schema:
2670 type: integer
2671 callbacks:
2672 'searchTarget === search-index':
2673 $ref: '#/components/callbacks/searchIndex'
2674 responses:
2675 '200':
2676 description: successful operation
2677 content:
2678 application/json:
2679 schema:
2680 $ref: '#/components/schemas/VideoListResponse'
2681 '500':
2682 description: search index unavailable
2683 /search/video-channels:
2684 get:
2685 tags:
2686 - Search
2687 summary: Search channels
2688 parameters:
2689 - name: search
2690 in: query
2691 required: true
2692 description: >
2693 String to search. If the user can make a remote URI search, and the string is an URI then the
2694 PeerTube instance will fetch the remote object and add it to its database. Then,
2695 you can use the REST API to fetch the complete channel information and interact with it.
2696 schema:
2697 type: string
2698 - $ref: '#/components/parameters/start'
2699 - $ref: '#/components/parameters/count'
2700 - $ref: '#/components/parameters/searchTarget'
2701 - $ref: '#/components/parameters/sort'
2702 callbacks:
2703 'searchTarget === search-index':
2704 $ref: '#/components/callbacks/searchIndex'
2705 responses:
2706 '200':
2707 description: successful operation
2708 content:
2709 application/json:
2710 schema:
2711 type: array
2712 items:
2713 $ref: '#/components/schemas/VideoChannel'
2714 '500':
2715 description: search index unavailable
2716 /blocklist/accounts:
2717 get:
2718 tags:
2719 - Account Blocks
2720 summary: List account blocks
2721 security:
2722 - OAuth2:
2723 - admin
2724 parameters:
2725 - $ref: '#/components/parameters/start'
2726 - $ref: '#/components/parameters/count'
2727 - $ref: '#/components/parameters/sort'
2728 responses:
2729 '200':
2730 description: successful operation
2731 post:
2732 tags:
2733 - Account Blocks
2734 summary: Block an account
2735 security:
2736 - OAuth2:
2737 - admin
2738 requestBody:
2739 content:
2740 application/json:
2741 schema:
2742 type: object
2743 properties:
2744 accountName:
2745 type: string
2746 example: chocobozzz@example.org
2747 description: account to block, in the form `username@domain`
2748 required:
2749 - accountName
2750 responses:
2751 '200':
2752 description: successful operation
2753 '409':
2754 description: self-blocking forbidden
2755 '/blocklist/accounts/{accountName}':
2756 delete:
2757 tags:
2758 - Account Blocks
2759 summary: Unblock an account by its handle
2760 security:
2761 - OAuth2:
2762 - admin
2763 parameters:
2764 - name: accountName
2765 in: path
2766 required: true
2767 description: account to unblock, in the form `username@domain`
2768 schema:
2769 type: string
2770 responses:
2771 '201':
2772 description: successful operation
2773 '404':
2774 description: account or account block does not exist
2775 /blocklist/servers:
2776 get:
2777 tags:
2778 - Server Blocks
2779 summary: List server blocks
2780 security:
2781 - OAuth2:
2782 - admin
2783 parameters:
2784 - $ref: '#/components/parameters/start'
2785 - $ref: '#/components/parameters/count'
2786 - $ref: '#/components/parameters/sort'
2787 responses:
2788 '200':
2789 description: successful operation
2790 post:
2791 tags:
2792 - Server Blocks
2793 summary: Block a server
2794 security:
2795 - OAuth2:
2796 - admin
2797 requestBody:
2798 content:
2799 application/json:
2800 schema:
2801 type: object
2802 properties:
2803 host:
2804 type: string
2805 format: hostname
2806 description: server domain to block
2807 required:
2808 - host
2809 responses:
2810 '200':
2811 description: successful operation
2812 '409':
2813 description: self-blocking forbidden
2814 '/blocklist/servers/{host}':
2815 delete:
2816 tags:
2817 - Server Blocks
2818 summary: Unblock a server by its domain
2819 security:
2820 - OAuth2:
2821 - admin
2822 parameters:
2823 - name: host
2824 in: path
2825 required: true
2826 description: server domain to unblock
2827 schema:
2828 type: string
2829 format: hostname
2830 responses:
2831 '201':
2832 description: successful operation
2833 '404':
2834 description: account block does not exist
2835 /redundancy/{host}:
2836 put:
2837 tags:
2838 - Instance Redundancy
2839 summary: Update a server redundancy policy
2840 security:
2841 - OAuth2:
2842 - admin
2843 parameters:
2844 - name: host
2845 in: path
2846 required: true
2847 description: server domain to mirror
2848 schema:
2849 type: string
2850 format: hostname
2851 requestBody:
2852 content:
2853 application/json:
2854 schema:
2855 type: object
2856 properties:
2857 redundancyAllowed:
2858 type: boolean
2859 description: allow mirroring of the host's local videos
2860 required:
2861 - redundancyAllowed
2862 responses:
2863 '204':
2864 description: successful operation
2865 '404':
2866 description: server is not already known
2867 /redundancy/videos:
2868 get:
2869 tags:
2870 - Video Mirroring
2871 summary: List videos being mirrored
2872 security:
2873 - OAuth2:
2874 - admin
2875 parameters:
2876 - name: target
2877 in: query
2878 required: true
2879 description: direction of the mirror
2880 schema:
2881 type: string
2882 enum:
2883 - my-videos
2884 - remote-videos
2885 - $ref: '#/components/parameters/start'
2886 - $ref: '#/components/parameters/count'
2887 - $ref: '#/components/parameters/videoRedundanciesSort'
2888 responses:
2889 '200':
2890 description: successful operation
2891 content:
2892 application/json:
2893 schema:
2894 type: array
2895 items:
2896 $ref: '#/components/schemas/VideoRedundancy'
2897 post:
2898 tags:
2899 - Video Mirroring
2900 summary: Mirror a video
2901 security:
2902 - OAuth2:
2903 - admin
2904 requestBody:
2905 content:
2906 application/json:
2907 schema:
2908 type: object
2909 properties:
2910 videoId:
2911 type: integer
2912 required:
2913 - videoId
2914 responses:
2915 '204':
2916 description: successful operation
2917 '400':
2918 description: cannot mirror a local video
2919 '404':
2920 description: video does not exist
2921 '409':
2922 description: video is already mirrored
2923 /redundancy/videos/{redundancyId}:
2924 delete:
2925 tags:
2926 - Video Mirroring
2927 summary: Delete a mirror done on a video
2928 security:
2929 - OAuth2:
2930 - admin
2931 parameters:
2932 - name: redundancyId
2933 in: path
2934 required: true
2935 description: id of an existing redundancy on a video
2936 schema:
2937 type: string
2938 responses:
2939 '204':
2940 description: successful operation
2941 '404':
2942 description: video redundancy not found
2943 '/feeds/video-comments.{format}':
2944 get:
2945 tags:
2946 - Feeds
2947 summary: List comments on videos
2948 servers:
2949 - url: 'https://peertube2.cpy.re'
2950 description: Live Test Server (live data - latest nightly version)
2951 - url: 'https://peertube3.cpy.re'
2952 description: Live Test Server (live data - latest RC version)
2953 - url: 'https://peertube.cpy.re'
2954 description: Live Test Server (live data - stable version)
2955 parameters:
2956 - name: format
2957 in: path
2958 required: true
2959 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
2960 schema:
2961 type: string
2962 enum:
2963 - xml
2964 - rss
2965 - rss2
2966 - atom
2967 - atom1
2968 - json
2969 - json1
2970 - name: videoId
2971 in: query
2972 description: 'limit listing to a specific video'
2973 schema:
2974 type: string
2975 - name: accountId
2976 in: query
2977 description: 'limit listing to a specific account'
2978 schema:
2979 type: string
2980 - name: accountName
2981 in: query
2982 description: 'limit listing to a specific account'
2983 schema:
2984 type: string
2985 - name: videoChannelId
2986 in: query
2987 description: 'limit listing to a specific video channel'
2988 schema:
2989 type: string
2990 - name: videoChannelName
2991 in: query
2992 description: 'limit listing to a specific video channel'
2993 schema:
2994 type: string
2995 responses:
2996 '204':
2997 description: successful operation
2998 headers:
2999 Cache-Control:
3000 schema:
3001 type: string
3002 default: 'max-age=900' # 15 min cache
3003 content:
3004 application/xml:
3005 schema:
3006 $ref: '#/components/schemas/VideoCommentsForXML'
3007 application/rss+xml:
3008 schema:
3009 $ref: '#/components/schemas/VideoCommentsForXML'
3010 text/xml:
3011 schema:
3012 $ref: '#/components/schemas/VideoCommentsForXML'
3013 application/atom+xml:
3014 schema:
3015 $ref: '#/components/schemas/VideoCommentsForXML'
3016 application/json:
3017 schema:
3018 type: object
3019 '400':
3020 x-summary: field inconsistencies
3021 description: >
3022 Arises when:
3023 - videoId filter is mixed with a channel filter
3024 '404':
3025 description: video, video channel or account not found
3026 '406':
3027 description: accept header unsupported
3028 '/feeds/videos.{format}':
3029 get:
3030 tags:
3031 - Feeds
3032 summary: List videos
3033 servers:
3034 - url: 'https://peertube2.cpy.re'
3035 description: Live Test Server (live data - latest nightly version)
3036 - url: 'https://peertube3.cpy.re'
3037 description: Live Test Server (live data - latest RC version)
3038 - url: 'https://peertube.cpy.re'
3039 description: Live Test Server (live data - stable version)
3040 parameters:
3041 - name: format
3042 in: path
3043 required: true
3044 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
3045 schema:
3046 type: string
3047 enum:
3048 - xml
3049 - rss
3050 - rss2
3051 - atom
3052 - atom1
3053 - json
3054 - json1
3055 - name: accountId
3056 in: query
3057 description: 'limit listing to a specific account'
3058 schema:
3059 type: string
3060 - name: accountName
3061 in: query
3062 description: 'limit listing to a specific account'
3063 schema:
3064 type: string
3065 - name: videoChannelId
3066 in: query
3067 description: 'limit listing to a specific video channel'
3068 schema:
3069 type: string
3070 - name: videoChannelName
3071 in: query
3072 description: 'limit listing to a specific video channel'
3073 schema:
3074 type: string
3075 - $ref: '#/components/parameters/sort'
3076 - $ref: '#/components/parameters/nsfw'
3077 - $ref: '#/components/parameters/filter'
3078 responses:
3079 '204':
3080 description: successful operation
3081 headers:
3082 Cache-Control:
3083 schema:
3084 type: string
3085 default: 'max-age=900' # 15 min cache
3086 content:
3087 application/xml:
3088 schema:
3089 $ref: '#/components/schemas/VideosForXML'
3090 examples:
3091 nightly:
3092 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
3093 application/rss+xml:
3094 schema:
3095 $ref: '#/components/schemas/VideosForXML'
3096 text/xml:
3097 schema:
3098 $ref: '#/components/schemas/VideosForXML'
3099 application/atom+xml:
3100 schema:
3101 $ref: '#/components/schemas/VideosForXML'
3102 application/json:
3103 schema:
3104 type: object
3105 '404':
3106 description: video channel or account not found
3107 '406':
3108 description: accept header unsupported
3109 /plugins:
3110 get:
3111 tags:
3112 - Plugins
3113 summary: List plugins
3114 security:
3115 - OAuth2:
3116 - admin
3117 parameters:
3118 - name: pluginType
3119 in: query
3120 schema:
3121 type: integer
3122 - name: uninstalled
3123 in: query
3124 schema:
3125 type: boolean
3126 - $ref: '#/components/parameters/start'
3127 - $ref: '#/components/parameters/count'
3128 - $ref: '#/components/parameters/sort'
3129 responses:
3130 '200':
3131 description: successful operation
3132 content:
3133 application/json:
3134 schema:
3135 $ref: '#/components/schemas/PluginResponse'
3136 /plugins/available:
3137 get:
3138 tags:
3139 - Plugins
3140 summary: List available plugins
3141 security:
3142 - OAuth2:
3143 - admin
3144 parameters:
3145 - name: search
3146 in: query
3147 schema:
3148 type: string
3149 - name: pluginType
3150 in: query
3151 schema:
3152 type: integer
3153 - name: currentPeerTubeEngine
3154 in: query
3155 schema:
3156 type: string
3157 - $ref: '#/components/parameters/start'
3158 - $ref: '#/components/parameters/count'
3159 - $ref: '#/components/parameters/sort'
3160 responses:
3161 '200':
3162 description: successful operation
3163 content:
3164 application/json:
3165 schema:
3166 $ref: '#/components/schemas/PluginResponse'
3167 '503':
3168 description: plugin index unavailable
3169 /plugins/install:
3170 post:
3171 tags:
3172 - Plugins
3173 summary: Install a plugin
3174 security:
3175 - OAuth2:
3176 - admin
3177 requestBody:
3178 content:
3179 application/json:
3180 schema:
3181 oneOf:
3182 - type: object
3183 properties:
3184 npmName:
3185 type: string
3186 example: peertube-plugin-auth-ldap
3187 required:
3188 - npmName
3189 additionalProperties: false
3190 - type: object
3191 properties:
3192 path:
3193 type: string
3194 required:
3195 - path
3196 additionalProperties: false
3197 responses:
3198 '204':
3199 description: successful operation
3200 '400':
3201 description: should have either `npmName` or `path` set
3202 /plugins/update:
3203 post:
3204 tags:
3205 - Plugins
3206 summary: Update a plugin
3207 security:
3208 - OAuth2:
3209 - admin
3210 requestBody:
3211 content:
3212 application/json:
3213 schema:
3214 oneOf:
3215 - type: object
3216 properties:
3217 npmName:
3218 type: string
3219 example: peertube-plugin-auth-ldap
3220 required:
3221 - npmName
3222 additionalProperties: false
3223 - type: object
3224 properties:
3225 path:
3226 type: string
3227 required:
3228 - path
3229 additionalProperties: false
3230 responses:
3231 '204':
3232 description: successful operation
3233 '400':
3234 description: should have either `npmName` or `path` set
3235 '404':
3236 description: existing plugin not found
3237 /plugins/uninstall:
3238 post:
3239 tags:
3240 - Plugins
3241 summary: Uninstall a plugin
3242 security:
3243 - OAuth2:
3244 - admin
3245 requestBody:
3246 content:
3247 application/json:
3248 schema:
3249 type: object
3250 properties:
3251 npmName:
3252 type: string
3253 description: name of the plugin/theme in its package.json
3254 example: peertube-plugin-auth-ldap
3255 required:
3256 - npmName
3257 responses:
3258 '204':
3259 description: successful operation
3260 '404':
3261 description: existing plugin not found
3262 /plugins/{npmName}:
3263 get:
3264 tags:
3265 - Plugins
3266 summary: Get a plugin
3267 security:
3268 - OAuth2:
3269 - admin
3270 parameters:
3271 - $ref: '#/components/parameters/npmName'
3272 responses:
3273 '200':
3274 description: successful operation
3275 content:
3276 application/json:
3277 schema:
3278 $ref: '#/components/schemas/Plugin'
3279 '404':
3280 description: plugin not found
3281 /plugins/{npmName}/settings:
3282 put:
3283 tags:
3284 - Plugins
3285 summary: Set a plugin's settings
3286 security:
3287 - OAuth2:
3288 - admin
3289 parameters:
3290 - $ref: '#/components/parameters/npmName'
3291 requestBody:
3292 content:
3293 application/json:
3294 schema:
3295 type: object
3296 properties:
3297 settings:
3298 type: object
3299 additionalProperties: true
3300 responses:
3301 '204':
3302 description: successful operation
3303 '404':
3304 description: plugin not found
3305 /plugins/{npmName}/public-settings:
3306 get:
3307 tags:
3308 - Plugins
3309 summary: Get a plugin's public settings
3310 parameters:
3311 - $ref: '#/components/parameters/npmName'
3312 responses:
3313 '200':
3314 description: successful operation
3315 content:
3316 application/json:
3317 schema:
3318 type: object
3319 additionalProperties: true
3320 '404':
3321 description: plugin not found
3322 /plugins/{npmName}/registered-settings:
3323 get:
3324 tags:
3325 - Plugins
3326 summary: Get a plugin's registered settings
3327 security:
3328 - OAuth2:
3329 - admin
3330 parameters:
3331 - $ref: '#/components/parameters/npmName'
3332 responses:
3333 '200':
3334 description: successful operation
3335 content:
3336 application/json:
3337 schema:
3338 type: object
3339 additionalProperties: true
3340 '404':
3341 description: plugin not found
3342 servers:
3343 - url: 'https://peertube2.cpy.re/api/v1'
3344 description: Live Test Server (live data - latest nightly version)
3345 - url: 'https://peertube3.cpy.re/api/v1'
3346 description: Live Test Server (live data - latest RC version)
3347 - url: 'https://peertube.cpy.re/api/v1'
3348 description: Live Test Server (live data - stable version)
3349 components:
3350 parameters:
3351 start:
3352 name: start
3353 in: query
3354 required: false
3355 description: Offset used to paginate results
3356 schema:
3357 type: integer
3358 minimum: 0
3359 count:
3360 name: count
3361 in: query
3362 required: false
3363 description: "Number of items to return"
3364 schema:
3365 type: integer
3366 default: 15
3367 maximum: 100
3368 minimum: 1
3369 sort:
3370 name: sort
3371 in: query
3372 required: false
3373 description: Sort column
3374 schema:
3375 type: string
3376 example: -createdAt
3377 search:
3378 name: search
3379 in: query
3380 required: false
3381 description: Plain text search, applied to various parts of the model depending on endpoint
3382 schema:
3383 type: string
3384 searchTarget:
3385 name: searchTarget
3386 in: query
3387 required: false
3388 description: >
3389 If the administrator enabled search index support, you can override the default search target.
3390
3391
3392 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
3393 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
3394 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3395 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3396 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
3397 * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch
3398 the data from the origin instance API
3399 schema:
3400 type: string
3401 enum:
3402 - 'local'
3403 - 'search-index'
3404 videosSort:
3405 name: sort
3406 in: query
3407 required: false
3408 description: Sort videos by criteria
3409 schema:
3410 type: string
3411 enum:
3412 - name
3413 - -duration
3414 - -createdAt
3415 - -publishedAt
3416 - -views
3417 - -likes
3418 - -trending
3419 videosSearchSort:
3420 name: sort
3421 in: query
3422 required: false
3423 description: Sort videos by criteria
3424 schema:
3425 type: string
3426 enum:
3427 - name
3428 - -duration
3429 - -createdAt
3430 - -publishedAt
3431 - -views
3432 - -likes
3433 - -match
3434 commentsSort:
3435 name: sort
3436 in: query
3437 required: false
3438 description: Sort comments by criteria
3439 schema:
3440 type: string
3441 enum:
3442 - -createdAt
3443 - -totalReplies
3444 blacklistsSort:
3445 name: sort
3446 in: query
3447 required: false
3448 description: Sort blacklists by criteria
3449 schema:
3450 type: string
3451 enum:
3452 - -id
3453 - name
3454 - -duration
3455 - -views
3456 - -likes
3457 - -dislikes
3458 - -uuid
3459 - -createdAt
3460 usersSearch:
3461 name: search
3462 in: query
3463 required: false
3464 description: Plain text search that will match with user usernames or emails
3465 schema:
3466 type: string
3467 usersBlocked:
3468 name: blocked
3469 in: query
3470 required: false
3471 description: Filter results down to (un)banned users
3472 schema:
3473 type: boolean
3474 usersSort:
3475 name: sort
3476 in: query
3477 required: false
3478 description: Sort users by criteria
3479 schema:
3480 type: string
3481 enum:
3482 - -id
3483 - -username
3484 - -createdAt
3485 abusesSort:
3486 name: sort
3487 in: query
3488 required: false
3489 description: Sort abuses by criteria
3490 schema:
3491 type: string
3492 enum:
3493 - -id
3494 - -createdAt
3495 - -state
3496 videoRedundanciesSort:
3497 name: sort
3498 in: query
3499 required: false
3500 description: Sort abuses by criteria
3501 schema:
3502 type: string
3503 enum:
3504 - name
3505 name:
3506 name: name
3507 in: path
3508 required: true
3509 description: The name of the account
3510 schema:
3511 type: string
3512 example: chocobozzz | chocobozzz@example.org
3513 id:
3514 name: id
3515 in: path
3516 required: true
3517 description: The user id
3518 schema:
3519 type: integer
3520 minimum: 0
3521 example: 42
3522 idOrUUID:
3523 name: id
3524 in: path
3525 required: true
3526 description: The object id or uuid
3527 schema:
3528 oneOf:
3529 - type: integer
3530 minimum: 0
3531 example: 42
3532 - type: string
3533 format: uuid
3534 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3535 playlistElementId:
3536 name: playlistElementId
3537 in: path
3538 required: true
3539 description: Playlist element id
3540 schema:
3541 type: integer
3542 abuseId:
3543 name: abuseId
3544 in: path
3545 required: true
3546 description: Abuse id
3547 schema:
3548 type: integer
3549 abuseMessageId:
3550 name: abuseMessageId
3551 in: path
3552 required: true
3553 description: Abuse message id
3554 schema:
3555 type: integer
3556 captionLanguage:
3557 name: captionLanguage
3558 in: path
3559 required: true
3560 description: The caption language
3561 schema:
3562 type: string
3563 channelHandle:
3564 name: channelHandle
3565 in: path
3566 required: true
3567 description: The video channel handle
3568 schema:
3569 type: string
3570 example: my_username | my_username@example.com
3571 subscriptionHandle:
3572 name: subscriptionHandle
3573 in: path
3574 required: true
3575 description: The subscription handle
3576 schema:
3577 type: string
3578 example: my_username | my_username@example.com
3579 threadId:
3580 name: threadId
3581 in: path
3582 required: true
3583 description: The thread id (root comment id)
3584 schema:
3585 type: integer
3586 commentId:
3587 name: commentId
3588 in: path
3589 required: true
3590 description: The comment id
3591 schema:
3592 type: integer
3593 categoryOneOf:
3594 name: categoryOneOf
3595 in: query
3596 required: false
3597 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
3598 schema:
3599 oneOf:
3600 - type: integer
3601 - type: array
3602 items:
3603 type: integer
3604 style: form
3605 explode: false
3606 tagsOneOf:
3607 name: tagsOneOf
3608 in: query
3609 required: false
3610 description: tag(s) of the video
3611 schema:
3612 oneOf:
3613 - type: string
3614 - type: array
3615 items:
3616 type: string
3617 style: form
3618 explode: false
3619 tagsAllOf:
3620 name: tagsAllOf
3621 in: query
3622 required: false
3623 description: tag(s) of the video, where all should be present in the video
3624 schema:
3625 oneOf:
3626 - type: string
3627 - type: array
3628 items:
3629 type: string
3630 style: form
3631 explode: false
3632 languageOneOf:
3633 name: languageOneOf
3634 in: query
3635 required: false
3636 description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get)). Use `_unknown` to filter on videos that don't have a video language
3637 schema:
3638 oneOf:
3639 - type: string
3640 - type: array
3641 items:
3642 type: string
3643 style: form
3644 explode: false
3645 licenceOneOf:
3646 name: licenceOneOf
3647 in: query
3648 required: false
3649 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
3650 schema:
3651 oneOf:
3652 - type: integer
3653 - type: array
3654 items:
3655 type: integer
3656 style: form
3657 explode: false
3658 skipCount:
3659 name: skipCount
3660 in: query
3661 required: false
3662 description: if you don't need the `total` in the response
3663 schema:
3664 type: string
3665 enum:
3666 - 'true'
3667 - 'false'
3668 default: 'false'
3669 nsfw:
3670 name: nsfw
3671 in: query
3672 required: false
3673 description: whether to include nsfw videos, if any
3674 schema:
3675 type: string
3676 enum:
3677 - 'true'
3678 - 'false'
3679 filter:
3680 name: filter
3681 in: query
3682 required: false
3683 description: >
3684 Special filters (local for instance) which might require special rights:
3685 * `local` - only videos local to the instance
3686 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
3687 schema:
3688 type: string
3689 enum:
3690 - local
3691 - all-local
3692 subscriptionsUris:
3693 name: uris
3694 in: query
3695 required: true
3696 description: list of uris to check if each is part of the user subscriptions
3697 schema:
3698 type: array
3699 items:
3700 type: string
3701 format: uri
3702 npmName:
3703 name: npmName
3704 in: path
3705 required: true
3706 description: name of the plugin/theme on npmjs.com or in its package.json
3707 schema:
3708 type: string
3709 example: peertube-plugin-auth-ldap
3710 securitySchemes:
3711 OAuth2:
3712 description: >
3713 In the header: *Authorization: Bearer <token\>*
3714
3715
3716 Authenticating via OAuth requires the following steps:
3717
3718
3719 - Have an account with sufficient authorization levels
3720
3721 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
3722 Bearer Token
3723
3724 - Make Authenticated Requests
3725 type: oauth2
3726 flows:
3727 password:
3728 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
3729 scopes:
3730 admin: Admin scope
3731 moderator: Moderator scope
3732 user: User scope
3733 schemas:
3734 VideoConstantNumber:
3735 properties:
3736 id:
3737 type: integer
3738 label:
3739 type: string
3740 VideoConstantString:
3741 properties:
3742 id:
3743 type: string
3744 label:
3745 type: string
3746
3747 VideoPlaylistPrivacySet:
3748 type: integer
3749 enum:
3750 - 1
3751 - 2
3752 - 3
3753 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
3754 VideoPlaylistPrivacyConstant:
3755 properties:
3756 id:
3757 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3758 label:
3759 type: string
3760
3761 VideoPlaylistTypeSet:
3762 type: integer
3763 enum:
3764 - 1
3765 - 2
3766 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
3767 VideoPlaylistTypeConstant:
3768 properties:
3769 id:
3770 $ref: '#/components/schemas/VideoPlaylistTypeSet'
3771 label:
3772 type: string
3773
3774 VideoPrivacySet:
3775 type: integer
3776 enum:
3777 - 1
3778 - 2
3779 - 3
3780 - 4
3781 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
3782 VideoPrivacyConstant:
3783 properties:
3784 id:
3785 $ref: '#/components/schemas/VideoPrivacySet'
3786 label:
3787 type: string
3788
3789 NSFWPolicy:
3790 type: string
3791 enum:
3792 - display
3793 - blur
3794 - do_not_list
3795
3796 UserRole:
3797 type: integer
3798 enum:
3799 - 0
3800 - 1
3801 - 2
3802 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
3803 example: 2
3804
3805 VideoStateConstant:
3806 properties:
3807 id:
3808 type: integer
3809 enum:
3810 - 1
3811 - 2
3812 - 3
3813 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
3814 label:
3815 type: string
3816
3817 AbuseStateSet:
3818 type: integer
3819 enum:
3820 - 1
3821 - 2
3822 - 3
3823 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
3824 AbuseStateConstant:
3825 properties:
3826 id:
3827 $ref: '#/components/schemas/AbuseStateSet'
3828 label:
3829 type: string
3830 AbusePredefinedReasons:
3831 type: array
3832 items:
3833 type: string
3834 enum:
3835 - violentOrAbusive
3836 - hatefulOrAbusive
3837 - spamOrMisleading
3838 - privacy
3839 - rights
3840 - serverRules
3841 - thumbnails
3842 - captions
3843 example: [spamOrMisleading]
3844
3845 VideoResolutionConstant:
3846 properties:
3847 id:
3848 type: integer
3849 description: 'Video resolution (240, 360, 720 ...)'
3850 example: 240
3851 label:
3852 type: string
3853 example: 240p
3854 VideoScheduledUpdate:
3855 properties:
3856 privacy:
3857 $ref: '#/components/schemas/VideoPrivacySet'
3858 updateAt:
3859 type: string
3860 format: date
3861 description: When to update the video
3862 required:
3863 - updateAt
3864 AccountSummary:
3865 properties:
3866 id:
3867 type: integer
3868 name:
3869 type: string
3870 displayName:
3871 type: string
3872 url:
3873 type: string
3874 format: url
3875 host:
3876 type: string
3877 format: hostname
3878 avatar:
3879 nullable: true
3880 allOf:
3881 - $ref: '#/components/schemas/Avatar'
3882 VideoChannelSummary:
3883 properties:
3884 id:
3885 type: integer
3886 name:
3887 type: string
3888 displayName:
3889 type: string
3890 url:
3891 type: string
3892 format: url
3893 host:
3894 type: string
3895 format: hostname
3896 avatar:
3897 nullable: true
3898 allOf:
3899 - $ref: '#/components/schemas/Avatar'
3900 PlaylistElement:
3901 properties:
3902 position:
3903 type: integer
3904 startTimestamp:
3905 type: integer
3906 stopTimestamp:
3907 type: integer
3908 video:
3909 nullable: true
3910 allOf:
3911 - $ref: '#/components/schemas/Video'
3912 VideoFile:
3913 properties:
3914 magnetUri:
3915 type: string
3916 resolution:
3917 $ref: '#/components/schemas/VideoResolutionConstant'
3918 size:
3919 type: integer
3920 description: 'Video file size in bytes'
3921 torrentUrl:
3922 type: string
3923 format: url
3924 torrentDownloadUrl:
3925 type: string
3926 format: url
3927 fileUrl:
3928 type: string
3929 format: url
3930 fileDownloadUrl:
3931 type: string
3932 format: url
3933 fps:
3934 type: number
3935 metadataUrl:
3936 type: string
3937 format: url
3938 VideoStreamingPlaylists:
3939 properties:
3940 id:
3941 type: integer
3942 type:
3943 type: integer
3944 enum:
3945 - 1
3946 description: 'Playlist type (HLS = `1`)'
3947 playlistUrl:
3948 type: string
3949 format: url
3950 segmentsSha256Url:
3951 type: string
3952 format: url
3953 files:
3954 type: array
3955 description: 'Video files associated to this playlist. The difference with the root "files" property is that these files are fragmented, so they can be used in this streaming playlist (HLS etc)'
3956 items:
3957 $ref: '#/components/schemas/VideoFile'
3958 redundancies:
3959 type: array
3960 items:
3961 type: object
3962 properties:
3963 baseUrl:
3964 type: string
3965 format: url
3966 VideoInfo:
3967 properties:
3968 id:
3969 type: integer
3970 uuid:
3971 type: string
3972 format: uuid
3973 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3974 name:
3975 type: string
3976 Video:
3977 properties:
3978 id:
3979 type: integer
3980 example: 8
3981 uuid:
3982 type: string
3983 format: uuid
3984 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3985 isLive:
3986 type: boolean
3987 createdAt:
3988 type: string
3989 format: date-time
3990 publishedAt:
3991 type: string
3992 format: date-time
3993 updatedAt:
3994 type: string
3995 format: date-time
3996 originallyPublishedAt:
3997 type: string
3998 format: date-time
3999 category:
4000 $ref: '#/components/schemas/VideoConstantNumber'
4001 licence:
4002 $ref: '#/components/schemas/VideoConstantNumber'
4003 language:
4004 $ref: '#/components/schemas/VideoConstantString'
4005 privacy:
4006 $ref: '#/components/schemas/VideoPrivacyConstant'
4007 description:
4008 type: string
4009 duration:
4010 type: integer
4011 example: 1419
4012 isLocal:
4013 type: boolean
4014 name:
4015 type: string
4016 example: What is PeerTube?
4017 thumbnailPath:
4018 type: string
4019 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4020 previewPath:
4021 type: string
4022 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
4023 embedPath:
4024 type: string
4025 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
4026 views:
4027 type: integer
4028 example: 1337
4029 likes:
4030 type: integer
4031 example: 42
4032 dislikes:
4033 type: integer
4034 example: 7
4035 nsfw:
4036 type: boolean
4037 waitTranscoding:
4038 type: boolean
4039 nullable: true
4040 state:
4041 $ref: '#/components/schemas/VideoStateConstant'
4042 scheduledUpdate:
4043 nullable: true
4044 allOf:
4045 - $ref: '#/components/schemas/VideoScheduledUpdate'
4046 blacklisted:
4047 nullable: true
4048 type: boolean
4049 blacklistedReason:
4050 nullable: true
4051 type: string
4052 account:
4053 $ref: '#/components/schemas/AccountSummary'
4054 channel:
4055 $ref: '#/components/schemas/VideoChannelSummary'
4056 userHistory:
4057 nullable: true
4058 type: object
4059 properties:
4060 currentTime:
4061 type: integer
4062 VideoDetails:
4063 allOf:
4064 - $ref: '#/components/schemas/Video'
4065 - type: object
4066 properties:
4067 descriptionPath:
4068 type: string
4069 support:
4070 type: string
4071 description: A text tell the audience how to support the video creator
4072 example: Please support my work on <insert crowdfunding plateform>! <3
4073 channel:
4074 $ref: '#/components/schemas/VideoChannel'
4075 account:
4076 $ref: '#/components/schemas/Account'
4077 tags:
4078 type: array
4079 items:
4080 type: string
4081 example: [flowers, gardening]
4082 files:
4083 type: array
4084 description: 'WebTorrent/raw video files. Can be empty if WebTorrent is disabled on the server. In this case, video files will be in the "streamingPlaylists[].files" property'
4085 items:
4086 $ref: '#/components/schemas/VideoFile'
4087 commentsEnabled:
4088 type: boolean
4089 downloadEnabled:
4090 type: boolean
4091 trackerUrls:
4092 type: array
4093 items:
4094 type: string
4095 format: url
4096 streamingPlaylists:
4097 type: array
4098 items:
4099 $ref: '#/components/schemas/VideoStreamingPlaylists'
4100 FileRedundancyInformation:
4101 properties:
4102 id:
4103 type: integer
4104 fileUrl:
4105 type: string
4106 format: url
4107 strategy:
4108 type: string
4109 enum:
4110 - manual
4111 - most-views
4112 - trending
4113 - recently-added
4114 size:
4115 type: integer
4116 createdAt:
4117 type: string
4118 format: date-time
4119 updatedAt:
4120 type: string
4121 format: date-time
4122 expiresOn:
4123 type: string
4124 format: date-time
4125 VideoRedundancy:
4126 properties:
4127 id:
4128 type: integer
4129 name:
4130 type: string
4131 url:
4132 type: string
4133 format: url
4134 uuid:
4135 type: string
4136 format: uuid
4137 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4138 redundancies:
4139 type: object
4140 properties:
4141 files:
4142 type: array
4143 items:
4144 $ref: '#/components/schemas/FileRedundancyInformation'
4145 streamingPlaylists:
4146 type: array
4147 items:
4148 $ref: '#/components/schemas/FileRedundancyInformation'
4149 VideoImportStateConstant:
4150 properties:
4151 id:
4152 type: integer
4153 enum:
4154 - 1
4155 - 2
4156 - 3
4157 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
4158 label:
4159 type: string
4160 example: Pending
4161 VideoImport:
4162 properties:
4163 id:
4164 type: integer
4165 example: 2
4166 targetUrl:
4167 type: string
4168 format: url
4169 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
4170 magnetUri:
4171 type: string
4172 format: uri
4173 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
4174 torrentName:
4175 type: string
4176 state:
4177 $ref: '#/components/schemas/VideoImportStateConstant'
4178 error:
4179 type: string
4180 createdAt:
4181 type: string
4182 format: date-time
4183 updatedAt:
4184 type: string
4185 format: date-time
4186 video:
4187 $ref: '#/components/schemas/Video'
4188 Abuse:
4189 properties:
4190 id:
4191 type: integer
4192 example: 7
4193 reason:
4194 type: string
4195 example: The video is a spam
4196 predefinedReasons:
4197 $ref: '#/components/schemas/AbusePredefinedReasons'
4198 reporterAccount:
4199 $ref: '#/components/schemas/Account'
4200 state:
4201 $ref: '#/components/schemas/AbuseStateConstant'
4202 moderationComment:
4203 type: string
4204 example: Decided to ban the server since it spams us regularly
4205 video:
4206 type: object
4207 properties:
4208 id:
4209 type: integer
4210 name:
4211 type: string
4212 uuid:
4213 type: string
4214 format: uuid
4215 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4216 createdAt:
4217 type: string
4218 format: date-time
4219 AbuseMessage:
4220 properties:
4221 id:
4222 type: integer
4223 message:
4224 type: string
4225 byModerator:
4226 type: boolean
4227 createdAt:
4228 type: string
4229 format: date-time
4230 account:
4231 $ref: '#/components/schemas/AccountSummary'
4232 VideoBlacklist:
4233 properties:
4234 id:
4235 type: integer
4236 videoId:
4237 type: integer
4238 createdAt:
4239 type: string
4240 format: date-time
4241 updatedAt:
4242 type: string
4243 format: date-time
4244 name:
4245 type: string
4246 uuid:
4247 type: string
4248 format: uuid
4249 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4250 description:
4251 type: string
4252 duration:
4253 type: integer
4254 views:
4255 type: integer
4256 likes:
4257 type: integer
4258 dislikes:
4259 type: integer
4260 nsfw:
4261 type: boolean
4262 VideoChannel:
4263 properties:
4264 displayName:
4265 type: string
4266 description:
4267 type: string
4268 isLocal:
4269 type: boolean
4270 ownerAccount:
4271 type: object
4272 properties:
4273 id:
4274 type: integer
4275 uuid:
4276 type: string
4277 format: uuid
4278 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4279 VideoPlaylist:
4280 properties:
4281 id:
4282 type: integer
4283 createdAt:
4284 type: string
4285 format: date-time
4286 updatedAt:
4287 type: string
4288 format: date-time
4289 description:
4290 type: string
4291 uuid:
4292 type: string
4293 format: uuid
4294 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4295 displayName:
4296 type: string
4297 isLocal:
4298 type: boolean
4299 videoLength:
4300 type: integer
4301 thumbnailPath:
4302 type: string
4303 privacy:
4304 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
4305 type:
4306 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
4307 ownerAccount:
4308 $ref: '#/components/schemas/AccountSummary'
4309 videoChannel:
4310 $ref: '#/components/schemas/VideoChannelSummary'
4311 VideoComment:
4312 properties:
4313 id:
4314 type: integer
4315 url:
4316 type: string
4317 format: url
4318 text:
4319 type: string
4320 threadId:
4321 type: integer
4322 inReplyToCommentId:
4323 type: integer
4324 videoId:
4325 type: integer
4326 createdAt:
4327 type: string
4328 format: date-time
4329 updatedAt:
4330 type: string
4331 format: date-time
4332 totalRepliesFromVideoAuthor:
4333 type: integer
4334 totalReplies:
4335 type: integer
4336 account:
4337 $ref: '#/components/schemas/Account'
4338 VideoCommentThreadTree:
4339 properties:
4340 comment:
4341 $ref: '#/components/schemas/VideoComment'
4342 children:
4343 type: array
4344 items:
4345 $ref: '#/components/schemas/VideoCommentThreadTree'
4346 VideoCaption:
4347 properties:
4348 language:
4349 $ref: '#/components/schemas/VideoConstantString'
4350 captionPath:
4351 type: string
4352 Avatar:
4353 properties:
4354 path:
4355 type: string
4356 createdAt:
4357 type: string
4358 format: date-time
4359 updatedAt:
4360 type: string
4361 format: date-time
4362 ActorInfo:
4363 properties:
4364 id:
4365 type: integer
4366 example: 11
4367 name:
4368 type: string
4369 displayName:
4370 type: string
4371 host:
4372 type: string
4373 format: hostname
4374 avatar:
4375 nullable: true
4376 type: object
4377 properties:
4378 path:
4379 type: string
4380 Actor:
4381 properties:
4382 id:
4383 type: integer
4384 example: 11
4385 url:
4386 type: string
4387 format: url
4388 name:
4389 type: string
4390 host:
4391 type: string
4392 format: hostname
4393 followingCount:
4394 type: integer
4395 followersCount:
4396 type: integer
4397 createdAt:
4398 type: string
4399 format: date-time
4400 updatedAt:
4401 type: string
4402 format: date-time
4403 avatar:
4404 $ref: '#/components/schemas/Avatar'
4405 Account:
4406 allOf:
4407 - $ref: '#/components/schemas/Actor'
4408 - properties:
4409 userId:
4410 type: string
4411 example: 2
4412 displayName:
4413 type: string
4414 description:
4415 type: string
4416 UserWatchingVideo:
4417 properties:
4418 currentTime:
4419 type: integer
4420 description: timestamp within the video, in seconds
4421 example: 5
4422 ServerConfig:
4423 properties:
4424 instance:
4425 type: object
4426 properties:
4427 name:
4428 type: string
4429 shortDescription:
4430 type: string
4431 defaultClientRoute:
4432 type: string
4433 isNSFW:
4434 type: boolean
4435 defaultNSFWPolicy:
4436 type: string
4437 customizations:
4438 type: object
4439 properties:
4440 javascript:
4441 type: string
4442 css:
4443 type: string
4444 search:
4445 type: object
4446 properties:
4447 remoteUri:
4448 type: object
4449 properties:
4450 users:
4451 type: boolean
4452 anonymous:
4453 type: boolean
4454 plugin:
4455 type: object
4456 properties:
4457 registered:
4458 type: array
4459 items:
4460 type: string
4461 theme:
4462 type: object
4463 properties:
4464 registered:
4465 type: array
4466 items:
4467 type: string
4468 email:
4469 type: object
4470 properties:
4471 enabled:
4472 type: boolean
4473 contactForm:
4474 type: object
4475 properties:
4476 enabled:
4477 type: boolean
4478 serverVersion:
4479 type: string
4480 serverCommit:
4481 type: string
4482 signup:
4483 type: object
4484 properties:
4485 allowed:
4486 type: boolean
4487 allowedForCurrentIP:
4488 type: boolean
4489 requiresEmailVerification:
4490 type: boolean
4491 transcoding:
4492 type: object
4493 properties:
4494 hls:
4495 type: object
4496 properties:
4497 enabled:
4498 type: boolean
4499 webtorrent:
4500 type: object
4501 properties:
4502 enabled:
4503 type: boolean
4504 enabledResolutions:
4505 type: array
4506 items:
4507 type: integer
4508 import:
4509 type: object
4510 properties:
4511 videos:
4512 type: object
4513 properties:
4514 http:
4515 type: object
4516 properties:
4517 enabled:
4518 type: boolean
4519 torrent:
4520 type: object
4521 properties:
4522 enabled:
4523 type: boolean
4524 autoBlacklist:
4525 type: object
4526 properties:
4527 videos:
4528 type: object
4529 properties:
4530 ofUsers:
4531 type: object
4532 properties:
4533 enabled:
4534 type: boolean
4535 avatar:
4536 type: object
4537 properties:
4538 file:
4539 type: object
4540 properties:
4541 size:
4542 type: object
4543 properties:
4544 max:
4545 type: integer
4546 extensions:
4547 type: array
4548 items:
4549 type: string
4550 video:
4551 type: object
4552 properties:
4553 image:
4554 type: object
4555 properties:
4556 extensions:
4557 type: array
4558 items:
4559 type: string
4560 size:
4561 type: object
4562 properties:
4563 max:
4564 type: integer
4565 file:
4566 type: object
4567 properties:
4568 extensions:
4569 type: array
4570 items:
4571 type: string
4572 videoCaption:
4573 type: object
4574 properties:
4575 file:
4576 type: object
4577 properties:
4578 size:
4579 type: object
4580 properties:
4581 max:
4582 type: integer
4583 extensions:
4584 type: array
4585 items:
4586 type: string
4587 user:
4588 type: object
4589 properties:
4590 videoQuota:
4591 type: integer
4592 videoQuotaDaily:
4593 type: integer
4594 trending:
4595 type: object
4596 properties:
4597 videos:
4598 type: object
4599 properties:
4600 intervalDays:
4601 type: integer
4602 tracker:
4603 type: object
4604 properties:
4605 enabled:
4606 type: boolean
4607 followings:
4608 type: object
4609 properties:
4610 instance:
4611 type: object
4612 properties:
4613 autoFollowIndex:
4614 type: object
4615 properties:
4616 indexUrl:
4617 type: string
4618 format: url
4619 ServerConfigAbout:
4620 properties:
4621 instance:
4622 type: object
4623 properties:
4624 name:
4625 type: string
4626 shortDescription:
4627 type: string
4628 description:
4629 type: string
4630 terms:
4631 type: string
4632 ServerConfigCustom:
4633 properties:
4634 instance:
4635 type: object
4636 properties:
4637 name:
4638 type: string
4639 shortDescription:
4640 type: string
4641 description:
4642 type: string
4643 terms:
4644 type: string
4645 defaultClientRoute:
4646 type: string
4647 isNSFW:
4648 type: boolean
4649 defaultNSFWPolicy:
4650 type: string
4651 customizations:
4652 type: object
4653 properties:
4654 javascript:
4655 type: string
4656 css:
4657 type: string
4658 theme:
4659 type: object
4660 properties:
4661 default:
4662 type: string
4663 services:
4664 type: object
4665 properties:
4666 twitter:
4667 type: object
4668 properties:
4669 username:
4670 type: string
4671 whitelisted:
4672 type: boolean
4673 cache:
4674 type: object
4675 properties:
4676 previews:
4677 type: object
4678 properties:
4679 size:
4680 type: integer
4681 captions:
4682 type: object
4683 properties:
4684 size:
4685 type: integer
4686 signup:
4687 type: object
4688 properties:
4689 enabled:
4690 type: boolean
4691 limit:
4692 type: integer
4693 requiresEmailVerification:
4694 type: boolean
4695 admin:
4696 type: object
4697 properties:
4698 email:
4699 type: string
4700 format: email
4701 contactForm:
4702 type: object
4703 properties:
4704 enabled:
4705 type: boolean
4706 user:
4707 type: object
4708 properties:
4709 videoQuota:
4710 type: integer
4711 videoQuotaDaily:
4712 type: integer
4713 transcoding:
4714 type: object
4715 properties:
4716 enabled:
4717 type: boolean
4718 allowAdditionalExtensions:
4719 type: boolean
4720 allowAudioFiles:
4721 type: boolean
4722 threads:
4723 type: integer
4724 resolutions:
4725 type: object
4726 properties:
4727 240p:
4728 type: boolean
4729 360p:
4730 type: boolean
4731 480p:
4732 type: boolean
4733 720p:
4734 type: boolean
4735 1080p:
4736 type: boolean
4737 2160p:
4738 type: boolean
4739 hls:
4740 type: object
4741 properties:
4742 enabled:
4743 type: boolean
4744 import:
4745 type: object
4746 properties:
4747 videos:
4748 type: object
4749 properties:
4750 http:
4751 type: object
4752 properties:
4753 enabled:
4754 type: boolean
4755 torrent:
4756 type: object
4757 properties:
4758 enabled:
4759 type: boolean
4760 autoBlacklist:
4761 type: object
4762 properties:
4763 videos:
4764 type: object
4765 properties:
4766 ofUsers:
4767 type: object
4768 properties:
4769 enabled:
4770 type: boolean
4771 followers:
4772 type: object
4773 properties:
4774 instance:
4775 type: object
4776 properties:
4777 enabled:
4778 type: boolean
4779 manualApproval:
4780 type: boolean
4781 Follow:
4782 properties:
4783 id:
4784 type: integer
4785 follower:
4786 $ref: '#/components/schemas/Actor'
4787 following:
4788 $ref: '#/components/schemas/Actor'
4789 score:
4790 type: number
4791 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
4792 state:
4793 type: string
4794 enum:
4795 - pending
4796 - accepted
4797 createdAt:
4798 type: string
4799 format: date-time
4800 updatedAt:
4801 type: string
4802 format: date-time
4803
4804 PredefinedAbuseReasons:
4805 description: Reason categories that help triage reports
4806 type: array
4807 items:
4808 type: string
4809 enum:
4810 - violentOrAbusive
4811 - hatefulOrAbusive
4812 - spamOrMisleading
4813 - privacy
4814 - rights
4815 - serverRules
4816 - thumbnails
4817 - captions
4818
4819 Job:
4820 properties:
4821 id:
4822 type: integer
4823 minimum: 0
4824 example: 42
4825 state:
4826 type: string
4827 enum:
4828 - active
4829 - completed
4830 - failed
4831 - waiting
4832 - delayed
4833 type:
4834 type: string
4835 enum:
4836 - activitypub-http-unicast
4837 - activitypub-http-broadcast
4838 - activitypub-http-fetcher
4839 - activitypub-follow
4840 - video-file-import
4841 - video-transcoding
4842 - email
4843 - video-import
4844 - videos-views
4845 - activitypub-refresher
4846 - video-redundancy
4847 data:
4848 type: object
4849 additionalProperties: true
4850 error:
4851 type: object
4852 additionalProperties: true
4853 createdAt:
4854 type: string
4855 format: date-time
4856 finishedOn:
4857 type: string
4858 format: date-time
4859 processedOn:
4860 type: string
4861 format: date-time
4862 AddUserResponse:
4863 properties:
4864 user:
4865 type: object
4866 properties:
4867 id:
4868 type: integer
4869 example: 8
4870 account:
4871 type: object
4872 properties:
4873 id:
4874 type: integer
4875 example: 37
4876 VideoUploadResponse:
4877 properties:
4878 video:
4879 type: object
4880 properties:
4881 id:
4882 type: integer
4883 example: 8
4884 uuid:
4885 type: string
4886 format: uuid
4887 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4888 CommentThreadResponse:
4889 properties:
4890 total:
4891 type: integer
4892 example: 1
4893 data:
4894 type: array
4895 maxItems: 100
4896 items:
4897 $ref: '#/components/schemas/VideoComment'
4898 CommentThreadPostResponse:
4899 properties:
4900 comment:
4901 $ref: '#/components/schemas/VideoComment'
4902 VideoListResponse:
4903 properties:
4904 total:
4905 type: integer
4906 example: 1
4907 data:
4908 type: array
4909 maxItems: 100
4910 items:
4911 $ref: '#/components/schemas/Video'
4912 User:
4913 properties:
4914 id:
4915 type: integer
4916 readOnly: true
4917 username:
4918 type: string
4919 description: The user username
4920 minLength: 1
4921 maxLength: 50
4922 email:
4923 type: string
4924 format: email
4925 description: The user email
4926 theme:
4927 type: string
4928 description: Theme enabled by this user
4929 emailVerified:
4930 type: boolean
4931 description: Has the user confirmed their email address?
4932 nsfwPolicy:
4933 $ref: '#/components/schemas/NSFWPolicy'
4934 webtorrentEnabled:
4935 type: boolean
4936 description: Enable P2P in the player
4937 autoPlayVideo:
4938 type: boolean
4939 description: Automatically start playing the video on the watch page
4940 role:
4941 $ref: '#/components/schemas/UserRole'
4942 roleLabel:
4943 type: string
4944 enum:
4945 - User
4946 - Moderator
4947 - Administrator
4948 videoQuota:
4949 type: integer
4950 description: The user video quota
4951 videoQuotaDaily:
4952 type: integer
4953 description: The user daily video quota
4954 videosCount:
4955 type: integer
4956 abusesCount:
4957 type: integer
4958 abusesAcceptedCount:
4959 type: integer
4960 abusesCreatedCount:
4961 type: integer
4962 videoCommentsCount:
4963 type: integer
4964 noInstanceConfigWarningModal:
4965 type: boolean
4966 noWelcomeModal:
4967 type: boolean
4968 blocked:
4969 type: boolean
4970 blockedReason:
4971 type: string
4972 createdAt:
4973 type: string
4974 account:
4975 $ref: '#/components/schemas/Account'
4976 videoChannels:
4977 type: array
4978 items:
4979 $ref: '#/components/schemas/VideoChannel'
4980 AddUser:
4981 properties:
4982 username:
4983 type: string
4984 description: The user username
4985 minLength: 1
4986 maxLength: 50
4987 password:
4988 type: string
4989 format: password
4990 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
4991 minLength: 6
4992 maxLength: 255
4993 email:
4994 type: string
4995 format: email
4996 description: The user email
4997 videoQuota:
4998 type: integer
4999 description: The user video quota
5000 videoQuotaDaily:
5001 type: integer
5002 description: The user daily video quota
5003 role:
5004 $ref: '#/components/schemas/UserRole'
5005 required:
5006 - username
5007 - password
5008 - email
5009 - videoQuota
5010 - videoQuotaDaily
5011 - role
5012 UpdateUser:
5013 properties:
5014 id:
5015 type: string
5016 description: The user id
5017 email:
5018 type: string
5019 format: email
5020 description: The updated email of the user
5021 videoQuota:
5022 type: integer
5023 description: The updated video quota of the user
5024 videoQuotaDaily:
5025 type: integer
5026 description: The updated daily video quota of the user
5027 role:
5028 $ref: '#/components/schemas/UserRole'
5029 required:
5030 - id
5031 - email
5032 - videoQuota
5033 - videoQuotaDaily
5034 - role
5035 UpdateMe:
5036 properties:
5037 password:
5038 type: string
5039 format: password
5040 description: Your new password
5041 minLength: 6
5042 maxLength: 255
5043 email:
5044 type: string
5045 format: email
5046 description: Your new email
5047 displayNSFW:
5048 type: string
5049 description: Your new displayNSFW
5050 enum:
5051 - 'true'
5052 - 'false'
5053 - both
5054 autoPlayVideo:
5055 type: boolean
5056 description: Your new autoPlayVideo
5057 required:
5058 - password
5059 - email
5060 - displayNSFW
5061 - autoPlayVideo
5062 GetMeVideoRating:
5063 properties:
5064 id:
5065 type: string
5066 description: Id of the video
5067 rating:
5068 type: number
5069 description: Rating of the video
5070 required:
5071 - id
5072 - rating
5073 VideoRating:
5074 properties:
5075 video:
5076 $ref: '#/components/schemas/Video'
5077 rating:
5078 type: number
5079 description: 'Rating of the video'
5080 required:
5081 - video
5082 - rating
5083 RegisterUser:
5084 properties:
5085 username:
5086 type: string
5087 description: The username of the user
5088 minLength: 1
5089 maxLength: 50
5090 pattern: '/^[a-z0-9._]{1,50}$/'
5091 password:
5092 type: string
5093 format: password
5094 description: The password of the user
5095 minLength: 6
5096 maxLength: 255
5097 email:
5098 type: string
5099 format: email
5100 description: The email of the user
5101 displayName:
5102 type: string
5103 description: The user display name
5104 minLength: 1
5105 maxLength: 120
5106 channel:
5107 type: object
5108 properties:
5109 name:
5110 type: string
5111 description: The name for the default channel
5112 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
5113 displayName:
5114 type: string
5115 description: The display name for the default channel
5116 minLength: 1
5117 maxLength: 120
5118 required:
5119 - username
5120 - password
5121 - email
5122 VideoChannelCreate:
5123 properties:
5124 name:
5125 type: string
5126 displayName:
5127 type: string
5128 description:
5129 type: string
5130 support:
5131 type: string
5132 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
5133 example: Please support my work on <insert crowdfunding plateform>! <3
5134 required:
5135 - name
5136 - displayName
5137 VideoChannelUpdate:
5138 properties:
5139 displayName:
5140 type: string
5141 description:
5142 type: string
5143 support:
5144 type: string
5145 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
5146 example: Please support my work on <insert crowdfunding plateform>! <3
5147 bulkVideosSupportUpdate:
5148 type: boolean
5149 description: 'Update the support field for all videos of this channel'
5150
5151 MRSSPeerLink:
5152 type: object
5153 xml:
5154 name: 'media:peerLink'
5155 properties:
5156 href:
5157 type: string
5158 xml:
5159 attribute: true
5160 type:
5161 type: string
5162 enum:
5163 - application/x-bittorrent
5164 xml:
5165 attribute: true
5166 MRSSGroupContent:
5167 type: object
5168 xml:
5169 name: 'media:content'
5170 properties:
5171 url:
5172 type: string
5173 format: url
5174 xml:
5175 attribute: true
5176 fileSize:
5177 type: integer
5178 xml:
5179 attribute: true
5180 type:
5181 type: string
5182 xml:
5183 attribute: true
5184 framerate:
5185 type: integer
5186 xml:
5187 attribute: true
5188 duration:
5189 type: integer
5190 xml:
5191 attribute: true
5192 height:
5193 type: integer
5194 xml:
5195 attribute: true
5196 lang:
5197 type: string
5198 xml:
5199 attribute: true
5200 VideoCommentsForXML:
5201 type: array
5202 xml:
5203 wrapped: true
5204 name: 'channel'
5205 items:
5206 type: object
5207 xml:
5208 name: 'item'
5209 properties:
5210 link:
5211 type: string
5212 format: url
5213 guid:
5214 type: string
5215 pubDate:
5216 type: string
5217 format: date-time
5218 'content:encoded':
5219 type: string
5220 'dc:creator':
5221 type: string
5222 VideosForXML:
5223 type: array
5224 xml:
5225 wrapped: true
5226 name: 'channel'
5227 items:
5228 type: object
5229 xml:
5230 name: 'item'
5231 properties:
5232 link:
5233 type: string
5234 format: url
5235 description: video watch page URL
5236 guid:
5237 type: string
5238 description: video canonical URL
5239 pubDate:
5240 type: string
5241 format: date-time
5242 description: video publication date
5243 description:
5244 type: string
5245 description: video description
5246 'content:encoded':
5247 type: string
5248 description: video description
5249 'dc:creator':
5250 type: string
5251 description: publisher user name
5252 'media:category':
5253 type: integer
5254 description: video category (MRSS)
5255 'media:community':
5256 type: object
5257 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5258 properties:
5259 'media:statistics':
5260 type: object
5261 properties:
5262 views:
5263 type: integer
5264 xml:
5265 attribute: true
5266 'media:embed':
5267 type: object
5268 properties:
5269 url:
5270 type: string
5271 format: url
5272 description: video embed path, relative to the canonical URL domain (MRSS)
5273 xml:
5274 attribute: true
5275 'media:player':
5276 type: object
5277 properties:
5278 url:
5279 type: string
5280 format: url
5281 description: video watch path, relative to the canonical URL domain (MRSS)
5282 xml:
5283 attribute: true
5284 'media:thumbnail':
5285 type: object
5286 properties:
5287 url:
5288 type: string
5289 format: url
5290 xml:
5291 attribute: true
5292 height:
5293 type: integer
5294 xml:
5295 attribute: true
5296 width:
5297 type: integer
5298 xml:
5299 attribute: true
5300 'media:title':
5301 type: string
5302 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
5303 'media:description':
5304 type: string
5305 'media:rating':
5306 type: string
5307 enum:
5308 - nonadult
5309 - adult
5310 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
5311 'enclosure':
5312 type: object
5313 description: main streamable file for the video
5314 properties:
5315 url:
5316 type: string
5317 format: url
5318 xml:
5319 attribute: true
5320 type:
5321 type: string
5322 enum:
5323 - application/x-bittorrent
5324 xml:
5325 attribute: true
5326 length:
5327 type: integer
5328 xml:
5329 attribute: true
5330 'media:group':
5331 type: array
5332 description: list of streamable files for the video. see [media:peerLink](https://www.rssboard.org/media-rss#media-peerlink) and [media:content](https://www.rssboard.org/media-rss#media-content) or (MRSS)
5333 items:
5334 anyOf:
5335 - $ref: '#/components/schemas/MRSSPeerLink'
5336 - $ref: '#/components/schemas/MRSSGroupContent'
5337 NotificationSettingValue:
5338 type: integer
5339 description: >
5340 Notification type
5341
5342 - `0` NONE
5343
5344 - `1` WEB
5345
5346 - `2` EMAIL
5347 enum:
5348 - 0
5349 - 1
5350 - 3
5351 Notification:
5352 properties:
5353 id:
5354 type: integer
5355 type:
5356 type: integer
5357 description: >
5358 Notification type, following the `UserNotificationType` enum:
5359
5360 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
5361
5362 - `2` NEW_COMMENT_ON_MY_VIDEO
5363
5364 - `3` NEW_ABUSE_FOR_MODERATORS
5365
5366 - `4` BLACKLIST_ON_MY_VIDEO
5367
5368 - `5` UNBLACKLIST_ON_MY_VIDEO
5369
5370 - `6` MY_VIDEO_PUBLISHED
5371
5372 - `7` MY_VIDEO_IMPORT_SUCCESS
5373
5374 - `8` MY_VIDEO_IMPORT_ERROR
5375
5376 - `9` NEW_USER_REGISTRATION
5377
5378 - `10` NEW_FOLLOW
5379
5380 - `11` COMMENT_MENTION
5381
5382 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
5383
5384 - `13` NEW_INSTANCE_FOLLOWER
5385
5386 - `14` AUTO_INSTANCE_FOLLOWING
5387 read:
5388 type: boolean
5389 video:
5390 nullable: true
5391 allOf:
5392 - $ref: '#/components/schemas/VideoInfo'
5393 - type: object
5394 properties:
5395 channel:
5396 $ref: '#/components/schemas/ActorInfo'
5397 videoImport:
5398 nullable: true
5399 type: object
5400 properties:
5401 id:
5402 type: integer
5403 video:
5404 nullable: true
5405 $ref: '#/components/schemas/VideoInfo'
5406 torrentName:
5407 type: string
5408 nullable: true
5409 magnetUri:
5410 type: string
5411 format: uri
5412 nullable: true
5413 targetUri:
5414 type: string
5415 format: uri
5416 nullable: true
5417 comment:
5418 nullable: true
5419 type: object
5420 properties:
5421 id:
5422 type: integer
5423 threadId:
5424 type: integer
5425 video:
5426 $ref: '#/components/schemas/VideoInfo'
5427 account:
5428 $ref: '#/components/schemas/ActorInfo'
5429 videoAbuse:
5430 nullable: true
5431 type: object
5432 properties:
5433 id:
5434 type: integer
5435 video:
5436 allOf:
5437 - $ref: '#/components/schemas/VideoInfo'
5438 videoBlacklist:
5439 nullable: true
5440 type: object
5441 properties:
5442 id:
5443 type: integer
5444 video:
5445 allOf:
5446 - $ref: '#/components/schemas/VideoInfo'
5447 account:
5448 nullable: true
5449 allOf:
5450 - $ref: '#/components/schemas/ActorInfo'
5451 actorFollow:
5452 type: object
5453 nullable: true
5454 properties:
5455 id:
5456 type: integer
5457 follower:
5458 $ref: '#/components/schemas/ActorInfo'
5459 state:
5460 type: string
5461 enum:
5462 - pending
5463 - accepted
5464 following:
5465 type: object
5466 properties:
5467 type:
5468 type: string
5469 enum:
5470 - account
5471 - channel
5472 - instance
5473 name:
5474 type: string
5475 displayName:
5476 type: string
5477 host:
5478 type: string
5479 format: hostname
5480 createdAt:
5481 type: string
5482 format: date-time
5483 updatedAt:
5484 type: string
5485 format: date-time
5486 NotificationListResponse:
5487 properties:
5488 total:
5489 type: integer
5490 example: 1
5491 data:
5492 type: array
5493 maxItems: 100
5494 items:
5495 $ref: '#/components/schemas/Notification'
5496 Plugin:
5497 properties:
5498 name:
5499 type: string
5500 example: peertube-plugin-auth-ldap
5501 type:
5502 type: integer
5503 description: >
5504 - `1`: PLUGIN
5505
5506 - `2`: THEME
5507 enum:
5508 - 1
5509 - 2
5510 latestVersion:
5511 type: string
5512 example: 0.0.3
5513 version:
5514 type: string
5515 example: 0.0.1
5516 enabled:
5517 type: boolean
5518 uninstalled:
5519 type: boolean
5520 peertubeEngine:
5521 type: string
5522 example: 2.2.0
5523 description:
5524 type: string
5525 homepage:
5526 type: string
5527 format: url
5528 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
5529 settings:
5530 type: object
5531 additionalProperties: true
5532 createdAt:
5533 type: string
5534 format: date-time
5535 updatedAt:
5536 type: string
5537 format: date-time
5538 PluginResponse:
5539 properties:
5540 total:
5541 type: integer
5542 example: 1
5543 data:
5544 type: array
5545 maxItems: 100
5546 items:
5547 $ref: '#/components/schemas/Plugin'
5548
5549 LiveVideoUpdate:
5550 properties:
5551 saveReplay:
5552 type: boolean
5553
5554 LiveVideoResponse:
5555 properties:
5556 rtmpUrl:
5557 type: string
5558 streamKey:
5559 type: string
5560 description: RTMP stream key to use to stream into this live video
5561 saveReplay:
5562 type: boolean
5563
5564 callbacks:
5565 searchIndex:
5566 'https://search.example.org/api/v1/search/videos':
5567 post:
5568 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
5569 responses:
5570 '200':
5571 description: successful operation
5572 content:
5573 application/json:
5574 schema:
5575 $ref: '#/components/schemas/VideoListResponse'