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