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