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