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