]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/doc/api/openapi.yaml
Remove invalid info from REST API doc
[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 hour, 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 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2106 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2107 requestBody:
2108 content:
2109 application/octet-stream:
2110 schema:
2111 type: string
2112 format: binary
2113 responses:
2114 '200':
2115 description: last chunk received
2116 headers:
2117 Content-Length:
2118 schema:
2119 type: number
2120 content:
2121 application/json:
2122 schema:
2123 $ref: '#/components/schemas/VideoUploadResponse'
2124 '308':
2125 description: resume incomplete
2126 headers:
2127 Range:
2128 schema:
2129 type: string
2130 example: bytes=0-262143
2131 Content-Length:
2132 schema:
2133 type: number
2134 example: 0
2135 '403':
2136 description: video didn't pass upload filter
2137 '404':
2138 description: upload not found
2139 '409':
2140 description: chunk doesn't match range
2141 '422':
2142 description: video unreadable
2143 '429':
2144 description: too many concurrent requests
2145 '503':
2146 description: upload is already being processed
2147 headers:
2148 'Retry-After':
2149 schema:
2150 type: number
2151 example: 300
2152 delete:
2153 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2154 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2155 operationId: uploadResumableCancel
2156 security:
2157 - OAuth2: []
2158 tags:
2159 - Video
2160 - Video Upload
2161 parameters:
2162 - name: upload_id
2163 in: query
2164 required: true
2165 description: |
2166 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2167 not valid anymore and the upload session has already been deleted with its data ;-)
2168 schema:
2169 type: string
2170 - name: Content-Length
2171 in: header
2172 required: true
2173 schema:
2174 type: number
2175 example: 0
2176 responses:
2177 '204':
2178 description: upload cancelled
2179 headers:
2180 Content-Length:
2181 schema:
2182 type: number
2183 example: 0
2184 '404':
2185 description: upload not found
2186
2187 /videos/imports:
2188 post:
2189 summary: Import a video
2190 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2191 operationId: importVideo
2192 security:
2193 - OAuth2: []
2194 tags:
2195 - Video Imports
2196 - Video Upload
2197 requestBody:
2198 content:
2199 multipart/form-data:
2200 schema:
2201 $ref: '#/components/schemas/VideoCreateImport'
2202 encoding:
2203 torrentfile:
2204 contentType: application/x-bittorrent
2205 thumbnailfile:
2206 contentType: image/jpeg
2207 previewfile:
2208 contentType: image/jpeg
2209 responses:
2210 '200':
2211 description: successful operation
2212 content:
2213 application/json:
2214 schema:
2215 $ref: '#/components/schemas/VideoUploadResponse'
2216 '400':
2217 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2218 '403':
2219 description: video didn't pass pre-import filter
2220 '409':
2221 description: HTTP or Torrent/magnetURI import not enabled
2222
2223 /videos/imports/{id}/cancel:
2224 post:
2225 summary: Cancel video import
2226 description: Cancel a pending video import
2227 security:
2228 - OAuth2: []
2229 tags:
2230 - Video Imports
2231 parameters:
2232 - $ref: '#/components/parameters/id'
2233 responses:
2234 '204':
2235 description: successful operation
2236
2237 /videos/imports/{id}:
2238 delete:
2239 summary: Delete video import
2240 description: Delete ended video import
2241 security:
2242 - OAuth2: []
2243 tags:
2244 - Video Imports
2245 parameters:
2246 - $ref: '#/components/parameters/id'
2247 responses:
2248 '204':
2249 description: successful operation
2250
2251 /videos/live:
2252 post:
2253 summary: Create a live
2254 operationId: addLive
2255 security:
2256 - OAuth2: []
2257 tags:
2258 - Live Videos
2259 - Video
2260 responses:
2261 '200':
2262 description: successful operation
2263 content:
2264 application/json:
2265 schema:
2266 $ref: '#/components/schemas/VideoUploadResponse'
2267 '400':
2268 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
2269 description: |
2270 Disambiguate via `type`:
2271 - default type for a validation error
2272 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
2273 '403':
2274 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2275 description: |
2276 Disambiguate via `type`:
2277 - `live_not_enabled` for a disabled live feature
2278 - `live_not_allowing_replay` for a disabled replay feature
2279 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
2280 - `max_user_lives_limit_reached` for the user concurrent live limit
2281 requestBody:
2282 content:
2283 multipart/form-data:
2284 schema:
2285 type: object
2286 properties:
2287 channelId:
2288 description: Channel id that will contain this live video
2289 type: integer
2290 saveReplay:
2291 type: boolean
2292 permanentLive:
2293 description: User can stream multiple times in a permanent live
2294 type: boolean
2295 latencyMode:
2296 description: User can select live latency mode if enabled by the instance
2297 $ref: '#/components/schemas/LiveVideoLatencyMode'
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 LiveVideoLatencyMode:
5295 type: integer
5296 enum:
5297 - 1
5298 - 2
5299 - 3
5300 description: 'The live latency mode (Default = `1`, HIght latency = `2`, Small Latency = `3`)'
5301
5302 VideoStateConstant:
5303 properties:
5304 id:
5305 type: integer
5306 enum:
5307 - 1
5308 - 2
5309 - 3
5310 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
5311 label:
5312 type: string
5313
5314 AbuseStateSet:
5315 type: integer
5316 enum:
5317 - 1
5318 - 2
5319 - 3
5320 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
5321 AbuseStateConstant:
5322 properties:
5323 id:
5324 $ref: '#/components/schemas/AbuseStateSet'
5325 label:
5326 type: string
5327 AbusePredefinedReasons:
5328 type: array
5329 items:
5330 type: string
5331 enum:
5332 - violentOrAbusive
5333 - hatefulOrAbusive
5334 - spamOrMisleading
5335 - privacy
5336 - rights
5337 - serverRules
5338 - thumbnails
5339 - captions
5340 example: [spamOrMisleading]
5341
5342 VideoResolutionSet:
5343 type: integer
5344 description: |
5345 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
5346
5347 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
5348 example: 240
5349 VideoResolutionConstant:
5350 description: resolutions and their labels for the video
5351 properties:
5352 id:
5353 $ref: '#/components/schemas/VideoResolutionSet'
5354 label:
5355 type: string
5356 example: 240p
5357 VideoScheduledUpdate:
5358 properties:
5359 privacy:
5360 $ref: '#/components/schemas/VideoPrivacySet'
5361 updateAt:
5362 type: string
5363 format: date
5364 description: When to update the video
5365 required:
5366 - updateAt
5367 AccountSummary:
5368 properties:
5369 id:
5370 type: integer
5371 name:
5372 type: string
5373 displayName:
5374 type: string
5375 url:
5376 type: string
5377 format: url
5378 host:
5379 type: string
5380 format: hostname
5381 avatars:
5382 type: array
5383 items:
5384 $ref: '#/components/schemas/ActorImage'
5385 VideoChannelSummary:
5386 properties:
5387 id:
5388 $ref: '#/components/schemas/id'
5389 name:
5390 type: string
5391 displayName:
5392 type: string
5393 url:
5394 type: string
5395 format: url
5396 host:
5397 type: string
5398 format: hostname
5399 avatars:
5400 type: array
5401 items:
5402 $ref: '#/components/schemas/ActorImage'
5403 PlaylistElement:
5404 properties:
5405 position:
5406 type: integer
5407 startTimestamp:
5408 type: integer
5409 format: seconds
5410 stopTimestamp:
5411 type: integer
5412 format: seconds
5413 video:
5414 nullable: true
5415 allOf:
5416 - $ref: '#/components/schemas/Video'
5417 VideoFile:
5418 readOnly: true
5419 properties:
5420 magnetUri:
5421 type: string
5422 format: uri
5423 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
5424 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5425 resolution:
5426 $ref: '#/components/schemas/VideoResolutionConstant'
5427 size:
5428 type: integer
5429 description: Video file size in bytes
5430 torrentUrl:
5431 type: string
5432 description: Direct URL of the torrent file
5433 format: url
5434 torrentDownloadUrl:
5435 type: string
5436 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
5437 format: url
5438 fileUrl:
5439 type: string
5440 description: Direct URL of the video
5441 format: url
5442 fileDownloadUrl:
5443 type: string
5444 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
5445 format: url
5446 fps:
5447 type: number
5448 description: Frames per second of the video file
5449 metadataUrl:
5450 type: string
5451 format: url
5452 description: URL dereferencing the output of ffprobe on the file
5453 VideoStreamingPlaylists:
5454 allOf:
5455 - type: object
5456 properties:
5457 id:
5458 $ref: '#/components/schemas/id'
5459 type:
5460 type: integer
5461 enum:
5462 - 1
5463 description: |
5464 Playlist type:
5465 - `1`: HLS
5466 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
5467 VideoStreamingPlaylists-HLS:
5468 properties:
5469 playlistUrl:
5470 type: string
5471 format: url
5472 segmentsSha256Url:
5473 type: string
5474 format: url
5475 files:
5476 type: array
5477 description: |
5478 Video files associated to this playlist.
5479
5480 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5481 items:
5482 $ref: '#/components/schemas/VideoFile'
5483 redundancies:
5484 type: array
5485 items:
5486 type: object
5487 properties:
5488 baseUrl:
5489 type: string
5490 format: url
5491 VideoInfo:
5492 properties:
5493 id:
5494 $ref: '#/components/schemas/Video/properties/id'
5495 uuid:
5496 $ref: '#/components/schemas/Video/properties/uuid'
5497 name:
5498 $ref: '#/components/schemas/Video/properties/name'
5499 Video:
5500 properties:
5501 id:
5502 description: object id for the video
5503 allOf:
5504 - $ref: '#/components/schemas/id'
5505 uuid:
5506 description: universal identifier for the video, that can be used across instances
5507 allOf:
5508 - $ref: '#/components/schemas/UUIDv4'
5509 shortUUID:
5510 allOf:
5511 - $ref: '#/components/schemas/shortUUID'
5512 isLive:
5513 type: boolean
5514 createdAt:
5515 type: string
5516 format: date-time
5517 example: 2017-10-01T10:52:46.396Z
5518 description: time at which the video object was first drafted
5519 publishedAt:
5520 type: string
5521 format: date-time
5522 example: 2018-10-01T10:52:46.396Z
5523 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5524 updatedAt:
5525 type: string
5526 format: date-time
5527 example: 2021-05-04T08:01:01.502Z
5528 description: last time the video's metadata was modified
5529 originallyPublishedAt:
5530 type: string
5531 format: date-time
5532 example: 2010-10-01T10:52:46.396Z
5533 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5534 category:
5535 allOf:
5536 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5537 description: category in which the video is classified
5538 licence:
5539 allOf:
5540 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5541 description: licence under which the video is distributed
5542 language:
5543 allOf:
5544 - $ref: '#/components/schemas/VideoConstantString-Language'
5545 description: main language used in the video
5546 privacy:
5547 allOf:
5548 - $ref: '#/components/schemas/VideoPrivacyConstant'
5549 description: privacy policy used to distribute the video
5550 description:
5551 type: string
5552 example: |
5553 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5554 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5555 minLength: 3
5556 maxLength: 250
5557 description: |
5558 truncated description of the video, written in Markdown.
5559 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5560 duration:
5561 type: integer
5562 example: 1419
5563 format: seconds
5564 description: duration of the video in seconds
5565 isLocal:
5566 type: boolean
5567 name:
5568 type: string
5569 description: title of the video
5570 example: What is PeerTube?
5571 minLength: 3
5572 maxLength: 120
5573 thumbnailPath:
5574 type: string
5575 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5576 previewPath:
5577 type: string
5578 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5579 embedPath:
5580 type: string
5581 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5582 views:
5583 type: integer
5584 example: 1337
5585 likes:
5586 type: integer
5587 example: 42
5588 dislikes:
5589 type: integer
5590 example: 7
5591 nsfw:
5592 type: boolean
5593 waitTranscoding:
5594 type: boolean
5595 nullable: true
5596 state:
5597 allOf:
5598 - $ref: '#/components/schemas/VideoStateConstant'
5599 description: represents the internal state of the video processing within the PeerTube instance
5600 scheduledUpdate:
5601 nullable: true
5602 allOf:
5603 - $ref: '#/components/schemas/VideoScheduledUpdate'
5604 blacklisted:
5605 nullable: true
5606 type: boolean
5607 blacklistedReason:
5608 nullable: true
5609 type: string
5610 account:
5611 $ref: '#/components/schemas/AccountSummary'
5612 channel:
5613 $ref: '#/components/schemas/VideoChannelSummary'
5614 userHistory:
5615 nullable: true
5616 type: object
5617 properties:
5618 currentTime:
5619 type: integer
5620 VideoDetails:
5621 allOf:
5622 - $ref: '#/components/schemas/Video'
5623 - type: object
5624 properties:
5625 viewers:
5626 type: integer
5627 description: If the video is a live, you have the amount of current viewers
5628 descriptionPath:
5629 type: string
5630 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5631 description: path at which to get the full description of maximum `10000` characters
5632 support:
5633 type: string
5634 description: A text tell the audience how to support the video creator
5635 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5636 minLength: 3
5637 maxLength: 1000
5638 channel:
5639 $ref: '#/components/schemas/VideoChannel'
5640 account:
5641 $ref: '#/components/schemas/Account'
5642 tags:
5643 example: [flowers, gardening]
5644 type: array
5645 minItems: 1
5646 maxItems: 5
5647 items:
5648 type: string
5649 minLength: 2
5650 maxLength: 30
5651 commentsEnabled:
5652 type: boolean
5653 downloadEnabled:
5654 type: boolean
5655 trackerUrls:
5656 type: array
5657 items:
5658 type: string
5659 format: url
5660 example:
5661 - https://peertube2.cpy.re/tracker/announce
5662 - wss://peertube2.cpy.re/tracker/socket
5663 files:
5664 type: array
5665 items:
5666 $ref: '#/components/schemas/VideoFile'
5667 description: |
5668 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5669
5670 - field will be empty
5671 - video files will be found in `streamingPlaylists[].files` field
5672 streamingPlaylists:
5673 type: array
5674 items:
5675 $ref: '#/components/schemas/VideoStreamingPlaylists'
5676 description: |
5677 HLS playlists/manifest files. If HLS is disabled on the server:
5678
5679 - field will be empty
5680 - video files will be found in `files` field
5681 FileRedundancyInformation:
5682 properties:
5683 id:
5684 $ref: '#/components/schemas/id'
5685 fileUrl:
5686 type: string
5687 format: url
5688 strategy:
5689 type: string
5690 enum:
5691 - manual
5692 - most-views
5693 - trending
5694 - recently-added
5695 size:
5696 type: integer
5697 createdAt:
5698 type: string
5699 format: date-time
5700 updatedAt:
5701 type: string
5702 format: date-time
5703 expiresOn:
5704 type: string
5705 format: date-time
5706 VideoRedundancy:
5707 properties:
5708 id:
5709 $ref: '#/components/schemas/id'
5710 name:
5711 type: string
5712 url:
5713 type: string
5714 format: url
5715 uuid:
5716 $ref: '#/components/schemas/UUIDv4'
5717 redundancies:
5718 type: object
5719 properties:
5720 files:
5721 type: array
5722 items:
5723 $ref: '#/components/schemas/FileRedundancyInformation'
5724 streamingPlaylists:
5725 type: array
5726 items:
5727 $ref: '#/components/schemas/FileRedundancyInformation'
5728 VideoImportStateConstant:
5729 properties:
5730 id:
5731 type: integer
5732 enum:
5733 - 1
5734 - 2
5735 - 3
5736 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5737 label:
5738 type: string
5739 example: Pending
5740 VideoCreateImport:
5741 allOf:
5742 - type: object
5743 additionalProperties: false
5744 oneOf:
5745 - properties:
5746 targetUrl:
5747 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5748 required: [targetUrl]
5749 - properties:
5750 magnetUri:
5751 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5752 required: [magnetUri]
5753 - properties:
5754 torrentfile:
5755 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5756 required: [torrentfile]
5757 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5758 required:
5759 - channelId
5760 - name
5761 VideoImport:
5762 properties:
5763 id:
5764 readOnly: true
5765 allOf:
5766 - $ref: '#/components/schemas/id'
5767 targetUrl:
5768 type: string
5769 format: url
5770 description: remote URL where to find the import's source video
5771 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5772 magnetUri:
5773 type: string
5774 format: uri
5775 description: magnet URI allowing to resolve the import's source video
5776 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5777 torrentfile:
5778 writeOnly: true
5779 type: string
5780 format: binary
5781 description: Torrent file containing only the video file
5782 torrentName:
5783 readOnly: true
5784 type: string
5785 state:
5786 readOnly: true
5787 allOf:
5788 - $ref: '#/components/schemas/VideoImportStateConstant'
5789 error:
5790 readOnly: true
5791 type: string
5792 createdAt:
5793 readOnly: true
5794 type: string
5795 format: date-time
5796 updatedAt:
5797 readOnly: true
5798 type: string
5799 format: date-time
5800 video:
5801 readOnly: true
5802 nullable: true
5803 allOf:
5804 - $ref: '#/components/schemas/Video'
5805 VideoImportsList:
5806 properties:
5807 total:
5808 type: integer
5809 example: 1
5810 data:
5811 type: array
5812 maxItems: 100
5813 items:
5814 $ref: '#/components/schemas/VideoImport'
5815 Abuse:
5816 properties:
5817 id:
5818 $ref: '#/components/schemas/id'
5819 reason:
5820 type: string
5821 example: The video is a spam
5822 minLength: 2
5823 maxLength: 3000
5824 predefinedReasons:
5825 $ref: '#/components/schemas/AbusePredefinedReasons'
5826 reporterAccount:
5827 $ref: '#/components/schemas/Account'
5828 state:
5829 $ref: '#/components/schemas/AbuseStateConstant'
5830 moderationComment:
5831 type: string
5832 example: Decided to ban the server since it spams us regularly
5833 minLength: 2
5834 maxLength: 3000
5835 video:
5836 $ref: '#/components/schemas/VideoInfo'
5837 createdAt:
5838 type: string
5839 format: date-time
5840 AbuseMessage:
5841 properties:
5842 id:
5843 $ref: '#/components/schemas/id'
5844 message:
5845 type: string
5846 minLength: 2
5847 maxLength: 3000
5848 byModerator:
5849 type: boolean
5850 createdAt:
5851 type: string
5852 format: date-time
5853 account:
5854 $ref: '#/components/schemas/AccountSummary'
5855 VideoBlacklist:
5856 properties:
5857 id:
5858 $ref: '#/components/schemas/id'
5859 videoId:
5860 $ref: '#/components/schemas/Video/properties/id'
5861 createdAt:
5862 type: string
5863 format: date-time
5864 updatedAt:
5865 type: string
5866 format: date-time
5867 name:
5868 type: string
5869 minLength: 3
5870 maxLength: 120
5871 uuid:
5872 $ref: '#/components/schemas/UUIDv4'
5873 description:
5874 type: string
5875 minLength: 3
5876 maxLength: 10000
5877 duration:
5878 type: integer
5879 views:
5880 type: integer
5881 likes:
5882 type: integer
5883 dislikes:
5884 type: integer
5885 nsfw:
5886 type: boolean
5887 VideoPlaylist:
5888 properties:
5889 id:
5890 $ref: '#/components/schemas/id'
5891 uuid:
5892 $ref: '#/components/schemas/UUIDv4'
5893 shortUUID:
5894 allOf:
5895 - $ref: '#/components/schemas/shortUUID'
5896 createdAt:
5897 type: string
5898 format: date-time
5899 updatedAt:
5900 type: string
5901 format: date-time
5902 description:
5903 type: string
5904 minLength: 3
5905 maxLength: 1000
5906 displayName:
5907 type: string
5908 minLength: 1
5909 maxLength: 120
5910 isLocal:
5911 type: boolean
5912 videoLength:
5913 type: integer
5914 minimum: 0
5915 thumbnailPath:
5916 type: string
5917 privacy:
5918 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5919 type:
5920 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5921 ownerAccount:
5922 $ref: '#/components/schemas/AccountSummary'
5923 videoChannel:
5924 $ref: '#/components/schemas/VideoChannelSummary'
5925 VideoComment:
5926 properties:
5927 id:
5928 $ref: '#/components/schemas/id'
5929 url:
5930 type: string
5931 format: url
5932 text:
5933 type: string
5934 format: html
5935 description: Text of the comment
5936 minLength: 1
5937 example: This video is wonderful!
5938 threadId:
5939 $ref: '#/components/schemas/id'
5940 inReplyToCommentId:
5941 nullable: true
5942 allOf:
5943 - $ref: '#/components/schemas/id'
5944 videoId:
5945 $ref: '#/components/schemas/Video/properties/id'
5946 createdAt:
5947 type: string
5948 format: date-time
5949 updatedAt:
5950 type: string
5951 format: date-time
5952 deletedAt:
5953 nullable: true
5954 type: string
5955 format: date-time
5956 default: null
5957 isDeleted:
5958 type: boolean
5959 default: false
5960 totalRepliesFromVideoAuthor:
5961 type: integer
5962 minimum: 0
5963 totalReplies:
5964 type: integer
5965 minimum: 0
5966 account:
5967 $ref: '#/components/schemas/Account'
5968 VideoCommentThreadTree:
5969 properties:
5970 comment:
5971 $ref: '#/components/schemas/VideoComment'
5972 children:
5973 type: array
5974 items:
5975 $ref: '#/components/schemas/VideoCommentThreadTree'
5976 VideoCaption:
5977 properties:
5978 language:
5979 $ref: '#/components/schemas/VideoConstantString-Language'
5980 captionPath:
5981 type: string
5982 ActorImage:
5983 properties:
5984 path:
5985 type: string
5986 width:
5987 type: integer
5988 createdAt:
5989 type: string
5990 format: date-time
5991 updatedAt:
5992 type: string
5993 format: date-time
5994 ActorInfo:
5995 properties:
5996 id:
5997 $ref: '#/components/schemas/id'
5998 name:
5999 type: string
6000 displayName:
6001 type: string
6002 host:
6003 type: string
6004 format: hostname
6005 avatars:
6006 type: array
6007 items:
6008 $ref: '#/components/schemas/ActorImage'
6009 Actor:
6010 properties:
6011 id:
6012 $ref: '#/components/schemas/id'
6013 url:
6014 type: string
6015 format: url
6016 name:
6017 description: immutable name of the actor, used to find or mention it
6018 allOf:
6019 - $ref: '#/components/schemas/username'
6020 host:
6021 type: string
6022 format: hostname
6023 description: server on which the actor is resident
6024 hostRedundancyAllowed:
6025 type: boolean
6026 description: whether this actor's host allows redundancy of its videos
6027 followingCount:
6028 type: integer
6029 minimum: 0
6030 description: number of actors subscribed to by this actor, as seen by this instance
6031 followersCount:
6032 type: integer
6033 minimum: 0
6034 description: number of followers of this actor, as seen by this instance
6035 createdAt:
6036 type: string
6037 format: date-time
6038 updatedAt:
6039 type: string
6040 format: date-time
6041 Account:
6042 allOf:
6043 - $ref: '#/components/schemas/Actor'
6044 - properties:
6045 userId:
6046 description: object id for the user tied to this account
6047 allOf:
6048 - $ref: '#/components/schemas/User/properties/id'
6049 displayName:
6050 type: string
6051 description: editable name of the account, displayed in its representations
6052 minLength: 3
6053 maxLength: 120
6054 description:
6055 type: string
6056 description: text or bio displayed on the account's profile
6057 UserWatchingVideo:
6058 properties:
6059 currentTime:
6060 type: integer
6061 format: seconds
6062 description: timestamp within the video, in seconds
6063 example: 5
6064 ServerConfig:
6065 properties:
6066 instance:
6067 type: object
6068 properties:
6069 name:
6070 type: string
6071 shortDescription:
6072 type: string
6073 defaultClientRoute:
6074 type: string
6075 isNSFW:
6076 type: boolean
6077 defaultNSFWPolicy:
6078 type: string
6079 customizations:
6080 type: object
6081 properties:
6082 javascript:
6083 type: string
6084 css:
6085 type: string
6086 search:
6087 type: object
6088 properties:
6089 remoteUri:
6090 type: object
6091 properties:
6092 users:
6093 type: boolean
6094 anonymous:
6095 type: boolean
6096 plugin:
6097 type: object
6098 properties:
6099 registered:
6100 type: array
6101 items:
6102 type: string
6103 theme:
6104 type: object
6105 properties:
6106 registered:
6107 type: array
6108 items:
6109 type: string
6110 email:
6111 type: object
6112 properties:
6113 enabled:
6114 type: boolean
6115 contactForm:
6116 type: object
6117 properties:
6118 enabled:
6119 type: boolean
6120 serverVersion:
6121 type: string
6122 serverCommit:
6123 type: string
6124 signup:
6125 type: object
6126 properties:
6127 allowed:
6128 type: boolean
6129 allowedForCurrentIP:
6130 type: boolean
6131 requiresEmailVerification:
6132 type: boolean
6133 transcoding:
6134 type: object
6135 properties:
6136 hls:
6137 type: object
6138 properties:
6139 enabled:
6140 type: boolean
6141 webtorrent:
6142 type: object
6143 properties:
6144 enabled:
6145 type: boolean
6146 enabledResolutions:
6147 type: array
6148 items:
6149 $ref: '#/components/schemas/VideoResolutionSet'
6150 import:
6151 type: object
6152 properties:
6153 videos:
6154 type: object
6155 properties:
6156 http:
6157 type: object
6158 properties:
6159 enabled:
6160 type: boolean
6161 torrent:
6162 type: object
6163 properties:
6164 enabled:
6165 type: boolean
6166 autoBlacklist:
6167 type: object
6168 properties:
6169 videos:
6170 type: object
6171 properties:
6172 ofUsers:
6173 type: object
6174 properties:
6175 enabled:
6176 type: boolean
6177 avatar:
6178 type: object
6179 properties:
6180 file:
6181 type: object
6182 properties:
6183 size:
6184 type: object
6185 properties:
6186 max:
6187 type: integer
6188 extensions:
6189 type: array
6190 items:
6191 type: string
6192 video:
6193 type: object
6194 properties:
6195 image:
6196 type: object
6197 properties:
6198 extensions:
6199 type: array
6200 items:
6201 type: string
6202 size:
6203 type: object
6204 properties:
6205 max:
6206 type: integer
6207 file:
6208 type: object
6209 properties:
6210 extensions:
6211 type: array
6212 items:
6213 type: string
6214 videoCaption:
6215 type: object
6216 properties:
6217 file:
6218 type: object
6219 properties:
6220 size:
6221 type: object
6222 properties:
6223 max:
6224 type: integer
6225 extensions:
6226 type: array
6227 items:
6228 type: string
6229 user:
6230 type: object
6231 properties:
6232 videoQuota:
6233 type: integer
6234 example: 16810141515
6235 videoQuotaDaily:
6236 type: integer
6237 example: 1681014151
6238 trending:
6239 type: object
6240 properties:
6241 videos:
6242 type: object
6243 properties:
6244 intervalDays:
6245 type: integer
6246 tracker:
6247 type: object
6248 properties:
6249 enabled:
6250 type: boolean
6251 followings:
6252 type: object
6253 properties:
6254 instance:
6255 type: object
6256 properties:
6257 autoFollowIndex:
6258 type: object
6259 properties:
6260 indexUrl:
6261 type: string
6262 format: url
6263 homepage:
6264 type: object
6265 properties:
6266 enabled:
6267 type: boolean
6268
6269 ServerConfigAbout:
6270 properties:
6271 instance:
6272 type: object
6273 properties:
6274 name:
6275 type: string
6276 shortDescription:
6277 type: string
6278 description:
6279 type: string
6280 terms:
6281 type: string
6282 ServerConfigCustom:
6283 properties:
6284 instance:
6285 type: object
6286 properties:
6287 name:
6288 type: string
6289 shortDescription:
6290 type: string
6291 description:
6292 type: string
6293 terms:
6294 type: string
6295 defaultClientRoute:
6296 type: string
6297 isNSFW:
6298 type: boolean
6299 defaultNSFWPolicy:
6300 type: string
6301 customizations:
6302 type: object
6303 properties:
6304 javascript:
6305 type: string
6306 css:
6307 type: string
6308 theme:
6309 type: object
6310 properties:
6311 default:
6312 type: string
6313 services:
6314 type: object
6315 properties:
6316 twitter:
6317 type: object
6318 properties:
6319 username:
6320 type: string
6321 whitelisted:
6322 type: boolean
6323 cache:
6324 type: object
6325 properties:
6326 previews:
6327 type: object
6328 properties:
6329 size:
6330 type: integer
6331 captions:
6332 type: object
6333 properties:
6334 size:
6335 type: integer
6336 signup:
6337 type: object
6338 properties:
6339 enabled:
6340 type: boolean
6341 limit:
6342 type: integer
6343 requiresEmailVerification:
6344 type: boolean
6345 admin:
6346 type: object
6347 properties:
6348 email:
6349 type: string
6350 format: email
6351 contactForm:
6352 type: object
6353 properties:
6354 enabled:
6355 type: boolean
6356 user:
6357 type: object
6358 description: Settings that apply to new users, if registration is enabled
6359 properties:
6360 videoQuota:
6361 type: integer
6362 example: 16810141515
6363 videoQuotaDaily:
6364 type: integer
6365 example: 1681014151
6366 transcoding:
6367 type: object
6368 description: Settings pertaining to transcoding jobs
6369 properties:
6370 enabled:
6371 type: boolean
6372 allowAdditionalExtensions:
6373 type: boolean
6374 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
6375 allowAudioFiles:
6376 type: boolean
6377 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
6378 threads:
6379 type: integer
6380 description: Amount of threads used by ffmpeg for 1 transcoding job
6381 concurrency:
6382 type: number
6383 description: Amount of transcoding jobs to execute in parallel
6384 profile:
6385 type: string
6386 enum:
6387 - default
6388 description: |
6389 New profiles can be added by plugins ; available in core PeerTube: 'default'.
6390 resolutions:
6391 type: object
6392 description: Resolutions to transcode _new videos_ to
6393 properties:
6394 0p:
6395 type: boolean
6396 144p:
6397 type: boolean
6398 240p:
6399 type: boolean
6400 360p:
6401 type: boolean
6402 480p:
6403 type: boolean
6404 720p:
6405 type: boolean
6406 1080p:
6407 type: boolean
6408 1440p:
6409 type: boolean
6410 2160p:
6411 type: boolean
6412 webtorrent:
6413 type: object
6414 description: WebTorrent-specific settings
6415 properties:
6416 enabled:
6417 type: boolean
6418 hls:
6419 type: object
6420 description: HLS-specific settings
6421 properties:
6422 enabled:
6423 type: boolean
6424 import:
6425 type: object
6426 properties:
6427 videos:
6428 type: object
6429 properties:
6430 http:
6431 type: object
6432 properties:
6433 enabled:
6434 type: boolean
6435 torrent:
6436 type: object
6437 properties:
6438 enabled:
6439 type: boolean
6440 autoBlacklist:
6441 type: object
6442 properties:
6443 videos:
6444 type: object
6445 properties:
6446 ofUsers:
6447 type: object
6448 properties:
6449 enabled:
6450 type: boolean
6451 followers:
6452 type: object
6453 properties:
6454 instance:
6455 type: object
6456 properties:
6457 enabled:
6458 type: boolean
6459 manualApproval:
6460 type: boolean
6461
6462 CustomHomepage:
6463 properties:
6464 content:
6465 type: string
6466
6467 Follow:
6468 properties:
6469 id:
6470 $ref: '#/components/schemas/id'
6471 follower:
6472 $ref: '#/components/schemas/Actor'
6473 following:
6474 $ref: '#/components/schemas/Actor'
6475 score:
6476 type: number
6477 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6478 state:
6479 type: string
6480 enum:
6481 - pending
6482 - accepted
6483 createdAt:
6484 type: string
6485 format: date-time
6486 updatedAt:
6487 type: string
6488 format: date-time
6489
6490 PredefinedAbuseReasons:
6491 description: Reason categories that help triage reports
6492 type: array
6493 maxItems: 8
6494 items:
6495 type: string
6496 enum:
6497 - violentOrAbusive
6498 - hatefulOrAbusive
6499 - spamOrMisleading
6500 - privacy
6501 - rights
6502 - serverRules
6503 - thumbnails
6504 - captions
6505
6506 Job:
6507 properties:
6508 id:
6509 $ref: '#/components/schemas/id'
6510 state:
6511 type: string
6512 enum:
6513 - active
6514 - completed
6515 - failed
6516 - waiting
6517 - delayed
6518 type:
6519 type: string
6520 enum:
6521 - activitypub-http-unicast
6522 - activitypub-http-broadcast
6523 - activitypub-http-fetcher
6524 - activitypub-follow
6525 - video-file-import
6526 - video-transcoding
6527 - email
6528 - video-import
6529 - videos-views-stats
6530 - activitypub-refresher
6531 - video-redundancy
6532 data:
6533 type: object
6534 additionalProperties: true
6535 error:
6536 type: object
6537 additionalProperties: true
6538 createdAt:
6539 type: string
6540 format: date-time
6541 finishedOn:
6542 type: string
6543 format: date-time
6544 processedOn:
6545 type: string
6546 format: date-time
6547 AddUserResponse:
6548 properties:
6549 user:
6550 type: object
6551 properties:
6552 id:
6553 $ref: '#/components/schemas/id'
6554 account:
6555 type: object
6556 properties:
6557 id:
6558 $ref: '#/components/schemas/id'
6559 VideoUploadRequestCommon:
6560 properties:
6561 name:
6562 description: Video name
6563 type: string
6564 example: What is PeerTube?
6565 minLength: 3
6566 maxLength: 120
6567 channelId:
6568 description: Channel id that will contain this video
6569 type: integer
6570 example: 3
6571 minimum: 1
6572 privacy:
6573 $ref: '#/components/schemas/VideoPrivacySet'
6574 category:
6575 $ref: '#/components/schemas/VideoCategorySet'
6576 licence:
6577 $ref: '#/components/schemas/VideoLicenceSet'
6578 language:
6579 $ref: '#/components/schemas/VideoLanguageSet'
6580 description:
6581 description: Video description
6582 type: string
6583 example: |
6584 **[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)**
6585 waitTranscoding:
6586 description: Whether or not we wait transcoding before publish the video
6587 type: boolean
6588 support:
6589 description: A text tell the audience how to support the video creator
6590 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6591 type: string
6592 nsfw:
6593 description: Whether or not this video contains sensitive content
6594 type: boolean
6595 tags:
6596 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6597 type: array
6598 minItems: 1
6599 maxItems: 5
6600 uniqueItems: true
6601 example:
6602 - framasoft
6603 - peertube
6604 items:
6605 type: string
6606 minLength: 2
6607 maxLength: 30
6608 commentsEnabled:
6609 description: Enable or disable comments for this video
6610 type: boolean
6611 downloadEnabled:
6612 description: Enable or disable downloading for this video
6613 type: boolean
6614 originallyPublishedAt:
6615 description: Date when the content was originally published
6616 type: string
6617 format: date-time
6618 scheduleUpdate:
6619 $ref: '#/components/schemas/VideoScheduledUpdate'
6620 thumbnailfile:
6621 description: Video thumbnail file
6622 type: string
6623 format: binary
6624 previewfile:
6625 description: Video preview file
6626 type: string
6627 format: binary
6628 required:
6629 - channelId
6630 - name
6631 VideoUploadRequestLegacy:
6632 allOf:
6633 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6634 - type: object
6635 required:
6636 - videofile
6637 properties:
6638 videofile:
6639 description: Video file
6640 type: string
6641 format: binary
6642 VideoUploadRequestResumable:
6643 allOf:
6644 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6645 - type: object
6646 required:
6647 - filename
6648 properties:
6649 filename:
6650 description: Video filename including extension
6651 type: string
6652 format: filename
6653 example: what_is_peertube.mp4
6654 thumbnailfile:
6655 description: Video thumbnail file
6656 type: string
6657 format: binary
6658 previewfile:
6659 description: Video preview file
6660 type: string
6661 format: binary
6662 VideoUploadResponse:
6663 properties:
6664 video:
6665 type: object
6666 properties:
6667 id:
6668 $ref: '#/components/schemas/Video/properties/id'
6669 uuid:
6670 $ref: '#/components/schemas/Video/properties/uuid'
6671 shortUUID:
6672 $ref: '#/components/schemas/Video/properties/shortUUID'
6673 CommentThreadResponse:
6674 properties:
6675 total:
6676 type: integer
6677 example: 1
6678 data:
6679 type: array
6680 maxItems: 100
6681 items:
6682 $ref: '#/components/schemas/VideoComment'
6683 CommentThreadPostResponse:
6684 properties:
6685 comment:
6686 $ref: '#/components/schemas/VideoComment'
6687 VideoListResponse:
6688 properties:
6689 total:
6690 type: integer
6691 example: 1
6692 data:
6693 type: array
6694 maxItems: 100
6695 items:
6696 $ref: '#/components/schemas/Video'
6697 User:
6698 properties:
6699 account:
6700 $ref: '#/components/schemas/Account'
6701 autoPlayNextVideo:
6702 type: boolean
6703 description: Automatically start playing the upcoming video after the currently playing video
6704 autoPlayNextVideoPlaylist:
6705 type: boolean
6706 description: Automatically start playing the video on the playlist after the currently playing video
6707 autoPlayVideo:
6708 type: boolean
6709 description: Automatically start playing the video on the watch page
6710 blocked:
6711 type: boolean
6712 blockedReason:
6713 type: string
6714 createdAt:
6715 type: string
6716 email:
6717 type: string
6718 format: email
6719 description: The user email
6720 emailVerified:
6721 type: boolean
6722 description: Has the user confirmed their email address?
6723 id:
6724 allOf:
6725 - $ref: '#/components/schemas/id'
6726 readOnly: true
6727 pluginAuth:
6728 type: string
6729 description: Auth plugin to use to authenticate the user
6730 lastLoginDate:
6731 type: string
6732 format: date-time
6733 noInstanceConfigWarningModal:
6734 type: boolean
6735 noAccountSetupWarningModal:
6736 type: boolean
6737 noWelcomeModal:
6738 type: boolean
6739 nsfwPolicy:
6740 $ref: '#/components/schemas/NSFWPolicy'
6741 role:
6742 $ref: '#/components/schemas/UserRole'
6743 roleLabel:
6744 type: string
6745 enum:
6746 - User
6747 - Moderator
6748 - Administrator
6749 theme:
6750 type: string
6751 description: Theme enabled by this user
6752 username:
6753 $ref: '#/components/schemas/username'
6754 videoChannels:
6755 type: array
6756 items:
6757 $ref: '#/components/schemas/VideoChannel'
6758 videoQuota:
6759 type: integer
6760 description: The user video quota in bytes
6761 example: -1
6762 videoQuotaDaily:
6763 type: integer
6764 description: The user daily video quota in bytes
6765 example: -1
6766 p2pEnabled:
6767 type: boolean
6768 description: Enable P2P in the player
6769 UserWithStats:
6770 allOf:
6771 - $ref: '#/components/schemas/User'
6772 - properties:
6773 # optionally present fields: they require WITH_STATS scope
6774 videosCount:
6775 type: integer
6776 description: Count of videos published
6777 abusesCount:
6778 type: integer
6779 description: Count of reports/abuses of which the user is a target
6780 abusesAcceptedCount:
6781 type: integer
6782 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6783 abusesCreatedCount:
6784 type: integer
6785 description: Count of reports/abuses created by the user
6786 videoCommentsCount:
6787 type: integer
6788 description: Count of comments published
6789 AddUser:
6790 properties:
6791 username:
6792 $ref: '#/components/schemas/username'
6793 password:
6794 $ref: '#/components/schemas/password'
6795 email:
6796 type: string
6797 format: email
6798 description: The user email
6799 videoQuota:
6800 type: integer
6801 description: The user video quota in bytes
6802 example: -1
6803 videoQuotaDaily:
6804 type: integer
6805 description: The user daily video quota in bytes
6806 example: -1
6807 channelName:
6808 $ref: '#/components/schemas/usernameChannel'
6809 role:
6810 $ref: '#/components/schemas/UserRole'
6811 adminFlags:
6812 $ref: '#/components/schemas/UserAdminFlags'
6813 required:
6814 - username
6815 - password
6816 - email
6817 - videoQuota
6818 - videoQuotaDaily
6819 - role
6820 UpdateUser:
6821 properties:
6822 email:
6823 description: The updated email of the user
6824 allOf:
6825 - $ref: '#/components/schemas/User/properties/email'
6826 emailVerified:
6827 type: boolean
6828 description: Set the email as verified
6829 videoQuota:
6830 type: integer
6831 description: The updated video quota of the user in bytes
6832 videoQuotaDaily:
6833 type: integer
6834 description: The updated daily video quota of the user in bytes
6835 pluginAuth:
6836 type: string
6837 nullable: true
6838 description: The auth plugin to use to authenticate the user
6839 example: 'peertube-plugin-auth-saml2'
6840 role:
6841 $ref: '#/components/schemas/UserRole'
6842 adminFlags:
6843 $ref: '#/components/schemas/UserAdminFlags'
6844 password:
6845 $ref: '#/components/schemas/password'
6846 UpdateMe:
6847 # see shared/models/users/user-update-me.model.ts:
6848 properties:
6849 password:
6850 $ref: '#/components/schemas/password'
6851 currentPassword:
6852 $ref: '#/components/schemas/password'
6853 email:
6854 description: new email used for login and service communications
6855 allOf:
6856 - $ref: '#/components/schemas/User/properties/email'
6857 displayName:
6858 type: string
6859 description: new name of the user in its representations
6860 minLength: 3
6861 maxLength: 120
6862 displayNSFW:
6863 type: string
6864 description: new NSFW display policy
6865 enum:
6866 - 'true'
6867 - 'false'
6868 - both
6869 p2pEnabled:
6870 type: boolean
6871 description: whether to enable P2P in the player or not
6872 autoPlayVideo:
6873 type: boolean
6874 description: new preference regarding playing videos automatically
6875 autoPlayNextVideo:
6876 type: boolean
6877 description: new preference regarding playing following videos automatically
6878 autoPlayNextVideoPlaylist:
6879 type: boolean
6880 description: new preference regarding playing following playlist videos automatically
6881 videosHistoryEnabled:
6882 type: boolean
6883 description: whether to keep track of watched history or not
6884 videoLanguages:
6885 type: array
6886 items:
6887 type: string
6888 description: list of languages to filter videos down to
6889 theme:
6890 type: string
6891 noInstanceConfigWarningModal:
6892 type: boolean
6893 noAccountSetupWarningModal:
6894 type: boolean
6895 noWelcomeModal:
6896 type: boolean
6897 GetMeVideoRating:
6898 properties:
6899 id:
6900 $ref: '#/components/schemas/id'
6901 rating:
6902 type: string
6903 enum:
6904 - like
6905 - dislike
6906 - none
6907 description: Rating of the video
6908 required:
6909 - id
6910 - rating
6911 VideoRating:
6912 properties:
6913 video:
6914 $ref: '#/components/schemas/Video'
6915 rating:
6916 type: string
6917 enum:
6918 - like
6919 - dislike
6920 - none
6921 description: Rating of the video
6922 required:
6923 - video
6924 - rating
6925 RegisterUser:
6926 properties:
6927 username:
6928 description: immutable name of the user, used to find or mention its actor
6929 allOf:
6930 - $ref: '#/components/schemas/username'
6931 password:
6932 $ref: '#/components/schemas/password'
6933 email:
6934 type: string
6935 format: email
6936 description: email of the user, used for login or service communications
6937 displayName:
6938 type: string
6939 description: editable name of the user, displayed in its representations
6940 minLength: 1
6941 maxLength: 120
6942 channel:
6943 type: object
6944 description: channel base information used to create the first channel of the user
6945 properties:
6946 name:
6947 $ref: '#/components/schemas/usernameChannel'
6948 displayName:
6949 type: string
6950 required:
6951 - username
6952 - password
6953 - email
6954
6955 OAuthClient:
6956 properties:
6957 client_id:
6958 type: string
6959 pattern: /^[a-z0-9]$/
6960 maxLength: 32
6961 minLength: 32
6962 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6963 client_secret:
6964 type: string
6965 pattern: /^[a-zA-Z0-9]$/
6966 maxLength: 32
6967 minLength: 32
6968 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6969 OAuthToken-password:
6970 allOf:
6971 - $ref: '#/components/schemas/OAuthClient'
6972 - type: object
6973 properties:
6974 grant_type:
6975 type: string
6976 enum:
6977 - password
6978 - refresh_token
6979 default: password
6980 username:
6981 $ref: '#/components/schemas/User/properties/username'
6982 password:
6983 $ref: '#/components/schemas/password'
6984 required:
6985 - client_id
6986 - client_secret
6987 - grant_type
6988 - username
6989 - password
6990 OAuthToken-refresh_token:
6991 allOf:
6992 - $ref: '#/components/schemas/OAuthClient'
6993 - type: object
6994 properties:
6995 grant_type:
6996 type: string
6997 enum:
6998 - password
6999 - refresh_token
7000 default: password
7001 refresh_token:
7002 type: string
7003 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
7004 required:
7005 - client_id
7006 - client_secret
7007 - grant_type
7008 - refresh_token
7009
7010 VideoChannel:
7011 allOf:
7012 - $ref: '#/components/schemas/Actor'
7013 - type: object
7014 properties:
7015 displayName:
7016 type: string
7017 description: editable name of the channel, displayed in its representations
7018 example: Videos of Framasoft
7019 minLength: 1
7020 maxLength: 120
7021 description:
7022 type: string
7023 example: Videos made with <3 by Framasoft
7024 minLength: 3
7025 maxLength: 1000
7026 support:
7027 type: string
7028 description: text shown by default on all videos of this channel, to tell the audience how to support it
7029 example: Please support our work on https://soutenir.framasoft.org/en/ <3
7030 minLength: 3
7031 maxLength: 1000
7032 isLocal:
7033 readOnly: true
7034 type: boolean
7035 updatedAt:
7036 readOnly: true
7037 type: string
7038 format: date-time
7039 banners:
7040 type: array
7041 items:
7042 $ref: '#/components/schemas/ActorImage'
7043 ownerAccount:
7044 readOnly: true
7045 nullable: true
7046 type: object
7047 properties:
7048 id:
7049 type: integer
7050 uuid:
7051 $ref: '#/components/schemas/UUIDv4'
7052 VideoChannelCreate:
7053 allOf:
7054 - $ref: '#/components/schemas/VideoChannel'
7055 - properties:
7056 name:
7057 description: username of the channel to create
7058 allOf:
7059 - $ref: '#/components/schemas/usernameChannel'
7060 required:
7061 - name
7062 - displayName
7063 VideoChannelUpdate:
7064 allOf:
7065 - $ref: '#/components/schemas/VideoChannel'
7066 - properties:
7067 bulkVideosSupportUpdate:
7068 type: boolean
7069 description: Update the support field for all videos of this channel
7070 VideoChannelList:
7071 properties:
7072 total:
7073 type: integer
7074 example: 1
7075 data:
7076 type: array
7077 items:
7078 allOf:
7079 - $ref: '#/components/schemas/VideoChannel'
7080 - $ref: '#/components/schemas/Actor'
7081
7082 MRSSPeerLink:
7083 type: object
7084 xml:
7085 name: 'media:peerLink'
7086 properties:
7087 href:
7088 type: string
7089 xml:
7090 attribute: true
7091 type:
7092 type: string
7093 enum:
7094 - application/x-bittorrent
7095 xml:
7096 attribute: true
7097 MRSSGroupContent:
7098 type: object
7099 xml:
7100 name: 'media:content'
7101 properties:
7102 url:
7103 type: string
7104 format: url
7105 xml:
7106 attribute: true
7107 fileSize:
7108 type: integer
7109 xml:
7110 attribute: true
7111 type:
7112 type: string
7113 xml:
7114 attribute: true
7115 framerate:
7116 type: integer
7117 xml:
7118 attribute: true
7119 duration:
7120 type: integer
7121 xml:
7122 attribute: true
7123 height:
7124 type: integer
7125 xml:
7126 attribute: true
7127 lang:
7128 type: string
7129 xml:
7130 attribute: true
7131 VideoCommentsForXML:
7132 type: array
7133 xml:
7134 wrapped: true
7135 name: 'channel'
7136 items:
7137 type: object
7138 xml:
7139 name: 'item'
7140 properties:
7141 link:
7142 type: string
7143 format: url
7144 guid:
7145 type: string
7146 pubDate:
7147 type: string
7148 format: date-time
7149 'content:encoded':
7150 type: string
7151 'dc:creator':
7152 type: string
7153 VideosForXML:
7154 type: array
7155 xml:
7156 wrapped: true
7157 name: 'channel'
7158 items:
7159 type: object
7160 xml:
7161 name: 'item'
7162 properties:
7163 link:
7164 type: string
7165 format: url
7166 description: video watch page URL
7167 guid:
7168 type: string
7169 description: video canonical URL
7170 pubDate:
7171 type: string
7172 format: date-time
7173 description: video publication date
7174 description:
7175 type: string
7176 description: video description
7177 'content:encoded':
7178 type: string
7179 description: video description
7180 'dc:creator':
7181 type: string
7182 description: publisher user name
7183 'media:category':
7184 type: integer
7185 description: video category (MRSS)
7186 'media:community':
7187 type: object
7188 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
7189 properties:
7190 'media:statistics':
7191 type: object
7192 properties:
7193 views:
7194 type: integer
7195 xml:
7196 attribute: true
7197 'media:embed':
7198 type: object
7199 properties:
7200 url:
7201 type: string
7202 format: url
7203 description: video embed path, relative to the canonical URL domain (MRSS)
7204 xml:
7205 attribute: true
7206 'media:player':
7207 type: object
7208 properties:
7209 url:
7210 type: string
7211 format: url
7212 description: video watch path, relative to the canonical URL domain (MRSS)
7213 xml:
7214 attribute: true
7215 'media:thumbnail':
7216 type: object
7217 properties:
7218 url:
7219 type: string
7220 format: url
7221 xml:
7222 attribute: true
7223 height:
7224 type: integer
7225 xml:
7226 attribute: true
7227 width:
7228 type: integer
7229 xml:
7230 attribute: true
7231 'media:title':
7232 type: string
7233 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
7234 'media:description':
7235 type: string
7236 'media:rating':
7237 type: string
7238 enum:
7239 - nonadult
7240 - adult
7241 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
7242 'enclosure':
7243 type: object
7244 description: main streamable file for the video
7245 properties:
7246 url:
7247 type: string
7248 format: url
7249 xml:
7250 attribute: true
7251 type:
7252 type: string
7253 enum:
7254 - application/x-bittorrent
7255 xml:
7256 attribute: true
7257 length:
7258 type: integer
7259 xml:
7260 attribute: true
7261 'media:group':
7262 type: array
7263 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)
7264 items:
7265 anyOf:
7266 - $ref: '#/components/schemas/MRSSPeerLink'
7267 - $ref: '#/components/schemas/MRSSGroupContent'
7268 NotificationSettingValue:
7269 type: integer
7270 description: >
7271 Notification type
7272
7273 - `0` NONE
7274
7275 - `1` WEB
7276
7277 - `2` EMAIL
7278 enum:
7279 - 0
7280 - 1
7281 - 2
7282 Notification:
7283 properties:
7284 id:
7285 $ref: '#/components/schemas/id'
7286 type:
7287 type: integer
7288 description: >
7289 Notification type, following the `UserNotificationType` enum:
7290
7291 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
7292
7293 - `2` NEW_COMMENT_ON_MY_VIDEO
7294
7295 - `3` NEW_ABUSE_FOR_MODERATORS
7296
7297 - `4` BLACKLIST_ON_MY_VIDEO
7298
7299 - `5` UNBLACKLIST_ON_MY_VIDEO
7300
7301 - `6` MY_VIDEO_PUBLISHED
7302
7303 - `7` MY_VIDEO_IMPORT_SUCCESS
7304
7305 - `8` MY_VIDEO_IMPORT_ERROR
7306
7307 - `9` NEW_USER_REGISTRATION
7308
7309 - `10` NEW_FOLLOW
7310
7311 - `11` COMMENT_MENTION
7312
7313 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
7314
7315 - `13` NEW_INSTANCE_FOLLOWER
7316
7317 - `14` AUTO_INSTANCE_FOLLOWING
7318
7319 - `15` ABUSE_STATE_CHANGE
7320
7321 - `16` ABUSE_NEW_MESSAGE
7322
7323 - `17` NEW_PLUGIN_VERSION
7324
7325 - `18` NEW_PEERTUBE_VERSION
7326 read:
7327 type: boolean
7328 video:
7329 nullable: true
7330 allOf:
7331 - $ref: '#/components/schemas/VideoInfo'
7332 - type: object
7333 properties:
7334 channel:
7335 $ref: '#/components/schemas/ActorInfo'
7336 videoImport:
7337 nullable: true
7338 type: object
7339 properties:
7340 id:
7341 $ref: '#/components/schemas/id'
7342 video:
7343 nullable: true
7344 $ref: '#/components/schemas/VideoInfo'
7345 torrentName:
7346 type: string
7347 nullable: true
7348 magnetUri:
7349 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
7350 targetUri:
7351 type: string
7352 format: uri
7353 nullable: true
7354 comment:
7355 nullable: true
7356 type: object
7357 properties:
7358 id:
7359 $ref: '#/components/schemas/id'
7360 threadId:
7361 type: integer
7362 video:
7363 $ref: '#/components/schemas/VideoInfo'
7364 account:
7365 $ref: '#/components/schemas/ActorInfo'
7366 videoAbuse:
7367 nullable: true
7368 type: object
7369 properties:
7370 id:
7371 $ref: '#/components/schemas/id'
7372 video:
7373 allOf:
7374 - $ref: '#/components/schemas/VideoInfo'
7375 videoBlacklist:
7376 nullable: true
7377 type: object
7378 properties:
7379 id:
7380 $ref: '#/components/schemas/id'
7381 video:
7382 allOf:
7383 - $ref: '#/components/schemas/VideoInfo'
7384 account:
7385 nullable: true
7386 allOf:
7387 - $ref: '#/components/schemas/ActorInfo'
7388 actorFollow:
7389 type: object
7390 nullable: true
7391 properties:
7392 id:
7393 $ref: '#/components/schemas/id'
7394 follower:
7395 $ref: '#/components/schemas/ActorInfo'
7396 state:
7397 type: string
7398 enum:
7399 - pending
7400 - accepted
7401 following:
7402 type: object
7403 properties:
7404 type:
7405 type: string
7406 enum:
7407 - account
7408 - channel
7409 - instance
7410 name:
7411 type: string
7412 displayName:
7413 type: string
7414 host:
7415 type: string
7416 format: hostname
7417 createdAt:
7418 type: string
7419 format: date-time
7420 updatedAt:
7421 type: string
7422 format: date-time
7423 NotificationListResponse:
7424 properties:
7425 total:
7426 type: integer
7427 example: 1
7428 data:
7429 type: array
7430 maxItems: 100
7431 items:
7432 $ref: '#/components/schemas/Notification'
7433 Plugin:
7434 properties:
7435 name:
7436 type: string
7437 example: peertube-plugin-auth-ldap
7438 type:
7439 type: integer
7440 description: >
7441 - `1`: PLUGIN
7442
7443 - `2`: THEME
7444 enum:
7445 - 1
7446 - 2
7447 latestVersion:
7448 type: string
7449 example: 0.0.3
7450 version:
7451 type: string
7452 example: 0.0.1
7453 enabled:
7454 type: boolean
7455 uninstalled:
7456 type: boolean
7457 peertubeEngine:
7458 type: string
7459 example: 2.2.0
7460 description:
7461 type: string
7462 homepage:
7463 type: string
7464 format: url
7465 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7466 settings:
7467 type: object
7468 additionalProperties: true
7469 createdAt:
7470 type: string
7471 format: date-time
7472 updatedAt:
7473 type: string
7474 format: date-time
7475 PluginResponse:
7476 properties:
7477 total:
7478 type: integer
7479 example: 1
7480 data:
7481 type: array
7482 maxItems: 100
7483 items:
7484 $ref: '#/components/schemas/Plugin'
7485
7486 LiveVideoUpdate:
7487 properties:
7488 saveReplay:
7489 type: boolean
7490 permanentLive:
7491 description: User can stream multiple times in a permanent live
7492 type: boolean
7493 latencyMode:
7494 description: User can select live latency mode if enabled by the instance
7495 $ref: '#/components/schemas/LiveVideoLatencyMode'
7496
7497 LiveVideoResponse:
7498 properties:
7499 rtmpUrl:
7500 type: string
7501 rtmpsUrl:
7502 type: string
7503 streamKey:
7504 type: string
7505 description: RTMP stream key to use to stream into this live video
7506 saveReplay:
7507 type: boolean
7508 permanentLive:
7509 description: User can stream multiple times in a permanent live
7510 type: boolean
7511 latencyMode:
7512 description: User can select live latency mode if enabled by the instance
7513 $ref: '#/components/schemas/LiveVideoLatencyMode'
7514
7515 callbacks:
7516 searchIndex:
7517 'https://search.example.org/api/v1/search/videos':
7518 post:
7519 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7520 responses:
7521 '200':
7522 description: successful operation
7523 content:
7524 application/json:
7525 schema:
7526 $ref: '#/components/schemas/VideoListResponse'