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