]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
Handle playlist position in URL
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
1 openapi: 3.0.0
2 info:
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 ```
51 externalDocs:
52 url: https://docs.joinpeertube.org/api-rest-reference.html
53 tags:
54 - name: Accounts
55 description: >
56 Accounts encompass remote accounts discovered across the federation,
57 and correspond to the main Actor, along with video channels a user can create, which
58 are also Actors.
59
60 When a comment is posted, it is done with your Account's Actor.
61 - name: Users
62 description: >
63 Using some features of PeerTube require authentication, for which User
64 provide different levels of permission as well as associated user
65 information. Each user has a corresponding local Account for federation.
66 - name: My User
67 description: >
68 Operations related to your own User, when logged-in.
69 - name: My Subscriptions
70 description: >
71 Operations related to your subscriptions to video channels, their
72 new videos, and how to keep up to date with their latest publications!
73 - name: My Notifications
74 description: >
75 Notifications following new videos, follows or reports. They allow you
76 to keep track of the interactions and overall important information that
77 concerns you. You MAY set per-notification type delivery preference, to
78 receive the info either by mail, by in-browser notification or both.
79 - name: Config
80 description: >
81 Each server exposes public information regarding supported videos and
82 options.
83 - name: Job
84 description: >
85 Jobs are long-running tasks enqueued and processed by the instance
86 itself. No additional worker registration is currently available.
87 - name: Instance Follows
88 description: >
89 Managing servers which the instance interacts with is crucial to the
90 concept of federation in PeerTube and external video indexation. The PeerTube
91 server then deals with inter-server ActivityPub operations and propagates
92 information across its social graph by posting activities to actors' inbox
93 endpoints.
94 externalDocs:
95 url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-follows
96 - name: Instance Redundancy
97 description: >
98 Redundancy is part of the inter-server solidarity that PeerTube fosters.
99 Manage the list of instances you wish to help by seeding their videos according
100 to the policy of video selection of your choice. Note that you have a similar functionality
101 to mirror individual videos, see `Video Mirroring`.
102 externalDocs:
103 url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-redundancy
104 - name: Plugins
105 description: >
106 Managing plugins installed from a local path or from NPM, or search for new ones.
107 externalDocs:
108 url: https://docs.joinpeertube.org/#/api-plugins
109 - name: Abuses
110 description: |
111 Abuses deal with reports of local or remote videos/comments/accounts alike.
112 - name: Video
113 description: |
114 Operations dealing with listing, uploading, fetching or modifying videos.
115 - name: Search
116 description: |
117 The search helps to find _videos_ or _channels_ from within the instance and beyond.
118 Videos from other instances federated by the instance (that is, instances
119 followed by the instance) can be found via keywords and other criteria of
120 the advanced search.
121
122 Administrators can also enable the use of a remote search system, indexing
123 videos and channels not could be not federated by the instance.
124 - name: Video Comments
125 description: >
126 Operations dealing with comments to a video. Comments are organized in
127 threads.
128 - name: Video Playlists
129 description: >
130 Operations dealing with playlists of videos. Playlists are bound to users
131 and/or channels.
132 - name: Video Channels
133 description: >
134 Operations dealing with the creation, modification and listing of videos within a channel.
135 - name: Video Blocks
136 description: >
137 Operations dealing with blocking videos (removing them from view and
138 preventing interactions).
139 - name: Video Rates
140 description: >
141 Like/dislike a video.
142 - name: Feeds
143 description: >
144 Server syndication feeds
145 x-tagGroups:
146 - name: Accounts
147 tags:
148 - Accounts
149 - Users
150 - My User
151 - My Subscriptions
152 - My Notifications
153 - name: Videos
154 tags:
155 - Video
156 - Video Captions
157 - Video Channels
158 - Video Comments
159 - Video Rates
160 - Video Playlists
161 - Video Ownership Change
162 - Video Mirroring
163 - 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
182 paths:
183 '/accounts/{name}':
184 get:
185 tags:
186 - Accounts
187 summary: Get an account
188 parameters:
189 - $ref: '#/components/parameters/name'
190 responses:
191 '200':
192 description: successful operation
193 content:
194 application/json:
195 schema:
196 $ref: '#/components/schemas/Account'
197 '404':
198 description: account not found
199 '/accounts/{name}/videos':
200 get:
201 tags:
202 - Accounts
203 - Video
204 summary: 'List videos of an account'
205 parameters:
206 - $ref: '#/components/parameters/name'
207 - $ref: '#/components/parameters/categoryOneOf'
208 - $ref: '#/components/parameters/tagsOneOf'
209 - $ref: '#/components/parameters/tagsAllOf'
210 - $ref: '#/components/parameters/licenceOneOf'
211 - $ref: '#/components/parameters/languageOneOf'
212 - $ref: '#/components/parameters/nsfw'
213 - $ref: '#/components/parameters/filter'
214 - $ref: '#/components/parameters/skipCount'
215 - $ref: '#/components/parameters/start'
216 - $ref: '#/components/parameters/count'
217 - $ref: '#/components/parameters/videosSort'
218 responses:
219 '200':
220 description: successful operation
221 content:
222 application/json:
223 schema:
224 $ref: '#/components/schemas/VideoListResponse'
225 x-code-samples:
226 - lang: JavaScript
227 source: |
228 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
229 .then(function(response) {
230 return response.json()
231 }).then(function(data) {
232 console.log(data)
233 })
234 - lang: Shell
235 source: |
236 ## 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 parameters:
1709 - $ref: '#/components/parameters/abuseId'
1710 requestBody:
1711 required: true
1712 content:
1713 application/json:
1714 schema:
1715 type: object
1716 properties:
1717 message:
1718 description: Message to send
1719 type: string
1720 required:
1721 - message
1722 responses:
1723 '200':
1724 description: successful operation
1725 '400':
1726 description: incorrect request parameters
1727 '/abuses/{abuseId}/messages/{abuseMessageId}':
1728 delete:
1729 summary: Delete an abuse message
1730 security:
1731 - OAuth2: []
1732 tags:
1733 - Abuses
1734 parameters:
1735 - $ref: '#/components/parameters/abuseId'
1736 - $ref: '#/components/parameters/abuseMessageId'
1737 responses:
1738 '204':
1739 description: successful operation
1740
1741 '/videos/{id}/blacklist':
1742 post:
1743 summary: Block a video
1744 security:
1745 - OAuth2:
1746 - admin
1747 - moderator
1748 tags:
1749 - Video Blocks
1750 parameters:
1751 - $ref: '#/components/parameters/idOrUUID'
1752 responses:
1753 '204':
1754 description: successful operation
1755 delete:
1756 summary: Unblock a video by its id
1757 security:
1758 - OAuth2:
1759 - admin
1760 - moderator
1761 tags:
1762 - Video Blocks
1763 parameters:
1764 - $ref: '#/components/parameters/idOrUUID'
1765 responses:
1766 '204':
1767 description: successful operation
1768 '404':
1769 description: block not found
1770 /videos/blacklist:
1771 get:
1772 tags:
1773 - Video Blocks
1774 summary: List video blocks
1775 security:
1776 - OAuth2:
1777 - admin
1778 - moderator
1779 parameters:
1780 - name: type
1781 in: query
1782 description: >
1783 list only blocks that match this type:
1784
1785 - `1`: manual block
1786
1787 - `2`: automatic block that needs review
1788 schema:
1789 type: integer
1790 enum:
1791 - 1
1792 - 2
1793 - name: search
1794 in: query
1795 description: plain search that will match with video titles, and more
1796 schema:
1797 type: string
1798 - $ref: '#/components/parameters/start'
1799 - $ref: '#/components/parameters/count'
1800 - $ref: '#/components/parameters/blacklistsSort'
1801 responses:
1802 '200':
1803 description: successful operation
1804 content:
1805 application/json:
1806 schema:
1807 type: object
1808 properties:
1809 total:
1810 type: integer
1811 example: 1
1812 data:
1813 type: array
1814 items:
1815 $ref: '#/components/schemas/VideoBlacklist'
1816 /videos/{id}/captions:
1817 get:
1818 summary: List captions of a video
1819 tags:
1820 - Video Captions
1821 parameters:
1822 - $ref: '#/components/parameters/idOrUUID'
1823 responses:
1824 '200':
1825 description: successful operation
1826 content:
1827 application/json:
1828 schema:
1829 type: object
1830 properties:
1831 total:
1832 type: integer
1833 example: 1
1834 data:
1835 type: array
1836 items:
1837 $ref: '#/components/schemas/VideoCaption'
1838 /videos/{id}/captions/{captionLanguage}:
1839 put:
1840 summary: Add or replace a video caption
1841 tags:
1842 - Video Captions
1843 parameters:
1844 - $ref: '#/components/parameters/idOrUUID'
1845 - $ref: '#/components/parameters/captionLanguage'
1846 requestBody:
1847 content:
1848 multipart/form-data:
1849 schema:
1850 type: object
1851 properties:
1852 captionfile:
1853 description: The file to upload.
1854 type: string
1855 format: binary
1856 encoding:
1857 captionfile:
1858 contentType: text/vtt, application/x-subrip, text/plain
1859 responses:
1860 '204':
1861 description: successful operation
1862 '404':
1863 description: video or language not found
1864 delete:
1865 summary: Delete a video caption
1866 tags:
1867 - Video Captions
1868 parameters:
1869 - $ref: '#/components/parameters/idOrUUID'
1870 - $ref: '#/components/parameters/captionLanguage'
1871 responses:
1872 '204':
1873 description: successful operation
1874 '404':
1875 description: video or language or caption for that language not found
1876 /video-channels:
1877 get:
1878 summary: List video channels
1879 tags:
1880 - Video Channels
1881 parameters:
1882 - $ref: '#/components/parameters/start'
1883 - $ref: '#/components/parameters/count'
1884 - $ref: '#/components/parameters/sort'
1885 responses:
1886 '200':
1887 description: successful operation
1888 content:
1889 application/json:
1890 schema:
1891 type: object
1892 properties:
1893 total:
1894 type: integer
1895 example: 1
1896 data:
1897 type: array
1898 items:
1899 $ref: '#/components/schemas/VideoChannel'
1900 post:
1901 summary: Create a video channel
1902 security:
1903 - OAuth2: []
1904 tags:
1905 - Video Channels
1906 responses:
1907 '204':
1908 description: successful operation
1909 requestBody:
1910 content:
1911 application/json:
1912 schema:
1913 $ref: '#/components/schemas/VideoChannelCreate'
1914 '/video-channels/{channelHandle}':
1915 get:
1916 summary: Get a video channel
1917 tags:
1918 - Video Channels
1919 parameters:
1920 - $ref: '#/components/parameters/channelHandle'
1921 responses:
1922 '200':
1923 description: successful operation
1924 content:
1925 application/json:
1926 schema:
1927 $ref: '#/components/schemas/VideoChannel'
1928 put:
1929 summary: Update a video channel
1930 security:
1931 - OAuth2: []
1932 tags:
1933 - Video Channels
1934 parameters:
1935 - $ref: '#/components/parameters/channelHandle'
1936 responses:
1937 '204':
1938 description: successful operation
1939 requestBody:
1940 content:
1941 application/json:
1942 schema:
1943 $ref: '#/components/schemas/VideoChannelUpdate'
1944 delete:
1945 summary: Delete a video channel
1946 security:
1947 - OAuth2: []
1948 tags:
1949 - Video Channels
1950 parameters:
1951 - $ref: '#/components/parameters/channelHandle'
1952 responses:
1953 '204':
1954 description: successful operation
1955 '/video-channels/{channelHandle}/videos':
1956 get:
1957 summary: List videos of a video channel
1958 tags:
1959 - Video
1960 - Video Channels
1961 parameters:
1962 - $ref: '#/components/parameters/channelHandle'
1963 - $ref: '#/components/parameters/categoryOneOf'
1964 - $ref: '#/components/parameters/tagsOneOf'
1965 - $ref: '#/components/parameters/tagsAllOf'
1966 - $ref: '#/components/parameters/licenceOneOf'
1967 - $ref: '#/components/parameters/languageOneOf'
1968 - $ref: '#/components/parameters/nsfw'
1969 - $ref: '#/components/parameters/filter'
1970 - $ref: '#/components/parameters/skipCount'
1971 - $ref: '#/components/parameters/start'
1972 - $ref: '#/components/parameters/count'
1973 - $ref: '#/components/parameters/videosSort'
1974 responses:
1975 '200':
1976 description: successful operation
1977 content:
1978 application/json:
1979 schema:
1980 $ref: '#/components/schemas/VideoListResponse'
1981
1982 /video-playlists/privacies:
1983 get:
1984 summary: List available playlist privacies
1985 tags:
1986 - Video Playlists
1987 responses:
1988 '200':
1989 description: successful operation
1990 content:
1991 application/json:
1992 schema:
1993 type: array
1994 items:
1995 type: string
1996 examples:
1997 nightly:
1998 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
1999
2000 /video-playlists:
2001 get:
2002 summary: List video playlists
2003 tags:
2004 - Video Playlists
2005 parameters:
2006 - $ref: '#/components/parameters/start'
2007 - $ref: '#/components/parameters/count'
2008 - $ref: '#/components/parameters/sort'
2009 responses:
2010 '200':
2011 description: successful operation
2012 content:
2013 application/json:
2014 schema:
2015 type: object
2016 properties:
2017 total:
2018 type: integer
2019 example: 1
2020 data:
2021 type: array
2022 items:
2023 $ref: '#/components/schemas/VideoPlaylist'
2024 post:
2025 summary: Create a video playlist
2026 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
2027 security:
2028 - OAuth2: []
2029 tags:
2030 - Video Playlists
2031 responses:
2032 '200':
2033 description: successful operation
2034 content:
2035 application/json:
2036 schema:
2037 type: object
2038 properties:
2039 videoPlaylist:
2040 type: object
2041 properties:
2042 id:
2043 type: integer
2044 uuid:
2045 type: string
2046 requestBody:
2047 content:
2048 multipart/form-data:
2049 schema:
2050 type: object
2051 properties:
2052 displayName:
2053 description: Video playlist display name
2054 type: string
2055 thumbnailfile:
2056 description: Video playlist thumbnail file
2057 type: string
2058 format: binary
2059 privacy:
2060 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2061 description:
2062 description: Video playlist description
2063 type: string
2064 videoChannelId:
2065 description: Video channel in which the playlist will be published
2066 type: integer
2067 required:
2068 - displayName
2069 encoding:
2070 thumbnailfile:
2071 contentType: image/jpeg
2072
2073 /video-playlists/{id}:
2074 get:
2075 summary: Get a video playlist
2076 tags:
2077 - Video Playlists
2078 parameters:
2079 - $ref: '#/components/parameters/idOrUUID'
2080 responses:
2081 '200':
2082 description: successful operation
2083 content:
2084 application/json:
2085 schema:
2086 $ref: '#/components/schemas/VideoPlaylist'
2087 put:
2088 summary: Update a video playlist
2089 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2090 security:
2091 - OAuth2: []
2092 tags:
2093 - Video Playlists
2094 responses:
2095 '204':
2096 description: successful operation
2097 parameters:
2098 - $ref: '#/components/parameters/idOrUUID'
2099 requestBody:
2100 content:
2101 multipart/form-data:
2102 schema:
2103 type: object
2104 properties:
2105 displayName:
2106 description: Video playlist display name
2107 type: string
2108 thumbnailfile:
2109 description: Video playlist thumbnail file
2110 type: string
2111 format: binary
2112 privacy:
2113 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2114 description:
2115 description: Video playlist description
2116 type: string
2117 videoChannelId:
2118 description: Video channel in which the playlist will be published
2119 type: integer
2120 encoding:
2121 thumbnailfile:
2122 contentType: image/jpeg
2123 delete:
2124 summary: Delete a video playlist
2125 security:
2126 - OAuth2: []
2127 tags:
2128 - Video Playlists
2129 parameters:
2130 - $ref: '#/components/parameters/idOrUUID'
2131 responses:
2132 '204':
2133 description: successful operation
2134
2135 /video-playlists/{id}/videos:
2136 get:
2137 summary: 'List videos of a playlist'
2138 tags:
2139 - Videos
2140 - Video Playlists
2141 parameters:
2142 - $ref: '#/components/parameters/idOrUUID'
2143 responses:
2144 '200':
2145 description: successful operation
2146 content:
2147 application/json:
2148 schema:
2149 $ref: '#/components/schemas/VideoListResponse'
2150 post:
2151 summary: 'Add a video in a playlist'
2152 security:
2153 - OAuth2: []
2154 tags:
2155 - Videos
2156 - Video Playlists
2157 parameters:
2158 - $ref: '#/components/parameters/idOrUUID'
2159 responses:
2160 '200':
2161 description: successful operation
2162 content:
2163 application/json:
2164 schema:
2165 type: object
2166 properties:
2167 videoPlaylistElement:
2168 type: object
2169 properties:
2170 id:
2171 type: integer
2172 requestBody:
2173 content:
2174 application/json:
2175 schema:
2176 type: object
2177 properties:
2178 videoId:
2179 type: integer
2180 description: 'Video to add in the playlist'
2181 startTimestamp:
2182 type: integer
2183 description: 'Start the video at this specific timestamp (in seconds)'
2184 stopTimestamp:
2185 type: integer
2186 description: 'Stop the video at this specific timestamp (in seconds)'
2187 required:
2188 - videoId
2189
2190 /video-playlists/{id}/videos/reorder:
2191 post:
2192 summary: 'Reorder a playlist'
2193 security:
2194 - OAuth2: []
2195 tags:
2196 - Video Playlists
2197 parameters:
2198 - $ref: '#/components/parameters/idOrUUID'
2199 responses:
2200 '204':
2201 description: successful operation
2202 requestBody:
2203 content:
2204 application/json:
2205 schema:
2206 type: object
2207 properties:
2208 startPosition:
2209 type: integer
2210 description: 'Start position of the element to reorder'
2211 minimum: 1
2212 insertAfterPosition:
2213 type: integer
2214 description: 'New position for the block to reorder, to add the block before the first element'
2215 minimum: 0
2216 reorderLength:
2217 type: integer
2218 description: 'How many element from `startPosition` to reorder'
2219 minimum: 1
2220 required:
2221 - startPosition
2222 - insertAfterPosition
2223
2224 /video-playlists/{id}/videos/{playlistElementId}:
2225 put:
2226 summary: 'Update a playlist element'
2227 security:
2228 - OAuth2: []
2229 tags:
2230 - Video Playlists
2231 parameters:
2232 - $ref: '#/components/parameters/idOrUUID'
2233 - $ref: '#/components/parameters/playlistElementId'
2234 responses:
2235 '204':
2236 description: successful operation
2237 requestBody:
2238 content:
2239 application/json:
2240 schema:
2241 type: object
2242 properties:
2243 startTimestamp:
2244 type: integer
2245 description: 'Start the video at this specific timestamp (in seconds)'
2246 stopTimestamp:
2247 type: integer
2248 description: 'Stop the video at this specific timestamp (in seconds)'
2249 delete:
2250 summary: 'Delete an element from a playlist'
2251 security:
2252 - OAuth2: []
2253 tags:
2254 - Video Playlists
2255 parameters:
2256 - $ref: '#/components/parameters/idOrUUID'
2257 - $ref: '#/components/parameters/playlistElementId'
2258 responses:
2259 '204':
2260 description: successful operation
2261
2262 '/users/me/video-playlists/videos-exist':
2263 get:
2264 summary: 'Check video exists in my playlists'
2265 security:
2266 - OAuth2: []
2267 tags:
2268 - Video Playlists
2269 parameters:
2270 - name: videoIds
2271 in: query
2272 required: true
2273 description: The video ids to check
2274 schema:
2275 type: array
2276 items:
2277 type: integer
2278 responses:
2279 '200':
2280 description: successful operation
2281 content:
2282 application/json:
2283 schema:
2284 type: object
2285 properties:
2286 videoId:
2287 type: array
2288 items:
2289 type: object
2290 properties:
2291 playlistElementId:
2292 type: integer
2293 playlistId:
2294 type: integer
2295 startTimestamp:
2296 type: integer
2297 stopTimestamp:
2298 type: integer
2299
2300 '/accounts/{name}/video-channels':
2301 get:
2302 summary: List video channels of an account
2303 tags:
2304 - Video Channels
2305 - Accounts
2306 parameters:
2307 - $ref: '#/components/parameters/name'
2308 - name: withStats
2309 in: query
2310 description: include view statistics for the last 30 days (only if authentified as the account user)
2311 schema:
2312 type: boolean
2313 - $ref: '#/components/parameters/start'
2314 - $ref: '#/components/parameters/count'
2315 - $ref: '#/components/parameters/sort'
2316 responses:
2317 '200':
2318 description: successful operation
2319 content:
2320 application/json:
2321 schema:
2322 type: array
2323 items:
2324 $ref: '#/components/schemas/VideoChannel'
2325 '/accounts/{name}/ratings':
2326 get:
2327 summary: List ratings of an account
2328 security:
2329 - OAuth2: []
2330 tags:
2331 - Accounts
2332 parameters:
2333 - $ref: '#/components/parameters/name'
2334 - $ref: '#/components/parameters/start'
2335 - $ref: '#/components/parameters/count'
2336 - $ref: '#/components/parameters/sort'
2337 - name: rating
2338 in: query
2339 required: false
2340 description: Optionally filter which ratings to retrieve
2341 schema:
2342 type: string
2343 enum:
2344 - like
2345 - dislike
2346 responses:
2347 '200':
2348 description: successful operation
2349 content:
2350 application/json:
2351 schema:
2352 type: array
2353 items:
2354 $ref: '#/components/schemas/VideoRating'
2355 '/videos/{id}/comment-threads':
2356 get:
2357 summary: List threads of a video
2358 tags:
2359 - Video Comments
2360 parameters:
2361 - $ref: '#/components/parameters/idOrUUID'
2362 - $ref: '#/components/parameters/start'
2363 - $ref: '#/components/parameters/count'
2364 - $ref: '#/components/parameters/commentsSort'
2365 responses:
2366 '200':
2367 description: successful operation
2368 content:
2369 application/json:
2370 schema:
2371 $ref: '#/components/schemas/CommentThreadResponse'
2372 post:
2373 summary: Create a thread
2374 security:
2375 - OAuth2: []
2376 tags:
2377 - Video Comments
2378 parameters:
2379 - $ref: '#/components/parameters/idOrUUID'
2380 responses:
2381 '200':
2382 description: successful operation
2383 content:
2384 application/json:
2385 schema:
2386 $ref: '#/components/schemas/CommentThreadPostResponse'
2387 '404':
2388 description: video does not exist
2389 requestBody:
2390 content:
2391 application/json:
2392 schema:
2393 type: object
2394 properties:
2395 text:
2396 type: string
2397 description: 'Text comment'
2398 required:
2399 - text
2400
2401 '/videos/{id}/comment-threads/{threadId}':
2402 get:
2403 summary: Get a thread
2404 tags:
2405 - Video Comments
2406 parameters:
2407 - $ref: '#/components/parameters/idOrUUID'
2408 - $ref: '#/components/parameters/threadId'
2409 responses:
2410 '200':
2411 description: successful operation
2412 content:
2413 application/json:
2414 schema:
2415 $ref: '#/components/schemas/VideoCommentThreadTree'
2416 '/videos/{id}/comments/{commentId}':
2417 post:
2418 summary: Reply to a thread of a video
2419 security:
2420 - OAuth2: []
2421 tags:
2422 - Video Comments
2423 parameters:
2424 - $ref: '#/components/parameters/idOrUUID'
2425 - $ref: '#/components/parameters/commentId'
2426 responses:
2427 '200':
2428 description: successful operation
2429 content:
2430 application/json:
2431 schema:
2432 $ref: '#/components/schemas/CommentThreadPostResponse'
2433 '404':
2434 description: thread or video does not exist
2435 requestBody:
2436 content:
2437 application/json:
2438 schema:
2439 type: object
2440 properties:
2441 text:
2442 type: string
2443 description: 'Text comment'
2444 required:
2445 - text
2446
2447 delete:
2448 summary: Delete a comment or a reply
2449 security:
2450 - OAuth2: []
2451 tags:
2452 - Video Comments
2453 parameters:
2454 - $ref: '#/components/parameters/idOrUUID'
2455 - $ref: '#/components/parameters/commentId'
2456 responses:
2457 '204':
2458 description: successful operation
2459 '403':
2460 description: cannot remove comment of another user
2461 '404':
2462 description: comment or video does not exist
2463 '409':
2464 description: comment is already deleted
2465 '/videos/{id}/rate':
2466 put:
2467 summary: Like/dislike a video
2468 security:
2469 - OAuth2: []
2470 tags:
2471 - Video Rates
2472 parameters:
2473 - $ref: '#/components/parameters/idOrUUID'
2474 responses:
2475 '204':
2476 description: successful operation
2477 '404':
2478 description: video does not exist
2479 /search/videos:
2480 get:
2481 tags:
2482 - Search
2483 summary: Search videos
2484 parameters:
2485 - name: search
2486 in: query
2487 required: true
2488 allowEmptyValue: false
2489 description: >
2490 String to search. If the user can make a remote URI search, and the string is an URI then the
2491 PeerTube instance will fetch the remote object and add it to its database. Then,
2492 you can use the REST API to fetch the complete video information and interact with it.
2493 schema:
2494 type: string
2495 - $ref: '#/components/parameters/categoryOneOf'
2496 - $ref: '#/components/parameters/tagsOneOf'
2497 - $ref: '#/components/parameters/tagsAllOf'
2498 - $ref: '#/components/parameters/licenceOneOf'
2499 - $ref: '#/components/parameters/languageOneOf'
2500 - $ref: '#/components/parameters/nsfw'
2501 - $ref: '#/components/parameters/filter'
2502 - $ref: '#/components/parameters/skipCount'
2503 - $ref: '#/components/parameters/start'
2504 - $ref: '#/components/parameters/count'
2505 - $ref: '#/components/parameters/searchTarget'
2506 - $ref: '#/components/parameters/videosSearchSort'
2507 - name: startDate
2508 in: query
2509 description: Get videos that are published after this date
2510 schema:
2511 type: string
2512 format: date-time
2513 - name: endDate
2514 in: query
2515 description: Get videos that are published before this date
2516 schema:
2517 type: string
2518 format: date-time
2519 - name: originallyPublishedStartDate
2520 in: query
2521 description: Get videos that are originally published after this date
2522 schema:
2523 type: string
2524 format: date-time
2525 - name: originallyPublishedEndDate
2526 in: query
2527 description: Get videos that are originally published before this date
2528 schema:
2529 type: string
2530 format: date-time
2531 - name: durationMin
2532 in: query
2533 description: Get videos that have this minimum duration
2534 schema:
2535 type: integer
2536 - name: durationMax
2537 in: query
2538 description: Get videos that have this maximum duration
2539 schema:
2540 type: integer
2541 callbacks:
2542 'searchTarget === search-index':
2543 $ref: '#/components/callbacks/searchIndex'
2544 responses:
2545 '200':
2546 description: successful operation
2547 content:
2548 application/json:
2549 schema:
2550 $ref: '#/components/schemas/VideoListResponse'
2551 '500':
2552 description: search index unavailable
2553 /search/video-channels:
2554 get:
2555 tags:
2556 - Search
2557 summary: Search channels
2558 parameters:
2559 - name: search
2560 in: query
2561 required: true
2562 description: >
2563 String to search. If the user can make a remote URI search, and the string is an URI then the
2564 PeerTube instance will fetch the remote object and add it to its database. Then,
2565 you can use the REST API to fetch the complete channel information and interact with it.
2566 schema:
2567 type: string
2568 - $ref: '#/components/parameters/start'
2569 - $ref: '#/components/parameters/count'
2570 - $ref: '#/components/parameters/searchTarget'
2571 - $ref: '#/components/parameters/sort'
2572 callbacks:
2573 'searchTarget === search-index':
2574 $ref: '#/components/callbacks/searchIndex'
2575 responses:
2576 '200':
2577 description: successful operation
2578 content:
2579 application/json:
2580 schema:
2581 type: array
2582 items:
2583 $ref: '#/components/schemas/VideoChannel'
2584 '500':
2585 description: search index unavailable
2586 /blocklist/accounts:
2587 get:
2588 tags:
2589 - Account Blocks
2590 summary: List account blocks
2591 security:
2592 - OAuth2:
2593 - admin
2594 parameters:
2595 - $ref: '#/components/parameters/start'
2596 - $ref: '#/components/parameters/count'
2597 - $ref: '#/components/parameters/sort'
2598 responses:
2599 '200':
2600 description: successful operation
2601 post:
2602 tags:
2603 - Account Blocks
2604 summary: Block an account
2605 security:
2606 - OAuth2:
2607 - admin
2608 requestBody:
2609 content:
2610 application/json:
2611 schema:
2612 type: object
2613 properties:
2614 accountName:
2615 type: string
2616 example: chocobozzz@example.org
2617 description: account to block, in the form `username@domain`
2618 required:
2619 - accountName
2620 responses:
2621 '200':
2622 description: successful operation
2623 '409':
2624 description: self-blocking forbidden
2625 '/blocklist/accounts/{accountName}':
2626 delete:
2627 tags:
2628 - Account Blocks
2629 summary: Unblock an account by its handle
2630 security:
2631 - OAuth2:
2632 - admin
2633 parameters:
2634 - name: accountName
2635 in: path
2636 required: true
2637 description: account to unblock, in the form `username@domain`
2638 schema:
2639 type: string
2640 responses:
2641 '201':
2642 description: successful operation
2643 '404':
2644 description: account or account block does not exist
2645 /blocklist/servers:
2646 get:
2647 tags:
2648 - Server Blocks
2649 summary: List server blocks
2650 security:
2651 - OAuth2:
2652 - admin
2653 parameters:
2654 - $ref: '#/components/parameters/start'
2655 - $ref: '#/components/parameters/count'
2656 - $ref: '#/components/parameters/sort'
2657 responses:
2658 '200':
2659 description: successful operation
2660 post:
2661 tags:
2662 - Server Blocks
2663 summary: Block a server
2664 security:
2665 - OAuth2:
2666 - admin
2667 requestBody:
2668 content:
2669 application/json:
2670 schema:
2671 type: object
2672 properties:
2673 host:
2674 type: string
2675 format: hostname
2676 description: server domain to block
2677 required:
2678 - host
2679 responses:
2680 '200':
2681 description: successful operation
2682 '409':
2683 description: self-blocking forbidden
2684 '/blocklist/servers/{host}':
2685 delete:
2686 tags:
2687 - Server Blocks
2688 summary: Unblock a server by its domain
2689 security:
2690 - OAuth2:
2691 - admin
2692 parameters:
2693 - name: host
2694 in: path
2695 required: true
2696 description: server domain to unblock
2697 schema:
2698 type: string
2699 format: hostname
2700 responses:
2701 '201':
2702 description: successful operation
2703 '404':
2704 description: account block does not exist
2705 /redundancy/{host}:
2706 put:
2707 tags:
2708 - Instance Redundancy
2709 summary: Update a server redundancy policy
2710 security:
2711 - OAuth2:
2712 - admin
2713 parameters:
2714 - name: host
2715 in: path
2716 required: true
2717 description: server domain to mirror
2718 schema:
2719 type: string
2720 format: hostname
2721 requestBody:
2722 content:
2723 application/json:
2724 schema:
2725 type: object
2726 properties:
2727 redundancyAllowed:
2728 type: boolean
2729 description: allow mirroring of the host's local videos
2730 required:
2731 - redundancyAllowed
2732 responses:
2733 '204':
2734 description: successful operation
2735 '404':
2736 description: server is not already known
2737 /redundancy/videos:
2738 get:
2739 tags:
2740 - Video Mirroring
2741 summary: List videos being mirrored
2742 security:
2743 - OAuth2:
2744 - admin
2745 parameters:
2746 - name: target
2747 in: query
2748 required: true
2749 description: direction of the mirror
2750 schema:
2751 type: string
2752 enum:
2753 - my-videos
2754 - remote-videos
2755 - $ref: '#/components/parameters/start'
2756 - $ref: '#/components/parameters/count'
2757 - $ref: '#/components/parameters/videoRedundanciesSort'
2758 responses:
2759 '200':
2760 description: successful operation
2761 content:
2762 application/json:
2763 schema:
2764 type: array
2765 items:
2766 $ref: '#/components/schemas/VideoRedundancy'
2767 post:
2768 tags:
2769 - Video Mirroring
2770 summary: Mirror a video
2771 security:
2772 - OAuth2:
2773 - admin
2774 requestBody:
2775 content:
2776 application/json:
2777 schema:
2778 type: object
2779 properties:
2780 videoId:
2781 type: integer
2782 required:
2783 - videoId
2784 responses:
2785 '204':
2786 description: successful operation
2787 '400':
2788 description: cannot mirror a local video
2789 '404':
2790 description: video does not exist
2791 '409':
2792 description: video is already mirrored
2793 /redundancy/videos/{redundancyId}:
2794 delete:
2795 tags:
2796 - Video Mirroring
2797 summary: Delete a mirror done on a video
2798 security:
2799 - OAuth2:
2800 - admin
2801 parameters:
2802 - name: redundancyId
2803 in: path
2804 required: true
2805 description: id of an existing redundancy on a video
2806 schema:
2807 type: string
2808 responses:
2809 '204':
2810 description: successful operation
2811 '404':
2812 description: video redundancy not found
2813 '/feeds/video-comments.{format}':
2814 get:
2815 tags:
2816 - Feeds
2817 summary: List comments on videos
2818 servers:
2819 - url: 'https://peertube2.cpy.re'
2820 description: Live Test Server (live data - latest nightly version)
2821 - url: 'https://peertube3.cpy.re'
2822 description: Live Test Server (live data - latest RC version)
2823 - url: 'https://peertube.cpy.re'
2824 description: Live Test Server (live data - stable version)
2825 parameters:
2826 - name: format
2827 in: path
2828 required: true
2829 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
2830 schema:
2831 type: string
2832 enum:
2833 - xml
2834 - rss
2835 - rss2
2836 - atom
2837 - atom1
2838 - json
2839 - json1
2840 - name: videoId
2841 in: query
2842 description: 'limit listing to a specific video'
2843 schema:
2844 type: string
2845 - name: accountId
2846 in: query
2847 description: 'limit listing to a specific account'
2848 schema:
2849 type: string
2850 - name: accountName
2851 in: query
2852 description: 'limit listing to a specific account'
2853 schema:
2854 type: string
2855 - name: videoChannelId
2856 in: query
2857 description: 'limit listing to a specific video channel'
2858 schema:
2859 type: string
2860 - name: videoChannelName
2861 in: query
2862 description: 'limit listing to a specific video channel'
2863 schema:
2864 type: string
2865 responses:
2866 '204':
2867 description: successful operation
2868 headers:
2869 Cache-Control:
2870 schema:
2871 type: string
2872 default: 'max-age=900' # 15 min cache
2873 content:
2874 application/xml:
2875 schema:
2876 $ref: '#/components/schemas/VideoCommentsForXML'
2877 application/rss+xml:
2878 schema:
2879 $ref: '#/components/schemas/VideoCommentsForXML'
2880 text/xml:
2881 schema:
2882 $ref: '#/components/schemas/VideoCommentsForXML'
2883 application/atom+xml:
2884 schema:
2885 $ref: '#/components/schemas/VideoCommentsForXML'
2886 application/json:
2887 schema:
2888 type: object
2889 '400':
2890 x-summary: field inconsistencies
2891 description: >
2892 Arises when:
2893 - videoId filter is mixed with a channel filter
2894 '404':
2895 description: video, video channel or account not found
2896 '406':
2897 description: accept header unsupported
2898 '/feeds/videos.{format}':
2899 get:
2900 tags:
2901 - Feeds
2902 summary: List videos
2903 servers:
2904 - url: 'https://peertube2.cpy.re'
2905 description: Live Test Server (live data - latest nightly version)
2906 - url: 'https://peertube3.cpy.re'
2907 description: Live Test Server (live data - latest RC version)
2908 - url: 'https://peertube.cpy.re'
2909 description: Live Test Server (live data - stable version)
2910 parameters:
2911 - name: format
2912 in: path
2913 required: true
2914 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
2915 schema:
2916 type: string
2917 enum:
2918 - xml
2919 - rss
2920 - rss2
2921 - atom
2922 - atom1
2923 - json
2924 - json1
2925 - name: accountId
2926 in: query
2927 description: 'limit listing to a specific account'
2928 schema:
2929 type: string
2930 - name: accountName
2931 in: query
2932 description: 'limit listing to a specific account'
2933 schema:
2934 type: string
2935 - name: videoChannelId
2936 in: query
2937 description: 'limit listing to a specific video channel'
2938 schema:
2939 type: string
2940 - name: videoChannelName
2941 in: query
2942 description: 'limit listing to a specific video channel'
2943 schema:
2944 type: string
2945 - $ref: '#/components/parameters/sort'
2946 - $ref: '#/components/parameters/nsfw'
2947 - $ref: '#/components/parameters/filter'
2948 responses:
2949 '204':
2950 description: successful operation
2951 headers:
2952 Cache-Control:
2953 schema:
2954 type: string
2955 default: 'max-age=900' # 15 min cache
2956 content:
2957 application/xml:
2958 schema:
2959 $ref: '#/components/schemas/VideosForXML'
2960 examples:
2961 nightly:
2962 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
2963 application/rss+xml:
2964 schema:
2965 $ref: '#/components/schemas/VideosForXML'
2966 text/xml:
2967 schema:
2968 $ref: '#/components/schemas/VideosForXML'
2969 application/atom+xml:
2970 schema:
2971 $ref: '#/components/schemas/VideosForXML'
2972 application/json:
2973 schema:
2974 type: object
2975 '404':
2976 description: video channel or account not found
2977 '406':
2978 description: accept header unsupported
2979 /plugins:
2980 get:
2981 tags:
2982 - Plugins
2983 summary: List plugins
2984 security:
2985 - OAuth2:
2986 - admin
2987 parameters:
2988 - name: pluginType
2989 in: query
2990 schema:
2991 type: integer
2992 - name: uninstalled
2993 in: query
2994 schema:
2995 type: boolean
2996 - $ref: '#/components/parameters/start'
2997 - $ref: '#/components/parameters/count'
2998 - $ref: '#/components/parameters/sort'
2999 responses:
3000 '200':
3001 description: successful operation
3002 content:
3003 application/json:
3004 schema:
3005 $ref: '#/components/schemas/PluginResponse'
3006 /plugins/available:
3007 get:
3008 tags:
3009 - Plugins
3010 summary: List available plugins
3011 security:
3012 - OAuth2:
3013 - admin
3014 parameters:
3015 - name: search
3016 in: query
3017 schema:
3018 type: string
3019 - name: pluginType
3020 in: query
3021 schema:
3022 type: integer
3023 - name: currentPeerTubeEngine
3024 in: query
3025 schema:
3026 type: string
3027 - $ref: '#/components/parameters/start'
3028 - $ref: '#/components/parameters/count'
3029 - $ref: '#/components/parameters/sort'
3030 responses:
3031 '200':
3032 description: successful operation
3033 content:
3034 application/json:
3035 schema:
3036 $ref: '#/components/schemas/PluginResponse'
3037 '503':
3038 description: plugin index unavailable
3039 /plugins/install:
3040 post:
3041 tags:
3042 - Plugins
3043 summary: Install a plugin
3044 security:
3045 - OAuth2:
3046 - admin
3047 requestBody:
3048 content:
3049 application/json:
3050 schema:
3051 oneOf:
3052 - type: object
3053 properties:
3054 npmName:
3055 type: string
3056 example: peertube-plugin-auth-ldap
3057 required:
3058 - npmName
3059 additionalProperties: false
3060 - type: object
3061 properties:
3062 path:
3063 type: string
3064 required:
3065 - path
3066 additionalProperties: false
3067 responses:
3068 '204':
3069 description: successful operation
3070 '400':
3071 description: should have either `npmName` or `path` set
3072 /plugins/update:
3073 post:
3074 tags:
3075 - Plugins
3076 summary: Update a plugin
3077 security:
3078 - OAuth2:
3079 - admin
3080 requestBody:
3081 content:
3082 application/json:
3083 schema:
3084 oneOf:
3085 - type: object
3086 properties:
3087 npmName:
3088 type: string
3089 example: peertube-plugin-auth-ldap
3090 required:
3091 - npmName
3092 additionalProperties: false
3093 - type: object
3094 properties:
3095 path:
3096 type: string
3097 required:
3098 - path
3099 additionalProperties: false
3100 responses:
3101 '204':
3102 description: successful operation
3103 '400':
3104 description: should have either `npmName` or `path` set
3105 '404':
3106 description: existing plugin not found
3107 /plugins/uninstall:
3108 post:
3109 tags:
3110 - Plugins
3111 summary: Uninstall a plugin
3112 security:
3113 - OAuth2:
3114 - admin
3115 requestBody:
3116 content:
3117 application/json:
3118 schema:
3119 type: object
3120 properties:
3121 npmName:
3122 type: string
3123 description: name of the plugin/theme in its package.json
3124 example: peertube-plugin-auth-ldap
3125 required:
3126 - npmName
3127 responses:
3128 '204':
3129 description: successful operation
3130 '404':
3131 description: existing plugin not found
3132 /plugins/{npmName}:
3133 get:
3134 tags:
3135 - Plugins
3136 summary: Get a plugin
3137 security:
3138 - OAuth2:
3139 - admin
3140 parameters:
3141 - $ref: '#/components/parameters/npmName'
3142 responses:
3143 '200':
3144 description: successful operation
3145 content:
3146 application/json:
3147 schema:
3148 $ref: '#/components/schemas/Plugin'
3149 '404':
3150 description: plugin not found
3151 /plugins/{npmName}/settings:
3152 put:
3153 tags:
3154 - Plugins
3155 summary: Set a plugin's settings
3156 security:
3157 - OAuth2:
3158 - admin
3159 parameters:
3160 - $ref: '#/components/parameters/npmName'
3161 requestBody:
3162 content:
3163 application/json:
3164 schema:
3165 type: object
3166 properties:
3167 settings:
3168 type: object
3169 additionalProperties: true
3170 responses:
3171 '204':
3172 description: successful operation
3173 '404':
3174 description: plugin not found
3175 /plugins/{npmName}/public-settings:
3176 get:
3177 tags:
3178 - Plugins
3179 summary: Get a plugin's public settings
3180 parameters:
3181 - $ref: '#/components/parameters/npmName'
3182 responses:
3183 '200':
3184 description: successful operation
3185 content:
3186 application/json:
3187 schema:
3188 type: object
3189 additionalProperties: true
3190 '404':
3191 description: plugin not found
3192 /plugins/{npmName}/registered-settings:
3193 get:
3194 tags:
3195 - Plugins
3196 summary: Get a plugin's registered settings
3197 security:
3198 - OAuth2:
3199 - admin
3200 parameters:
3201 - $ref: '#/components/parameters/npmName'
3202 responses:
3203 '200':
3204 description: successful operation
3205 content:
3206 application/json:
3207 schema:
3208 type: object
3209 additionalProperties: true
3210 '404':
3211 description: plugin not found
3212 servers:
3213 - url: 'https://peertube2.cpy.re/api/v1'
3214 description: Live Test Server (live data - latest nightly version)
3215 - url: 'https://peertube3.cpy.re/api/v1'
3216 description: Live Test Server (live data - latest RC version)
3217 - url: 'https://peertube.cpy.re/api/v1'
3218 description: Live Test Server (live data - stable version)
3219 components:
3220 parameters:
3221 start:
3222 name: start
3223 in: query
3224 required: false
3225 description: Offset used to paginate results
3226 schema:
3227 type: integer
3228 minimum: 0
3229 count:
3230 name: count
3231 in: query
3232 required: false
3233 description: "Number of items to return"
3234 schema:
3235 type: integer
3236 default: 15
3237 maximum: 100
3238 minimum: 1
3239 sort:
3240 name: sort
3241 in: query
3242 required: false
3243 description: Sort column
3244 schema:
3245 type: string
3246 example: -createdAt
3247 search:
3248 name: search
3249 in: query
3250 required: false
3251 description: Plain text search, applied to various parts of the model depending on endpoint
3252 schema:
3253 type: string
3254 searchTarget:
3255 name: searchTarget
3256 in: query
3257 required: false
3258 description: >
3259 If the administrator enabled search index support, you can override the default search target.
3260
3261
3262 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
3263 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
3264 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3265 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3266 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
3267 * 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
3268 the data from the origin instance API
3269 schema:
3270 type: string
3271 enum:
3272 - 'local'
3273 - 'search-index'
3274 videosSort:
3275 name: sort
3276 in: query
3277 required: false
3278 description: Sort videos by criteria
3279 schema:
3280 type: string
3281 enum:
3282 - name
3283 - -duration
3284 - -createdAt
3285 - -publishedAt
3286 - -views
3287 - -likes
3288 - -trending
3289 videosSearchSort:
3290 name: sort
3291 in: query
3292 required: false
3293 description: Sort videos by criteria
3294 schema:
3295 type: string
3296 enum:
3297 - name
3298 - -duration
3299 - -createdAt
3300 - -publishedAt
3301 - -views
3302 - -likes
3303 - -match
3304 commentsSort:
3305 name: sort
3306 in: query
3307 required: false
3308 description: Sort comments by criteria
3309 schema:
3310 type: string
3311 enum:
3312 - -createdAt
3313 - -totalReplies
3314 blacklistsSort:
3315 name: sort
3316 in: query
3317 required: false
3318 description: Sort blacklists by criteria
3319 schema:
3320 type: string
3321 enum:
3322 - -id
3323 - name
3324 - -duration
3325 - -views
3326 - -likes
3327 - -dislikes
3328 - -uuid
3329 - -createdAt
3330 usersSearch:
3331 name: search
3332 in: query
3333 required: false
3334 description: Plain text search that will match with user usernames or emails
3335 schema:
3336 type: string
3337 usersBlocked:
3338 name: blocked
3339 in: query
3340 required: false
3341 description: Filter results down to (un)banned users
3342 schema:
3343 type: boolean
3344 usersSort:
3345 name: sort
3346 in: query
3347 required: false
3348 description: Sort users by criteria
3349 schema:
3350 type: string
3351 enum:
3352 - -id
3353 - -username
3354 - -createdAt
3355 abusesSort:
3356 name: sort
3357 in: query
3358 required: false
3359 description: Sort abuses by criteria
3360 schema:
3361 type: string
3362 enum:
3363 - -id
3364 - -createdAt
3365 - -state
3366 videoRedundanciesSort:
3367 name: sort
3368 in: query
3369 required: false
3370 description: Sort abuses by criteria
3371 schema:
3372 type: string
3373 enum:
3374 - name
3375 name:
3376 name: name
3377 in: path
3378 required: true
3379 description: The name of the account
3380 schema:
3381 type: string
3382 example: chocobozzz | chocobozzz@example.org
3383 id:
3384 name: id
3385 in: path
3386 required: true
3387 description: The user id
3388 schema:
3389 type: integer
3390 minimum: 0
3391 example: 42
3392 idOrUUID:
3393 name: id
3394 in: path
3395 required: true
3396 description: The object id or uuid
3397 schema:
3398 oneOf:
3399 - type: integer
3400 minimum: 0
3401 example: 42
3402 - type: string
3403 format: uuid
3404 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3405 playlistElementId:
3406 name: playlistElementId
3407 in: path
3408 required: true
3409 description: Playlist element id
3410 schema:
3411 type: integer
3412 abuseId:
3413 name: abuseId
3414 in: path
3415 required: true
3416 description: Abuse id
3417 schema:
3418 type: integer
3419 abuseMessageId:
3420 name: abuseMessageId
3421 in: path
3422 required: true
3423 description: Abuse message id
3424 schema:
3425 type: integer
3426 captionLanguage:
3427 name: captionLanguage
3428 in: path
3429 required: true
3430 description: The caption language
3431 schema:
3432 type: string
3433 channelHandle:
3434 name: channelHandle
3435 in: path
3436 required: true
3437 description: The video channel handle
3438 schema:
3439 type: string
3440 example: my_username | my_username@example.com
3441 subscriptionHandle:
3442 name: subscriptionHandle
3443 in: path
3444 required: true
3445 description: The subscription handle
3446 schema:
3447 type: string
3448 example: my_username | my_username@example.com
3449 threadId:
3450 name: threadId
3451 in: path
3452 required: true
3453 description: The thread id (root comment id)
3454 schema:
3455 type: integer
3456 commentId:
3457 name: commentId
3458 in: path
3459 required: true
3460 description: The comment id
3461 schema:
3462 type: integer
3463 categoryOneOf:
3464 name: categoryOneOf
3465 in: query
3466 required: false
3467 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
3468 schema:
3469 oneOf:
3470 - type: integer
3471 - type: array
3472 items:
3473 type: integer
3474 style: form
3475 explode: false
3476 tagsOneOf:
3477 name: tagsOneOf
3478 in: query
3479 required: false
3480 description: tag(s) of the video
3481 schema:
3482 oneOf:
3483 - type: string
3484 - type: array
3485 items:
3486 type: string
3487 style: form
3488 explode: false
3489 tagsAllOf:
3490 name: tagsAllOf
3491 in: query
3492 required: false
3493 description: tag(s) of the video, where all should be present in the video
3494 schema:
3495 oneOf:
3496 - type: string
3497 - type: array
3498 items:
3499 type: string
3500 style: form
3501 explode: false
3502 languageOneOf:
3503 name: languageOneOf
3504 in: query
3505 required: false
3506 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
3507 schema:
3508 oneOf:
3509 - type: string
3510 - type: array
3511 items:
3512 type: string
3513 style: form
3514 explode: false
3515 licenceOneOf:
3516 name: licenceOneOf
3517 in: query
3518 required: false
3519 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
3520 schema:
3521 oneOf:
3522 - type: integer
3523 - type: array
3524 items:
3525 type: integer
3526 style: form
3527 explode: false
3528 skipCount:
3529 name: skipCount
3530 in: query
3531 required: false
3532 description: if you don't need the `total` in the response
3533 schema:
3534 type: string
3535 enum:
3536 - 'true'
3537 - 'false'
3538 default: 'false'
3539 nsfw:
3540 name: nsfw
3541 in: query
3542 required: false
3543 description: whether to include nsfw videos, if any
3544 schema:
3545 type: string
3546 enum:
3547 - 'true'
3548 - 'false'
3549 filter:
3550 name: filter
3551 in: query
3552 required: false
3553 description: >
3554 Special filters (local for instance) which might require special rights:
3555 * `local` - only videos local to the instance
3556 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
3557 schema:
3558 type: string
3559 enum:
3560 - local
3561 - all-local
3562 subscriptionsUris:
3563 name: uris
3564 in: query
3565 required: true
3566 description: list of uris to check if each is part of the user subscriptions
3567 schema:
3568 type: array
3569 items:
3570 type: string
3571 format: uri
3572 npmName:
3573 name: npmName
3574 in: path
3575 required: true
3576 description: name of the plugin/theme on npmjs.com or in its package.json
3577 schema:
3578 type: string
3579 example: peertube-plugin-auth-ldap
3580 securitySchemes:
3581 OAuth2:
3582 description: >
3583 In the header: *Authorization: Bearer <token\>*
3584
3585
3586 Authenticating via OAuth requires the following steps:
3587
3588
3589 - Have an account with sufficient authorization levels
3590
3591 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
3592 Bearer Token
3593
3594 - Make Authenticated Requests
3595 type: oauth2
3596 flows:
3597 password:
3598 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
3599 scopes:
3600 admin: Admin scope
3601 moderator: Moderator scope
3602 user: User scope
3603 schemas:
3604 VideoConstantNumber:
3605 properties:
3606 id:
3607 type: integer
3608 label:
3609 type: string
3610 VideoConstantString:
3611 properties:
3612 id:
3613 type: string
3614 label:
3615 type: string
3616
3617 VideoPlaylistPrivacySet:
3618 type: integer
3619 enum:
3620 - 1
3621 - 2
3622 - 3
3623 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
3624 VideoPlaylistPrivacyConstant:
3625 properties:
3626 id:
3627 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3628 label:
3629 type: string
3630
3631 VideoPlaylistTypeSet:
3632 type: integer
3633 enum:
3634 - 1
3635 - 2
3636 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
3637 VideoPlaylistTypeConstant:
3638 properties:
3639 id:
3640 $ref: '#/components/schemas/VideoPlaylistTypeSet'
3641 label:
3642 type: string
3643
3644 VideoPrivacySet:
3645 type: integer
3646 enum:
3647 - 1
3648 - 2
3649 - 3
3650 - 4
3651 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
3652 VideoPrivacyConstant:
3653 properties:
3654 id:
3655 $ref: '#/components/schemas/VideoPrivacySet'
3656 label:
3657 type: string
3658
3659 NSFWPolicy:
3660 type: string
3661 enum:
3662 - display
3663 - blur
3664 - do_not_list
3665
3666 UserRole:
3667 type: integer
3668 enum:
3669 - 0
3670 - 1
3671 - 2
3672 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
3673 example: 2
3674
3675 VideoStateConstant:
3676 properties:
3677 id:
3678 type: integer
3679 enum:
3680 - 1
3681 - 2
3682 - 3
3683 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
3684 label:
3685 type: string
3686
3687 AbuseStateSet:
3688 type: integer
3689 enum:
3690 - 1
3691 - 2
3692 - 3
3693 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
3694 AbuseStateConstant:
3695 properties:
3696 id:
3697 $ref: '#/components/schemas/AbuseStateSet'
3698 label:
3699 type: string
3700 AbusePredefinedReasons:
3701 type: array
3702 items:
3703 type: string
3704 enum:
3705 - violentOrAbusive
3706 - hatefulOrAbusive
3707 - spamOrMisleading
3708 - privacy
3709 - rights
3710 - serverRules
3711 - thumbnails
3712 - captions
3713 example: [spamOrMisleading]
3714
3715 VideoResolutionConstant:
3716 properties:
3717 id:
3718 type: integer
3719 description: 'Video resolution (240, 360, 720 ...)'
3720 example: 240
3721 label:
3722 type: string
3723 example: 240p
3724 VideoScheduledUpdate:
3725 properties:
3726 privacy:
3727 $ref: '#/components/schemas/VideoPrivacySet'
3728 updateAt:
3729 type: string
3730 format: date
3731 description: When to update the video
3732 required:
3733 - updateAt
3734 AccountSummary:
3735 properties:
3736 id:
3737 type: integer
3738 name:
3739 type: string
3740 displayName:
3741 type: string
3742 url:
3743 type: string
3744 format: url
3745 host:
3746 type: string
3747 format: hostname
3748 avatar:
3749 nullable: true
3750 allOf:
3751 - $ref: '#/components/schemas/Avatar'
3752 VideoChannelSummary:
3753 properties:
3754 id:
3755 type: integer
3756 name:
3757 type: string
3758 displayName:
3759 type: string
3760 url:
3761 type: string
3762 format: url
3763 host:
3764 type: string
3765 format: hostname
3766 avatar:
3767 nullable: true
3768 allOf:
3769 - $ref: '#/components/schemas/Avatar'
3770 PlaylistElement:
3771 properties:
3772 position:
3773 type: integer
3774 startTimestamp:
3775 type: integer
3776 stopTimestamp:
3777 type: integer
3778 video:
3779 nullable: true
3780 allOf:
3781 - $ref: '#/components/schemas/Video'
3782 VideoFile:
3783 properties:
3784 magnetUri:
3785 type: string
3786 resolution:
3787 $ref: '#/components/schemas/VideoResolutionConstant'
3788 size:
3789 type: integer
3790 description: 'Video file size in bytes'
3791 torrentUrl:
3792 type: string
3793 format: url
3794 torrentDownloadUrl:
3795 type: string
3796 format: url
3797 fileUrl:
3798 type: string
3799 format: url
3800 fileDownloadUrl:
3801 type: string
3802 format: url
3803 fps:
3804 type: number
3805 metadataUrl:
3806 type: string
3807 format: url
3808 VideoStreamingPlaylists:
3809 properties:
3810 id:
3811 type: integer
3812 type:
3813 type: integer
3814 enum:
3815 - 1
3816 description: 'Playlist type (HLS = `1`)'
3817 playlistUrl:
3818 type: string
3819 format: url
3820 segmentsSha256Url:
3821 type: string
3822 format: url
3823 files:
3824 type: array
3825 items:
3826 $ref: '#/components/schemas/VideoFile'
3827 redundancies:
3828 type: array
3829 items:
3830 type: object
3831 properties:
3832 baseUrl:
3833 type: string
3834 format: url
3835 VideoInfo:
3836 properties:
3837 id:
3838 type: integer
3839 uuid:
3840 type: string
3841 format: uuid
3842 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3843 name:
3844 type: string
3845 Video:
3846 properties:
3847 id:
3848 type: integer
3849 example: 8
3850 uuid:
3851 type: string
3852 format: uuid
3853 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3854 createdAt:
3855 type: string
3856 format: date-time
3857 publishedAt:
3858 type: string
3859 format: date-time
3860 updatedAt:
3861 type: string
3862 format: date-time
3863 originallyPublishedAt:
3864 type: string
3865 format: date-time
3866 category:
3867 $ref: '#/components/schemas/VideoConstantNumber'
3868 licence:
3869 $ref: '#/components/schemas/VideoConstantNumber'
3870 language:
3871 $ref: '#/components/schemas/VideoConstantString'
3872 privacy:
3873 $ref: '#/components/schemas/VideoPrivacyConstant'
3874 description:
3875 type: string
3876 duration:
3877 type: integer
3878 example: 1419
3879 isLocal:
3880 type: boolean
3881 name:
3882 type: string
3883 example: What is PeerTube?
3884 thumbnailPath:
3885 type: string
3886 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3887 previewPath:
3888 type: string
3889 example: /static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3890 embedPath:
3891 type: string
3892 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
3893 views:
3894 type: integer
3895 example: 1337
3896 likes:
3897 type: integer
3898 example: 42
3899 dislikes:
3900 type: integer
3901 example: 7
3902 nsfw:
3903 type: boolean
3904 waitTranscoding:
3905 type: boolean
3906 nullable: true
3907 state:
3908 $ref: '#/components/schemas/VideoStateConstant'
3909 scheduledUpdate:
3910 nullable: true
3911 allOf:
3912 - $ref: '#/components/schemas/VideoScheduledUpdate'
3913 blacklisted:
3914 nullable: true
3915 type: boolean
3916 blacklistedReason:
3917 nullable: true
3918 type: string
3919 account:
3920 $ref: '#/components/schemas/AccountSummary'
3921 channel:
3922 $ref: '#/components/schemas/VideoChannelSummary'
3923 userHistory:
3924 nullable: true
3925 type: object
3926 properties:
3927 currentTime:
3928 type: integer
3929 VideoDetails:
3930 allOf:
3931 - $ref: '#/components/schemas/Video'
3932 - type: object
3933 properties:
3934 descriptionPath:
3935 type: string
3936 support:
3937 type: string
3938 description: A text tell the audience how to support the video creator
3939 example: Please support my work on <insert crowdfunding plateform>! <3
3940 channel:
3941 $ref: '#/components/schemas/VideoChannel'
3942 account:
3943 $ref: '#/components/schemas/Account'
3944 tags:
3945 type: array
3946 items:
3947 type: string
3948 example: [flowers, gardening]
3949 files:
3950 type: array
3951 items:
3952 $ref: '#/components/schemas/VideoFile'
3953 commentsEnabled:
3954 type: boolean
3955 downloadEnabled:
3956 type: boolean
3957 trackerUrls:
3958 type: array
3959 items:
3960 type: string
3961 format: url
3962 streamingPlaylists:
3963 type: array
3964 items:
3965 $ref: '#/components/schemas/VideoStreamingPlaylists'
3966 FileRedundancyInformation:
3967 properties:
3968 id:
3969 type: integer
3970 fileUrl:
3971 type: string
3972 format: url
3973 strategy:
3974 type: string
3975 enum:
3976 - manual
3977 - most-views
3978 - trending
3979 - recently-added
3980 size:
3981 type: integer
3982 createdAt:
3983 type: string
3984 format: date-time
3985 updatedAt:
3986 type: string
3987 format: date-time
3988 expiresOn:
3989 type: string
3990 format: date-time
3991 VideoRedundancy:
3992 properties:
3993 id:
3994 type: integer
3995 name:
3996 type: string
3997 url:
3998 type: string
3999 format: url
4000 uuid:
4001 type: string
4002 format: uuid
4003 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4004 redundancies:
4005 type: object
4006 properties:
4007 files:
4008 type: array
4009 items:
4010 $ref: '#/components/schemas/FileRedundancyInformation'
4011 streamingPlaylists:
4012 type: array
4013 items:
4014 $ref: '#/components/schemas/FileRedundancyInformation'
4015 VideoImportStateConstant:
4016 properties:
4017 id:
4018 type: integer
4019 enum:
4020 - 1
4021 - 2
4022 - 3
4023 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
4024 label:
4025 type: string
4026 example: Pending
4027 VideoImport:
4028 properties:
4029 id:
4030 type: integer
4031 example: 2
4032 targetUrl:
4033 type: string
4034 format: url
4035 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
4036 magnetUri:
4037 type: string
4038 format: uri
4039 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
4040 torrentName:
4041 type: string
4042 state:
4043 $ref: '#/components/schemas/VideoImportStateConstant'
4044 error:
4045 type: string
4046 createdAt:
4047 type: string
4048 format: date-time
4049 updatedAt:
4050 type: string
4051 format: date-time
4052 video:
4053 $ref: '#/components/schemas/Video'
4054 Abuse:
4055 properties:
4056 id:
4057 type: integer
4058 example: 7
4059 reason:
4060 type: string
4061 example: The video is a spam
4062 predefinedReasons:
4063 $ref: '#/components/schemas/AbusePredefinedReasons'
4064 reporterAccount:
4065 $ref: '#/components/schemas/Account'
4066 state:
4067 $ref: '#/components/schemas/AbuseStateConstant'
4068 moderationComment:
4069 type: string
4070 example: Decided to ban the server since it spams us regularly
4071 video:
4072 type: object
4073 properties:
4074 id:
4075 type: integer
4076 name:
4077 type: string
4078 uuid:
4079 type: string
4080 format: uuid
4081 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4082 createdAt:
4083 type: string
4084 format: date-time
4085 AbuseMessage:
4086 properties:
4087 id:
4088 type: integer
4089 message:
4090 type: string
4091 byModerator:
4092 type: boolean
4093 createdAt:
4094 type: string
4095 format: date-time
4096 account:
4097 $ref: '#/components/schemas/AccountSummary'
4098 VideoBlacklist:
4099 properties:
4100 id:
4101 type: integer
4102 videoId:
4103 type: integer
4104 createdAt:
4105 type: string
4106 format: date-time
4107 updatedAt:
4108 type: string
4109 format: date-time
4110 name:
4111 type: string
4112 uuid:
4113 type: string
4114 format: uuid
4115 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4116 description:
4117 type: string
4118 duration:
4119 type: integer
4120 views:
4121 type: integer
4122 likes:
4123 type: integer
4124 dislikes:
4125 type: integer
4126 nsfw:
4127 type: boolean
4128 VideoChannel:
4129 properties:
4130 displayName:
4131 type: string
4132 description:
4133 type: string
4134 isLocal:
4135 type: boolean
4136 ownerAccount:
4137 type: object
4138 properties:
4139 id:
4140 type: integer
4141 uuid:
4142 type: string
4143 format: uuid
4144 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4145 VideoPlaylist:
4146 properties:
4147 id:
4148 type: integer
4149 createdAt:
4150 type: string
4151 format: date-time
4152 updatedAt:
4153 type: string
4154 format: date-time
4155 description:
4156 type: string
4157 uuid:
4158 type: string
4159 format: uuid
4160 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4161 displayName:
4162 type: string
4163 isLocal:
4164 type: boolean
4165 videoLength:
4166 type: integer
4167 thumbnailPath:
4168 type: string
4169 privacy:
4170 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
4171 type:
4172 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
4173 ownerAccount:
4174 $ref: '#/components/schemas/AccountSummary'
4175 videoChannel:
4176 $ref: '#/components/schemas/VideoChannelSummary'
4177 VideoComment:
4178 properties:
4179 id:
4180 type: integer
4181 url:
4182 type: string
4183 format: url
4184 text:
4185 type: string
4186 threadId:
4187 type: integer
4188 inReplyToCommentId:
4189 type: integer
4190 videoId:
4191 type: integer
4192 createdAt:
4193 type: string
4194 format: date-time
4195 updatedAt:
4196 type: string
4197 format: date-time
4198 totalRepliesFromVideoAuthor:
4199 type: integer
4200 totalReplies:
4201 type: integer
4202 account:
4203 $ref: '#/components/schemas/Account'
4204 VideoCommentThreadTree:
4205 properties:
4206 comment:
4207 $ref: '#/components/schemas/VideoComment'
4208 children:
4209 type: array
4210 items:
4211 $ref: '#/components/schemas/VideoCommentThreadTree'
4212 VideoCaption:
4213 properties:
4214 language:
4215 $ref: '#/components/schemas/VideoConstantString'
4216 captionPath:
4217 type: string
4218 Avatar:
4219 properties:
4220 path:
4221 type: string
4222 createdAt:
4223 type: string
4224 format: date-time
4225 updatedAt:
4226 type: string
4227 format: date-time
4228 ActorInfo:
4229 properties:
4230 id:
4231 type: integer
4232 example: 11
4233 name:
4234 type: string
4235 displayName:
4236 type: string
4237 host:
4238 type: string
4239 format: hostname
4240 avatar:
4241 nullable: true
4242 type: object
4243 properties:
4244 path:
4245 type: string
4246 Actor:
4247 properties:
4248 id:
4249 type: integer
4250 example: 11
4251 url:
4252 type: string
4253 format: url
4254 name:
4255 type: string
4256 host:
4257 type: string
4258 format: hostname
4259 followingCount:
4260 type: integer
4261 followersCount:
4262 type: integer
4263 createdAt:
4264 type: string
4265 format: date-time
4266 updatedAt:
4267 type: string
4268 format: date-time
4269 avatar:
4270 $ref: '#/components/schemas/Avatar'
4271 Account:
4272 allOf:
4273 - $ref: '#/components/schemas/Actor'
4274 - properties:
4275 userId:
4276 type: string
4277 example: 2
4278 displayName:
4279 type: string
4280 description:
4281 type: string
4282 UserWatchingVideo:
4283 properties:
4284 currentTime:
4285 type: integer
4286 description: timestamp within the video, in seconds
4287 example: 5
4288 ServerConfig:
4289 properties:
4290 instance:
4291 type: object
4292 properties:
4293 name:
4294 type: string
4295 shortDescription:
4296 type: string
4297 defaultClientRoute:
4298 type: string
4299 isNSFW:
4300 type: boolean
4301 defaultNSFWPolicy:
4302 type: string
4303 customizations:
4304 type: object
4305 properties:
4306 javascript:
4307 type: string
4308 css:
4309 type: string
4310 search:
4311 type: object
4312 properties:
4313 remoteUri:
4314 type: object
4315 properties:
4316 users:
4317 type: boolean
4318 anonymous:
4319 type: boolean
4320 plugin:
4321 type: object
4322 properties:
4323 registered:
4324 type: array
4325 items:
4326 type: string
4327 theme:
4328 type: object
4329 properties:
4330 registered:
4331 type: array
4332 items:
4333 type: string
4334 email:
4335 type: object
4336 properties:
4337 enabled:
4338 type: boolean
4339 contactForm:
4340 type: object
4341 properties:
4342 enabled:
4343 type: boolean
4344 serverVersion:
4345 type: string
4346 serverCommit:
4347 type: string
4348 signup:
4349 type: object
4350 properties:
4351 allowed:
4352 type: boolean
4353 allowedForCurrentIP:
4354 type: boolean
4355 requiresEmailVerification:
4356 type: boolean
4357 transcoding:
4358 type: object
4359 properties:
4360 hls:
4361 type: object
4362 properties:
4363 enabled:
4364 type: boolean
4365 webtorrent:
4366 type: object
4367 properties:
4368 enabled:
4369 type: boolean
4370 enabledResolutions:
4371 type: array
4372 items:
4373 type: integer
4374 import:
4375 type: object
4376 properties:
4377 videos:
4378 type: object
4379 properties:
4380 http:
4381 type: object
4382 properties:
4383 enabled:
4384 type: boolean
4385 torrent:
4386 type: object
4387 properties:
4388 enabled:
4389 type: boolean
4390 autoBlacklist:
4391 type: object
4392 properties:
4393 videos:
4394 type: object
4395 properties:
4396 ofUsers:
4397 type: object
4398 properties:
4399 enabled:
4400 type: boolean
4401 avatar:
4402 type: object
4403 properties:
4404 file:
4405 type: object
4406 properties:
4407 size:
4408 type: object
4409 properties:
4410 max:
4411 type: integer
4412 extensions:
4413 type: array
4414 items:
4415 type: string
4416 video:
4417 type: object
4418 properties:
4419 image:
4420 type: object
4421 properties:
4422 extensions:
4423 type: array
4424 items:
4425 type: string
4426 size:
4427 type: object
4428 properties:
4429 max:
4430 type: integer
4431 file:
4432 type: object
4433 properties:
4434 extensions:
4435 type: array
4436 items:
4437 type: string
4438 videoCaption:
4439 type: object
4440 properties:
4441 file:
4442 type: object
4443 properties:
4444 size:
4445 type: object
4446 properties:
4447 max:
4448 type: integer
4449 extensions:
4450 type: array
4451 items:
4452 type: string
4453 user:
4454 type: object
4455 properties:
4456 videoQuota:
4457 type: integer
4458 videoQuotaDaily:
4459 type: integer
4460 trending:
4461 type: object
4462 properties:
4463 videos:
4464 type: object
4465 properties:
4466 intervalDays:
4467 type: integer
4468 tracker:
4469 type: object
4470 properties:
4471 enabled:
4472 type: boolean
4473 followings:
4474 type: object
4475 properties:
4476 instance:
4477 type: object
4478 properties:
4479 autoFollowIndex:
4480 type: object
4481 properties:
4482 indexUrl:
4483 type: string
4484 format: url
4485 ServerConfigAbout:
4486 properties:
4487 instance:
4488 type: object
4489 properties:
4490 name:
4491 type: string
4492 shortDescription:
4493 type: string
4494 description:
4495 type: string
4496 terms:
4497 type: string
4498 ServerConfigCustom:
4499 properties:
4500 instance:
4501 type: object
4502 properties:
4503 name:
4504 type: string
4505 shortDescription:
4506 type: string
4507 description:
4508 type: string
4509 terms:
4510 type: string
4511 defaultClientRoute:
4512 type: string
4513 isNSFW:
4514 type: boolean
4515 defaultNSFWPolicy:
4516 type: string
4517 customizations:
4518 type: object
4519 properties:
4520 javascript:
4521 type: string
4522 css:
4523 type: string
4524 theme:
4525 type: object
4526 properties:
4527 default:
4528 type: string
4529 services:
4530 type: object
4531 properties:
4532 twitter:
4533 type: object
4534 properties:
4535 username:
4536 type: string
4537 whitelisted:
4538 type: boolean
4539 cache:
4540 type: object
4541 properties:
4542 previews:
4543 type: object
4544 properties:
4545 size:
4546 type: integer
4547 captions:
4548 type: object
4549 properties:
4550 size:
4551 type: integer
4552 signup:
4553 type: object
4554 properties:
4555 enabled:
4556 type: boolean
4557 limit:
4558 type: integer
4559 requiresEmailVerification:
4560 type: boolean
4561 admin:
4562 type: object
4563 properties:
4564 email:
4565 type: string
4566 format: email
4567 contactForm:
4568 type: object
4569 properties:
4570 enabled:
4571 type: boolean
4572 user:
4573 type: object
4574 properties:
4575 videoQuota:
4576 type: integer
4577 videoQuotaDaily:
4578 type: integer
4579 transcoding:
4580 type: object
4581 properties:
4582 enabled:
4583 type: boolean
4584 allowAdditionalExtensions:
4585 type: boolean
4586 allowAudioFiles:
4587 type: boolean
4588 threads:
4589 type: integer
4590 resolutions:
4591 type: object
4592 properties:
4593 240p:
4594 type: boolean
4595 360p:
4596 type: boolean
4597 480p:
4598 type: boolean
4599 720p:
4600 type: boolean
4601 1080p:
4602 type: boolean
4603 2160p:
4604 type: boolean
4605 hls:
4606 type: object
4607 properties:
4608 enabled:
4609 type: boolean
4610 import:
4611 type: object
4612 properties:
4613 videos:
4614 type: object
4615 properties:
4616 http:
4617 type: object
4618 properties:
4619 enabled:
4620 type: boolean
4621 torrent:
4622 type: object
4623 properties:
4624 enabled:
4625 type: boolean
4626 autoBlacklist:
4627 type: object
4628 properties:
4629 videos:
4630 type: object
4631 properties:
4632 ofUsers:
4633 type: object
4634 properties:
4635 enabled:
4636 type: boolean
4637 followers:
4638 type: object
4639 properties:
4640 instance:
4641 type: object
4642 properties:
4643 enabled:
4644 type: boolean
4645 manualApproval:
4646 type: boolean
4647 Follow:
4648 properties:
4649 id:
4650 type: integer
4651 follower:
4652 $ref: '#/components/schemas/Actor'
4653 following:
4654 $ref: '#/components/schemas/Actor'
4655 score:
4656 type: number
4657 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
4658 state:
4659 type: string
4660 enum:
4661 - pending
4662 - accepted
4663 createdAt:
4664 type: string
4665 format: date-time
4666 updatedAt:
4667 type: string
4668 format: date-time
4669
4670 PredefinedAbuseReasons:
4671 description: Reason categories that help triage reports
4672 type: array
4673 items:
4674 type: string
4675 enum:
4676 - violentOrAbusive
4677 - hatefulOrAbusive
4678 - spamOrMisleading
4679 - privacy
4680 - rights
4681 - serverRules
4682 - thumbnails
4683 - captions
4684
4685 Job:
4686 properties:
4687 id:
4688 type: integer
4689 minimum: 0
4690 example: 42
4691 state:
4692 type: string
4693 enum:
4694 - active
4695 - completed
4696 - failed
4697 - waiting
4698 - delayed
4699 type:
4700 type: string
4701 enum:
4702 - activitypub-http-unicast
4703 - activitypub-http-broadcast
4704 - activitypub-http-fetcher
4705 - activitypub-follow
4706 - video-file-import
4707 - video-transcoding
4708 - email
4709 - video-import
4710 - videos-views
4711 - activitypub-refresher
4712 - video-redundancy
4713 data:
4714 type: object
4715 additionalProperties: true
4716 error:
4717 type: object
4718 additionalProperties: true
4719 createdAt:
4720 type: string
4721 format: date-time
4722 finishedOn:
4723 type: string
4724 format: date-time
4725 processedOn:
4726 type: string
4727 format: date-time
4728 AddUserResponse:
4729 properties:
4730 user:
4731 type: object
4732 properties:
4733 id:
4734 type: integer
4735 example: 8
4736 account:
4737 type: object
4738 properties:
4739 id:
4740 type: integer
4741 example: 37
4742 VideoUploadResponse:
4743 properties:
4744 video:
4745 type: object
4746 properties:
4747 id:
4748 type: integer
4749 example: 8
4750 uuid:
4751 type: string
4752 format: uuid
4753 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4754 CommentThreadResponse:
4755 properties:
4756 total:
4757 type: integer
4758 example: 1
4759 data:
4760 type: array
4761 maxItems: 100
4762 items:
4763 $ref: '#/components/schemas/VideoComment'
4764 CommentThreadPostResponse:
4765 properties:
4766 comment:
4767 $ref: '#/components/schemas/VideoComment'
4768 VideoListResponse:
4769 properties:
4770 total:
4771 type: integer
4772 example: 1
4773 data:
4774 type: array
4775 maxItems: 100
4776 items:
4777 $ref: '#/components/schemas/Video'
4778 User:
4779 properties:
4780 id:
4781 type: integer
4782 readOnly: true
4783 username:
4784 type: string
4785 description: The user username
4786 minLength: 1
4787 maxLength: 50
4788 email:
4789 type: string
4790 format: email
4791 description: The user email
4792 theme:
4793 type: string
4794 description: Theme enabled by this user
4795 emailVerified:
4796 type: boolean
4797 description: Has the user confirmed their email address?
4798 nsfwPolicy:
4799 $ref: '#/components/schemas/NSFWPolicy'
4800 webtorrentEnabled:
4801 type: boolean
4802 description: Enable P2P in the player
4803 autoPlayVideo:
4804 type: boolean
4805 description: Automatically start playing the video on the watch page
4806 role:
4807 $ref: '#/components/schemas/UserRole'
4808 roleLabel:
4809 type: string
4810 enum:
4811 - User
4812 - Moderator
4813 - Administrator
4814 videoQuota:
4815 type: integer
4816 description: The user video quota
4817 videoQuotaDaily:
4818 type: integer
4819 description: The user daily video quota
4820 videosCount:
4821 type: integer
4822 abusesCount:
4823 type: integer
4824 abusesAcceptedCount:
4825 type: integer
4826 abusesCreatedCount:
4827 type: integer
4828 videoCommentsCount:
4829 type: integer
4830 noInstanceConfigWarningModal:
4831 type: boolean
4832 noWelcomeModal:
4833 type: boolean
4834 blocked:
4835 type: boolean
4836 blockedReason:
4837 type: string
4838 createdAt:
4839 type: string
4840 account:
4841 $ref: '#/components/schemas/Account'
4842 videoChannels:
4843 type: array
4844 items:
4845 $ref: '#/components/schemas/VideoChannel'
4846 AddUser:
4847 properties:
4848 username:
4849 type: string
4850 description: The user username
4851 minLength: 1
4852 maxLength: 50
4853 password:
4854 type: string
4855 format: password
4856 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
4857 minLength: 6
4858 maxLength: 255
4859 email:
4860 type: string
4861 format: email
4862 description: The user email
4863 videoQuota:
4864 type: integer
4865 description: The user video quota
4866 videoQuotaDaily:
4867 type: integer
4868 description: The user daily video quota
4869 role:
4870 $ref: '#/components/schemas/UserRole'
4871 required:
4872 - username
4873 - password
4874 - email
4875 - videoQuota
4876 - videoQuotaDaily
4877 - role
4878 UpdateUser:
4879 properties:
4880 id:
4881 type: string
4882 description: The user id
4883 email:
4884 type: string
4885 format: email
4886 description: The updated email of the user
4887 videoQuota:
4888 type: integer
4889 description: The updated video quota of the user
4890 videoQuotaDaily:
4891 type: integer
4892 description: The updated daily video quota of the user
4893 role:
4894 $ref: '#/components/schemas/UserRole'
4895 required:
4896 - id
4897 - email
4898 - videoQuota
4899 - videoQuotaDaily
4900 - role
4901 UpdateMe:
4902 properties:
4903 password:
4904 type: string
4905 format: password
4906 description: Your new password
4907 minLength: 6
4908 maxLength: 255
4909 email:
4910 type: string
4911 format: email
4912 description: Your new email
4913 displayNSFW:
4914 type: string
4915 description: Your new displayNSFW
4916 enum:
4917 - 'true'
4918 - 'false'
4919 - both
4920 autoPlayVideo:
4921 type: boolean
4922 description: Your new autoPlayVideo
4923 required:
4924 - password
4925 - email
4926 - displayNSFW
4927 - autoPlayVideo
4928 GetMeVideoRating:
4929 properties:
4930 id:
4931 type: string
4932 description: Id of the video
4933 rating:
4934 type: number
4935 description: Rating of the video
4936 required:
4937 - id
4938 - rating
4939 VideoRating:
4940 properties:
4941 video:
4942 $ref: '#/components/schemas/Video'
4943 rating:
4944 type: number
4945 description: 'Rating of the video'
4946 required:
4947 - video
4948 - rating
4949 RegisterUser:
4950 properties:
4951 username:
4952 type: string
4953 description: The username of the user
4954 minLength: 1
4955 maxLength: 50
4956 pattern: '/^[a-z0-9._]{1,50}$/'
4957 password:
4958 type: string
4959 format: password
4960 description: The password of the user
4961 minLength: 6
4962 maxLength: 255
4963 email:
4964 type: string
4965 format: email
4966 description: The email of the user
4967 displayName:
4968 type: string
4969 description: The user display name
4970 minLength: 1
4971 maxLength: 120
4972 channel:
4973 type: object
4974 properties:
4975 name:
4976 type: string
4977 description: The name for the default channel
4978 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
4979 displayName:
4980 type: string
4981 description: The display name for the default channel
4982 minLength: 1
4983 maxLength: 120
4984 required:
4985 - username
4986 - password
4987 - email
4988 VideoChannelCreate:
4989 properties:
4990 name:
4991 type: string
4992 displayName:
4993 type: string
4994 description:
4995 type: string
4996 support:
4997 type: string
4998 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
4999 example: Please support my work on <insert crowdfunding plateform>! <3
5000 required:
5001 - name
5002 - displayName
5003 VideoChannelUpdate:
5004 properties:
5005 displayName:
5006 type: string
5007 description:
5008 type: string
5009 support:
5010 type: string
5011 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
5012 example: Please support my work on <insert crowdfunding plateform>! <3
5013 bulkVideosSupportUpdate:
5014 type: boolean
5015 description: 'Update the support field for all videos of this channel'
5016
5017 MRSSPeerLink:
5018 type: object
5019 xml:
5020 name: 'media:peerLink'
5021 properties:
5022 href:
5023 type: string
5024 xml:
5025 attribute: true
5026 type:
5027 type: string
5028 enum:
5029 - application/x-bittorrent
5030 xml:
5031 attribute: true
5032 MRSSGroupContent:
5033 type: object
5034 xml:
5035 name: 'media:content'
5036 properties:
5037 url:
5038 type: string
5039 format: url
5040 xml:
5041 attribute: true
5042 fileSize:
5043 type: integer
5044 xml:
5045 attribute: true
5046 type:
5047 type: string
5048 xml:
5049 attribute: true
5050 framerate:
5051 type: integer
5052 xml:
5053 attribute: true
5054 duration:
5055 type: integer
5056 xml:
5057 attribute: true
5058 height:
5059 type: integer
5060 xml:
5061 attribute: true
5062 lang:
5063 type: string
5064 xml:
5065 attribute: true
5066 VideoCommentsForXML:
5067 type: array
5068 xml:
5069 wrapped: true
5070 name: 'channel'
5071 items:
5072 type: object
5073 xml:
5074 name: 'item'
5075 properties:
5076 link:
5077 type: string
5078 format: url
5079 guid:
5080 type: string
5081 pubDate:
5082 type: string
5083 format: date-time
5084 'content:encoded':
5085 type: string
5086 'dc:creator':
5087 type: string
5088 VideosForXML:
5089 type: array
5090 xml:
5091 wrapped: true
5092 name: 'channel'
5093 items:
5094 type: object
5095 xml:
5096 name: 'item'
5097 properties:
5098 link:
5099 type: string
5100 format: url
5101 description: video watch page URL
5102 guid:
5103 type: string
5104 description: video canonical URL
5105 pubDate:
5106 type: string
5107 format: date-time
5108 description: video publication date
5109 description:
5110 type: string
5111 description: video description
5112 'content:encoded':
5113 type: string
5114 description: video description
5115 'dc:creator':
5116 type: string
5117 description: publisher user name
5118 'media:category':
5119 type: integer
5120 description: video category (MRSS)
5121 'media:community':
5122 type: object
5123 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5124 properties:
5125 'media:statistics':
5126 type: object
5127 properties:
5128 views:
5129 type: integer
5130 xml:
5131 attribute: true
5132 'media:embed':
5133 type: object
5134 properties:
5135 url:
5136 type: string
5137 format: url
5138 description: video embed path, relative to the canonical URL domain (MRSS)
5139 xml:
5140 attribute: true
5141 'media:player':
5142 type: object
5143 properties:
5144 url:
5145 type: string
5146 format: url
5147 description: video watch path, relative to the canonical URL domain (MRSS)
5148 xml:
5149 attribute: true
5150 'media:thumbnail':
5151 type: object
5152 properties:
5153 url:
5154 type: string
5155 format: url
5156 xml:
5157 attribute: true
5158 height:
5159 type: integer
5160 xml:
5161 attribute: true
5162 width:
5163 type: integer
5164 xml:
5165 attribute: true
5166 'media:title':
5167 type: string
5168 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
5169 'media:description':
5170 type: string
5171 'media:rating':
5172 type: string
5173 enum:
5174 - nonadult
5175 - adult
5176 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
5177 'enclosure':
5178 type: object
5179 description: main streamable file for the video
5180 properties:
5181 url:
5182 type: string
5183 format: url
5184 xml:
5185 attribute: true
5186 type:
5187 type: string
5188 enum:
5189 - application/x-bittorrent
5190 xml:
5191 attribute: true
5192 length:
5193 type: integer
5194 xml:
5195 attribute: true
5196 'media:group':
5197 type: array
5198 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)
5199 items:
5200 anyOf:
5201 - $ref: '#/components/schemas/MRSSPeerLink'
5202 - $ref: '#/components/schemas/MRSSGroupContent'
5203 NotificationSettingValue:
5204 type: integer
5205 description: >
5206 Notification type
5207
5208 - `0` NONE
5209
5210 - `1` WEB
5211
5212 - `2` EMAIL
5213 enum:
5214 - 0
5215 - 1
5216 - 3
5217 Notification:
5218 properties:
5219 id:
5220 type: integer
5221 type:
5222 type: integer
5223 description: >
5224 Notification type, following the `UserNotificationType` enum:
5225
5226 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
5227
5228 - `2` NEW_COMMENT_ON_MY_VIDEO
5229
5230 - `3` NEW_ABUSE_FOR_MODERATORS
5231
5232 - `4` BLACKLIST_ON_MY_VIDEO
5233
5234 - `5` UNBLACKLIST_ON_MY_VIDEO
5235
5236 - `6` MY_VIDEO_PUBLISHED
5237
5238 - `7` MY_VIDEO_IMPORT_SUCCESS
5239
5240 - `8` MY_VIDEO_IMPORT_ERROR
5241
5242 - `9` NEW_USER_REGISTRATION
5243
5244 - `10` NEW_FOLLOW
5245
5246 - `11` COMMENT_MENTION
5247
5248 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
5249
5250 - `13` NEW_INSTANCE_FOLLOWER
5251
5252 - `14` AUTO_INSTANCE_FOLLOWING
5253 read:
5254 type: boolean
5255 video:
5256 nullable: true
5257 allOf:
5258 - $ref: '#/components/schemas/VideoInfo'
5259 - type: object
5260 properties:
5261 channel:
5262 $ref: '#/components/schemas/ActorInfo'
5263 videoImport:
5264 nullable: true
5265 type: object
5266 properties:
5267 id:
5268 type: integer
5269 video:
5270 nullable: true
5271 $ref: '#/components/schemas/VideoInfo'
5272 torrentName:
5273 type: string
5274 nullable: true
5275 magnetUri:
5276 type: string
5277 format: uri
5278 nullable: true
5279 targetUri:
5280 type: string
5281 format: uri
5282 nullable: true
5283 comment:
5284 nullable: true
5285 type: object
5286 properties:
5287 id:
5288 type: integer
5289 threadId:
5290 type: integer
5291 video:
5292 $ref: '#/components/schemas/VideoInfo'
5293 account:
5294 $ref: '#/components/schemas/ActorInfo'
5295 videoAbuse:
5296 nullable: true
5297 type: object
5298 properties:
5299 id:
5300 type: integer
5301 video:
5302 allOf:
5303 - $ref: '#/components/schemas/VideoInfo'
5304 videoBlacklist:
5305 nullable: true
5306 type: object
5307 properties:
5308 id:
5309 type: integer
5310 video:
5311 allOf:
5312 - $ref: '#/components/schemas/VideoInfo'
5313 account:
5314 nullable: true
5315 allOf:
5316 - $ref: '#/components/schemas/ActorInfo'
5317 actorFollow:
5318 type: object
5319 nullable: true
5320 properties:
5321 id:
5322 type: integer
5323 follower:
5324 $ref: '#/components/schemas/ActorInfo'
5325 state:
5326 type: string
5327 enum:
5328 - pending
5329 - accepted
5330 following:
5331 type: object
5332 properties:
5333 type:
5334 type: string
5335 enum:
5336 - account
5337 - channel
5338 - instance
5339 name:
5340 type: string
5341 displayName:
5342 type: string
5343 host:
5344 type: string
5345 format: hostname
5346 createdAt:
5347 type: string
5348 format: date-time
5349 updatedAt:
5350 type: string
5351 format: date-time
5352 NotificationListResponse:
5353 properties:
5354 total:
5355 type: integer
5356 example: 1
5357 data:
5358 type: array
5359 maxItems: 100
5360 items:
5361 $ref: '#/components/schemas/Notification'
5362 Plugin:
5363 properties:
5364 name:
5365 type: string
5366 example: peertube-plugin-auth-ldap
5367 type:
5368 type: integer
5369 description: >
5370 - `1`: PLUGIN
5371
5372 - `2`: THEME
5373 enum:
5374 - 1
5375 - 2
5376 latestVersion:
5377 type: string
5378 example: 0.0.3
5379 version:
5380 type: string
5381 example: 0.0.1
5382 enabled:
5383 type: boolean
5384 uninstalled:
5385 type: boolean
5386 peertubeEngine:
5387 type: string
5388 example: 2.2.0
5389 description:
5390 type: string
5391 homepage:
5392 type: string
5393 format: url
5394 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
5395 settings:
5396 type: object
5397 additionalProperties: true
5398 createdAt:
5399 type: string
5400 format: date-time
5401 updatedAt:
5402 type: string
5403 format: date-time
5404 PluginResponse:
5405 properties:
5406 total:
5407 type: integer
5408 example: 1
5409 data:
5410 type: array
5411 maxItems: 100
5412 items:
5413 $ref: '#/components/schemas/Plugin'
5414 callbacks:
5415 searchIndex:
5416 'https://search.example.org/api/v1/search/videos':
5417 post:
5418 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
5419 responses:
5420 '200':
5421 description: successful operation
5422 content:
5423 application/json:
5424 schema:
5425 $ref: '#/components/schemas/VideoListResponse'