]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - support/doc/api/openapi.yaml
Add ability to cancel & delete video imports
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
... / ...
CommitLineData
1openapi: 3.0.0
2info:
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.
152externalDocs:
153 url: https://docs.joinpeertube.org/api-rest-reference.html
154tags:
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).
294x-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
344paths:
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 avatar:
1560 $ref: '#/components/schemas/ActorImage'
1561 '413':
1562 description: image file too large
1563 headers:
1564 X-File-Maximum-Size:
1565 schema:
1566 type: string
1567 format: Nginx size
1568 description: Maximum file size for the avatar
1569 requestBody:
1570 content:
1571 multipart/form-data:
1572 schema:
1573 type: object
1574 properties:
1575 avatarfile:
1576 description: The file to upload
1577 type: string
1578 format: binary
1579 encoding:
1580 avatarfile:
1581 contentType: image/png, image/jpeg
1582
1583 /users/me/avatar:
1584 delete:
1585 summary: Delete my avatar
1586 security:
1587 - OAuth2: []
1588 tags:
1589 - My User
1590 responses:
1591 '204':
1592 description: successful operation
1593
1594 /videos/ownership:
1595 get:
1596 summary: List video ownership changes
1597 tags:
1598 - Video Ownership Change
1599 security:
1600 - OAuth2: []
1601 responses:
1602 '200':
1603 description: successful operation
1604
1605 '/videos/ownership/{id}/accept':
1606 post:
1607 summary: Accept ownership change request
1608 tags:
1609 - Video Ownership Change
1610 security:
1611 - OAuth2: []
1612 parameters:
1613 - $ref: '#/components/parameters/idOrUUID'
1614 responses:
1615 '204':
1616 description: successful operation
1617 '403':
1618 description: cannot terminate an ownership change of another user
1619 '404':
1620 description: video owneship change not found
1621
1622 '/videos/ownership/{id}/refuse':
1623 post:
1624 summary: Refuse ownership change request
1625 tags:
1626 - Video Ownership Change
1627 security:
1628 - OAuth2: []
1629 parameters:
1630 - $ref: '#/components/parameters/idOrUUID'
1631 responses:
1632 '204':
1633 description: successful operation
1634 '403':
1635 description: cannot terminate an ownership change of another user
1636 '404':
1637 description: video owneship change not found
1638
1639 '/videos/{id}/give-ownership':
1640 post:
1641 summary: Request ownership change
1642 tags:
1643 - Video Ownership Change
1644 security:
1645 - OAuth2: []
1646 parameters:
1647 - $ref: '#/components/parameters/idOrUUID'
1648 requestBody:
1649 required: true
1650 content:
1651 application/x-www-form-urlencoded:
1652 schema:
1653 type: object
1654 properties:
1655 username:
1656 type: string
1657 required:
1658 - username
1659 responses:
1660 '204':
1661 description: successful operation
1662 '400':
1663 description: changing video ownership to a remote account is not supported yet
1664 '404':
1665 description: video not found
1666
1667 /videos:
1668 get:
1669 summary: List videos
1670 operationId: getVideos
1671 tags:
1672 - Video
1673 parameters:
1674 - $ref: '#/components/parameters/categoryOneOf'
1675 - $ref: '#/components/parameters/isLive'
1676 - $ref: '#/components/parameters/tagsOneOf'
1677 - $ref: '#/components/parameters/tagsAllOf'
1678 - $ref: '#/components/parameters/licenceOneOf'
1679 - $ref: '#/components/parameters/languageOneOf'
1680 - $ref: '#/components/parameters/nsfw'
1681 - $ref: '#/components/parameters/isLocal'
1682 - $ref: '#/components/parameters/include'
1683 - $ref: '#/components/parameters/privacyOneOf'
1684 - $ref: '#/components/parameters/hasHLSFiles'
1685 - $ref: '#/components/parameters/hasWebtorrentFiles'
1686 - $ref: '#/components/parameters/skipCount'
1687 - $ref: '#/components/parameters/start'
1688 - $ref: '#/components/parameters/count'
1689 - $ref: '#/components/parameters/videosSort'
1690 responses:
1691 '200':
1692 description: successful operation
1693 content:
1694 application/json:
1695 schema:
1696 $ref: '#/components/schemas/VideoListResponse'
1697
1698 /videos/categories:
1699 get:
1700 summary: List available video categories
1701 operationId: getCategories
1702 tags:
1703 - Video
1704 responses:
1705 '200':
1706 description: successful operation
1707 content:
1708 application/json:
1709 schema:
1710 type: array
1711 items:
1712 type: string
1713 examples:
1714 nightly:
1715 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1716
1717 /videos/licences:
1718 get:
1719 summary: List available video licences
1720 operationId: getLicences
1721 tags:
1722 - Video
1723 responses:
1724 '200':
1725 description: successful operation
1726 content:
1727 application/json:
1728 schema:
1729 type: array
1730 items:
1731 type: string
1732 examples:
1733 nightly:
1734 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1735
1736 /videos/languages:
1737 get:
1738 summary: List available video languages
1739 operationId: getLanguages
1740 tags:
1741 - Video
1742 responses:
1743 '200':
1744 description: successful operation
1745 content:
1746 application/json:
1747 schema:
1748 type: array
1749 items:
1750 type: string
1751 examples:
1752 nightly:
1753 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1754
1755 /videos/privacies:
1756 get:
1757 summary: List available video privacy policies
1758 operationId: getPrivacyPolicies
1759 tags:
1760 - Video
1761 responses:
1762 '200':
1763 description: successful operation
1764 content:
1765 application/json:
1766 schema:
1767 type: array
1768 items:
1769 type: string
1770 examples:
1771 nightly:
1772 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1773
1774 '/videos/{id}':
1775 put:
1776 summary: Update a video
1777 operationId: putVideo
1778 security:
1779 - OAuth2: []
1780 tags:
1781 - Video
1782 parameters:
1783 - $ref: '#/components/parameters/idOrUUID'
1784 responses:
1785 '204':
1786 description: successful operation
1787 requestBody:
1788 content:
1789 multipart/form-data:
1790 schema:
1791 type: object
1792 properties:
1793 thumbnailfile:
1794 description: Video thumbnail file
1795 type: string
1796 format: binary
1797 previewfile:
1798 description: Video preview file
1799 type: string
1800 format: binary
1801 category:
1802 $ref: '#/components/schemas/VideoCategorySet'
1803 licence:
1804 $ref: '#/components/schemas/VideoLicenceSet'
1805 language:
1806 $ref: '#/components/schemas/VideoLanguageSet'
1807 privacy:
1808 $ref: '#/components/schemas/VideoPrivacySet'
1809 description:
1810 description: Video description
1811 type: string
1812 waitTranscoding:
1813 description: Whether or not we wait transcoding before publish the video
1814 type: string
1815 support:
1816 description: A text tell the audience how to support the video creator
1817 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1818 type: string
1819 nsfw:
1820 description: Whether or not this video contains sensitive content
1821 type: boolean
1822 name:
1823 description: Video name
1824 type: string
1825 minLength: 3
1826 maxLength: 120
1827 tags:
1828 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1829 type: array
1830 minItems: 1
1831 maxItems: 5
1832 items:
1833 type: string
1834 minLength: 2
1835 maxLength: 30
1836 commentsEnabled:
1837 description: Enable or disable comments for this video
1838 type: boolean
1839 downloadEnabled:
1840 description: Enable or disable downloading for this video
1841 type: boolean
1842 originallyPublishedAt:
1843 description: Date when the content was originally published
1844 type: string
1845 format: date-time
1846 scheduleUpdate:
1847 $ref: '#/components/schemas/VideoScheduledUpdate'
1848 encoding:
1849 thumbnailfile:
1850 contentType: image/jpeg
1851 previewfile:
1852 contentType: image/jpeg
1853 get:
1854 summary: Get a video
1855 operationId: getVideo
1856 tags:
1857 - Video
1858 parameters:
1859 - $ref: '#/components/parameters/idOrUUID'
1860 responses:
1861 '200':
1862 description: successful operation
1863 content:
1864 application/json:
1865 schema:
1866 $ref: '#/components/schemas/VideoDetails'
1867 delete:
1868 summary: Delete a video
1869 operationId: delVideo
1870 security:
1871 - OAuth2: []
1872 tags:
1873 - Video
1874 parameters:
1875 - $ref: '#/components/parameters/idOrUUID'
1876 responses:
1877 '204':
1878 description: successful operation
1879
1880 '/videos/{id}/description':
1881 get:
1882 summary: Get complete video description
1883 operationId: getVideoDesc
1884 tags:
1885 - Video
1886 parameters:
1887 - $ref: '#/components/parameters/idOrUUID'
1888 responses:
1889 '200':
1890 description: successful operation
1891 content:
1892 application/json:
1893 schema:
1894 nullable: true
1895 type: string
1896 minLength: 3
1897 maxLength: 10000
1898 example: |
1899 **[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)**
1900
1901 '/videos/{id}/views':
1902 post:
1903 summary: Add a view to a video
1904 operationId: addView
1905 tags:
1906 - Video
1907 parameters:
1908 - $ref: '#/components/parameters/idOrUUID'
1909 responses:
1910 '204':
1911 description: successful operation
1912
1913 '/videos/{id}/watching':
1914 put:
1915 summary: Set watching progress of a video
1916 operationId: setProgress
1917 tags:
1918 - Video
1919 security:
1920 - OAuth2: []
1921 parameters:
1922 - $ref: '#/components/parameters/idOrUUID'
1923 requestBody:
1924 content:
1925 application/json:
1926 schema:
1927 $ref: '#/components/schemas/UserWatchingVideo'
1928 required: true
1929 responses:
1930 '204':
1931 description: successful operation
1932
1933 /videos/upload:
1934 post:
1935 summary: Upload a video
1936 description: Uses a single request to upload a video.
1937 operationId: uploadLegacy
1938 security:
1939 - OAuth2: []
1940 tags:
1941 - Video
1942 - Video Upload
1943 responses:
1944 '200':
1945 description: successful operation
1946 content:
1947 application/json:
1948 schema:
1949 $ref: '#/components/schemas/VideoUploadResponse'
1950 '403':
1951 description: video didn't pass upload filter
1952 '408':
1953 description: upload has timed out
1954 '413':
1955 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy
1956 description: |
1957 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`:
1958 - `quota_reached` for quota limits wether daily or global
1959 headers:
1960 X-File-Maximum-Size:
1961 schema:
1962 type: string
1963 format: Nginx size
1964 description: Maximum file size for the video
1965 '415':
1966 description: video type unsupported
1967 '422':
1968 description: video unreadable
1969 requestBody:
1970 content:
1971 multipart/form-data:
1972 schema:
1973 $ref: '#/components/schemas/VideoUploadRequestLegacy'
1974 encoding:
1975 videofile:
1976 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1977 thumbnailfile:
1978 contentType: image/jpeg
1979 previewfile:
1980 contentType: image/jpeg
1981 x-codeSamples:
1982 - lang: Shell
1983 source: |
1984 ## DEPENDENCIES: jq
1985 USERNAME="<your_username>"
1986 PASSWORD="<your_password>"
1987 FILE_PATH="<your_file_path>"
1988 CHANNEL_ID="<your_channel_id>"
1989 NAME="<video_name>"
1990 API="https://peertube2.cpy.re/api/v1"
1991
1992 ## AUTH
1993 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id")
1994 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret")
1995 token=$(curl -s "$API/users/token" \
1996 --data client_id="$client_id" \
1997 --data client_secret="$client_secret" \
1998 --data grant_type=password \
1999 --data username="$USERNAME" \
2000 --data password="$PASSWORD" \
2001 | jq -r ".access_token")
2002
2003 ## VIDEO UPLOAD
2004 curl -s "$API/videos/upload" \
2005 -H "Authorization: Bearer $token" \
2006 --max-time 600 \
2007 --form videofile=@"$FILE_PATH" \
2008 --form channelId=$CHANNEL_ID \
2009 --form name="$NAME"
2010
2011 /videos/upload-resumable:
2012 post:
2013 summary: Initialize the resumable upload of a video
2014 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
2015 operationId: uploadResumableInit
2016 security:
2017 - OAuth2: []
2018 tags:
2019 - Video
2020 - Video Upload
2021 parameters:
2022 - name: X-Upload-Content-Length
2023 in: header
2024 schema:
2025 type: number
2026 example: 2469036
2027 required: true
2028 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading.
2029 - name: X-Upload-Content-Type
2030 in: header
2031 schema:
2032 type: string
2033 format: mimetype
2034 example: video/mp4
2035 required: true
2036 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary.
2037 requestBody:
2038 content:
2039 application/json:
2040 schema:
2041 $ref: '#/components/schemas/VideoUploadRequestResumable'
2042 responses:
2043 '200':
2044 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead
2045 '201':
2046 description: created
2047 headers:
2048 Location:
2049 schema:
2050 type: string
2051 format: url
2052 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51
2053 Content-Length:
2054 schema:
2055 type: number
2056 example: 0
2057 '413':
2058 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit
2059 description: |
2060 Disambiguate via `type`:
2061 - `max_file_size_reached` for the absolute file size limit
2062 - `quota_reached` for quota limits whether daily or global
2063 '415':
2064 description: video type unsupported
2065 put:
2066 summary: Send chunk for the resumable upload of a video
2067 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
2068 operationId: uploadResumable
2069 security:
2070 - OAuth2: []
2071 tags:
2072 - Video
2073 - Video Upload
2074 parameters:
2075 - name: upload_id
2076 in: query
2077 required: true
2078 description: |
2079 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2080 not valid anymore and you need to initialize a new upload.
2081 schema:
2082 type: string
2083 - name: Content-Range
2084 in: header
2085 schema:
2086 type: string
2087 example: bytes 0-262143/2469036
2088 required: true
2089 description: |
2090 Specifies the bytes in the file that the request is uploading.
2091
2092 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first
2093 262144 bytes (256 x 1024) in a 2,469,036 byte file.
2094 - name: Content-Length
2095 in: header
2096 schema:
2097 type: number
2098 example: 262144
2099 required: true
2100 description: |
2101 Size of the chunk that the request is sending.
2102
2103 The chunk size __must be a multiple of 256 KB__, and unlike [Google Resumable](https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol)
2104 doesn't mandate for chunks to have the same size throughout the upload sequence.
2105
2106 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from
2107 1048576 bytes (~1MB) and increases or reduces size depending on connection health.
2108 requestBody:
2109 content:
2110 application/octet-stream:
2111 schema:
2112 type: string
2113 format: binary
2114 responses:
2115 '200':
2116 description: last chunk received
2117 headers:
2118 Content-Length:
2119 schema:
2120 type: number
2121 content:
2122 application/json:
2123 schema:
2124 $ref: '#/components/schemas/VideoUploadResponse'
2125 '308':
2126 description: resume incomplete
2127 headers:
2128 Range:
2129 schema:
2130 type: string
2131 example: bytes=0-262143
2132 Content-Length:
2133 schema:
2134 type: number
2135 example: 0
2136 '403':
2137 description: video didn't pass upload filter
2138 '404':
2139 description: upload not found
2140 '409':
2141 description: chunk doesn't match range
2142 '422':
2143 description: video unreadable
2144 '429':
2145 description: too many concurrent requests
2146 '503':
2147 description: upload is already being processed
2148 headers:
2149 'Retry-After':
2150 schema:
2151 type: number
2152 example: 300
2153 delete:
2154 summary: Cancel the resumable upload of a video, deleting any data uploaded so far
2155 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video
2156 operationId: uploadResumableCancel
2157 security:
2158 - OAuth2: []
2159 tags:
2160 - Video
2161 - Video Upload
2162 parameters:
2163 - name: upload_id
2164 in: query
2165 required: true
2166 description: |
2167 Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is
2168 not valid anymore and the upload session has already been deleted with its data ;-)
2169 schema:
2170 type: string
2171 - name: Content-Length
2172 in: header
2173 required: true
2174 schema:
2175 type: number
2176 example: 0
2177 responses:
2178 '204':
2179 description: upload cancelled
2180 headers:
2181 Content-Length:
2182 schema:
2183 type: number
2184 example: 0
2185 '404':
2186 description: upload not found
2187
2188 /videos/imports:
2189 post:
2190 summary: Import a video
2191 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
2192 operationId: importVideo
2193 security:
2194 - OAuth2: []
2195 tags:
2196 - Video Imports
2197 - Video Upload
2198 requestBody:
2199 content:
2200 multipart/form-data:
2201 schema:
2202 $ref: '#/components/schemas/VideoCreateImport'
2203 encoding:
2204 torrentfile:
2205 contentType: application/x-bittorrent
2206 thumbnailfile:
2207 contentType: image/jpeg
2208 previewfile:
2209 contentType: image/jpeg
2210 responses:
2211 '200':
2212 description: successful operation
2213 content:
2214 application/json:
2215 schema:
2216 $ref: '#/components/schemas/VideoUploadResponse'
2217 '400':
2218 description: '`magnetUri` or `targetUrl` or a torrent file missing'
2219 '403':
2220 description: video didn't pass pre-import filter
2221 '409':
2222 description: HTTP or Torrent/magnetURI import not enabled
2223
2224 /videos/imports/{id}/cancel:
2225 post:
2226 summary: Cancel video import
2227 description: Cancel a pending video import
2228 security:
2229 - OAuth2: []
2230 tags:
2231 - Video Imports
2232 parameters:
2233 - $ref: '#/components/parameters/id'
2234 responses:
2235 '204':
2236 description: successful operation
2237
2238 /videos/imports/{id}:
2239 delete:
2240 summary: Delete video import
2241 description: Delete ended video import
2242 security:
2243 - OAuth2: []
2244 tags:
2245 - Video Imports
2246 parameters:
2247 - $ref: '#/components/parameters/id'
2248 responses:
2249 '204':
2250 description: successful operation
2251
2252 /videos/live:
2253 post:
2254 summary: Create a live
2255 operationId: addLive
2256 security:
2257 - OAuth2: []
2258 tags:
2259 - Live Videos
2260 - Video
2261 responses:
2262 '200':
2263 description: successful operation
2264 content:
2265 application/json:
2266 schema:
2267 $ref: '#/components/schemas/VideoUploadResponse'
2268 '400':
2269 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set
2270 description: |
2271 Disambiguate via `type`:
2272 - default type for a validation error
2273 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set
2274 '403':
2275 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
2276 description: |
2277 Disambiguate via `type`:
2278 - `live_not_enabled` for a disabled live feature
2279 - `live_not_allowing_replay` for a disabled replay feature
2280 - `max_instance_lives_limit_reached` for the absolute concurrent live limit
2281 - `max_user_lives_limit_reached` for the user concurrent live limit
2282 requestBody:
2283 content:
2284 multipart/form-data:
2285 schema:
2286 type: object
2287 properties:
2288 channelId:
2289 description: Channel id that will contain this live video
2290 type: integer
2291 saveReplay:
2292 type: boolean
2293 permanentLive:
2294 description: User can stream multiple times in a permanent live
2295 type: boolean
2296 thumbnailfile:
2297 description: Live video/replay thumbnail file
2298 type: string
2299 format: binary
2300 previewfile:
2301 description: Live video/replay preview file
2302 type: string
2303 format: binary
2304 privacy:
2305 $ref: '#/components/schemas/VideoPrivacySet'
2306 category:
2307 $ref: '#/components/schemas/VideoCategorySet'
2308 licence:
2309 $ref: '#/components/schemas/VideoLicenceSet'
2310 language:
2311 $ref: '#/components/schemas/VideoLanguageSet'
2312 description:
2313 description: Live video/replay description
2314 type: string
2315 support:
2316 description: A text tell the audience how to support the creator
2317 example: Please support our work on https://soutenir.framasoft.org/en/ <3
2318 type: string
2319 nsfw:
2320 description: Whether or not this live video/replay contains sensitive content
2321 type: boolean
2322 name:
2323 description: Live video/replay name
2324 type: string
2325 minLength: 3
2326 maxLength: 120
2327 tags:
2328 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
2329 type: array
2330 minItems: 1
2331 maxItems: 5
2332 items:
2333 type: string
2334 minLength: 2
2335 maxLength: 30
2336 commentsEnabled:
2337 description: Enable or disable comments for this live video/replay
2338 type: boolean
2339 downloadEnabled:
2340 description: Enable or disable downloading for the replay of this live video
2341 type: boolean
2342 required:
2343 - channelId
2344 - name
2345 encoding:
2346 thumbnailfile:
2347 contentType: image/jpeg
2348 previewfile:
2349 contentType: image/jpeg
2350
2351 /videos/live/{id}:
2352 get:
2353 summary: Get information about a live
2354 operationId: getLiveId
2355 security:
2356 - OAuth2: []
2357 tags:
2358 - Live Videos
2359 - Video
2360 parameters:
2361 - $ref: '#/components/parameters/idOrUUID'
2362 responses:
2363 '200':
2364 description: successful operation
2365 content:
2366 application/json:
2367 schema:
2368 $ref: '#/components/schemas/LiveVideoResponse'
2369 put:
2370 summary: Update information about a live
2371 operationId: updateLiveId
2372 security:
2373 - OAuth2: []
2374 tags:
2375 - Live Videos
2376 - Video
2377 parameters:
2378 - $ref: '#/components/parameters/idOrUUID'
2379 requestBody:
2380 content:
2381 application/json:
2382 schema:
2383 $ref: '#/components/schemas/LiveVideoUpdate'
2384 responses:
2385 '204':
2386 description: successful operation
2387 '400':
2388 description: bad parameters or trying to update a live that has already started
2389 '403':
2390 description: trying to save replay of the live but saving replay is not enabled on the instance
2391
2392 /users/me/abuses:
2393 get:
2394 summary: List my abuses
2395 operationId: getMyAbuses
2396 security:
2397 - OAuth2: []
2398 tags:
2399 - Abuses
2400 - My User
2401 parameters:
2402 - name: id
2403 in: query
2404 description: only list the report with this id
2405 schema:
2406 type: integer
2407 - name: state
2408 in: query
2409 schema:
2410 $ref: '#/components/schemas/AbuseStateSet'
2411 - $ref: '#/components/parameters/abusesSort'
2412 - $ref: '#/components/parameters/start'
2413 - $ref: '#/components/parameters/count'
2414 responses:
2415 '200':
2416 description: successful operation
2417 content:
2418 application/json:
2419 schema:
2420 type: object
2421 properties:
2422 total:
2423 type: integer
2424 example: 1
2425 data:
2426 type: array
2427 items:
2428 $ref: '#/components/schemas/Abuse'
2429
2430 /abuses:
2431 get:
2432 summary: List abuses
2433 operationId: getAbuses
2434 security:
2435 - OAuth2:
2436 - admin
2437 - moderator
2438 tags:
2439 - Abuses
2440 parameters:
2441 - name: id
2442 in: query
2443 description: only list the report with this id
2444 schema:
2445 type: integer
2446 - name: predefinedReason
2447 in: query
2448 description: predefined reason the listed reports should contain
2449 schema:
2450 $ref: '#/components/schemas/PredefinedAbuseReasons'
2451 - name: search
2452 in: query
2453 description: plain search that will match with video titles, reporter names and more
2454 schema:
2455 type: string
2456 - name: state
2457 in: query
2458 schema:
2459 $ref: '#/components/schemas/AbuseStateSet'
2460 - name: searchReporter
2461 in: query
2462 description: only list reports of a specific reporter
2463 schema:
2464 type: string
2465 - name: searchReportee
2466 description: only list reports of a specific reportee
2467 in: query
2468 schema:
2469 type: string
2470 - name: searchVideo
2471 in: query
2472 description: only list reports of a specific video
2473 schema:
2474 type: string
2475 - name: searchVideoChannel
2476 in: query
2477 description: only list reports of a specific video channel
2478 schema:
2479 type: string
2480 - name: videoIs
2481 in: query
2482 description: only list deleted or blocklisted videos
2483 schema:
2484 type: string
2485 enum:
2486 - 'deleted'
2487 - 'blacklisted'
2488 - name: filter
2489 in: query
2490 description: only list account, comment or video reports
2491 schema:
2492 type: string
2493 enum:
2494 - 'video'
2495 - 'comment'
2496 - 'account'
2497 - $ref: '#/components/parameters/start'
2498 - $ref: '#/components/parameters/count'
2499 - $ref: '#/components/parameters/abusesSort'
2500 responses:
2501 '200':
2502 description: successful operation
2503 content:
2504 application/json:
2505 schema:
2506 type: object
2507 properties:
2508 total:
2509 type: integer
2510 example: 1
2511 data:
2512 type: array
2513 items:
2514 $ref: '#/components/schemas/Abuse'
2515 post:
2516 summary: Report an abuse
2517 security:
2518 - OAuth2: []
2519 tags:
2520 - Abuses
2521 requestBody:
2522 required: true
2523 content:
2524 application/json:
2525 schema:
2526 type: object
2527 properties:
2528 reason:
2529 description: Reason why the user reports this video
2530 type: string
2531 minLength: 2
2532 maxLength: 3000
2533 predefinedReasons:
2534 $ref: '#/components/schemas/PredefinedAbuseReasons'
2535 video:
2536 type: object
2537 properties:
2538 id:
2539 description: Video id to report
2540 allOf:
2541 - $ref: '#/components/schemas/Video/properties/id'
2542 startAt:
2543 type: integer
2544 format: seconds
2545 description: Timestamp in the video that marks the beginning of the report
2546 minimum: 0
2547 endAt:
2548 type: integer
2549 format: seconds
2550 description: Timestamp in the video that marks the ending of the report
2551 minimum: 0
2552 comment:
2553 type: object
2554 properties:
2555 id:
2556 description: Comment id to report
2557 allOf:
2558 - $ref: '#/components/schemas/VideoComment/properties/id'
2559 account:
2560 type: object
2561 properties:
2562 id:
2563 description: Account id to report
2564 type: integer
2565 required:
2566 - reason
2567 responses:
2568 '200':
2569 description: successful operation
2570 content:
2571 application/json:
2572 schema:
2573 type: object
2574 properties:
2575 abuse:
2576 type: object
2577 properties:
2578 id:
2579 $ref: '#/components/schemas/id'
2580 '400':
2581 description: incorrect request parameters
2582
2583 '/abuses/{abuseId}':
2584 put:
2585 summary: Update an abuse
2586 security:
2587 - OAuth2:
2588 - admin
2589 - moderator
2590 tags:
2591 - Abuses
2592 parameters:
2593 - $ref: '#/components/parameters/abuseId'
2594 requestBody:
2595 content:
2596 application/json:
2597 schema:
2598 type: object
2599 properties:
2600 state:
2601 $ref: '#/components/schemas/AbuseStateSet'
2602 moderationComment:
2603 type: string
2604 description: Update the report comment visible only to the moderation team
2605 minLength: 2
2606 maxLength: 3000
2607 responses:
2608 '204':
2609 description: successful operation
2610 '404':
2611 description: abuse not found
2612 delete:
2613 tags:
2614 - Abuses
2615 summary: Delete an abuse
2616 security:
2617 - OAuth2:
2618 - admin
2619 - moderator
2620 parameters:
2621 - $ref: '#/components/parameters/abuseId'
2622 responses:
2623 '204':
2624 description: successful operation
2625 '404':
2626 description: block not found
2627
2628 '/abuses/{abuseId}/messages':
2629 get:
2630 summary: List messages of an abuse
2631 security:
2632 - OAuth2: []
2633 tags:
2634 - Abuses
2635 parameters:
2636 - $ref: '#/components/parameters/abuseId'
2637 responses:
2638 '200':
2639 description: successful operation
2640 content:
2641 application/json:
2642 schema:
2643 type: object
2644 properties:
2645 total:
2646 type: integer
2647 example: 1
2648 data:
2649 type: array
2650 items:
2651 $ref: '#/components/schemas/AbuseMessage'
2652 post:
2653 summary: Add message to an abuse
2654 security:
2655 - OAuth2: []
2656 tags:
2657 - Abuses
2658 parameters:
2659 - $ref: '#/components/parameters/abuseId'
2660 requestBody:
2661 required: true
2662 content:
2663 application/json:
2664 schema:
2665 type: object
2666 properties:
2667 message:
2668 description: Message to send
2669 type: string
2670 minLength: 2
2671 maxLength: 3000
2672 required:
2673 - message
2674 responses:
2675 '200':
2676 description: successful operation
2677 '400':
2678 description: incorrect request parameters
2679
2680 '/abuses/{abuseId}/messages/{abuseMessageId}':
2681 delete:
2682 summary: Delete an abuse message
2683 security:
2684 - OAuth2: []
2685 tags:
2686 - Abuses
2687 parameters:
2688 - $ref: '#/components/parameters/abuseId'
2689 - $ref: '#/components/parameters/abuseMessageId'
2690 responses:
2691 '204':
2692 description: successful operation
2693
2694 '/videos/{id}/blacklist':
2695 post:
2696 summary: Block a video
2697 operationId: addVideoBlock
2698 security:
2699 - OAuth2:
2700 - admin
2701 - moderator
2702 tags:
2703 - Video Blocks
2704 parameters:
2705 - $ref: '#/components/parameters/idOrUUID'
2706 responses:
2707 '204':
2708 description: successful operation
2709 delete:
2710 summary: Unblock a video by its id
2711 operationId: delVideoBlock
2712 security:
2713 - OAuth2:
2714 - admin
2715 - moderator
2716 tags:
2717 - Video Blocks
2718 parameters:
2719 - $ref: '#/components/parameters/idOrUUID'
2720 responses:
2721 '204':
2722 description: successful operation
2723 '404':
2724 description: block not found
2725
2726 /videos/blacklist:
2727 get:
2728 tags:
2729 - Video Blocks
2730 summary: List video blocks
2731 operationId: getVideoBlocks
2732 security:
2733 - OAuth2:
2734 - admin
2735 - moderator
2736 parameters:
2737 - name: type
2738 in: query
2739 description: >
2740 list only blocks that match this type:
2741
2742 - `1`: manual block
2743
2744 - `2`: automatic block that needs review
2745 schema:
2746 type: integer
2747 enum:
2748 - 1
2749 - 2
2750 - name: search
2751 in: query
2752 description: plain search that will match with video titles, and more
2753 schema:
2754 type: string
2755 - $ref: '#/components/parameters/start'
2756 - $ref: '#/components/parameters/count'
2757 - $ref: '#/components/parameters/blacklistsSort'
2758 responses:
2759 '200':
2760 description: successful operation
2761 content:
2762 application/json:
2763 schema:
2764 type: object
2765 properties:
2766 total:
2767 type: integer
2768 example: 1
2769 data:
2770 type: array
2771 items:
2772 $ref: '#/components/schemas/VideoBlacklist'
2773
2774 /videos/{id}/captions:
2775 get:
2776 summary: List captions of a video
2777 operationId: getVideoCaptions
2778 tags:
2779 - Video Captions
2780 parameters:
2781 - $ref: '#/components/parameters/idOrUUID'
2782 responses:
2783 '200':
2784 description: successful operation
2785 content:
2786 application/json:
2787 schema:
2788 type: object
2789 properties:
2790 total:
2791 type: integer
2792 example: 1
2793 data:
2794 type: array
2795 items:
2796 $ref: '#/components/schemas/VideoCaption'
2797
2798 /videos/{id}/captions/{captionLanguage}:
2799 put:
2800 summary: Add or replace a video caption
2801 operationId: addVideoCaption
2802 security:
2803 - OAuth2:
2804 - user
2805 tags:
2806 - Video Captions
2807 parameters:
2808 - $ref: '#/components/parameters/idOrUUID'
2809 - $ref: '#/components/parameters/captionLanguage'
2810 requestBody:
2811 content:
2812 multipart/form-data:
2813 schema:
2814 type: object
2815 properties:
2816 captionfile:
2817 description: The file to upload.
2818 type: string
2819 format: binary
2820 encoding:
2821 captionfile:
2822 contentType: text/vtt, application/x-subrip, text/plain
2823 responses:
2824 '204':
2825 description: successful operation
2826 '404':
2827 description: video or language not found
2828 delete:
2829 summary: Delete a video caption
2830 operationId: delVideoCaption
2831 security:
2832 - OAuth2:
2833 - user
2834 tags:
2835 - Video Captions
2836 parameters:
2837 - $ref: '#/components/parameters/idOrUUID'
2838 - $ref: '#/components/parameters/captionLanguage'
2839 responses:
2840 '204':
2841 description: successful operation
2842 '404':
2843 description: video or language or caption for that language not found
2844
2845 /video-channels:
2846 get:
2847 summary: List video channels
2848 operationId: getVideoChannels
2849 tags:
2850 - Video Channels
2851 parameters:
2852 - $ref: '#/components/parameters/start'
2853 - $ref: '#/components/parameters/count'
2854 - $ref: '#/components/parameters/sort'
2855 responses:
2856 '200':
2857 description: successful operation
2858 content:
2859 application/json:
2860 schema:
2861 $ref: '#/components/schemas/VideoChannelList'
2862 post:
2863 summary: Create a video channel
2864 operationId: addVideoChannel
2865 security:
2866 - OAuth2: []
2867 tags:
2868 - Video Channels
2869 responses:
2870 '204':
2871 description: successful operation
2872 content:
2873 application/json:
2874 schema:
2875 type: object
2876 properties:
2877 videoChannel:
2878 type: object
2879 properties:
2880 id:
2881 $ref: '#/components/schemas/VideoChannel/properties/id'
2882 requestBody:
2883 content:
2884 application/json:
2885 schema:
2886 $ref: '#/components/schemas/VideoChannelCreate'
2887
2888 '/video-channels/{channelHandle}':
2889 get:
2890 summary: Get a video channel
2891 operationId: getVideoChannel
2892 tags:
2893 - Video Channels
2894 parameters:
2895 - $ref: '#/components/parameters/channelHandle'
2896 responses:
2897 '200':
2898 description: successful operation
2899 content:
2900 application/json:
2901 schema:
2902 $ref: '#/components/schemas/VideoChannel'
2903 put:
2904 summary: Update a video channel
2905 operationId: putVideoChannel
2906 security:
2907 - OAuth2: []
2908 tags:
2909 - Video Channels
2910 parameters:
2911 - $ref: '#/components/parameters/channelHandle'
2912 responses:
2913 '204':
2914 description: successful operation
2915 requestBody:
2916 content:
2917 application/json:
2918 schema:
2919 $ref: '#/components/schemas/VideoChannelUpdate'
2920 delete:
2921 summary: Delete a video channel
2922 operationId: delVideoChannel
2923 security:
2924 - OAuth2: []
2925 tags:
2926 - Video Channels
2927 parameters:
2928 - $ref: '#/components/parameters/channelHandle'
2929 responses:
2930 '204':
2931 description: successful operation
2932
2933 '/video-channels/{channelHandle}/videos':
2934 get:
2935 summary: List videos of a video channel
2936 operationId: getVideoChannelVideos
2937 tags:
2938 - Video
2939 - Video Channels
2940 parameters:
2941 - $ref: '#/components/parameters/channelHandle'
2942 - $ref: '#/components/parameters/categoryOneOf'
2943 - $ref: '#/components/parameters/isLive'
2944 - $ref: '#/components/parameters/tagsOneOf'
2945 - $ref: '#/components/parameters/tagsAllOf'
2946 - $ref: '#/components/parameters/licenceOneOf'
2947 - $ref: '#/components/parameters/languageOneOf'
2948 - $ref: '#/components/parameters/nsfw'
2949 - $ref: '#/components/parameters/isLocal'
2950 - $ref: '#/components/parameters/include'
2951 - $ref: '#/components/parameters/privacyOneOf'
2952 - $ref: '#/components/parameters/hasHLSFiles'
2953 - $ref: '#/components/parameters/hasWebtorrentFiles'
2954 - $ref: '#/components/parameters/skipCount'
2955 - $ref: '#/components/parameters/start'
2956 - $ref: '#/components/parameters/count'
2957 - $ref: '#/components/parameters/videosSort'
2958 responses:
2959 '200':
2960 description: successful operation
2961 content:
2962 application/json:
2963 schema:
2964 $ref: '#/components/schemas/VideoListResponse'
2965
2966 '/video-channels/{channelHandle}/followers':
2967 get:
2968 tags:
2969 - Video Channels
2970 summary: 'List followers of a video channel'
2971 security:
2972 - OAuth2: []
2973 operationId: getVideoChannelFollowers
2974 parameters:
2975 - $ref: '#/components/parameters/channelHandle'
2976 - $ref: '#/components/parameters/start'
2977 - $ref: '#/components/parameters/count'
2978 - $ref: '#/components/parameters/followersSort'
2979 - $ref: '#/components/parameters/search'
2980 responses:
2981 '200':
2982 description: successful operation
2983 content:
2984 application/json:
2985 schema:
2986 type: object
2987 properties:
2988 total:
2989 type: integer
2990 example: 1
2991 data:
2992 type: array
2993 items:
2994 $ref: '#/components/schemas/Follow'
2995
2996 '/video-channels/{channelHandle}/avatar/pick':
2997 post:
2998 summary: Update channel avatar
2999 security:
3000 - OAuth2: []
3001 tags:
3002 - Video Channels
3003 parameters:
3004 - $ref: '#/components/parameters/channelHandle'
3005 responses:
3006 '200':
3007 description: successful operation
3008 content:
3009 application/json:
3010 schema:
3011 type: object
3012 properties:
3013 avatar:
3014 $ref: '#/components/schemas/ActorImage'
3015 '413':
3016 description: image file too large
3017 headers:
3018 X-File-Maximum-Size:
3019 schema:
3020 type: string
3021 format: Nginx size
3022 description: Maximum file size for the avatar
3023 requestBody:
3024 content:
3025 multipart/form-data:
3026 schema:
3027 type: object
3028 properties:
3029 avatarfile:
3030 description: The file to upload.
3031 type: string
3032 format: binary
3033 encoding:
3034 avatarfile:
3035 contentType: image/png, image/jpeg
3036
3037 '/video-channels/{channelHandle}/avatar':
3038 delete:
3039 summary: Delete channel avatar
3040 security:
3041 - OAuth2: []
3042 tags:
3043 - Video Channels
3044 parameters:
3045 - $ref: '#/components/parameters/channelHandle'
3046 responses:
3047 '204':
3048 description: successful operation
3049
3050 '/video-channels/{channelHandle}/banner/pick':
3051 post:
3052 summary: Update channel banner
3053 security:
3054 - OAuth2: []
3055 tags:
3056 - Video Channels
3057 parameters:
3058 - $ref: '#/components/parameters/channelHandle'
3059 responses:
3060 '200':
3061 description: successful operation
3062 content:
3063 application/json:
3064 schema:
3065 type: object
3066 properties:
3067 banner:
3068 $ref: '#/components/schemas/ActorImage'
3069 '413':
3070 description: image file too large
3071 headers:
3072 X-File-Maximum-Size:
3073 schema:
3074 type: string
3075 format: Nginx size
3076 description: Maximum file size for the banner
3077 requestBody:
3078 content:
3079 multipart/form-data:
3080 schema:
3081 type: object
3082 properties:
3083 bannerfile:
3084 description: The file to upload.
3085 type: string
3086 format: binary
3087 encoding:
3088 bannerfile:
3089 contentType: image/png, image/jpeg
3090
3091 '/video-channels/{channelHandle}/banner':
3092 delete:
3093 summary: Delete channel banner
3094 security:
3095 - OAuth2: []
3096 tags:
3097 - Video Channels
3098 parameters:
3099 - $ref: '#/components/parameters/channelHandle'
3100 responses:
3101 '204':
3102 description: successful operation
3103
3104 /video-playlists/privacies:
3105 get:
3106 summary: List available playlist privacy policies
3107 operationId: getPlaylistPrivacyPolicies
3108 tags:
3109 - Video Playlists
3110 responses:
3111 '200':
3112 description: successful operation
3113 content:
3114 application/json:
3115 schema:
3116 type: array
3117 items:
3118 type: string
3119 examples:
3120 nightly:
3121 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
3122
3123 /video-playlists:
3124 get:
3125 summary: List video playlists
3126 operationId: getPlaylists
3127 tags:
3128 - Video Playlists
3129 parameters:
3130 - $ref: '#/components/parameters/start'
3131 - $ref: '#/components/parameters/count'
3132 - $ref: '#/components/parameters/sort'
3133 responses:
3134 '200':
3135 description: successful operation
3136 content:
3137 application/json:
3138 schema:
3139 type: object
3140 properties:
3141 total:
3142 type: integer
3143 example: 1
3144 data:
3145 type: array
3146 items:
3147 $ref: '#/components/schemas/VideoPlaylist'
3148 post:
3149 summary: Create a video playlist
3150 description: If the video playlist is set as public, `videoChannelId` is mandatory.
3151 operationId: addPlaylist
3152 security:
3153 - OAuth2: []
3154 tags:
3155 - Video Playlists
3156 responses:
3157 '200':
3158 description: successful operation
3159 content:
3160 application/json:
3161 schema:
3162 type: object
3163 properties:
3164 videoPlaylist:
3165 type: object
3166 properties:
3167 id:
3168 $ref: '#/components/schemas/VideoPlaylist/properties/id'
3169 uuid:
3170 $ref: '#/components/schemas/VideoPlaylist/properties/uuid'
3171 shortUUID:
3172 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID'
3173 requestBody:
3174 content:
3175 multipart/form-data:
3176 schema:
3177 type: object
3178 properties:
3179 displayName:
3180 description: Video playlist display name
3181 type: string
3182 minLength: 1
3183 maxLength: 120
3184 thumbnailfile:
3185 description: Video playlist thumbnail file
3186 type: string
3187 format: binary
3188 privacy:
3189 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3190 description:
3191 description: Video playlist description
3192 type: string
3193 minLength: 3
3194 maxLength: 1000
3195 videoChannelId:
3196 allOf:
3197 - $ref: '#/components/schemas/id'
3198 description: Video channel in which the playlist will be published
3199 required:
3200 - displayName
3201 encoding:
3202 thumbnailfile:
3203 contentType: image/jpeg
3204
3205 /video-playlists/{playlistId}:
3206 get:
3207 summary: Get a video playlist
3208 tags:
3209 - Video Playlists
3210 parameters:
3211 - $ref: '#/components/parameters/playlistId'
3212 responses:
3213 '200':
3214 description: successful operation
3215 content:
3216 application/json:
3217 schema:
3218 $ref: '#/components/schemas/VideoPlaylist'
3219 put:
3220 summary: Update a video playlist
3221 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
3222 security:
3223 - OAuth2: []
3224 tags:
3225 - Video Playlists
3226 responses:
3227 '204':
3228 description: successful operation
3229 parameters:
3230 - $ref: '#/components/parameters/playlistId'
3231 requestBody:
3232 content:
3233 multipart/form-data:
3234 schema:
3235 type: object
3236 properties:
3237 displayName:
3238 description: Video playlist display name
3239 type: string
3240 minLength: 1
3241 maxLength: 120
3242 thumbnailfile:
3243 description: Video playlist thumbnail file
3244 type: string
3245 format: binary
3246 privacy:
3247 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3248 description:
3249 description: Video playlist description
3250 type: string
3251 videoChannelId:
3252 allOf:
3253 - $ref: '#/components/schemas/id'
3254 description: Video channel in which the playlist will be published
3255 encoding:
3256 thumbnailfile:
3257 contentType: image/jpeg
3258 delete:
3259 summary: Delete a video playlist
3260 security:
3261 - OAuth2: []
3262 tags:
3263 - Video Playlists
3264 parameters:
3265 - $ref: '#/components/parameters/playlistId'
3266 responses:
3267 '204':
3268 description: successful operation
3269
3270 /video-playlists/{playlistId}/videos:
3271 get:
3272 summary: 'List videos of a playlist'
3273 operationId: getVideoPlaylistVideos
3274 tags:
3275 - Videos
3276 - Video Playlists
3277 parameters:
3278 - $ref: '#/components/parameters/playlistId'
3279 - $ref: '#/components/parameters/start'
3280 - $ref: '#/components/parameters/count'
3281 responses:
3282 '200':
3283 description: successful operation
3284 content:
3285 application/json:
3286 schema:
3287 $ref: '#/components/schemas/VideoListResponse'
3288 post:
3289 summary: Add a video in a playlist
3290 operationId: addVideoPlaylistVideo
3291 security:
3292 - OAuth2: []
3293 tags:
3294 - Videos
3295 - Video Playlists
3296 parameters:
3297 - $ref: '#/components/parameters/playlistId'
3298 responses:
3299 '200':
3300 description: successful operation
3301 content:
3302 application/json:
3303 schema:
3304 type: object
3305 properties:
3306 videoPlaylistElement:
3307 type: object
3308 properties:
3309 id:
3310 type: integer
3311 example: 2
3312 requestBody:
3313 content:
3314 application/json:
3315 schema:
3316 type: object
3317 properties:
3318 videoId:
3319 oneOf:
3320 - $ref: '#/components/schemas/Video/properties/uuid'
3321 - $ref: '#/components/schemas/Video/properties/id'
3322 description: Video to add in the playlist
3323 startTimestamp:
3324 type: integer
3325 format: seconds
3326 description: Start the video at this specific timestamp
3327 stopTimestamp:
3328 type: integer
3329 format: seconds
3330 description: Stop the video at this specific timestamp
3331 required:
3332 - videoId
3333
3334 /video-playlists/{playlistId}/videos/reorder:
3335 post:
3336 summary: 'Reorder a playlist'
3337 operationId: reorderVideoPlaylist
3338 security:
3339 - OAuth2: []
3340 tags:
3341 - Video Playlists
3342 parameters:
3343 - $ref: '#/components/parameters/playlistId'
3344 responses:
3345 '204':
3346 description: successful operation
3347 requestBody:
3348 content:
3349 application/json:
3350 schema:
3351 type: object
3352 properties:
3353 startPosition:
3354 type: integer
3355 description: 'Start position of the element to reorder'
3356 minimum: 1
3357 insertAfterPosition:
3358 type: integer
3359 description: 'New position for the block to reorder, to add the block before the first element'
3360 minimum: 0
3361 reorderLength:
3362 type: integer
3363 description: 'How many element from `startPosition` to reorder'
3364 minimum: 1
3365 required:
3366 - startPosition
3367 - insertAfterPosition
3368
3369 /video-playlists/{playlistId}/videos/{playlistElementId}:
3370 put:
3371 summary: Update a playlist element
3372 operationId: putVideoPlaylistVideo
3373 security:
3374 - OAuth2: []
3375 tags:
3376 - Video Playlists
3377 parameters:
3378 - $ref: '#/components/parameters/playlistId'
3379 - $ref: '#/components/parameters/playlistElementId'
3380 responses:
3381 '204':
3382 description: successful operation
3383 requestBody:
3384 content:
3385 application/json:
3386 schema:
3387 type: object
3388 properties:
3389 startTimestamp:
3390 type: integer
3391 format: seconds
3392 description: Start the video at this specific timestamp
3393 stopTimestamp:
3394 type: integer
3395 format: seconds
3396 description: Stop the video at this specific timestamp
3397 delete:
3398 summary: Delete an element from a playlist
3399 operationId: delVideoPlaylistVideo
3400 security:
3401 - OAuth2: []
3402 tags:
3403 - Video Playlists
3404 parameters:
3405 - $ref: '#/components/parameters/playlistId'
3406 - $ref: '#/components/parameters/playlistElementId'
3407 responses:
3408 '204':
3409 description: successful operation
3410
3411 '/users/me/video-playlists/videos-exist':
3412 get:
3413 summary: Check video exists in my playlists
3414 security:
3415 - OAuth2: []
3416 tags:
3417 - Video Playlists
3418 parameters:
3419 - name: videoIds
3420 in: query
3421 required: true
3422 description: The video ids to check
3423 schema:
3424 type: array
3425 items:
3426 $ref: '#/components/schemas/Video/properties/id'
3427 responses:
3428 '200':
3429 description: successful operation
3430 content:
3431 application/json:
3432 schema:
3433 type: object
3434 properties:
3435 videoId:
3436 type: array
3437 items:
3438 type: object
3439 properties:
3440 playlistElementId:
3441 type: integer
3442 playlistId:
3443 type: integer
3444 startTimestamp:
3445 type: integer
3446 format: seconds
3447 stopTimestamp:
3448 type: integer
3449 format: seconds
3450
3451 '/accounts/{name}/video-channels':
3452 get:
3453 summary: List video channels of an account
3454 tags:
3455 - Video Channels
3456 - Accounts
3457 parameters:
3458 - $ref: '#/components/parameters/name'
3459 - name: withStats
3460 in: query
3461 description: include view statistics for the last 30 days (only if authentified as the account user)
3462 schema:
3463 type: boolean
3464 - $ref: '#/components/parameters/start'
3465 - $ref: '#/components/parameters/count'
3466 - $ref: '#/components/parameters/sort'
3467 responses:
3468 '200':
3469 description: successful operation
3470 content:
3471 application/json:
3472 schema:
3473 $ref: '#/components/schemas/VideoChannelList'
3474
3475 '/accounts/{name}/ratings':
3476 get:
3477 summary: List ratings of an account
3478 security:
3479 - OAuth2: []
3480 tags:
3481 - Accounts
3482 parameters:
3483 - $ref: '#/components/parameters/name'
3484 - $ref: '#/components/parameters/start'
3485 - $ref: '#/components/parameters/count'
3486 - $ref: '#/components/parameters/sort'
3487 - name: rating
3488 in: query
3489 required: false
3490 description: Optionally filter which ratings to retrieve
3491 schema:
3492 type: string
3493 enum:
3494 - like
3495 - dislike
3496 responses:
3497 '200':
3498 description: successful operation
3499 content:
3500 application/json:
3501 schema:
3502 type: array
3503 items:
3504 $ref: '#/components/schemas/VideoRating'
3505
3506 '/videos/{id}/comment-threads':
3507 get:
3508 summary: List threads of a video
3509 tags:
3510 - Video Comments
3511 parameters:
3512 - $ref: '#/components/parameters/idOrUUID'
3513 - $ref: '#/components/parameters/start'
3514 - $ref: '#/components/parameters/count'
3515 - $ref: '#/components/parameters/commentsSort'
3516 responses:
3517 '200':
3518 description: successful operation
3519 content:
3520 application/json:
3521 schema:
3522 $ref: '#/components/schemas/CommentThreadResponse'
3523 post:
3524 summary: Create a thread
3525 security:
3526 - OAuth2: []
3527 tags:
3528 - Video Comments
3529 parameters:
3530 - $ref: '#/components/parameters/idOrUUID'
3531 responses:
3532 '200':
3533 description: successful operation
3534 content:
3535 application/json:
3536 schema:
3537 $ref: '#/components/schemas/CommentThreadPostResponse'
3538 '404':
3539 description: video does not exist
3540 requestBody:
3541 content:
3542 application/json:
3543 schema:
3544 type: object
3545 properties:
3546 text:
3547 allOf:
3548 - $ref: '#/components/schemas/VideoComment/properties/text'
3549 format: markdown
3550 maxLength: 10000
3551 required:
3552 - text
3553
3554 '/videos/{id}/comment-threads/{threadId}':
3555 get:
3556 summary: Get a thread
3557 tags:
3558 - Video Comments
3559 parameters:
3560 - $ref: '#/components/parameters/idOrUUID'
3561 - $ref: '#/components/parameters/threadId'
3562 responses:
3563 '200':
3564 description: successful operation
3565 content:
3566 application/json:
3567 schema:
3568 $ref: '#/components/schemas/VideoCommentThreadTree'
3569
3570 '/videos/{id}/comments/{commentId}':
3571 post:
3572 summary: Reply to a thread of a video
3573 security:
3574 - OAuth2: []
3575 tags:
3576 - Video Comments
3577 parameters:
3578 - $ref: '#/components/parameters/idOrUUID'
3579 - $ref: '#/components/parameters/commentId'
3580 responses:
3581 '200':
3582 description: successful operation
3583 content:
3584 application/json:
3585 schema:
3586 $ref: '#/components/schemas/CommentThreadPostResponse'
3587 '404':
3588 description: thread or video does not exist
3589 requestBody:
3590 content:
3591 application/json:
3592 schema:
3593 type: object
3594 properties:
3595 text:
3596 allOf:
3597 - $ref: '#/components/schemas/VideoComment/properties/text'
3598 format: markdown
3599 maxLength: 10000
3600 required:
3601 - text
3602 delete:
3603 summary: Delete a comment or a reply
3604 security:
3605 - OAuth2: []
3606 tags:
3607 - Video Comments
3608 parameters:
3609 - $ref: '#/components/parameters/idOrUUID'
3610 - $ref: '#/components/parameters/commentId'
3611 responses:
3612 '204':
3613 description: successful operation
3614 '403':
3615 description: cannot remove comment of another user
3616 '404':
3617 description: comment or video does not exist
3618 '409':
3619 description: comment is already deleted
3620
3621 '/videos/{id}/rate':
3622 put:
3623 summary: Like/dislike a video
3624 security:
3625 - OAuth2: []
3626 tags:
3627 - Video Rates
3628 parameters:
3629 - $ref: '#/components/parameters/idOrUUID'
3630 requestBody:
3631 content:
3632 application/json:
3633 schema:
3634 type: object
3635 properties:
3636 rating:
3637 type: string
3638 enum:
3639 - like
3640 - dislike
3641 required:
3642 - rating
3643 responses:
3644 '204':
3645 description: successful operation
3646 '404':
3647 description: video does not exist
3648
3649 '/videos/{id}/hls':
3650 delete:
3651 summary: Delete video HLS files
3652 security:
3653 - OAuth2:
3654 - admin
3655 tags:
3656 - Video Files
3657 operationId: delVideoHLS
3658 parameters:
3659 - $ref: '#/components/parameters/idOrUUID'
3660 responses:
3661 '204':
3662 description: successful operation
3663 '404':
3664 description: video does not exist
3665 '/videos/{id}/webtorrent':
3666 delete:
3667 summary: Delete video WebTorrent files
3668 security:
3669 - OAuth2:
3670 - admin
3671 tags:
3672 - Video Files
3673 operationId: delVideoWebTorrent
3674 parameters:
3675 - $ref: '#/components/parameters/idOrUUID'
3676 responses:
3677 '204':
3678 description: successful operation
3679 '404':
3680 description: video does not exist
3681
3682 '/videos/{id}/transcoding':
3683 post:
3684 summary: Create a transcoding job
3685 security:
3686 - OAuth2:
3687 - admin
3688 tags:
3689 - Video Transcoding
3690 operationId: createVideoTranscoding
3691 parameters:
3692 - $ref: '#/components/parameters/idOrUUID'
3693 requestBody:
3694 content:
3695 application/json:
3696 schema:
3697 type: object
3698 properties:
3699 transcodingType:
3700 type: string
3701 enum:
3702 - hls
3703 - webtorrent
3704 required:
3705 - transcodingType
3706 responses:
3707 '204':
3708 description: successful operation
3709 '404':
3710 description: video does not exist
3711
3712 /search/videos:
3713 get:
3714 tags:
3715 - Search
3716 summary: Search videos
3717 operationId: searchVideos
3718 parameters:
3719 - name: search
3720 in: query
3721 required: true
3722 allowEmptyValue: false
3723 description: >
3724 String to search. If the user can make a remote URI search, and the string is an URI then the
3725 PeerTube instance will fetch the remote object and add it to its database. Then,
3726 you can use the REST API to fetch the complete video information and interact with it.
3727 schema:
3728 type: string
3729 - $ref: '#/components/parameters/categoryOneOf'
3730 - $ref: '#/components/parameters/isLive'
3731 - $ref: '#/components/parameters/tagsOneOf'
3732 - $ref: '#/components/parameters/tagsAllOf'
3733 - $ref: '#/components/parameters/licenceOneOf'
3734 - $ref: '#/components/parameters/languageOneOf'
3735 - $ref: '#/components/parameters/nsfw'
3736 - $ref: '#/components/parameters/isLocal'
3737 - $ref: '#/components/parameters/include'
3738 - $ref: '#/components/parameters/privacyOneOf'
3739 - $ref: '#/components/parameters/hasHLSFiles'
3740 - $ref: '#/components/parameters/hasWebtorrentFiles'
3741 - $ref: '#/components/parameters/skipCount'
3742 - $ref: '#/components/parameters/start'
3743 - $ref: '#/components/parameters/count'
3744 - $ref: '#/components/parameters/searchTarget'
3745 - $ref: '#/components/parameters/videosSearchSort'
3746 - name: startDate
3747 in: query
3748 description: Get videos that are published after this date
3749 schema:
3750 type: string
3751 format: date-time
3752 - name: endDate
3753 in: query
3754 description: Get videos that are published before this date
3755 schema:
3756 type: string
3757 format: date-time
3758 - name: originallyPublishedStartDate
3759 in: query
3760 description: Get videos that are originally published after this date
3761 schema:
3762 type: string
3763 format: date-time
3764 - name: originallyPublishedEndDate
3765 in: query
3766 description: Get videos that are originally published before this date
3767 schema:
3768 type: string
3769 format: date-time
3770 - name: durationMin
3771 in: query
3772 description: Get videos that have this minimum duration
3773 schema:
3774 type: integer
3775 - name: durationMax
3776 in: query
3777 description: Get videos that have this maximum duration
3778 schema:
3779 type: integer
3780 callbacks:
3781 'searchTarget === search-index':
3782 $ref: '#/components/callbacks/searchIndex'
3783 responses:
3784 '200':
3785 description: successful operation
3786 content:
3787 application/json:
3788 schema:
3789 $ref: '#/components/schemas/VideoListResponse'
3790 '500':
3791 description: search index unavailable
3792
3793 /search/video-channels:
3794 get:
3795 tags:
3796 - Search
3797 summary: Search channels
3798 operationId: searchChannels
3799 parameters:
3800 - name: search
3801 in: query
3802 required: true
3803 description: >
3804 String to search. If the user can make a remote URI search, and the string is an URI then the
3805 PeerTube instance will fetch the remote object and add it to its database. Then,
3806 you can use the REST API to fetch the complete channel information and interact with it.
3807 schema:
3808 type: string
3809 - $ref: '#/components/parameters/start'
3810 - $ref: '#/components/parameters/count'
3811 - $ref: '#/components/parameters/searchTarget'
3812 - $ref: '#/components/parameters/sort'
3813 callbacks:
3814 'searchTarget === search-index':
3815 $ref: '#/components/callbacks/searchIndex'
3816 responses:
3817 '200':
3818 description: successful operation
3819 content:
3820 application/json:
3821 schema:
3822 $ref: '#/components/schemas/VideoChannelList'
3823 '500':
3824 description: search index unavailable
3825
3826 /search/video-playlists:
3827 get:
3828 tags:
3829 - Search
3830 summary: Search playlists
3831 operationId: searchPlaylists
3832 parameters:
3833 - name: search
3834 in: query
3835 required: true
3836 description: >
3837 String to search. If the user can make a remote URI search, and the string is an URI then the
3838 PeerTube instance will fetch the remote object and add it to its database. Then,
3839 you can use the REST API to fetch the complete playlist information and interact with it.
3840 schema:
3841 type: string
3842 - $ref: '#/components/parameters/start'
3843 - $ref: '#/components/parameters/count'
3844 - $ref: '#/components/parameters/searchTarget'
3845 - $ref: '#/components/parameters/sort'
3846 callbacks:
3847 'searchTarget === search-index':
3848 $ref: '#/components/callbacks/searchIndex'
3849 responses:
3850 '200':
3851 description: successful operation
3852 content:
3853 application/json:
3854 schema:
3855 type: object
3856 properties:
3857 total:
3858 type: integer
3859 example: 1
3860 data:
3861 type: array
3862 items:
3863 $ref: '#/components/schemas/VideoPlaylist'
3864 '500':
3865 description: search index unavailable
3866
3867 /blocklist/status:
3868 get:
3869 tags:
3870 - Account Blocks
3871 - Server Blocks
3872 summary: Get block status of accounts/hosts
3873 parameters:
3874 -
3875 name: 'accounts'
3876 in: query
3877 description: 'Check if these accounts are blocked'
3878 example: [ 'goofy@example.com', 'donald@example.com' ]
3879 schema:
3880 type: array
3881 items:
3882 type: string
3883 -
3884 name: 'hosts'
3885 in: query
3886 description: 'Check if these hosts are blocked'
3887 example: [ 'example.com' ]
3888 schema:
3889 type: array
3890 items:
3891 type: string
3892 responses:
3893 '200':
3894 description: successful operation
3895 content:
3896 'application/json':
3897 schema:
3898 $ref: '#/components/schemas/BlockStatus'
3899
3900 /server/blocklist/accounts:
3901 get:
3902 tags:
3903 - Account Blocks
3904 summary: List account blocks
3905 security:
3906 - OAuth2:
3907 - admin
3908 parameters:
3909 - $ref: '#/components/parameters/start'
3910 - $ref: '#/components/parameters/count'
3911 - $ref: '#/components/parameters/sort'
3912 responses:
3913 '200':
3914 description: successful operation
3915 post:
3916 tags:
3917 - Account Blocks
3918 summary: Block an account
3919 security:
3920 - OAuth2:
3921 - admin
3922 requestBody:
3923 content:
3924 application/json:
3925 schema:
3926 type: object
3927 properties:
3928 accountName:
3929 type: string
3930 example: chocobozzz@example.org
3931 description: account to block, in the form `username@domain`
3932 required:
3933 - accountName
3934 responses:
3935 '200':
3936 description: successful operation
3937 '409':
3938 description: self-blocking forbidden
3939
3940 '/server/blocklist/accounts/{accountName}':
3941 delete:
3942 tags:
3943 - Account Blocks
3944 summary: Unblock an account by its handle
3945 security:
3946 - OAuth2:
3947 - admin
3948 parameters:
3949 - name: accountName
3950 in: path
3951 required: true
3952 description: account to unblock, in the form `username@domain`
3953 schema:
3954 type: string
3955 responses:
3956 '201':
3957 description: successful operation
3958 '404':
3959 description: account or account block does not exist
3960
3961 /server/blocklist/servers:
3962 get:
3963 tags:
3964 - Server Blocks
3965 summary: List server blocks
3966 security:
3967 - OAuth2:
3968 - admin
3969 parameters:
3970 - $ref: '#/components/parameters/start'
3971 - $ref: '#/components/parameters/count'
3972 - $ref: '#/components/parameters/sort'
3973 responses:
3974 '200':
3975 description: successful operation
3976 post:
3977 tags:
3978 - Server Blocks
3979 summary: Block a server
3980 security:
3981 - OAuth2:
3982 - admin
3983 requestBody:
3984 content:
3985 application/json:
3986 schema:
3987 type: object
3988 properties:
3989 host:
3990 type: string
3991 format: hostname
3992 description: server domain to block
3993 required:
3994 - host
3995 responses:
3996 '204':
3997 description: successful operation
3998 '409':
3999 description: self-blocking forbidden
4000
4001 '/server/blocklist/servers/{host}':
4002 delete:
4003 tags:
4004 - Server Blocks
4005 summary: Unblock a server by its domain
4006 security:
4007 - OAuth2:
4008 - admin
4009 parameters:
4010 - name: host
4011 in: path
4012 required: true
4013 description: server domain to unblock
4014 schema:
4015 type: string
4016 format: hostname
4017 responses:
4018 '204':
4019 description: successful operation
4020 '404':
4021 description: account block does not exist
4022
4023 /server/redundancy/{host}:
4024 put:
4025 tags:
4026 - Instance Redundancy
4027 summary: Update a server redundancy policy
4028 security:
4029 - OAuth2:
4030 - admin
4031 parameters:
4032 - name: host
4033 in: path
4034 required: true
4035 description: server domain to mirror
4036 schema:
4037 type: string
4038 format: hostname
4039 requestBody:
4040 content:
4041 application/json:
4042 schema:
4043 type: object
4044 properties:
4045 redundancyAllowed:
4046 type: boolean
4047 description: allow mirroring of the host's local videos
4048 required:
4049 - redundancyAllowed
4050 responses:
4051 '204':
4052 description: successful operation
4053 '404':
4054 description: server is not already known
4055
4056 /server/redundancy/videos:
4057 get:
4058 tags:
4059 - Video Mirroring
4060 summary: List videos being mirrored
4061 operationId: getMirroredVideos
4062 security:
4063 - OAuth2:
4064 - admin
4065 parameters:
4066 - name: target
4067 in: query
4068 required: true
4069 description: direction of the mirror
4070 schema:
4071 type: string
4072 enum:
4073 - my-videos
4074 - remote-videos
4075 - $ref: '#/components/parameters/start'
4076 - $ref: '#/components/parameters/count'
4077 - $ref: '#/components/parameters/videoRedundanciesSort'
4078 responses:
4079 '200':
4080 description: successful operation
4081 content:
4082 application/json:
4083 schema:
4084 type: array
4085 items:
4086 $ref: '#/components/schemas/VideoRedundancy'
4087 post:
4088 tags:
4089 - Video Mirroring
4090 summary: Mirror a video
4091 operationId: putMirroredVideo
4092 security:
4093 - OAuth2:
4094 - admin
4095 requestBody:
4096 content:
4097 application/json:
4098 schema:
4099 type: object
4100 properties:
4101 videoId:
4102 $ref: '#/components/schemas/Video/properties/id'
4103 required:
4104 - videoId
4105 responses:
4106 '204':
4107 description: successful operation
4108 '400':
4109 description: cannot mirror a local video
4110 '404':
4111 description: video does not exist
4112 '409':
4113 description: video is already mirrored
4114
4115 /server/redundancy/videos/{redundancyId}:
4116 delete:
4117 tags:
4118 - Video Mirroring
4119 summary: Delete a mirror done on a video
4120 operationId: delMirroredVideo
4121 security:
4122 - OAuth2:
4123 - admin
4124 parameters:
4125 - name: redundancyId
4126 in: path
4127 required: true
4128 description: id of an existing redundancy on a video
4129 schema:
4130 type: string
4131 responses:
4132 '204':
4133 description: successful operation
4134 '404':
4135 description: video redundancy not found
4136
4137 '/feeds/video-comments.{format}':
4138 get:
4139 tags:
4140 - Feeds
4141 summary: List comments on videos
4142 operationId: getSyndicatedComments
4143 parameters:
4144 - name: format
4145 in: path
4146 required: true
4147 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4148 schema:
4149 type: string
4150 enum:
4151 - xml
4152 - rss
4153 - rss2
4154 - atom
4155 - atom1
4156 - json
4157 - json1
4158 - name: videoId
4159 in: query
4160 description: 'limit listing to a specific video'
4161 schema:
4162 type: string
4163 - name: accountId
4164 in: query
4165 description: 'limit listing to a specific account'
4166 schema:
4167 type: string
4168 - name: accountName
4169 in: query
4170 description: 'limit listing to a specific account'
4171 schema:
4172 type: string
4173 - name: videoChannelId
4174 in: query
4175 description: 'limit listing to a specific video channel'
4176 schema:
4177 type: string
4178 - name: videoChannelName
4179 in: query
4180 description: 'limit listing to a specific video channel'
4181 schema:
4182 type: string
4183 responses:
4184 '204':
4185 description: successful operation
4186 headers:
4187 Cache-Control:
4188 schema:
4189 type: string
4190 default: 'max-age=900' # 15 min cache
4191 content:
4192 application/xml:
4193 schema:
4194 $ref: '#/components/schemas/VideoCommentsForXML'
4195 examples:
4196 nightly:
4197 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4198 application/rss+xml:
4199 schema:
4200 $ref: '#/components/schemas/VideoCommentsForXML'
4201 examples:
4202 nightly:
4203 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
4204 text/xml:
4205 schema:
4206 $ref: '#/components/schemas/VideoCommentsForXML'
4207 examples:
4208 nightly:
4209 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4210 application/atom+xml:
4211 schema:
4212 $ref: '#/components/schemas/VideoCommentsForXML'
4213 examples:
4214 nightly:
4215 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
4216 application/json:
4217 schema:
4218 type: object
4219 examples:
4220 nightly:
4221 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
4222 '400':
4223 x-summary: field inconsistencies
4224 description: >
4225 Arises when:
4226 - videoId filter is mixed with a channel filter
4227 '404':
4228 description: video, video channel or account not found
4229 '406':
4230 description: accept header unsupported
4231
4232 '/feeds/videos.{format}':
4233 get:
4234 tags:
4235 - Feeds
4236 summary: List videos
4237 operationId: getSyndicatedVideos
4238 parameters:
4239 - name: format
4240 in: path
4241 required: true
4242 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4243 schema:
4244 type: string
4245 enum:
4246 - xml
4247 - rss
4248 - rss2
4249 - atom
4250 - atom1
4251 - json
4252 - json1
4253 - name: accountId
4254 in: query
4255 description: 'limit listing to a specific account'
4256 schema:
4257 type: string
4258 - name: accountName
4259 in: query
4260 description: 'limit listing to a specific account'
4261 schema:
4262 type: string
4263 - name: videoChannelId
4264 in: query
4265 description: 'limit listing to a specific video channel'
4266 schema:
4267 type: string
4268 - name: videoChannelName
4269 in: query
4270 description: 'limit listing to a specific video channel'
4271 schema:
4272 type: string
4273 - $ref: '#/components/parameters/sort'
4274 - $ref: '#/components/parameters/nsfw'
4275 - $ref: '#/components/parameters/isLocal'
4276 - $ref: '#/components/parameters/include'
4277 - $ref: '#/components/parameters/privacyOneOf'
4278 - $ref: '#/components/parameters/hasHLSFiles'
4279 - $ref: '#/components/parameters/hasWebtorrentFiles'
4280 responses:
4281 '204':
4282 description: successful operation
4283 headers:
4284 Cache-Control:
4285 schema:
4286 type: string
4287 default: 'max-age=900' # 15 min cache
4288 content:
4289 application/xml:
4290 schema:
4291 $ref: '#/components/schemas/VideosForXML'
4292 examples:
4293 nightly:
4294 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4295 application/rss+xml:
4296 schema:
4297 $ref: '#/components/schemas/VideosForXML'
4298 examples:
4299 nightly:
4300 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
4301 text/xml:
4302 schema:
4303 $ref: '#/components/schemas/VideosForXML'
4304 examples:
4305 nightly:
4306 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4307 application/atom+xml:
4308 schema:
4309 $ref: '#/components/schemas/VideosForXML'
4310 examples:
4311 nightly:
4312 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
4313 application/json:
4314 schema:
4315 type: object
4316 examples:
4317 nightly:
4318 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
4319 '404':
4320 description: video channel or account not found
4321 '406':
4322 description: accept header unsupported
4323
4324 '/feeds/subscriptions.{format}':
4325 get:
4326 tags:
4327 - Feeds
4328 - Account
4329 summary: List videos of subscriptions tied to a token
4330 operationId: getSyndicatedSubscriptionVideos
4331 parameters:
4332 - name: format
4333 in: path
4334 required: true
4335 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4336 schema:
4337 type: string
4338 enum:
4339 - xml
4340 - rss
4341 - rss2
4342 - atom
4343 - atom1
4344 - json
4345 - json1
4346 - name: accountId
4347 in: query
4348 description: limit listing to a specific account
4349 schema:
4350 type: string
4351 required: true
4352 - name: token
4353 in: query
4354 description: private token allowing access
4355 schema:
4356 type: string
4357 required: true
4358 - $ref: '#/components/parameters/sort'
4359 - $ref: '#/components/parameters/nsfw'
4360 - $ref: '#/components/parameters/isLocal'
4361 - $ref: '#/components/parameters/include'
4362 - $ref: '#/components/parameters/privacyOneOf'
4363 - $ref: '#/components/parameters/hasHLSFiles'
4364 - $ref: '#/components/parameters/hasWebtorrentFiles'
4365 responses:
4366 '204':
4367 description: successful operation
4368 headers:
4369 Cache-Control:
4370 schema:
4371 type: string
4372 default: 'max-age=900' # 15 min cache
4373 content:
4374 application/xml:
4375 schema:
4376 $ref: '#/components/schemas/VideosForXML'
4377 application/rss+xml:
4378 schema:
4379 $ref: '#/components/schemas/VideosForXML'
4380 text/xml:
4381 schema:
4382 $ref: '#/components/schemas/VideosForXML'
4383 application/atom+xml:
4384 schema:
4385 $ref: '#/components/schemas/VideosForXML'
4386 application/json:
4387 schema:
4388 type: object
4389 '406':
4390 description: accept header unsupported
4391
4392 /plugins:
4393 get:
4394 tags:
4395 - Plugins
4396 summary: List plugins
4397 operationId: getPlugins
4398 security:
4399 - OAuth2:
4400 - admin
4401 parameters:
4402 - name: pluginType
4403 in: query
4404 schema:
4405 type: integer
4406 - name: uninstalled
4407 in: query
4408 schema:
4409 type: boolean
4410 - $ref: '#/components/parameters/start'
4411 - $ref: '#/components/parameters/count'
4412 - $ref: '#/components/parameters/sort'
4413 responses:
4414 '200':
4415 description: successful operation
4416 content:
4417 application/json:
4418 schema:
4419 $ref: '#/components/schemas/PluginResponse'
4420
4421 /plugins/available:
4422 get:
4423 tags:
4424 - Plugins
4425 summary: List available plugins
4426 operationId: getAvailablePlugins
4427 security:
4428 - OAuth2:
4429 - admin
4430 parameters:
4431 - name: search
4432 in: query
4433 schema:
4434 type: string
4435 - name: pluginType
4436 in: query
4437 schema:
4438 type: integer
4439 - name: currentPeerTubeEngine
4440 in: query
4441 schema:
4442 type: string
4443 - $ref: '#/components/parameters/start'
4444 - $ref: '#/components/parameters/count'
4445 - $ref: '#/components/parameters/sort'
4446 responses:
4447 '200':
4448 description: successful operation
4449 content:
4450 application/json:
4451 schema:
4452 $ref: '#/components/schemas/PluginResponse'
4453 '503':
4454 description: plugin index unavailable
4455
4456 /plugins/install:
4457 post:
4458 tags:
4459 - Plugins
4460 summary: Install a plugin
4461 operationId: addPlugin
4462 security:
4463 - OAuth2:
4464 - admin
4465 requestBody:
4466 content:
4467 application/json:
4468 schema:
4469 oneOf:
4470 - type: object
4471 properties:
4472 npmName:
4473 type: string
4474 example: peertube-plugin-auth-ldap
4475 required:
4476 - npmName
4477 additionalProperties: false
4478 - type: object
4479 properties:
4480 path:
4481 type: string
4482 required:
4483 - path
4484 additionalProperties: false
4485 responses:
4486 '204':
4487 description: successful operation
4488 '400':
4489 description: should have either `npmName` or `path` set
4490
4491 /plugins/update:
4492 post:
4493 tags:
4494 - Plugins
4495 summary: Update a plugin
4496 operationId: updatePlugin
4497 security:
4498 - OAuth2:
4499 - admin
4500 requestBody:
4501 content:
4502 application/json:
4503 schema:
4504 oneOf:
4505 - type: object
4506 properties:
4507 npmName:
4508 type: string
4509 example: peertube-plugin-auth-ldap
4510 required:
4511 - npmName
4512 additionalProperties: false
4513 - type: object
4514 properties:
4515 path:
4516 type: string
4517 required:
4518 - path
4519 additionalProperties: false
4520 responses:
4521 '204':
4522 description: successful operation
4523 '400':
4524 description: should have either `npmName` or `path` set
4525 '404':
4526 description: existing plugin not found
4527
4528 /plugins/uninstall:
4529 post:
4530 tags:
4531 - Plugins
4532 summary: Uninstall a plugin
4533 operationId: uninstallPlugin
4534 security:
4535 - OAuth2:
4536 - admin
4537 requestBody:
4538 content:
4539 application/json:
4540 schema:
4541 type: object
4542 properties:
4543 npmName:
4544 type: string
4545 description: name of the plugin/theme in its package.json
4546 example: peertube-plugin-auth-ldap
4547 required:
4548 - npmName
4549 responses:
4550 '204':
4551 description: successful operation
4552 '404':
4553 description: existing plugin not found
4554
4555 /plugins/{npmName}:
4556 get:
4557 tags:
4558 - Plugins
4559 summary: Get a plugin
4560 operationId: getPlugin
4561 security:
4562 - OAuth2:
4563 - admin
4564 parameters:
4565 - $ref: '#/components/parameters/npmName'
4566 responses:
4567 '200':
4568 description: successful operation
4569 content:
4570 application/json:
4571 schema:
4572 $ref: '#/components/schemas/Plugin'
4573 '404':
4574 description: plugin not found
4575
4576 /plugins/{npmName}/settings:
4577 put:
4578 tags:
4579 - Plugins
4580 summary: Set a plugin's settings
4581 security:
4582 - OAuth2:
4583 - admin
4584 parameters:
4585 - $ref: '#/components/parameters/npmName'
4586 requestBody:
4587 content:
4588 application/json:
4589 schema:
4590 type: object
4591 properties:
4592 settings:
4593 type: object
4594 additionalProperties: true
4595 responses:
4596 '204':
4597 description: successful operation
4598 '404':
4599 description: plugin not found
4600
4601 /plugins/{npmName}/public-settings:
4602 get:
4603 tags:
4604 - Plugins
4605 summary: Get a plugin's public settings
4606 parameters:
4607 - $ref: '#/components/parameters/npmName'
4608 responses:
4609 '200':
4610 description: successful operation
4611 content:
4612 application/json:
4613 schema:
4614 type: object
4615 additionalProperties: true
4616 '404':
4617 description: plugin not found
4618
4619 /plugins/{npmName}/registered-settings:
4620 get:
4621 tags:
4622 - Plugins
4623 summary: Get a plugin's registered settings
4624 security:
4625 - OAuth2:
4626 - admin
4627 parameters:
4628 - $ref: '#/components/parameters/npmName'
4629 responses:
4630 '200':
4631 description: successful operation
4632 content:
4633 application/json:
4634 schema:
4635 type: object
4636 additionalProperties: true
4637 '404':
4638 description: plugin not found
4639
4640servers:
4641 - url: 'https://peertube2.cpy.re/api/v1'
4642 description: Live Test Server (live data - latest nightly version)
4643 - url: 'https://peertube3.cpy.re/api/v1'
4644 description: Live Test Server (live data - latest RC version)
4645 - url: 'https://peertube.cpy.re/api/v1'
4646 description: Live Test Server (live data - stable version)
4647components:
4648 parameters:
4649 start:
4650 name: start
4651 in: query
4652 required: false
4653 description: Offset used to paginate results
4654 schema:
4655 type: integer
4656 minimum: 0
4657 count:
4658 name: count
4659 in: query
4660 required: false
4661 description: "Number of items to return"
4662 schema:
4663 type: integer
4664 default: 15
4665 maximum: 100
4666 minimum: 1
4667 sort:
4668 name: sort
4669 in: query
4670 required: false
4671 description: Sort column
4672 schema:
4673 type: string
4674 example: -createdAt
4675 search:
4676 name: search
4677 in: query
4678 required: false
4679 description: Plain text search, applied to various parts of the model depending on endpoint
4680 schema:
4681 type: string
4682 searchTarget:
4683 name: searchTarget
4684 in: query
4685 required: false
4686 description: >
4687 If the administrator enabled search index support, you can override the default search target.
4688
4689
4690 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
4691 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
4692 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
4693 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
4694 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
4695 * 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
4696 the data from the origin instance API
4697 schema:
4698 type: string
4699 enum:
4700 - 'local'
4701 - 'search-index'
4702 videosSort:
4703 name: sort
4704 in: query
4705 required: false
4706 description: Sort videos by criteria
4707 schema:
4708 type: string
4709 enum:
4710 - name
4711 - -duration
4712 - -createdAt
4713 - -publishedAt
4714 - -views
4715 - -likes
4716 - -trending
4717 - -hot
4718 videosSearchSort:
4719 name: sort
4720 in: query
4721 required: false
4722 description: Sort videos by criteria
4723 schema:
4724 type: string
4725 enum:
4726 - name
4727 - -duration
4728 - -createdAt
4729 - -publishedAt
4730 - -views
4731 - -likes
4732 - -match
4733 commentsSort:
4734 name: sort
4735 in: query
4736 required: false
4737 description: Sort comments by criteria
4738 schema:
4739 type: string
4740 enum:
4741 - -createdAt
4742 - -totalReplies
4743 blacklistsSort:
4744 name: sort
4745 in: query
4746 required: false
4747 description: Sort blocklists by criteria
4748 schema:
4749 type: string
4750 enum:
4751 - -id
4752 - name
4753 - -duration
4754 - -views
4755 - -likes
4756 - -dislikes
4757 - -uuid
4758 - -createdAt
4759 usersSearch:
4760 name: search
4761 in: query
4762 required: false
4763 description: Plain text search that will match with user usernames or emails
4764 schema:
4765 type: string
4766 usersBlocked:
4767 name: blocked
4768 in: query
4769 required: false
4770 description: Filter results down to (un)banned users
4771 schema:
4772 type: boolean
4773 usersSort:
4774 name: sort
4775 in: query
4776 required: false
4777 description: Sort users by criteria
4778 schema:
4779 type: string
4780 enum:
4781 - -id
4782 - -username
4783 - -createdAt
4784 abusesSort:
4785 name: sort
4786 in: query
4787 required: false
4788 description: Sort abuses by criteria
4789 schema:
4790 type: string
4791 enum:
4792 - -id
4793 - -createdAt
4794 - -state
4795 videoRedundanciesSort:
4796 name: sort
4797 in: query
4798 required: false
4799 description: Sort abuses by criteria
4800 schema:
4801 type: string
4802 enum:
4803 - name
4804 followersSort:
4805 name: sort
4806 in: query
4807 required: false
4808 description: Sort followers by criteria
4809 schema:
4810 type: string
4811 enum:
4812 - createdAt
4813 name:
4814 name: name
4815 in: path
4816 required: true
4817 description: The username or handle of the account
4818 schema:
4819 type: string
4820 example: chocobozzz | chocobozzz@example.org
4821 id:
4822 name: id
4823 in: path
4824 required: true
4825 description: Entity id
4826 schema:
4827 $ref: '#/components/schemas/id'
4828 idOrUUID:
4829 name: id
4830 in: path
4831 required: true
4832 description: The object id, uuid or short uuid
4833 schema:
4834 oneOf:
4835 - $ref: '#/components/schemas/id'
4836 - $ref: '#/components/schemas/UUIDv4'
4837 - $ref: '#/components/schemas/shortUUID'
4838 playlistId:
4839 name: playlistId
4840 in: path
4841 required: true
4842 description: Playlist id
4843 schema:
4844 $ref: '#/components/schemas/VideoPlaylist/properties/id'
4845 playlistElementId:
4846 name: playlistElementId
4847 in: path
4848 required: true
4849 description: Playlist element id
4850 schema:
4851 $ref: '#/components/schemas/id'
4852 abuseId:
4853 name: abuseId
4854 in: path
4855 required: true
4856 description: Abuse id
4857 schema:
4858 $ref: '#/components/schemas/Abuse/properties/id'
4859 abuseMessageId:
4860 name: abuseMessageId
4861 in: path
4862 required: true
4863 description: Abuse message id
4864 schema:
4865 $ref: '#/components/schemas/AbuseMessage/properties/id'
4866 captionLanguage:
4867 name: captionLanguage
4868 in: path
4869 required: true
4870 description: The caption language
4871 schema:
4872 $ref: '#/components/schemas/VideoLanguageSet'
4873 channelHandle:
4874 name: channelHandle
4875 in: path
4876 required: true
4877 description: The video channel handle
4878 schema:
4879 type: string
4880 example: my_username | my_username@example.com
4881 subscriptionHandle:
4882 name: subscriptionHandle
4883 in: path
4884 required: true
4885 description: The subscription handle
4886 schema:
4887 type: string
4888 example: my_username | my_username@example.com
4889 threadId:
4890 name: threadId
4891 in: path
4892 required: true
4893 description: The thread id (root comment id)
4894 schema:
4895 type: integer
4896 commentId:
4897 name: commentId
4898 in: path
4899 required: true
4900 description: The comment id
4901 schema:
4902 $ref: '#/components/schemas/VideoComment/properties/id'
4903 isLive:
4904 name: isLive
4905 in: query
4906 required: false
4907 description: whether or not the video is a live
4908 schema:
4909 type: boolean
4910 categoryOneOf:
4911 name: categoryOneOf
4912 in: query
4913 required: false
4914 description: category id of the video (see [/videos/categories](#operation/getCategories))
4915 schema:
4916 oneOf:
4917 - $ref: '#/components/schemas/VideoCategorySet'
4918 - type: array
4919 items:
4920 $ref: '#/components/schemas/VideoCategorySet'
4921 style: form
4922 explode: false
4923 tagsOneOf:
4924 name: tagsOneOf
4925 in: query
4926 required: false
4927 description: tag(s) of the video
4928 schema:
4929 oneOf:
4930 - type: string
4931 - type: array
4932 maxItems: 5
4933 items:
4934 type: string
4935 style: form
4936 explode: false
4937 tagsAllOf:
4938 name: tagsAllOf
4939 in: query
4940 required: false
4941 description: tag(s) of the video, where all should be present in the video
4942 schema:
4943 oneOf:
4944 - type: string
4945 - type: array
4946 items:
4947 type: string
4948 style: form
4949 explode: false
4950 languageOneOf:
4951 name: languageOneOf
4952 in: query
4953 required: false
4954 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language
4955 schema:
4956 oneOf:
4957 - $ref: '#/components/schemas/VideoLanguageSet'
4958 - type: array
4959 items:
4960 $ref: '#/components/schemas/VideoLanguageSet'
4961 style: form
4962 explode: false
4963 licenceOneOf:
4964 name: licenceOneOf
4965 in: query
4966 required: false
4967 description: licence id of the video (see [/videos/licences](#operation/getLicences))
4968 schema:
4969 oneOf:
4970 - $ref: '#/components/schemas/VideoLicenceSet'
4971 - type: array
4972 items:
4973 $ref: '#/components/schemas/VideoLicenceSet'
4974 style: form
4975 explode: false
4976 skipCount:
4977 name: skipCount
4978 in: query
4979 required: false
4980 description: if you don't need the `total` in the response
4981 schema:
4982 type: string
4983 enum:
4984 - 'true'
4985 - 'false'
4986 default: 'false'
4987 nsfw:
4988 name: nsfw
4989 in: query
4990 required: false
4991 description: whether to include nsfw videos, if any
4992 schema:
4993 type: string
4994 enum:
4995 - 'true'
4996 - 'false'
4997 isLocal:
4998 name: isLocal
4999 in: query
5000 required: false
5001 schema:
5002 type: boolean
5003 description: '**PeerTube >= 4.0** Display only local or remote videos'
5004 hasHLSFiles:
5005 name: hasHLSFiles
5006 in: query
5007 required: false
5008 schema:
5009 type: boolean
5010 description: '**PeerTube >= 4.0** Display only videos that have HLS files'
5011 hasWebtorrentFiles:
5012 name: hasWebtorrentFiles
5013 in: query
5014 required: false
5015 schema:
5016 type: boolean
5017 description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files'
5018 privacyOneOf:
5019 name: privacyOneOf
5020 in: query
5021 required: false
5022 schema:
5023 $ref: '#/components/schemas/VideoPrivacySet'
5024 description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
5025 include:
5026 name: include
5027 in: query
5028 required: false
5029 schema:
5030 type: integer
5031 enum:
5032 - 0
5033 - 1
5034 - 2
5035 - 4
5036 - 8
5037 description: >
5038 **PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator)
5039
5040 - `0` NONE
5041
5042 - `1` NOT_PUBLISHED_STATE
5043
5044 - `2` BLACKLISTED
5045
5046 - `4` BLOCKED_OWNER
5047
5048 - `8` FILES
5049 subscriptionsUris:
5050 name: uris
5051 in: query
5052 required: true
5053 description: list of uris to check if each is part of the user subscriptions
5054 schema:
5055 type: array
5056 items:
5057 type: string
5058 format: uri
5059 npmName:
5060 name: npmName
5061 in: path
5062 required: true
5063 description: name of the plugin/theme on npmjs.com or in its package.json
5064 schema:
5065 type: string
5066 example: peertube-plugin-auth-ldap
5067 jobType:
5068 name: jobType
5069 in: query
5070 required: false
5071 description: job type
5072 schema:
5073 type: string
5074 enum:
5075 - activitypub-follow
5076 - activitypub-http-broadcast
5077 - activitypub-http-fetcher
5078 - activitypub-http-unicast
5079 - email
5080 - video-transcoding
5081 - video-file-import
5082 - video-import
5083 - videos-views-stats
5084 - activitypub-refresher
5085 - video-redundancy
5086 - video-live-ending
5087 followState:
5088 name: state
5089 in: query
5090 schema:
5091 type: string
5092 enum:
5093 - pending
5094 - accepted
5095 actorType:
5096 name: actorType
5097 in: query
5098 schema:
5099 type: string
5100 enum:
5101 - Person
5102 - Application
5103 - Group
5104 - Service
5105 - Organization
5106 securitySchemes:
5107 OAuth2:
5108 description: |
5109 Authenticating via OAuth requires the following steps:
5110 - Have an activated account
5111 - [Generate] an access token for that account at `/api/v1/users/token`.
5112 - Make requests with the *Authorization: Bearer <token\>* header
5113 - Profit, depending on the role assigned to the account
5114
5115 Note that the __access token is valid for 1 day__ and is given
5116 along with a __refresh token valid for 2 weeks__.
5117
5118 [Generate]: https://docs.joinpeertube.org/api-rest-getting-started
5119 type: oauth2
5120 flows:
5121 password:
5122 tokenUrl: /api/v1/users/token
5123 scopes:
5124 admin: Admin scope
5125 moderator: Moderator scope
5126 user: User scope
5127 schemas:
5128 # Resuable core properties
5129 id:
5130 type: integer
5131 minimum: 1
5132 example: 42
5133 UUIDv4:
5134 type: string
5135 format: uuid
5136 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
5137 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
5138 minLength: 36
5139 maxLength: 36
5140 shortUUID:
5141 type: string
5142 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
5143 example: 2y84q2MQUMWPbiEcxNXMgC
5144 username:
5145 type: string
5146 description: immutable name of the user, used to find or mention its actor
5147 example: chocobozzz
5148 pattern: '/^[a-z0-9._]+$/'
5149 minLength: 1
5150 maxLength: 50
5151 usernameChannel:
5152 type: string
5153 description: immutable name of the channel, used to interact with its actor
5154 example: framasoft_videos
5155 pattern: '/^[a-zA-Z0-9\\-_.:]+$/'
5156 minLength: 1
5157 maxLength: 50
5158 password:
5159 type: string
5160 format: password
5161 minLength: 6
5162 maxLength: 255
5163
5164 VideoCategorySet:
5165 type: integer
5166 description: category id of the video (see [/videos/categories](#operation/getCategories))
5167 example: 15
5168 VideoConstantNumber-Category:
5169 properties:
5170 id:
5171 $ref: '#/components/schemas/VideoCategorySet'
5172 label:
5173 type: string
5174 example: Science & Technology
5175
5176 VideoLicenceSet:
5177 type: integer
5178 description: licence id of the video (see [/videos/licences](#operation/getLicences))
5179 example: 2
5180 VideoConstantNumber-Licence:
5181 properties:
5182 id:
5183 $ref: '#/components/schemas/VideoLicenceSet'
5184 label:
5185 type: string
5186 example: Attribution - Share Alike
5187
5188 VideoLanguageSet:
5189 type: string
5190 description: language id of the video (see [/videos/languages](#operation/getLanguages))
5191 example: en
5192 VideoConstantString-Language:
5193 properties:
5194 id:
5195 $ref: '#/components/schemas/VideoLanguageSet'
5196 label:
5197 type: string
5198 example: English
5199
5200 VideoPlaylistPrivacySet:
5201 type: integer
5202 enum:
5203 - 1
5204 - 2
5205 - 3
5206 description: Video playlist privacy policy (see [/video-playlists/privacies])
5207 VideoPlaylistPrivacyConstant:
5208 properties:
5209 id:
5210 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
5211 label:
5212 type: string
5213
5214 VideoPlaylistTypeSet:
5215 type: integer
5216 enum:
5217 - 1
5218 - 2
5219 description: The video playlist type (Regular = `1`, Watch Later = `2`)
5220 VideoPlaylistTypeConstant:
5221 properties:
5222 id:
5223 $ref: '#/components/schemas/VideoPlaylistTypeSet'
5224 label:
5225 type: string
5226
5227 VideoPrivacySet:
5228 type: integer
5229 enum:
5230 - 1
5231 - 2
5232 - 3
5233 - 4
5234 description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies))
5235 VideoPrivacyConstant:
5236 properties:
5237 id:
5238 $ref: '#/components/schemas/VideoPrivacySet'
5239 label:
5240 type: string
5241
5242 BlockStatus:
5243 properties:
5244 accounts:
5245 type: object
5246 additionalProperties:
5247 x-additionalPropertiesName: account
5248 type: object
5249 properties:
5250 blockedByServer:
5251 type: boolean
5252 blockedByUser:
5253 type: boolean
5254 hosts:
5255 type: object
5256 additionalProperties:
5257 x-additionalPropertiesName: host
5258 type: object
5259 properties:
5260 blockedByServer:
5261 type: boolean
5262 blockedByUser:
5263 type: boolean
5264
5265 NSFWPolicy:
5266 type: string
5267 enum:
5268 - display
5269 - blur
5270 - do_not_list
5271
5272 UserRole:
5273 type: integer
5274 enum:
5275 - 0
5276 - 1
5277 - 2
5278 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
5279 example: 2
5280 UserAdminFlags:
5281 type: integer
5282 enum:
5283 - 0
5284 - 1
5285 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)'
5286 example: 1
5287
5288 VideoStateConstant:
5289 properties:
5290 id:
5291 type: integer
5292 enum:
5293 - 1
5294 - 2
5295 - 3
5296 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
5297 label:
5298 type: string
5299
5300 AbuseStateSet:
5301 type: integer
5302 enum:
5303 - 1
5304 - 2
5305 - 3
5306 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
5307 AbuseStateConstant:
5308 properties:
5309 id:
5310 $ref: '#/components/schemas/AbuseStateSet'
5311 label:
5312 type: string
5313 AbusePredefinedReasons:
5314 type: array
5315 items:
5316 type: string
5317 enum:
5318 - violentOrAbusive
5319 - hatefulOrAbusive
5320 - spamOrMisleading
5321 - privacy
5322 - rights
5323 - serverRules
5324 - thumbnails
5325 - captions
5326 example: [spamOrMisleading]
5327
5328 VideoResolutionSet:
5329 type: integer
5330 description: |
5331 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`)
5332
5333 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
5334 example: 240
5335 VideoResolutionConstant:
5336 description: resolutions and their labels for the video
5337 properties:
5338 id:
5339 $ref: '#/components/schemas/VideoResolutionSet'
5340 label:
5341 type: string
5342 example: 240p
5343 VideoScheduledUpdate:
5344 properties:
5345 privacy:
5346 $ref: '#/components/schemas/VideoPrivacySet'
5347 updateAt:
5348 type: string
5349 format: date
5350 description: When to update the video
5351 required:
5352 - updateAt
5353 AccountSummary:
5354 properties:
5355 id:
5356 type: integer
5357 name:
5358 type: string
5359 displayName:
5360 type: string
5361 url:
5362 type: string
5363 format: url
5364 host:
5365 type: string
5366 format: hostname
5367 avatar:
5368 nullable: true
5369 allOf:
5370 - $ref: '#/components/schemas/ActorImage'
5371 VideoChannelSummary:
5372 properties:
5373 id:
5374 $ref: '#/components/schemas/id'
5375 name:
5376 type: string
5377 displayName:
5378 type: string
5379 url:
5380 type: string
5381 format: url
5382 host:
5383 type: string
5384 format: hostname
5385 avatar:
5386 nullable: true
5387 allOf:
5388 - $ref: '#/components/schemas/ActorImage'
5389 PlaylistElement:
5390 properties:
5391 position:
5392 type: integer
5393 startTimestamp:
5394 type: integer
5395 format: seconds
5396 stopTimestamp:
5397 type: integer
5398 format: seconds
5399 video:
5400 nullable: true
5401 allOf:
5402 - $ref: '#/components/schemas/Video'
5403 VideoFile:
5404 readOnly: true
5405 properties:
5406 magnetUri:
5407 type: string
5408 format: uri
5409 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
5410 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5411 resolution:
5412 $ref: '#/components/schemas/VideoResolutionConstant'
5413 size:
5414 type: integer
5415 description: Video file size in bytes
5416 torrentUrl:
5417 type: string
5418 description: Direct URL of the torrent file
5419 format: url
5420 torrentDownloadUrl:
5421 type: string
5422 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
5423 format: url
5424 fileUrl:
5425 type: string
5426 description: Direct URL of the video
5427 format: url
5428 fileDownloadUrl:
5429 type: string
5430 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
5431 format: url
5432 fps:
5433 type: number
5434 description: Frames per second of the video file
5435 metadataUrl:
5436 type: string
5437 format: url
5438 description: URL dereferencing the output of ffprobe on the file
5439 VideoStreamingPlaylists:
5440 allOf:
5441 - type: object
5442 properties:
5443 id:
5444 $ref: '#/components/schemas/id'
5445 type:
5446 type: integer
5447 enum:
5448 - 1
5449 description: |
5450 Playlist type:
5451 - `1`: HLS
5452 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS'
5453 VideoStreamingPlaylists-HLS:
5454 properties:
5455 playlistUrl:
5456 type: string
5457 format: url
5458 segmentsSha256Url:
5459 type: string
5460 format: url
5461 files:
5462 type: array
5463 description: |
5464 Video files associated to this playlist.
5465
5466 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.)
5467 items:
5468 $ref: '#/components/schemas/VideoFile'
5469 redundancies:
5470 type: array
5471 items:
5472 type: object
5473 properties:
5474 baseUrl:
5475 type: string
5476 format: url
5477 VideoInfo:
5478 properties:
5479 id:
5480 $ref: '#/components/schemas/Video/properties/id'
5481 uuid:
5482 $ref: '#/components/schemas/Video/properties/uuid'
5483 name:
5484 $ref: '#/components/schemas/Video/properties/name'
5485 Video:
5486 properties:
5487 id:
5488 description: object id for the video
5489 allOf:
5490 - $ref: '#/components/schemas/id'
5491 uuid:
5492 description: universal identifier for the video, that can be used across instances
5493 allOf:
5494 - $ref: '#/components/schemas/UUIDv4'
5495 shortUUID:
5496 allOf:
5497 - $ref: '#/components/schemas/shortUUID'
5498 isLive:
5499 type: boolean
5500 createdAt:
5501 type: string
5502 format: date-time
5503 example: 2017-10-01T10:52:46.396Z
5504 description: time at which the video object was first drafted
5505 publishedAt:
5506 type: string
5507 format: date-time
5508 example: 2018-10-01T10:52:46.396Z
5509 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution.
5510 updatedAt:
5511 type: string
5512 format: date-time
5513 example: 2021-05-04T08:01:01.502Z
5514 description: last time the video's metadata was modified
5515 originallyPublishedAt:
5516 type: string
5517 format: date-time
5518 example: 2010-10-01T10:52:46.396Z
5519 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt`
5520 category:
5521 allOf:
5522 - $ref: '#/components/schemas/VideoConstantNumber-Category'
5523 description: category in which the video is classified
5524 licence:
5525 allOf:
5526 - $ref: '#/components/schemas/VideoConstantNumber-Licence'
5527 description: licence under which the video is distributed
5528 language:
5529 allOf:
5530 - $ref: '#/components/schemas/VideoConstantString-Language'
5531 description: main language used in the video
5532 privacy:
5533 allOf:
5534 - $ref: '#/components/schemas/VideoPrivacyConstant'
5535 description: privacy policy used to distribute the video
5536 description:
5537 type: string
5538 example: |
5539 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n
5540 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr...
5541 minLength: 3
5542 maxLength: 250
5543 description: |
5544 truncated description of the video, written in Markdown.
5545 Resolve `descriptionPath` to get the full description of maximum `10000` characters.
5546 duration:
5547 type: integer
5548 example: 1419
5549 format: seconds
5550 description: duration of the video in seconds
5551 isLocal:
5552 type: boolean
5553 name:
5554 type: string
5555 description: title of the video
5556 example: What is PeerTube?
5557 minLength: 3
5558 maxLength: 120
5559 thumbnailPath:
5560 type: string
5561 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5562 previewPath:
5563 type: string
5564 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
5565 embedPath:
5566 type: string
5567 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
5568 views:
5569 type: integer
5570 example: 1337
5571 likes:
5572 type: integer
5573 example: 42
5574 dislikes:
5575 type: integer
5576 example: 7
5577 nsfw:
5578 type: boolean
5579 waitTranscoding:
5580 type: boolean
5581 nullable: true
5582 state:
5583 allOf:
5584 - $ref: '#/components/schemas/VideoStateConstant'
5585 description: represents the internal state of the video processing within the PeerTube instance
5586 scheduledUpdate:
5587 nullable: true
5588 allOf:
5589 - $ref: '#/components/schemas/VideoScheduledUpdate'
5590 blacklisted:
5591 nullable: true
5592 type: boolean
5593 blacklistedReason:
5594 nullable: true
5595 type: string
5596 account:
5597 $ref: '#/components/schemas/AccountSummary'
5598 channel:
5599 $ref: '#/components/schemas/VideoChannelSummary'
5600 userHistory:
5601 nullable: true
5602 type: object
5603 properties:
5604 currentTime:
5605 type: integer
5606 VideoDetails:
5607 allOf:
5608 - $ref: '#/components/schemas/Video'
5609 - type: object
5610 properties:
5611 viewers:
5612 type: integer
5613 description: If the video is a live, you have the amount of current viewers
5614 descriptionPath:
5615 type: string
5616 example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description
5617 description: path at which to get the full description of maximum `10000` characters
5618 support:
5619 type: string
5620 description: A text tell the audience how to support the video creator
5621 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5622 minLength: 3
5623 maxLength: 1000
5624 channel:
5625 $ref: '#/components/schemas/VideoChannel'
5626 account:
5627 $ref: '#/components/schemas/Account'
5628 tags:
5629 example: [flowers, gardening]
5630 type: array
5631 minItems: 1
5632 maxItems: 5
5633 items:
5634 type: string
5635 minLength: 2
5636 maxLength: 30
5637 commentsEnabled:
5638 type: boolean
5639 downloadEnabled:
5640 type: boolean
5641 trackerUrls:
5642 type: array
5643 items:
5644 type: string
5645 format: url
5646 example:
5647 - https://peertube2.cpy.re/tracker/announce
5648 - wss://peertube2.cpy.re/tracker/socket
5649 files:
5650 type: array
5651 items:
5652 $ref: '#/components/schemas/VideoFile'
5653 description: |
5654 WebTorrent/raw video files. If WebTorrent is disabled on the server:
5655
5656 - field will be empty
5657 - video files will be found in `streamingPlaylists[].files` field
5658 streamingPlaylists:
5659 type: array
5660 items:
5661 $ref: '#/components/schemas/VideoStreamingPlaylists'
5662 description: |
5663 HLS playlists/manifest files. If HLS is disabled on the server:
5664
5665 - field will be empty
5666 - video files will be found in `files` field
5667 FileRedundancyInformation:
5668 properties:
5669 id:
5670 $ref: '#/components/schemas/id'
5671 fileUrl:
5672 type: string
5673 format: url
5674 strategy:
5675 type: string
5676 enum:
5677 - manual
5678 - most-views
5679 - trending
5680 - recently-added
5681 size:
5682 type: integer
5683 createdAt:
5684 type: string
5685 format: date-time
5686 updatedAt:
5687 type: string
5688 format: date-time
5689 expiresOn:
5690 type: string
5691 format: date-time
5692 VideoRedundancy:
5693 properties:
5694 id:
5695 $ref: '#/components/schemas/id'
5696 name:
5697 type: string
5698 url:
5699 type: string
5700 format: url
5701 uuid:
5702 $ref: '#/components/schemas/UUIDv4'
5703 redundancies:
5704 type: object
5705 properties:
5706 files:
5707 type: array
5708 items:
5709 $ref: '#/components/schemas/FileRedundancyInformation'
5710 streamingPlaylists:
5711 type: array
5712 items:
5713 $ref: '#/components/schemas/FileRedundancyInformation'
5714 VideoImportStateConstant:
5715 properties:
5716 id:
5717 type: integer
5718 enum:
5719 - 1
5720 - 2
5721 - 3
5722 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
5723 label:
5724 type: string
5725 example: Pending
5726 VideoCreateImport:
5727 allOf:
5728 - type: object
5729 additionalProperties: false
5730 oneOf:
5731 - properties:
5732 targetUrl:
5733 $ref: '#/components/schemas/VideoImport/properties/targetUrl'
5734 required: [targetUrl]
5735 - properties:
5736 magnetUri:
5737 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
5738 required: [magnetUri]
5739 - properties:
5740 torrentfile:
5741 $ref: '#/components/schemas/VideoImport/properties/torrentfile'
5742 required: [torrentfile]
5743 - $ref: '#/components/schemas/VideoUploadRequestCommon'
5744 required:
5745 - channelId
5746 - name
5747 VideoImport:
5748 properties:
5749 id:
5750 readOnly: true
5751 allOf:
5752 - $ref: '#/components/schemas/id'
5753 targetUrl:
5754 type: string
5755 format: url
5756 description: remote URL where to find the import's source video
5757 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
5758 magnetUri:
5759 type: string
5760 format: uri
5761 description: magnet URI allowing to resolve the import's source video
5762 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
5763 torrentfile:
5764 writeOnly: true
5765 type: string
5766 format: binary
5767 description: Torrent file containing only the video file
5768 torrentName:
5769 readOnly: true
5770 type: string
5771 state:
5772 readOnly: true
5773 allOf:
5774 - $ref: '#/components/schemas/VideoImportStateConstant'
5775 error:
5776 readOnly: true
5777 type: string
5778 createdAt:
5779 readOnly: true
5780 type: string
5781 format: date-time
5782 updatedAt:
5783 readOnly: true
5784 type: string
5785 format: date-time
5786 video:
5787 readOnly: true
5788 nullable: true
5789 allOf:
5790 - $ref: '#/components/schemas/Video'
5791 VideoImportsList:
5792 properties:
5793 total:
5794 type: integer
5795 example: 1
5796 data:
5797 type: array
5798 maxItems: 100
5799 items:
5800 $ref: '#/components/schemas/VideoImport'
5801 Abuse:
5802 properties:
5803 id:
5804 $ref: '#/components/schemas/id'
5805 reason:
5806 type: string
5807 example: The video is a spam
5808 minLength: 2
5809 maxLength: 3000
5810 predefinedReasons:
5811 $ref: '#/components/schemas/AbusePredefinedReasons'
5812 reporterAccount:
5813 $ref: '#/components/schemas/Account'
5814 state:
5815 $ref: '#/components/schemas/AbuseStateConstant'
5816 moderationComment:
5817 type: string
5818 example: Decided to ban the server since it spams us regularly
5819 minLength: 2
5820 maxLength: 3000
5821 video:
5822 $ref: '#/components/schemas/VideoInfo'
5823 createdAt:
5824 type: string
5825 format: date-time
5826 AbuseMessage:
5827 properties:
5828 id:
5829 $ref: '#/components/schemas/id'
5830 message:
5831 type: string
5832 minLength: 2
5833 maxLength: 3000
5834 byModerator:
5835 type: boolean
5836 createdAt:
5837 type: string
5838 format: date-time
5839 account:
5840 $ref: '#/components/schemas/AccountSummary'
5841 VideoBlacklist:
5842 properties:
5843 id:
5844 $ref: '#/components/schemas/id'
5845 videoId:
5846 $ref: '#/components/schemas/Video/properties/id'
5847 createdAt:
5848 type: string
5849 format: date-time
5850 updatedAt:
5851 type: string
5852 format: date-time
5853 name:
5854 type: string
5855 minLength: 3
5856 maxLength: 120
5857 uuid:
5858 $ref: '#/components/schemas/UUIDv4'
5859 description:
5860 type: string
5861 minLength: 3
5862 maxLength: 10000
5863 duration:
5864 type: integer
5865 views:
5866 type: integer
5867 likes:
5868 type: integer
5869 dislikes:
5870 type: integer
5871 nsfw:
5872 type: boolean
5873 VideoPlaylist:
5874 properties:
5875 id:
5876 $ref: '#/components/schemas/id'
5877 uuid:
5878 $ref: '#/components/schemas/UUIDv4'
5879 shortUUID:
5880 allOf:
5881 - $ref: '#/components/schemas/shortUUID'
5882 createdAt:
5883 type: string
5884 format: date-time
5885 updatedAt:
5886 type: string
5887 format: date-time
5888 description:
5889 type: string
5890 minLength: 3
5891 maxLength: 1000
5892 displayName:
5893 type: string
5894 minLength: 1
5895 maxLength: 120
5896 isLocal:
5897 type: boolean
5898 videoLength:
5899 type: integer
5900 minimum: 0
5901 thumbnailPath:
5902 type: string
5903 privacy:
5904 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
5905 type:
5906 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
5907 ownerAccount:
5908 $ref: '#/components/schemas/AccountSummary'
5909 videoChannel:
5910 $ref: '#/components/schemas/VideoChannelSummary'
5911 VideoComment:
5912 properties:
5913 id:
5914 $ref: '#/components/schemas/id'
5915 url:
5916 type: string
5917 format: url
5918 text:
5919 type: string
5920 format: html
5921 description: Text of the comment
5922 minLength: 1
5923 example: This video is wonderful!
5924 threadId:
5925 $ref: '#/components/schemas/id'
5926 inReplyToCommentId:
5927 nullable: true
5928 allOf:
5929 - $ref: '#/components/schemas/id'
5930 videoId:
5931 $ref: '#/components/schemas/Video/properties/id'
5932 createdAt:
5933 type: string
5934 format: date-time
5935 updatedAt:
5936 type: string
5937 format: date-time
5938 deletedAt:
5939 nullable: true
5940 type: string
5941 format: date-time
5942 default: null
5943 isDeleted:
5944 type: boolean
5945 default: false
5946 totalRepliesFromVideoAuthor:
5947 type: integer
5948 minimum: 0
5949 totalReplies:
5950 type: integer
5951 minimum: 0
5952 account:
5953 $ref: '#/components/schemas/Account'
5954 VideoCommentThreadTree:
5955 properties:
5956 comment:
5957 $ref: '#/components/schemas/VideoComment'
5958 children:
5959 type: array
5960 items:
5961 $ref: '#/components/schemas/VideoCommentThreadTree'
5962 VideoCaption:
5963 properties:
5964 language:
5965 $ref: '#/components/schemas/VideoConstantString-Language'
5966 captionPath:
5967 type: string
5968 ActorImage:
5969 properties:
5970 path:
5971 type: string
5972 createdAt:
5973 type: string
5974 format: date-time
5975 updatedAt:
5976 type: string
5977 format: date-time
5978 ActorInfo:
5979 properties:
5980 id:
5981 $ref: '#/components/schemas/id'
5982 name:
5983 type: string
5984 displayName:
5985 type: string
5986 host:
5987 type: string
5988 format: hostname
5989 avatar:
5990 nullable: true
5991 type: object
5992 properties:
5993 path:
5994 type: string
5995 Actor:
5996 properties:
5997 id:
5998 $ref: '#/components/schemas/id'
5999 url:
6000 type: string
6001 format: url
6002 name:
6003 description: immutable name of the actor, used to find or mention it
6004 allOf:
6005 - $ref: '#/components/schemas/username'
6006 host:
6007 type: string
6008 format: hostname
6009 description: server on which the actor is resident
6010 hostRedundancyAllowed:
6011 type: boolean
6012 description: whether this actor's host allows redundancy of its videos
6013 followingCount:
6014 type: integer
6015 minimum: 0
6016 description: number of actors subscribed to by this actor, as seen by this instance
6017 followersCount:
6018 type: integer
6019 minimum: 0
6020 description: number of followers of this actor, as seen by this instance
6021 createdAt:
6022 type: string
6023 format: date-time
6024 updatedAt:
6025 type: string
6026 format: date-time
6027 avatar:
6028 $ref: '#/components/schemas/ActorImage'
6029 Account:
6030 allOf:
6031 - $ref: '#/components/schemas/Actor'
6032 - properties:
6033 userId:
6034 description: object id for the user tied to this account
6035 allOf:
6036 - $ref: '#/components/schemas/User/properties/id'
6037 displayName:
6038 type: string
6039 description: editable name of the account, displayed in its representations
6040 minLength: 3
6041 maxLength: 120
6042 description:
6043 type: string
6044 description: text or bio displayed on the account's profile
6045 UserWatchingVideo:
6046 properties:
6047 currentTime:
6048 type: integer
6049 format: seconds
6050 description: timestamp within the video, in seconds
6051 example: 5
6052 ServerConfig:
6053 properties:
6054 instance:
6055 type: object
6056 properties:
6057 name:
6058 type: string
6059 shortDescription:
6060 type: string
6061 defaultClientRoute:
6062 type: string
6063 isNSFW:
6064 type: boolean
6065 defaultNSFWPolicy:
6066 type: string
6067 customizations:
6068 type: object
6069 properties:
6070 javascript:
6071 type: string
6072 css:
6073 type: string
6074 search:
6075 type: object
6076 properties:
6077 remoteUri:
6078 type: object
6079 properties:
6080 users:
6081 type: boolean
6082 anonymous:
6083 type: boolean
6084 plugin:
6085 type: object
6086 properties:
6087 registered:
6088 type: array
6089 items:
6090 type: string
6091 theme:
6092 type: object
6093 properties:
6094 registered:
6095 type: array
6096 items:
6097 type: string
6098 email:
6099 type: object
6100 properties:
6101 enabled:
6102 type: boolean
6103 contactForm:
6104 type: object
6105 properties:
6106 enabled:
6107 type: boolean
6108 serverVersion:
6109 type: string
6110 serverCommit:
6111 type: string
6112 signup:
6113 type: object
6114 properties:
6115 allowed:
6116 type: boolean
6117 allowedForCurrentIP:
6118 type: boolean
6119 requiresEmailVerification:
6120 type: boolean
6121 transcoding:
6122 type: object
6123 properties:
6124 hls:
6125 type: object
6126 properties:
6127 enabled:
6128 type: boolean
6129 webtorrent:
6130 type: object
6131 properties:
6132 enabled:
6133 type: boolean
6134 enabledResolutions:
6135 type: array
6136 items:
6137 $ref: '#/components/schemas/VideoResolutionSet'
6138 import:
6139 type: object
6140 properties:
6141 videos:
6142 type: object
6143 properties:
6144 http:
6145 type: object
6146 properties:
6147 enabled:
6148 type: boolean
6149 torrent:
6150 type: object
6151 properties:
6152 enabled:
6153 type: boolean
6154 autoBlacklist:
6155 type: object
6156 properties:
6157 videos:
6158 type: object
6159 properties:
6160 ofUsers:
6161 type: object
6162 properties:
6163 enabled:
6164 type: boolean
6165 avatar:
6166 type: object
6167 properties:
6168 file:
6169 type: object
6170 properties:
6171 size:
6172 type: object
6173 properties:
6174 max:
6175 type: integer
6176 extensions:
6177 type: array
6178 items:
6179 type: string
6180 video:
6181 type: object
6182 properties:
6183 image:
6184 type: object
6185 properties:
6186 extensions:
6187 type: array
6188 items:
6189 type: string
6190 size:
6191 type: object
6192 properties:
6193 max:
6194 type: integer
6195 file:
6196 type: object
6197 properties:
6198 extensions:
6199 type: array
6200 items:
6201 type: string
6202 videoCaption:
6203 type: object
6204 properties:
6205 file:
6206 type: object
6207 properties:
6208 size:
6209 type: object
6210 properties:
6211 max:
6212 type: integer
6213 extensions:
6214 type: array
6215 items:
6216 type: string
6217 user:
6218 type: object
6219 properties:
6220 videoQuota:
6221 type: integer
6222 example: 16810141515
6223 videoQuotaDaily:
6224 type: integer
6225 example: 1681014151
6226 trending:
6227 type: object
6228 properties:
6229 videos:
6230 type: object
6231 properties:
6232 intervalDays:
6233 type: integer
6234 tracker:
6235 type: object
6236 properties:
6237 enabled:
6238 type: boolean
6239 followings:
6240 type: object
6241 properties:
6242 instance:
6243 type: object
6244 properties:
6245 autoFollowIndex:
6246 type: object
6247 properties:
6248 indexUrl:
6249 type: string
6250 format: url
6251 homepage:
6252 type: object
6253 properties:
6254 enabled:
6255 type: boolean
6256
6257 ServerConfigAbout:
6258 properties:
6259 instance:
6260 type: object
6261 properties:
6262 name:
6263 type: string
6264 shortDescription:
6265 type: string
6266 description:
6267 type: string
6268 terms:
6269 type: string
6270 ServerConfigCustom:
6271 properties:
6272 instance:
6273 type: object
6274 properties:
6275 name:
6276 type: string
6277 shortDescription:
6278 type: string
6279 description:
6280 type: string
6281 terms:
6282 type: string
6283 defaultClientRoute:
6284 type: string
6285 isNSFW:
6286 type: boolean
6287 defaultNSFWPolicy:
6288 type: string
6289 customizations:
6290 type: object
6291 properties:
6292 javascript:
6293 type: string
6294 css:
6295 type: string
6296 theme:
6297 type: object
6298 properties:
6299 default:
6300 type: string
6301 services:
6302 type: object
6303 properties:
6304 twitter:
6305 type: object
6306 properties:
6307 username:
6308 type: string
6309 whitelisted:
6310 type: boolean
6311 cache:
6312 type: object
6313 properties:
6314 previews:
6315 type: object
6316 properties:
6317 size:
6318 type: integer
6319 captions:
6320 type: object
6321 properties:
6322 size:
6323 type: integer
6324 signup:
6325 type: object
6326 properties:
6327 enabled:
6328 type: boolean
6329 limit:
6330 type: integer
6331 requiresEmailVerification:
6332 type: boolean
6333 admin:
6334 type: object
6335 properties:
6336 email:
6337 type: string
6338 format: email
6339 contactForm:
6340 type: object
6341 properties:
6342 enabled:
6343 type: boolean
6344 user:
6345 type: object
6346 description: Settings that apply to new users, if registration is enabled
6347 properties:
6348 videoQuota:
6349 type: integer
6350 example: 16810141515
6351 videoQuotaDaily:
6352 type: integer
6353 example: 1681014151
6354 transcoding:
6355 type: object
6356 description: Settings pertaining to transcoding jobs
6357 properties:
6358 enabled:
6359 type: boolean
6360 allowAdditionalExtensions:
6361 type: boolean
6362 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
6363 allowAudioFiles:
6364 type: boolean
6365 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
6366 threads:
6367 type: integer
6368 description: Amount of threads used by ffmpeg for 1 transcoding job
6369 concurrency:
6370 type: number
6371 description: Amount of transcoding jobs to execute in parallel
6372 profile:
6373 type: string
6374 enum:
6375 - default
6376 description: |
6377 New profiles can be added by plugins ; available in core PeerTube: 'default'.
6378 resolutions:
6379 type: object
6380 description: Resolutions to transcode _new videos_ to
6381 properties:
6382 0p:
6383 type: boolean
6384 144p:
6385 type: boolean
6386 240p:
6387 type: boolean
6388 360p:
6389 type: boolean
6390 480p:
6391 type: boolean
6392 720p:
6393 type: boolean
6394 1080p:
6395 type: boolean
6396 1440p:
6397 type: boolean
6398 2160p:
6399 type: boolean
6400 webtorrent:
6401 type: object
6402 description: WebTorrent-specific settings
6403 properties:
6404 enabled:
6405 type: boolean
6406 hls:
6407 type: object
6408 description: HLS-specific settings
6409 properties:
6410 enabled:
6411 type: boolean
6412 import:
6413 type: object
6414 properties:
6415 videos:
6416 type: object
6417 properties:
6418 http:
6419 type: object
6420 properties:
6421 enabled:
6422 type: boolean
6423 torrent:
6424 type: object
6425 properties:
6426 enabled:
6427 type: boolean
6428 autoBlacklist:
6429 type: object
6430 properties:
6431 videos:
6432 type: object
6433 properties:
6434 ofUsers:
6435 type: object
6436 properties:
6437 enabled:
6438 type: boolean
6439 followers:
6440 type: object
6441 properties:
6442 instance:
6443 type: object
6444 properties:
6445 enabled:
6446 type: boolean
6447 manualApproval:
6448 type: boolean
6449
6450 CustomHomepage:
6451 properties:
6452 content:
6453 type: string
6454
6455 Follow:
6456 properties:
6457 id:
6458 $ref: '#/components/schemas/id'
6459 follower:
6460 $ref: '#/components/schemas/Actor'
6461 following:
6462 $ref: '#/components/schemas/Actor'
6463 score:
6464 type: number
6465 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
6466 state:
6467 type: string
6468 enum:
6469 - pending
6470 - accepted
6471 createdAt:
6472 type: string
6473 format: date-time
6474 updatedAt:
6475 type: string
6476 format: date-time
6477
6478 PredefinedAbuseReasons:
6479 description: Reason categories that help triage reports
6480 type: array
6481 maxItems: 8
6482 items:
6483 type: string
6484 enum:
6485 - violentOrAbusive
6486 - hatefulOrAbusive
6487 - spamOrMisleading
6488 - privacy
6489 - rights
6490 - serverRules
6491 - thumbnails
6492 - captions
6493
6494 Job:
6495 properties:
6496 id:
6497 $ref: '#/components/schemas/id'
6498 state:
6499 type: string
6500 enum:
6501 - active
6502 - completed
6503 - failed
6504 - waiting
6505 - delayed
6506 type:
6507 type: string
6508 enum:
6509 - activitypub-http-unicast
6510 - activitypub-http-broadcast
6511 - activitypub-http-fetcher
6512 - activitypub-follow
6513 - video-file-import
6514 - video-transcoding
6515 - email
6516 - video-import
6517 - videos-views-stats
6518 - activitypub-refresher
6519 - video-redundancy
6520 data:
6521 type: object
6522 additionalProperties: true
6523 error:
6524 type: object
6525 additionalProperties: true
6526 createdAt:
6527 type: string
6528 format: date-time
6529 finishedOn:
6530 type: string
6531 format: date-time
6532 processedOn:
6533 type: string
6534 format: date-time
6535 AddUserResponse:
6536 properties:
6537 user:
6538 type: object
6539 properties:
6540 id:
6541 $ref: '#/components/schemas/id'
6542 account:
6543 type: object
6544 properties:
6545 id:
6546 $ref: '#/components/schemas/id'
6547 VideoUploadRequestCommon:
6548 properties:
6549 name:
6550 description: Video name
6551 type: string
6552 example: What is PeerTube?
6553 minLength: 3
6554 maxLength: 120
6555 channelId:
6556 description: Channel id that will contain this video
6557 type: integer
6558 example: 3
6559 minimum: 1
6560 privacy:
6561 $ref: '#/components/schemas/VideoPrivacySet'
6562 category:
6563 $ref: '#/components/schemas/VideoCategorySet'
6564 licence:
6565 $ref: '#/components/schemas/VideoLicenceSet'
6566 language:
6567 $ref: '#/components/schemas/VideoLanguageSet'
6568 description:
6569 description: Video description
6570 type: string
6571 example: |
6572 **[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)**
6573 waitTranscoding:
6574 description: Whether or not we wait transcoding before publish the video
6575 type: boolean
6576 support:
6577 description: A text tell the audience how to support the video creator
6578 example: Please support our work on https://soutenir.framasoft.org/en/ <3
6579 type: string
6580 nsfw:
6581 description: Whether or not this video contains sensitive content
6582 type: boolean
6583 tags:
6584 description: Video tags (maximum 5 tags each between 2 and 30 characters)
6585 type: array
6586 minItems: 1
6587 maxItems: 5
6588 uniqueItems: true
6589 example:
6590 - framasoft
6591 - peertube
6592 items:
6593 type: string
6594 minLength: 2
6595 maxLength: 30
6596 commentsEnabled:
6597 description: Enable or disable comments for this video
6598 type: boolean
6599 downloadEnabled:
6600 description: Enable or disable downloading for this video
6601 type: boolean
6602 originallyPublishedAt:
6603 description: Date when the content was originally published
6604 type: string
6605 format: date-time
6606 scheduleUpdate:
6607 $ref: '#/components/schemas/VideoScheduledUpdate'
6608 thumbnailfile:
6609 description: Video thumbnail file
6610 type: string
6611 format: binary
6612 previewfile:
6613 description: Video preview file
6614 type: string
6615 format: binary
6616 required:
6617 - channelId
6618 - name
6619 VideoUploadRequestLegacy:
6620 allOf:
6621 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6622 - type: object
6623 required:
6624 - videofile
6625 properties:
6626 videofile:
6627 description: Video file
6628 type: string
6629 format: binary
6630 VideoUploadRequestResumable:
6631 allOf:
6632 - $ref: '#/components/schemas/VideoUploadRequestCommon'
6633 - type: object
6634 required:
6635 - filename
6636 properties:
6637 filename:
6638 description: Video filename including extension
6639 type: string
6640 format: filename
6641 example: what_is_peertube.mp4
6642 thumbnailfile:
6643 description: Video thumbnail file
6644 type: string
6645 format: binary
6646 previewfile:
6647 description: Video preview file
6648 type: string
6649 format: binary
6650 VideoUploadResponse:
6651 properties:
6652 video:
6653 type: object
6654 properties:
6655 id:
6656 $ref: '#/components/schemas/Video/properties/id'
6657 uuid:
6658 $ref: '#/components/schemas/Video/properties/uuid'
6659 shortUUID:
6660 $ref: '#/components/schemas/Video/properties/shortUUID'
6661 CommentThreadResponse:
6662 properties:
6663 total:
6664 type: integer
6665 example: 1
6666 data:
6667 type: array
6668 maxItems: 100
6669 items:
6670 $ref: '#/components/schemas/VideoComment'
6671 CommentThreadPostResponse:
6672 properties:
6673 comment:
6674 $ref: '#/components/schemas/VideoComment'
6675 VideoListResponse:
6676 properties:
6677 total:
6678 type: integer
6679 example: 1
6680 data:
6681 type: array
6682 maxItems: 100
6683 items:
6684 $ref: '#/components/schemas/Video'
6685 User:
6686 properties:
6687 account:
6688 $ref: '#/components/schemas/Account'
6689 autoPlayNextVideo:
6690 type: boolean
6691 description: Automatically start playing the upcoming video after the currently playing video
6692 autoPlayNextVideoPlaylist:
6693 type: boolean
6694 description: Automatically start playing the video on the playlist after the currently playing video
6695 autoPlayVideo:
6696 type: boolean
6697 description: Automatically start playing the video on the watch page
6698 blocked:
6699 type: boolean
6700 blockedReason:
6701 type: string
6702 createdAt:
6703 type: string
6704 email:
6705 type: string
6706 format: email
6707 description: The user email
6708 emailVerified:
6709 type: boolean
6710 description: Has the user confirmed their email address?
6711 id:
6712 allOf:
6713 - $ref: '#/components/schemas/id'
6714 readOnly: true
6715 pluginAuth:
6716 type: string
6717 description: Auth plugin to use to authenticate the user
6718 lastLoginDate:
6719 type: string
6720 format: date-time
6721 noInstanceConfigWarningModal:
6722 type: boolean
6723 noAccountSetupWarningModal:
6724 type: boolean
6725 noWelcomeModal:
6726 type: boolean
6727 nsfwPolicy:
6728 $ref: '#/components/schemas/NSFWPolicy'
6729 role:
6730 $ref: '#/components/schemas/UserRole'
6731 roleLabel:
6732 type: string
6733 enum:
6734 - User
6735 - Moderator
6736 - Administrator
6737 theme:
6738 type: string
6739 description: Theme enabled by this user
6740 username:
6741 $ref: '#/components/schemas/username'
6742 videoChannels:
6743 type: array
6744 items:
6745 $ref: '#/components/schemas/VideoChannel'
6746 videoQuota:
6747 type: integer
6748 description: The user video quota in bytes
6749 example: -1
6750 videoQuotaDaily:
6751 type: integer
6752 description: The user daily video quota in bytes
6753 example: -1
6754 p2pEnabled:
6755 type: boolean
6756 description: Enable P2P in the player
6757 UserWithStats:
6758 allOf:
6759 - $ref: '#/components/schemas/User'
6760 - properties:
6761 # optionally present fields: they require WITH_STATS scope
6762 videosCount:
6763 type: integer
6764 description: Count of videos published
6765 abusesCount:
6766 type: integer
6767 description: Count of reports/abuses of which the user is a target
6768 abusesAcceptedCount:
6769 type: integer
6770 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team
6771 abusesCreatedCount:
6772 type: integer
6773 description: Count of reports/abuses created by the user
6774 videoCommentsCount:
6775 type: integer
6776 description: Count of comments published
6777 AddUser:
6778 properties:
6779 username:
6780 $ref: '#/components/schemas/username'
6781 password:
6782 $ref: '#/components/schemas/password'
6783 email:
6784 type: string
6785 format: email
6786 description: The user email
6787 videoQuota:
6788 type: integer
6789 description: The user video quota in bytes
6790 example: -1
6791 videoQuotaDaily:
6792 type: integer
6793 description: The user daily video quota in bytes
6794 example: -1
6795 channelName:
6796 $ref: '#/components/schemas/usernameChannel'
6797 role:
6798 $ref: '#/components/schemas/UserRole'
6799 adminFlags:
6800 $ref: '#/components/schemas/UserAdminFlags'
6801 required:
6802 - username
6803 - password
6804 - email
6805 - videoQuota
6806 - videoQuotaDaily
6807 - role
6808 UpdateUser:
6809 properties:
6810 email:
6811 description: The updated email of the user
6812 allOf:
6813 - $ref: '#/components/schemas/User/properties/email'
6814 emailVerified:
6815 type: boolean
6816 description: Set the email as verified
6817 videoQuota:
6818 type: integer
6819 description: The updated video quota of the user in bytes
6820 videoQuotaDaily:
6821 type: integer
6822 description: The updated daily video quota of the user in bytes
6823 pluginAuth:
6824 type: string
6825 nullable: true
6826 description: The auth plugin to use to authenticate the user
6827 example: 'peertube-plugin-auth-saml2'
6828 role:
6829 $ref: '#/components/schemas/UserRole'
6830 adminFlags:
6831 $ref: '#/components/schemas/UserAdminFlags'
6832 password:
6833 $ref: '#/components/schemas/password'
6834 UpdateMe:
6835 # see shared/models/users/user-update-me.model.ts:
6836 properties:
6837 password:
6838 $ref: '#/components/schemas/password'
6839 currentPassword:
6840 $ref: '#/components/schemas/password'
6841 email:
6842 description: new email used for login and service communications
6843 allOf:
6844 - $ref: '#/components/schemas/User/properties/email'
6845 displayName:
6846 type: string
6847 description: new name of the user in its representations
6848 minLength: 3
6849 maxLength: 120
6850 displayNSFW:
6851 type: string
6852 description: new NSFW display policy
6853 enum:
6854 - 'true'
6855 - 'false'
6856 - both
6857 p2pEnabled:
6858 type: boolean
6859 description: whether to enable P2P in the player or not
6860 autoPlayVideo:
6861 type: boolean
6862 description: new preference regarding playing videos automatically
6863 autoPlayNextVideo:
6864 type: boolean
6865 description: new preference regarding playing following videos automatically
6866 autoPlayNextVideoPlaylist:
6867 type: boolean
6868 description: new preference regarding playing following playlist videos automatically
6869 videosHistoryEnabled:
6870 type: boolean
6871 description: whether to keep track of watched history or not
6872 videoLanguages:
6873 type: array
6874 items:
6875 type: string
6876 description: list of languages to filter videos down to
6877 theme:
6878 type: string
6879 noInstanceConfigWarningModal:
6880 type: boolean
6881 noAccountSetupWarningModal:
6882 type: boolean
6883 noWelcomeModal:
6884 type: boolean
6885 GetMeVideoRating:
6886 properties:
6887 id:
6888 $ref: '#/components/schemas/id'
6889 rating:
6890 type: string
6891 enum:
6892 - like
6893 - dislike
6894 - none
6895 description: Rating of the video
6896 required:
6897 - id
6898 - rating
6899 VideoRating:
6900 properties:
6901 video:
6902 $ref: '#/components/schemas/Video'
6903 rating:
6904 type: string
6905 enum:
6906 - like
6907 - dislike
6908 - none
6909 description: Rating of the video
6910 required:
6911 - video
6912 - rating
6913 RegisterUser:
6914 properties:
6915 username:
6916 description: immutable name of the user, used to find or mention its actor
6917 allOf:
6918 - $ref: '#/components/schemas/username'
6919 password:
6920 $ref: '#/components/schemas/password'
6921 email:
6922 type: string
6923 format: email
6924 description: email of the user, used for login or service communications
6925 displayName:
6926 type: string
6927 description: editable name of the user, displayed in its representations
6928 minLength: 1
6929 maxLength: 120
6930 channel:
6931 type: object
6932 description: channel base information used to create the first channel of the user
6933 properties:
6934 name:
6935 $ref: '#/components/schemas/usernameChannel'
6936 displayName:
6937 $ref: '#/components/schemas/VideoChannel/properties/displayName'
6938 required:
6939 - username
6940 - password
6941 - email
6942
6943 OAuthClient:
6944 properties:
6945 client_id:
6946 type: string
6947 pattern: /^[a-z0-9]$/
6948 maxLength: 32
6949 minLength: 32
6950 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf
6951 client_secret:
6952 type: string
6953 pattern: /^[a-zA-Z0-9]$/
6954 maxLength: 32
6955 minLength: 32
6956 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt
6957 OAuthToken-password:
6958 allOf:
6959 - $ref: '#/components/schemas/OAuthClient'
6960 - type: object
6961 properties:
6962 grant_type:
6963 type: string
6964 enum:
6965 - password
6966 - refresh_token
6967 default: password
6968 username:
6969 $ref: '#/components/schemas/User/properties/username'
6970 password:
6971 $ref: '#/components/schemas/password'
6972 required:
6973 - client_id
6974 - client_secret
6975 - grant_type
6976 - username
6977 - password
6978 OAuthToken-refresh_token:
6979 allOf:
6980 - $ref: '#/components/schemas/OAuthClient'
6981 - type: object
6982 properties:
6983 grant_type:
6984 type: string
6985 enum:
6986 - password
6987 - refresh_token
6988 default: password
6989 refresh_token:
6990 type: string
6991 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
6992 required:
6993 - client_id
6994 - client_secret
6995 - grant_type
6996 - refresh_token
6997
6998 VideoChannel:
6999 properties:
7000 # GET/POST/PUT properties
7001 displayName:
7002 type: string
7003 description: editable name of the channel, displayed in its representations
7004 example: Videos of Framasoft
7005 minLength: 1
7006 maxLength: 120
7007 description:
7008 type: string
7009 example: Videos made with <3 by Framasoft
7010 minLength: 3
7011 maxLength: 1000
7012 support:
7013 type: string
7014 description: text shown by default on all videos of this channel, to tell the audience how to support it
7015 example: Please support our work on https://soutenir.framasoft.org/en/ <3
7016 minLength: 3
7017 maxLength: 1000
7018 # GET-only properties
7019 id:
7020 readOnly: true
7021 allOf:
7022 - $ref: '#/components/schemas/id'
7023 isLocal:
7024 readOnly: true
7025 type: boolean
7026 updatedAt:
7027 readOnly: true
7028 type: string
7029 format: date-time
7030 ownerAccount:
7031 readOnly: true
7032 nullable: true
7033 type: object
7034 properties:
7035 id:
7036 type: integer
7037 uuid:
7038 $ref: '#/components/schemas/UUIDv4'
7039 VideoChannelCreate:
7040 allOf:
7041 - $ref: '#/components/schemas/VideoChannel'
7042 - properties:
7043 name:
7044 description: username of the channel to create
7045 allOf:
7046 - $ref: '#/components/schemas/usernameChannel'
7047 required:
7048 - name
7049 - displayName
7050 VideoChannelUpdate:
7051 allOf:
7052 - $ref: '#/components/schemas/VideoChannel'
7053 - properties:
7054 bulkVideosSupportUpdate:
7055 type: boolean
7056 description: Update the support field for all videos of this channel
7057 VideoChannelList:
7058 properties:
7059 total:
7060 type: integer
7061 example: 1
7062 data:
7063 type: array
7064 items:
7065 allOf:
7066 - $ref: '#/components/schemas/VideoChannel'
7067 - $ref: '#/components/schemas/Actor'
7068
7069 MRSSPeerLink:
7070 type: object
7071 xml:
7072 name: 'media:peerLink'
7073 properties:
7074 href:
7075 type: string
7076 xml:
7077 attribute: true
7078 type:
7079 type: string
7080 enum:
7081 - application/x-bittorrent
7082 xml:
7083 attribute: true
7084 MRSSGroupContent:
7085 type: object
7086 xml:
7087 name: 'media:content'
7088 properties:
7089 url:
7090 type: string
7091 format: url
7092 xml:
7093 attribute: true
7094 fileSize:
7095 type: integer
7096 xml:
7097 attribute: true
7098 type:
7099 type: string
7100 xml:
7101 attribute: true
7102 framerate:
7103 type: integer
7104 xml:
7105 attribute: true
7106 duration:
7107 type: integer
7108 xml:
7109 attribute: true
7110 height:
7111 type: integer
7112 xml:
7113 attribute: true
7114 lang:
7115 type: string
7116 xml:
7117 attribute: true
7118 VideoCommentsForXML:
7119 type: array
7120 xml:
7121 wrapped: true
7122 name: 'channel'
7123 items:
7124 type: object
7125 xml:
7126 name: 'item'
7127 properties:
7128 link:
7129 type: string
7130 format: url
7131 guid:
7132 type: string
7133 pubDate:
7134 type: string
7135 format: date-time
7136 'content:encoded':
7137 type: string
7138 'dc:creator':
7139 type: string
7140 VideosForXML:
7141 type: array
7142 xml:
7143 wrapped: true
7144 name: 'channel'
7145 items:
7146 type: object
7147 xml:
7148 name: 'item'
7149 properties:
7150 link:
7151 type: string
7152 format: url
7153 description: video watch page URL
7154 guid:
7155 type: string
7156 description: video canonical URL
7157 pubDate:
7158 type: string
7159 format: date-time
7160 description: video publication date
7161 description:
7162 type: string
7163 description: video description
7164 'content:encoded':
7165 type: string
7166 description: video description
7167 'dc:creator':
7168 type: string
7169 description: publisher user name
7170 'media:category':
7171 type: integer
7172 description: video category (MRSS)
7173 'media:community':
7174 type: object
7175 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
7176 properties:
7177 'media:statistics':
7178 type: object
7179 properties:
7180 views:
7181 type: integer
7182 xml:
7183 attribute: true
7184 'media:embed':
7185 type: object
7186 properties:
7187 url:
7188 type: string
7189 format: url
7190 description: video embed path, relative to the canonical URL domain (MRSS)
7191 xml:
7192 attribute: true
7193 'media:player':
7194 type: object
7195 properties:
7196 url:
7197 type: string
7198 format: url
7199 description: video watch path, relative to the canonical URL domain (MRSS)
7200 xml:
7201 attribute: true
7202 'media:thumbnail':
7203 type: object
7204 properties:
7205 url:
7206 type: string
7207 format: url
7208 xml:
7209 attribute: true
7210 height:
7211 type: integer
7212 xml:
7213 attribute: true
7214 width:
7215 type: integer
7216 xml:
7217 attribute: true
7218 'media:title':
7219 type: string
7220 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
7221 'media:description':
7222 type: string
7223 'media:rating':
7224 type: string
7225 enum:
7226 - nonadult
7227 - adult
7228 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
7229 'enclosure':
7230 type: object
7231 description: main streamable file for the video
7232 properties:
7233 url:
7234 type: string
7235 format: url
7236 xml:
7237 attribute: true
7238 type:
7239 type: string
7240 enum:
7241 - application/x-bittorrent
7242 xml:
7243 attribute: true
7244 length:
7245 type: integer
7246 xml:
7247 attribute: true
7248 'media:group':
7249 type: array
7250 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)
7251 items:
7252 anyOf:
7253 - $ref: '#/components/schemas/MRSSPeerLink'
7254 - $ref: '#/components/schemas/MRSSGroupContent'
7255 NotificationSettingValue:
7256 type: integer
7257 description: >
7258 Notification type
7259
7260 - `0` NONE
7261
7262 - `1` WEB
7263
7264 - `2` EMAIL
7265 enum:
7266 - 0
7267 - 1
7268 - 2
7269 Notification:
7270 properties:
7271 id:
7272 $ref: '#/components/schemas/id'
7273 type:
7274 type: integer
7275 description: >
7276 Notification type, following the `UserNotificationType` enum:
7277
7278 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
7279
7280 - `2` NEW_COMMENT_ON_MY_VIDEO
7281
7282 - `3` NEW_ABUSE_FOR_MODERATORS
7283
7284 - `4` BLACKLIST_ON_MY_VIDEO
7285
7286 - `5` UNBLACKLIST_ON_MY_VIDEO
7287
7288 - `6` MY_VIDEO_PUBLISHED
7289
7290 - `7` MY_VIDEO_IMPORT_SUCCESS
7291
7292 - `8` MY_VIDEO_IMPORT_ERROR
7293
7294 - `9` NEW_USER_REGISTRATION
7295
7296 - `10` NEW_FOLLOW
7297
7298 - `11` COMMENT_MENTION
7299
7300 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
7301
7302 - `13` NEW_INSTANCE_FOLLOWER
7303
7304 - `14` AUTO_INSTANCE_FOLLOWING
7305
7306 - `15` ABUSE_STATE_CHANGE
7307
7308 - `16` ABUSE_NEW_MESSAGE
7309
7310 - `17` NEW_PLUGIN_VERSION
7311
7312 - `18` NEW_PEERTUBE_VERSION
7313 read:
7314 type: boolean
7315 video:
7316 nullable: true
7317 allOf:
7318 - $ref: '#/components/schemas/VideoInfo'
7319 - type: object
7320 properties:
7321 channel:
7322 $ref: '#/components/schemas/ActorInfo'
7323 videoImport:
7324 nullable: true
7325 type: object
7326 properties:
7327 id:
7328 $ref: '#/components/schemas/id'
7329 video:
7330 nullable: true
7331 $ref: '#/components/schemas/VideoInfo'
7332 torrentName:
7333 type: string
7334 nullable: true
7335 magnetUri:
7336 $ref: '#/components/schemas/VideoImport/properties/magnetUri'
7337 targetUri:
7338 type: string
7339 format: uri
7340 nullable: true
7341 comment:
7342 nullable: true
7343 type: object
7344 properties:
7345 id:
7346 $ref: '#/components/schemas/id'
7347 threadId:
7348 type: integer
7349 video:
7350 $ref: '#/components/schemas/VideoInfo'
7351 account:
7352 $ref: '#/components/schemas/ActorInfo'
7353 videoAbuse:
7354 nullable: true
7355 type: object
7356 properties:
7357 id:
7358 $ref: '#/components/schemas/id'
7359 video:
7360 allOf:
7361 - $ref: '#/components/schemas/VideoInfo'
7362 videoBlacklist:
7363 nullable: true
7364 type: object
7365 properties:
7366 id:
7367 $ref: '#/components/schemas/id'
7368 video:
7369 allOf:
7370 - $ref: '#/components/schemas/VideoInfo'
7371 account:
7372 nullable: true
7373 allOf:
7374 - $ref: '#/components/schemas/ActorInfo'
7375 actorFollow:
7376 type: object
7377 nullable: true
7378 properties:
7379 id:
7380 $ref: '#/components/schemas/id'
7381 follower:
7382 $ref: '#/components/schemas/ActorInfo'
7383 state:
7384 type: string
7385 enum:
7386 - pending
7387 - accepted
7388 following:
7389 type: object
7390 properties:
7391 type:
7392 type: string
7393 enum:
7394 - account
7395 - channel
7396 - instance
7397 name:
7398 type: string
7399 displayName:
7400 type: string
7401 host:
7402 type: string
7403 format: hostname
7404 createdAt:
7405 type: string
7406 format: date-time
7407 updatedAt:
7408 type: string
7409 format: date-time
7410 NotificationListResponse:
7411 properties:
7412 total:
7413 type: integer
7414 example: 1
7415 data:
7416 type: array
7417 maxItems: 100
7418 items:
7419 $ref: '#/components/schemas/Notification'
7420 Plugin:
7421 properties:
7422 name:
7423 type: string
7424 example: peertube-plugin-auth-ldap
7425 type:
7426 type: integer
7427 description: >
7428 - `1`: PLUGIN
7429
7430 - `2`: THEME
7431 enum:
7432 - 1
7433 - 2
7434 latestVersion:
7435 type: string
7436 example: 0.0.3
7437 version:
7438 type: string
7439 example: 0.0.1
7440 enabled:
7441 type: boolean
7442 uninstalled:
7443 type: boolean
7444 peertubeEngine:
7445 type: string
7446 example: 2.2.0
7447 description:
7448 type: string
7449 homepage:
7450 type: string
7451 format: url
7452 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7453 settings:
7454 type: object
7455 additionalProperties: true
7456 createdAt:
7457 type: string
7458 format: date-time
7459 updatedAt:
7460 type: string
7461 format: date-time
7462 PluginResponse:
7463 properties:
7464 total:
7465 type: integer
7466 example: 1
7467 data:
7468 type: array
7469 maxItems: 100
7470 items:
7471 $ref: '#/components/schemas/Plugin'
7472
7473 LiveVideoUpdate:
7474 properties:
7475 saveReplay:
7476 type: boolean
7477 permanentLive:
7478 description: User can stream multiple times in a permanent live
7479 type: boolean
7480
7481 LiveVideoResponse:
7482 properties:
7483 rtmpUrl:
7484 type: string
7485 rtmpsUrl:
7486 type: string
7487 streamKey:
7488 type: string
7489 description: RTMP stream key to use to stream into this live video
7490 saveReplay:
7491 type: boolean
7492 permanentLive:
7493 description: User can stream multiple times in a permanent live
7494 type: boolean
7495
7496
7497
7498 callbacks:
7499 searchIndex:
7500 'https://search.example.org/api/v1/search/videos':
7501 post:
7502 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
7503 responses:
7504 '200':
7505 description: successful operation
7506 content:
7507 application/json:
7508 schema:
7509 $ref: '#/components/schemas/VideoListResponse'