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