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