OCaml bindings to the Peertube ActivityPub video sharing API
at main 12656 lines 374 kB view raw
1openapi: 3.0.3 2info: 3 title: PeerTube 4 version: 8.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. 17 18 See the [REST API quick start](https://docs.joinpeertube.org/api/rest-getting-started) for a few 19 examples of using the PeerTube API. 20 21 # Authentication 22 23 When you sign up for an account on a PeerTube instance, you are given the possibility 24 to generate sessions on it, and authenticate there using an access token. Only __one 25 access token can currently be used at a time__. 26 27 ## Roles 28 29 Accounts are given permissions based on their role. There are three roles on 30 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin/managing-users#roles) for a detail of their permissions. 31 32 # Errors 33 34 The API uses standard HTTP status codes to indicate the success or failure 35 of the API call, completed by a [RFC7807-compliant](https://tools.ietf.org/html/rfc7807) response body. 36 37 ``` 38 HTTP 1.1 404 Not Found 39 Content-Type: application/problem+json; charset=utf-8 40 41 { 42 "detail": "Video not found", 43 "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo", 44 "status": 404, 45 "title": "Not Found", 46 "type": "about:blank" 47 } 48 ``` 49 50 We provide error `type` (following RFC7807) and `code` (internal PeerTube code) values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/packages/models/src/server/server-error-code.enum.ts), 51 but it is still optional. Types are used to disambiguate errors that bear the same status code 52 and are non-obvious: 53 54 ``` 55 HTTP 1.1 403 Forbidden 56 Content-Type: application/problem+json; charset=utf-8 57 58 { 59 "detail": "Cannot get this video regarding follow constraints", 60 "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo", 61 "status": 403, 62 "title": "Forbidden", 63 "type": "https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints" 64 } 65 ``` 66 67 Here a 403 error could otherwise mean that the video is private or blocklisted. 68 69 ### Validation errors 70 71 Each parameter is evaluated on its own against a set of rules before the route validator 72 proceeds with potential testing involving parameter combinations. Errors coming from validation 73 errors appear earlier and benefit from a more detailed error description: 74 75 ``` 76 HTTP 1.1 400 Bad Request 77 Content-Type: application/problem+json; charset=utf-8 78 79 { 80 "detail": "Incorrect request parameters: id", 81 "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo", 82 "instance": "/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180", 83 "invalid-params": { 84 "id": { 85 "location": "params", 86 "msg": "Invalid value", 87 "param": "id", 88 "value": "9c9de5e8-0a1e-484a-b099-e80766180" 89 } 90 }, 91 "status": 400, 92 "title": "Bad Request", 93 "type": "about:blank" 94 } 95 ``` 96 97 Where `id` is the name of the field concerned by the error, within the route definition. 98 `invalid-params.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and 99 `invalid-params.<field>.value` reports the value that didn't pass validation whose `invalid-params.<field>.msg` 100 is about. 101 102 ### Deprecated error fields 103 104 Some fields could be included with previous versions. They are still included but their use is deprecated: 105 - `error`: superseded by `detail` 106 107 # Rate limits 108 109 We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators: 110 111 | Endpoint (prefix: `/api/v1`) | Calls | Time frame | 112 |------------------------------|---------------|--------------| 113 | `/*` | 50 | 10 seconds | 114 | `POST /users/token` | 15 | 5 minutes | 115 | `POST /users/register` | 2<sup>*</sup> | 5 minutes | 116 | `POST /users/ask-send-verify-email` | 3 | 5 minutes | 117 118 Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service 119 limit is announced by a `429 Too Many Requests` status code. 120 121 You can get details about the current state of your rate limit by reading the 122 following headers: 123 124 | Header | Description | 125 |-------------------------|------------------------------------------------------------| 126 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period | 127 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period | 128 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp | 129 | `Retry-After` | Seconds to delay after the first `429` is received | 130 131 # CORS 132 133 This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/), 134 allowing cross-domain communication from the browser for some routes: 135 136 | Endpoint | 137 |------------------------- ---| 138 | `/api/*` | 139 | `/download/*` | 140 | `/lazy-static/*` | 141 | `/.well-known/webfinger` | 142 143 In addition, all routes serving ActivityPub are CORS-enabled for all origins. 144externalDocs: 145 url: https://docs.joinpeertube.org/api-rest-reference.html 146tags: 147 - name: Register 148 description: | 149 As a visitor, you can use this API to open an account (if registrations are open on 150 that PeerTube instance). As an admin, you should use the dedicated [User creation 151 API](#operation/addUser) instead. 152 - name: Session 153 x-displayName: Login/Logout 154 description: | 155 Sessions deal with access tokens over time. Only __one session token can currently be used at a time__. 156 - name: Accounts 157 description: > 158 Accounts encompass remote accounts discovered across the federation, 159 and correspond to the main Actor, along with video channels a user can create, which 160 are also Actors. 161 162 When a comment is posted, it is done with your Account's Actor. 163 - name: Users 164 description: > 165 Using some features of PeerTube require authentication, for which User 166 provide different levels of permission as well as associated user 167 information. Each user has a corresponding local Account for federation. 168 - name: User Exports 169 description: > 170 To create an archive of user data. 171 - name: User Imports 172 description: > 173 To import an archive of user data. 174 - name: My User 175 description: > 176 Operations related to your own User, when logged-in. 177 - name: My Subscriptions 178 description: > 179 Operations related to your subscriptions to video channels, their 180 new videos, and how to keep up to date with their latest publications! 181 - name: My History 182 description: > 183 Operations related to your watch history. 184 - name: My Notifications 185 description: > 186 Notifications following new videos, follows or reports. They allow you 187 to keep track of the interactions and overall important information that 188 concerns you. You MAY set per-notification type delivery preference, to 189 receive the info either by mail, by in-browser notification or both. 190 - name: Config 191 description: > 192 Each server exposes public information regarding supported videos and 193 options. 194 - name: Job 195 description: > 196 Jobs are long-running tasks enqueued and processed by the instance 197 itself. No additional worker registration is currently available. 198 - name: Instance Follows 199 description: > 200 Managing servers which the instance interacts with is crucial to the 201 concept of federation in PeerTube and external video indexation. The PeerTube 202 server then deals with inter-server ActivityPub operations and propagates 203 information across its social graph by posting activities to actors' inbox 204 endpoints. 205 externalDocs: 206 url: https://docs.joinpeertube.org/admin/following-instances#instances-follows 207 - name: Instance Redundancy 208 description: > 209 Redundancy is part of the inter-server solidarity that PeerTube fosters. 210 Manage the list of instances you wish to help by seeding their videos according 211 to the policy of video selection of your choice. Note that you have a similar functionality 212 to mirror individual videos, see [video mirroring](#tag/Video-Mirroring). 213 externalDocs: 214 url: https://docs.joinpeertube.org/admin/following-instances#instances-redundancy 215 - name: Plugins 216 description: > 217 Managing plugins installed from a local path or from NPM, or search for new ones. 218 externalDocs: 219 url: https://docs.joinpeertube.org/api/plugins 220 - name: Abuses 221 description: | 222 Abuses deal with reports of local or remote videos/comments/accounts alike. 223 - name: Video 224 description: | 225 Operations dealing with listing, uploading, fetching or modifying videos. 226 - name: Video Upload 227 description: | 228 Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes. 229 230 ### Upload 231 232 - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request 233 - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks 234 235 You can upload videos more reliably by using the resumable variant. Its protocol lets 236 you resume an upload operation after a network interruption or other transmission failure, 237 saving time and bandwidth in the event of network failures. 238 239 Favor using resumable uploads in any of the following cases: 240 - You are transferring large files 241 - The likelihood of a network interruption is high 242 - Uploads are originating from a device with a low-bandwidth or unstable Internet connection, 243 such as a mobile device 244 245 ### Import 246 247 - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/) 248 - _magnet_-based: where the URI resolves to a BitTorrent resource containing a single supported video file 249 - _torrent_-based: where the metainfo file resolves to a BitTorrent resource containing a single supported video file 250 251 The import function is practical when the desired video/audio is available online. It makes PeerTube 252 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have. 253 - name: Video Imports 254 description: Operations dealing with listing, adding and removing video imports. 255 - name: Channels Sync 256 description: Operations dealing with synchronizing PeerTube user's channel with channels of other platforms 257 - name: Video Captions 258 description: Operations dealing with listing, adding and removing closed captions of a video. 259 - name: Video Chapters 260 description: Operations dealing with managing chapters of a video. 261 - name: Video Channels 262 description: Operations dealing with the creation, modification and listing of videos within a channel. 263 - name: Player Settings 264 description: Operations dealing with video player settings for videos and channels. 265 - name: Video Comments 266 description: > 267 Operations dealing with comments to a video. Comments are organized in threads: adding a 268 comment in response to the video starts a thread, adding a reply to a comment adds it to 269 its root comment thread. 270 - name: Video Blocks 271 description: Operations dealing with blocking videos (removing them from view and preventing interactions). 272 - name: Automatic Tags 273 description: Automatic tags set on objects (like comments or videos) by specific rules (external link, watched words, etc.) 274 - name: Watched Words 275 description: Manage list of watched words to detect patterns on objects (like comments of videos) 276 - name: Video Rates 277 description: Like/dislike a video. 278 - name: Video Playlists 279 description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels. 280 - name: Video Files 281 description: Operations on video files 282 - name: Video Transcoding 283 description: Video transcoding related operations 284 - name: Video Stats 285 description: Video statistics 286 - name: Video Feeds 287 description: Server syndication feeds of videos 288 - name: Video Download 289 description: Download video files 290 - name: Search 291 description: | 292 The search helps to find _videos_ or _channels_ from within the instance and beyond. 293 Videos from other instances federated by the instance (that is, instances 294 followed by the instance) can be found via keywords and other criteria of 295 the advanced search. 296 297 Administrators can also enable the use of a remote search system, indexing 298 videos and channels not could be not federated by the instance. 299 - name: Homepage 300 description: Get and update the custom homepage 301 - name: Video Mirroring 302 description: | 303 PeerTube instances can mirror videos from one another, and help distribute some videos. 304 305 For importing videos as your own, refer to [video imports](#operation/importVideo). 306 - name: Stats 307 description: | 308 Statistics 309 - name: Runner Registration Token 310 description: | 311 Manage runner registration token 312 - name: Video Passwords 313 description: Operation on video passwords 314 - name: Client Config 315 description: Configuration of the web client 316 317x-tagGroups: 318 - name: Static endpoints 319 tags: 320 - Static Video Files 321 - name: Download 322 tags: 323 - Video Download 324 - name: Feeds 325 tags: 326 - Video Feeds 327 - name: Auth 328 tags: 329 - Register 330 - Session 331 - name: Accounts 332 tags: 333 - Accounts 334 - Users 335 - User Exports 336 - User Imports 337 - My User 338 - My Subscriptions 339 - My Notifications 340 - My History 341 - name: Videos 342 tags: 343 - Video 344 - Video Upload 345 - Video Imports 346 - Video Captions 347 - Video Chapters 348 - Video Channels 349 - Video Comments 350 - Video Rates 351 - Video Playlists 352 - Video Stats 353 - Video Ownership Change 354 - Video Mirroring 355 - Video Files 356 - Video Transcoding 357 - Live Videos 358 - Channels Sync 359 - Video Passwords 360 - name: Search 361 tags: 362 - Search 363 - name: Moderation 364 tags: 365 - Abuses 366 - Video Blocks 367 - Account Blocks 368 - Server Blocks 369 - Automatic Tags 370 - Watched Words 371 - name: Instance 372 tags: 373 - Config 374 - Client Config 375 - Homepage 376 - Instance Follows 377 - Instance Redundancy 378 - Plugins 379 - Stats 380 - Logs 381 - Job 382 - name: Remote Jobs 383 tags: 384 - Runner Registration Token 385 - Runner Jobs 386 - Runners 387 388paths: 389 '/static/web-videos/{filename}': 390 get: 391 tags: 392 - Static Video Files 393 summary: Get public Web Video file 394 description: "**PeerTube >= 6.0**" 395 parameters: 396 - $ref: '#/components/parameters/staticFilename' 397 responses: 398 '200': 399 description: successful operation 400 '404': 401 description: not found 402 '/static/web-videos/private/{filename}': 403 get: 404 tags: 405 - Static Video Files 406 summary: Get private Web Video file 407 description: "**PeerTube >= 6.0**" 408 parameters: 409 - $ref: '#/components/parameters/staticFilename' 410 - $ref: '#/components/parameters/videoFileToken' 411 security: 412 - OAuth2: [] 413 responses: 414 '200': 415 description: successful operation 416 '403': 417 description: invalid auth 418 '404': 419 description: not found 420 421 '/static/streaming-playlists/hls/{filename}': 422 get: 423 tags: 424 - Static Video Files 425 summary: Get public HLS video file 426 parameters: 427 - $ref: '#/components/parameters/staticFilename' 428 security: 429 - OAuth2: [] 430 responses: 431 '200': 432 description: successful operation 433 '403': 434 description: invalid auth 435 '404': 436 description: not found 437 '/static/streaming-playlists/hls/private/{filename}': 438 get: 439 tags: 440 - Static Video Files 441 summary: Get private HLS video file 442 parameters: 443 - $ref: '#/components/parameters/staticFilename' 444 - $ref: '#/components/parameters/videoFileToken' 445 - $ref: '#/components/parameters/reinjectVideoFileToken' 446 security: 447 - OAuth2: [] 448 responses: 449 '200': 450 description: successful operation 451 '403': 452 description: invalid auth 453 '404': 454 description: not found 455 456 '/download/videos/generate/{videoId}': 457 get: 458 tags: 459 - Video Download 460 summary: Download video file 461 description: Generate a mp4 container that contains at most 1 video stream and at most 1 audio stream. 462 Mainly used to merge the HLS audio only video file and the HLS video only resolution file. 463 parameters: 464 - name: videoId 465 in: path 466 required: true 467 description: The video id 468 schema: 469 $ref: '#/components/schemas/Video/properties/id' 470 - name: videoFileIds 471 in: query 472 required: true 473 description: streams of video files to mux in the output 474 schema: 475 type: array 476 items: 477 type: integer 478 - $ref: '#/components/parameters/videoFileToken' 479 responses: 480 '200': 481 description: successful operation 482 483 '/feeds/video-comments.{format}': 484 get: 485 tags: 486 - Video Feeds 487 summary: Comments on videos feeds 488 operationId: getSyndicatedComments 489 parameters: 490 - name: format 491 in: path 492 required: true 493 description: 'format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss))' 494 schema: 495 type: string 496 enum: 497 - xml 498 - rss 499 - rss2 500 - atom 501 - atom1 502 - json 503 - json1 504 - name: videoId 505 in: query 506 description: 'limit listing comments to a specific video' 507 schema: 508 type: string 509 - name: accountId 510 in: query 511 description: 'limit listing comments to videos of a specific account' 512 schema: 513 type: string 514 - name: accountName 515 in: query 516 description: 'limit listing comments to videos of a specific account' 517 schema: 518 type: string 519 - name: videoChannelId 520 in: query 521 description: 'limit listing comments to videos of a specific video channel' 522 schema: 523 type: string 524 - name: videoChannelName 525 in: query 526 description: 'limit listing comments to videos of a specific video channel' 527 schema: 528 type: string 529 responses: 530 '200': 531 description: successful operation 532 headers: 533 Cache-Control: 534 schema: 535 type: string 536 default: 'max-age=900' # 15 min cache 537 content: 538 application/xml: 539 schema: 540 $ref: '#/components/schemas/VideoCommentsForXML' 541 examples: 542 nightly: 543 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?scope=local 544 application/rss+xml: 545 schema: 546 $ref: '#/components/schemas/VideoCommentsForXML' 547 examples: 548 nightly: 549 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?scope=local 550 text/xml: 551 schema: 552 $ref: '#/components/schemas/VideoCommentsForXML' 553 examples: 554 nightly: 555 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?scope=local 556 application/atom+xml: 557 schema: 558 $ref: '#/components/schemas/VideoCommentsForXML' 559 examples: 560 nightly: 561 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?scope=local 562 application/json: 563 schema: 564 type: object 565 examples: 566 nightly: 567 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?scope=local 568 '400': 569 x-summary: field inconsistencies 570 description: > 571 Arises when: 572 - videoId filter is mixed with a channel filter 573 '404': 574 description: video, video channel or account not found 575 '406': 576 description: accept header unsupported 577 578 '/feeds/videos.{format}': 579 get: 580 tags: 581 - Video Feeds 582 summary: Common videos feeds 583 operationId: getSyndicatedVideos 584 parameters: 585 - name: format 586 in: path 587 required: true 588 description: 'format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss))' 589 schema: 590 type: string 591 enum: 592 - xml 593 - rss 594 - rss2 595 - atom 596 - atom1 597 - json 598 - json1 599 - name: accountId 600 in: query 601 description: 'limit listing to a specific account' 602 schema: 603 type: string 604 - name: accountName 605 in: query 606 description: 'limit listing to a specific account' 607 schema: 608 type: string 609 - name: videoChannelId 610 in: query 611 description: 'limit listing to a specific video channel' 612 schema: 613 type: string 614 - name: videoChannelName 615 in: query 616 description: 'limit listing to a specific video channel' 617 schema: 618 type: string 619 - $ref: '#/components/parameters/sort' 620 - $ref: '#/components/parameters/nsfw' 621 - $ref: '#/components/parameters/isLocal' 622 - $ref: '#/components/parameters/include' 623 - $ref: '#/components/parameters/privacyOneOf' 624 - $ref: '#/components/parameters/hasHLSFiles' 625 - $ref: '#/components/parameters/hasWebVideoFiles' 626 responses: 627 '200': 628 description: successful operation 629 headers: 630 Cache-Control: 631 schema: 632 type: string 633 default: 'max-age=900' # 15 min cache 634 content: 635 application/xml: 636 schema: 637 $ref: '#/components/schemas/VideosForXML' 638 examples: 639 nightly: 640 externalValue: https://peertube2.cpy.re/feeds/videos.xml?scope=local 641 application/rss+xml: 642 schema: 643 $ref: '#/components/schemas/VideosForXML' 644 examples: 645 nightly: 646 externalValue: https://peertube2.cpy.re/feeds/videos.rss?scope=local 647 text/xml: 648 schema: 649 $ref: '#/components/schemas/VideosForXML' 650 examples: 651 nightly: 652 externalValue: https://peertube2.cpy.re/feeds/videos.xml?scope=local 653 application/atom+xml: 654 schema: 655 $ref: '#/components/schemas/VideosForXML' 656 examples: 657 nightly: 658 externalValue: https://peertube2.cpy.re/feeds/videos.atom?scope=local 659 application/json: 660 schema: 661 type: object 662 examples: 663 nightly: 664 externalValue: https://peertube2.cpy.re/feeds/videos.json?scope=local 665 '404': 666 description: video channel or account not found 667 '406': 668 description: accept header unsupported 669 670 '/feeds/subscriptions.{format}': 671 get: 672 tags: 673 - Video Feeds 674 summary: Videos of subscriptions feeds 675 operationId: getSyndicatedSubscriptionVideos 676 parameters: 677 - name: format 678 in: path 679 required: true 680 description: 'format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss))' 681 schema: 682 type: string 683 enum: 684 - xml 685 - rss 686 - rss2 687 - atom 688 - atom1 689 - json 690 - json1 691 - name: accountId 692 in: query 693 description: limit listing to a specific account 694 schema: 695 type: string 696 required: true 697 - name: token 698 in: query 699 description: private token allowing access 700 schema: 701 type: string 702 required: true 703 - $ref: '#/components/parameters/sort' 704 - $ref: '#/components/parameters/nsfw' 705 - $ref: '#/components/parameters/isLocal' 706 - $ref: '#/components/parameters/include' 707 - $ref: '#/components/parameters/privacyOneOf' 708 - $ref: '#/components/parameters/hasHLSFiles' 709 - $ref: '#/components/parameters/hasWebVideoFiles' 710 responses: 711 '200': 712 description: successful operation 713 headers: 714 Cache-Control: 715 schema: 716 type: string 717 default: 'max-age=900' # 15 min cache 718 content: 719 application/xml: 720 schema: 721 $ref: '#/components/schemas/VideosForXML' 722 application/rss+xml: 723 schema: 724 $ref: '#/components/schemas/VideosForXML' 725 text/xml: 726 schema: 727 $ref: '#/components/schemas/VideosForXML' 728 application/atom+xml: 729 schema: 730 $ref: '#/components/schemas/VideosForXML' 731 application/json: 732 schema: 733 type: object 734 '406': 735 description: accept header unsupported 736 737 '/feeds/podcast/videos.xml': 738 get: 739 tags: 740 - Video Feeds 741 summary: Videos podcast feed 742 operationId: getVideosPodcastFeed 743 parameters: 744 - name: videoChannelId 745 in: query 746 description: 'Limit listing to a specific video channel' 747 required: true 748 schema: 749 type: string 750 responses: 751 '200': 752 description: successful operation 753 headers: 754 Cache-Control: 755 schema: 756 type: string 757 default: 'max-age=900' # 15 min cache 758 '404': 759 description: video channel not found 760 761 '/api/v1/accounts/{name}': 762 get: 763 tags: 764 - Accounts 765 summary: Get an account 766 operationId: getAccount 767 parameters: 768 - $ref: '#/components/parameters/name' 769 responses: 770 '200': 771 description: successful operation 772 content: 773 application/json: 774 schema: 775 $ref: '#/components/schemas/Account' 776 '404': 777 description: account not found 778 779 '/api/v1/accounts/{name}/videos': 780 get: 781 tags: 782 - Accounts 783 - Video 784 summary: 'List videos of an account' 785 operationId: getAccountVideos 786 parameters: 787 - $ref: '#/components/parameters/name' 788 # Common video filter parameters 789 - $ref: '#/components/parameters/start' 790 - $ref: '#/components/parameters/count' 791 - $ref: '#/components/parameters/skipCount' 792 - $ref: '#/components/parameters/videosSort' 793 - $ref: '#/components/parameters/nsfw' 794 - $ref: '#/components/parameters/nsfwFlagsIncluded' 795 - $ref: '#/components/parameters/nsfwFlagsExcluded' 796 - $ref: '#/components/parameters/isLive' 797 - $ref: '#/components/parameters/includeScheduledLive' 798 - $ref: '#/components/parameters/categoryOneOf' 799 - $ref: '#/components/parameters/licenceOneOf' 800 - $ref: '#/components/parameters/languageOneOf' 801 - $ref: '#/components/parameters/tagsOneOf' 802 - $ref: '#/components/parameters/tagsAllOf' 803 - $ref: '#/components/parameters/isLocal' 804 - $ref: '#/components/parameters/include' 805 - $ref: '#/components/parameters/hasHLSFiles' 806 - $ref: '#/components/parameters/hasWebVideoFiles' 807 - $ref: '#/components/parameters/host' 808 - $ref: '#/components/parameters/autoTagOneOfVideo' 809 - $ref: '#/components/parameters/privacyOneOf' 810 - $ref: '#/components/parameters/excludeAlreadyWatched' 811 - $ref: '#/components/parameters/search' 812 responses: 813 '200': 814 description: successful operation 815 content: 816 application/json: 817 schema: 818 $ref: '#/components/schemas/VideoListResponse' 819 x-codeSamples: 820 - lang: JavaScript 821 source: | 822 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos') 823 .then(function(response) { 824 return response.json() 825 }).then(function(data) { 826 console.log(data) 827 }) 828 - lang: Shell 829 source: | 830 ## DEPENDENCIES: jq 831 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq 832 - lang: Ruby 833 source: | 834 require 'net/http' 835 require 'json' 836 837 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos") 838 839 http = Net::HTTP.new(uri.host, uri.port) 840 http.use_ssl = true 841 842 response = http.get(uri.request_uri) 843 844 puts JSON.parse(response.read_body) 845 - lang: Python 846 source: | 847 import requests 848 849 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos") 850 json = r.json() 851 852 print(json) 853 854 '/api/v1/accounts/{name}/followers': 855 get: 856 tags: 857 - Accounts 858 summary: 'List followers of an account' 859 security: 860 - OAuth2: [] 861 operationId: getAccountFollowers 862 parameters: 863 - $ref: '#/components/parameters/name' 864 - $ref: '#/components/parameters/start' 865 - $ref: '#/components/parameters/count' 866 - $ref: '#/components/parameters/followersSort' 867 - $ref: '#/components/parameters/search' 868 responses: 869 '200': 870 description: successful operation 871 content: 872 application/json: 873 schema: 874 type: object 875 properties: 876 total: 877 type: integer 878 example: 1 879 data: 880 type: array 881 items: 882 $ref: '#/components/schemas/Follow' 883 884 /api/v1/accounts: 885 get: 886 tags: 887 - Accounts 888 summary: List accounts 889 operationId: getAccounts 890 parameters: 891 - $ref: '#/components/parameters/start' 892 - $ref: '#/components/parameters/count' 893 - $ref: '#/components/parameters/sort' 894 responses: 895 '200': 896 description: successful operation 897 content: 898 'application/json': 899 schema: 900 type: object 901 properties: 902 total: 903 type: integer 904 example: 1 905 data: 906 type: array 907 items: 908 $ref: '#/components/schemas/Account' 909 910 /api/v1/config: 911 get: 912 tags: 913 - Config 914 summary: Get instance public configuration 915 operationId: getConfig 916 responses: 917 '200': 918 description: successful operation 919 content: 920 application/json: 921 schema: 922 $ref: '#/components/schemas/ServerConfig' 923 examples: 924 nightly: 925 externalValue: https://peertube2.cpy.re/api/v1/config 926 927 /api/v1/config/about: 928 get: 929 summary: Get instance "About" information 930 operationId: getAbout 931 tags: 932 - Config 933 responses: 934 '200': 935 description: successful operation 936 content: 937 application/json: 938 schema: 939 $ref: '#/components/schemas/ServerConfigAbout' 940 examples: 941 nightly: 942 externalValue: https://peertube2.cpy.re/api/v1/config/about 943 944 /api/v1/config/custom: 945 get: 946 summary: Get instance runtime configuration 947 operationId: getCustomConfig 948 tags: 949 - Config 950 security: 951 - OAuth2: 952 - admin 953 responses: 954 '200': 955 description: successful operation 956 content: 957 application/json: 958 schema: 959 $ref: '#/components/schemas/ServerConfigCustom' 960 put: 961 summary: Set instance runtime configuration 962 operationId: putCustomConfig 963 tags: 964 - Config 965 security: 966 - OAuth2: 967 - admin 968 responses: 969 '200': 970 description: successful operation 971 '400': 972 x-summary: field inconsistencies 973 description: > 974 Arises when: 975 - the emailer is disabled and the instance is open to registrations 976 - web videos and hls are disabled with transcoding enabled - you need at least one enabled 977 delete: 978 summary: Delete instance runtime configuration 979 operationId: delCustomConfig 980 tags: 981 - Config 982 security: 983 - OAuth2: 984 - admin 985 responses: 986 '200': 987 description: successful operation 988 989 /api/v1/config/instance-banner/pick: 990 post: 991 summary: Update instance banner 992 security: 993 - OAuth2: 994 - admin 995 tags: 996 - Config 997 responses: 998 '204': 999 description: successful operation 1000 '413': 1001 description: image file too large 1002 headers: 1003 X-File-Maximum-Size: 1004 schema: 1005 type: string 1006 format: Nginx size 1007 description: Maximum file size for the banner 1008 requestBody: 1009 content: 1010 multipart/form-data: 1011 schema: 1012 type: object 1013 properties: 1014 bannerfile: 1015 description: The file to upload. 1016 type: string 1017 format: binary 1018 encoding: 1019 bannerfile: 1020 contentType: image/png, image/jpeg 1021 1022 '/api/v1/config/instance-banner': 1023 delete: 1024 summary: Delete instance banner 1025 security: 1026 - OAuth2: 1027 - admin 1028 tags: 1029 - Config 1030 responses: 1031 '204': 1032 description: successful operation 1033 1034 /api/v1/config/instance-avatar/pick: 1035 post: 1036 summary: Update instance avatar 1037 security: 1038 - OAuth2: 1039 - admin 1040 tags: 1041 - Config 1042 responses: 1043 '204': 1044 description: successful operation 1045 '413': 1046 description: image file too large 1047 headers: 1048 X-File-Maximum-Size: 1049 schema: 1050 type: string 1051 format: Nginx size 1052 description: Maximum file size for the avatar 1053 requestBody: 1054 content: 1055 multipart/form-data: 1056 schema: 1057 type: object 1058 properties: 1059 avatarfile: 1060 description: The file to upload. 1061 type: string 1062 format: binary 1063 encoding: 1064 avatarfile: 1065 contentType: image/png, image/jpeg 1066 1067 '/api/v1/config/instance-avatar': 1068 delete: 1069 summary: Delete instance avatar 1070 security: 1071 - OAuth2: 1072 - admin 1073 tags: 1074 - Config 1075 responses: 1076 '204': 1077 description: successful operation 1078 1079 '/api/v1/config/instance-logo/:logoType/pick': 1080 post: 1081 summary: Update instance logo 1082 security: 1083 - OAuth2: 1084 - admin 1085 tags: 1086 - Config 1087 parameters: 1088 - $ref: '#/components/parameters/logoTypeParam' 1089 responses: 1090 '204': 1091 description: successful operation 1092 '413': 1093 description: image file too large 1094 headers: 1095 X-File-Maximum-Size: 1096 schema: 1097 type: string 1098 format: Nginx size 1099 description: Maximum file size for the banner 1100 requestBody: 1101 content: 1102 multipart/form-data: 1103 schema: 1104 type: object 1105 properties: 1106 logofile: 1107 description: The file to upload. 1108 type: string 1109 format: binary 1110 encoding: 1111 logofile: 1112 contentType: image/png, image/jpeg 1113 1114 '/api/v1/config/instance-logo/:logoType': 1115 delete: 1116 summary: Delete instance logo 1117 security: 1118 - OAuth2: 1119 - admin 1120 tags: 1121 - Config 1122 parameters: 1123 - $ref: '#/components/parameters/logoTypeParam' 1124 responses: 1125 '204': 1126 description: successful operation 1127 1128 /api/v1/custom-pages/homepage/instance: 1129 get: 1130 summary: Get instance custom homepage 1131 tags: 1132 - Homepage 1133 responses: 1134 '404': 1135 description: No homepage set 1136 '200': 1137 description: successful operation 1138 content: 1139 application/json: 1140 schema: 1141 $ref: '#/components/schemas/CustomHomepage' 1142 put: 1143 summary: Set instance custom homepage 1144 tags: 1145 - Homepage 1146 security: 1147 - OAuth2: 1148 - admin 1149 requestBody: 1150 content: 1151 application/json: 1152 schema: 1153 type: object 1154 properties: 1155 content: 1156 type: string 1157 description: content of the homepage, that will be injected in the client 1158 responses: 1159 '204': 1160 description: successful operation 1161 1162 /api/v1/jobs/pause: 1163 post: 1164 summary: Pause job queue 1165 security: 1166 - OAuth2: 1167 - admin 1168 tags: 1169 - Job 1170 responses: 1171 '204': 1172 description: successful operation 1173 1174 /api/v1/jobs/resume: 1175 post: 1176 summary: Resume job queue 1177 security: 1178 - OAuth2: 1179 - admin 1180 tags: 1181 - Job 1182 responses: 1183 '204': 1184 description: successful operation 1185 1186 /api/v1/jobs/{state}: 1187 get: 1188 summary: List instance jobs 1189 operationId: getJobs 1190 security: 1191 - OAuth2: 1192 - admin 1193 tags: 1194 - Job 1195 parameters: 1196 - name: state 1197 in: path 1198 required: true 1199 description: The state of the job ('' for for no filter) 1200 schema: 1201 type: string 1202 enum: 1203 - '' 1204 - active 1205 - completed 1206 - failed 1207 - waiting 1208 - delayed 1209 - $ref: '#/components/parameters/jobType' 1210 - $ref: '#/components/parameters/start' 1211 - $ref: '#/components/parameters/count' 1212 - $ref: '#/components/parameters/sort' 1213 responses: 1214 '200': 1215 description: successful operation 1216 content: 1217 application/json: 1218 schema: 1219 type: object 1220 properties: 1221 total: 1222 type: integer 1223 example: 1 1224 data: 1225 type: array 1226 maxItems: 100 1227 items: 1228 $ref: '#/components/schemas/Job' 1229 1230 /api/v1/server/followers: 1231 get: 1232 tags: 1233 - Instance Follows 1234 summary: List instances following the server 1235 parameters: 1236 - $ref: '#/components/parameters/followState' 1237 - $ref: '#/components/parameters/actorType' 1238 - $ref: '#/components/parameters/start' 1239 - $ref: '#/components/parameters/count' 1240 - $ref: '#/components/parameters/sort' 1241 responses: 1242 '200': 1243 description: successful operation 1244 content: 1245 application/json: 1246 schema: 1247 type: object 1248 properties: 1249 total: 1250 type: integer 1251 example: 1 1252 data: 1253 type: array 1254 items: 1255 $ref: '#/components/schemas/Follow' 1256 1257 '/api/v1/server/followers/{handle}': 1258 delete: 1259 summary: Remove or reject a follower to your server 1260 security: 1261 - OAuth2: 1262 - admin 1263 tags: 1264 - Instance Follows 1265 parameters: 1266 - name: handle 1267 in: path 1268 required: true 1269 description: The remote actor handle to remove from your followers 1270 schema: 1271 type: string 1272 format: email 1273 responses: 1274 '204': 1275 description: successful operation 1276 '404': 1277 description: follower not found 1278 1279 '/api/v1/server/followers/{handle}/reject': 1280 post: 1281 summary: Reject a pending follower to your server 1282 security: 1283 - OAuth2: 1284 - admin 1285 tags: 1286 - Instance Follows 1287 parameters: 1288 - name: handle 1289 in: path 1290 required: true 1291 description: The remote actor handle to remove from your followers 1292 schema: 1293 type: string 1294 format: email 1295 responses: 1296 '204': 1297 description: successful operation 1298 '404': 1299 description: follower not found 1300 1301 '/api/v1/server/followers/{handle}/accept': 1302 post: 1303 summary: Accept a pending follower to your server 1304 security: 1305 - OAuth2: 1306 - admin 1307 tags: 1308 - Instance Follows 1309 parameters: 1310 - name: handle 1311 in: path 1312 required: true 1313 description: The remote actor handle to remove from your followers 1314 schema: 1315 type: string 1316 format: email 1317 responses: 1318 '204': 1319 description: successful operation 1320 '404': 1321 description: follower not found 1322 1323 /api/v1/server/following: 1324 get: 1325 tags: 1326 - Instance Follows 1327 summary: List instances followed by the server 1328 parameters: 1329 - $ref: '#/components/parameters/followState' 1330 - $ref: '#/components/parameters/actorType' 1331 - $ref: '#/components/parameters/start' 1332 - $ref: '#/components/parameters/count' 1333 - $ref: '#/components/parameters/sort' 1334 responses: 1335 '200': 1336 description: successful operation 1337 content: 1338 application/json: 1339 schema: 1340 type: object 1341 properties: 1342 total: 1343 type: integer 1344 example: 1 1345 data: 1346 type: array 1347 items: 1348 $ref: '#/components/schemas/Follow' 1349 post: 1350 security: 1351 - OAuth2: 1352 - admin 1353 tags: 1354 - Instance Follows 1355 summary: Follow a list of actors (PeerTube instance, channel or account) 1356 responses: 1357 '204': 1358 description: successful operation 1359 '500': 1360 description: cannot follow a non-HTTPS server 1361 requestBody: 1362 content: 1363 application/json: 1364 schema: 1365 type: object 1366 properties: 1367 hosts: 1368 type: array 1369 items: 1370 type: string 1371 format: hostname 1372 uniqueItems: true 1373 handles: 1374 type: array 1375 items: 1376 type: string 1377 uniqueItems: true 1378 1379 '/api/v1/server/following/{hostOrHandle}': 1380 delete: 1381 summary: Unfollow an actor (PeerTube instance, channel or account) 1382 security: 1383 - OAuth2: 1384 - admin 1385 tags: 1386 - Instance Follows 1387 parameters: 1388 - name: hostOrHandle 1389 in: path 1390 required: true 1391 description: The hostOrHandle to unfollow 1392 schema: 1393 type: string 1394 responses: 1395 '204': 1396 description: successful operation 1397 '404': 1398 description: host or handle not found 1399 1400 /api/v1/users: 1401 post: 1402 summary: Create a user 1403 operationId: addUser 1404 security: 1405 - OAuth2: 1406 - admin 1407 tags: 1408 - Users 1409 responses: 1410 '200': 1411 description: user created 1412 content: 1413 application/json: 1414 schema: 1415 $ref: '#/components/schemas/AddUserResponse' 1416 links: 1417 # GET /users/{id} 1418 GetUser: 1419 operationId: getUser 1420 parameters: 1421 id: '$response.body#/user/id' 1422 # PUT /users/{id} 1423 PutUser: 1424 operationId: putUser 1425 parameters: 1426 id: '$response.body#/user/id' 1427 # DELETE /users/{id} 1428 DelUser: 1429 operationId: delUser 1430 parameters: 1431 id: '$response.body#/user/id' 1432 '403': 1433 description: insufficient authority to create an admin or moderator 1434 requestBody: 1435 content: 1436 application/json: 1437 schema: 1438 $ref: '#/components/schemas/AddUser' 1439 description: | 1440 If the smtp server is configured, you can leave the password empty and an email will be sent 1441 asking the user to set it first. 1442 required: true 1443 get: 1444 summary: List users 1445 operationId: getUsers 1446 security: 1447 - OAuth2: 1448 - admin 1449 tags: 1450 - Users 1451 parameters: 1452 - $ref: '#/components/parameters/usersSearch' 1453 - $ref: '#/components/parameters/usersBlocked' 1454 - $ref: '#/components/parameters/start' 1455 - $ref: '#/components/parameters/count' 1456 - $ref: '#/components/parameters/usersSort' 1457 responses: 1458 '200': 1459 description: successful operation 1460 content: 1461 application/json: 1462 schema: 1463 type: array 1464 items: 1465 $ref: '#/components/schemas/User' 1466 1467 '/api/v1/users/{id}': 1468 parameters: 1469 - $ref: '#/components/parameters/id' 1470 delete: 1471 summary: Delete a user 1472 security: 1473 - OAuth2: 1474 - admin 1475 tags: 1476 - Users 1477 operationId: delUser 1478 responses: 1479 '204': 1480 description: successful operation 1481 get: 1482 summary: Get a user 1483 security: 1484 - OAuth2: [] 1485 tags: 1486 - Users 1487 operationId: getUser 1488 parameters: 1489 - name: withStats 1490 in: query 1491 description: include statistics about the user (only available as a moderator/admin) 1492 schema: 1493 type: boolean 1494 responses: 1495 '200': 1496 x-summary: successful operation 1497 description: | 1498 As an admin/moderator, you can request a response augmented with statistics about the user's 1499 moderation relations and videos usage, by using the `withStats` parameter. 1500 content: 1501 application/json: 1502 schema: 1503 oneOf: 1504 - $ref: '#/components/schemas/User' 1505 - $ref: '#/components/schemas/UserWithStats' 1506 put: 1507 summary: Update a user 1508 security: 1509 - OAuth2: [] 1510 tags: 1511 - Users 1512 operationId: putUser 1513 responses: 1514 '204': 1515 description: successful operation 1516 requestBody: 1517 content: 1518 application/json: 1519 schema: 1520 $ref: '#/components/schemas/UpdateUser' 1521 required: true 1522 1523 /api/v1/oauth-clients/local: 1524 get: 1525 summary: Login prerequisite 1526 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken). 1527 operationId: getOAuthClient 1528 tags: 1529 - Session 1530 responses: 1531 '200': 1532 description: successful operation 1533 content: 1534 application/json: 1535 schema: 1536 $ref: '#/components/schemas/OAuthClient' 1537 links: 1538 UseOAuthClientToLogin: 1539 operationId: getOAuthToken 1540 parameters: 1541 client_id: '$response.body#/client_id' 1542 client_secret: '$response.body#/client_secret' 1543 x-codeSamples: 1544 - lang: Shell 1545 source: | 1546 API="https://peertube2.cpy.re/api/v1" 1547 1548 ## AUTH 1549 curl -s "$API/oauth-clients/local" 1550 1551 /api/v1/users/token: 1552 post: 1553 summary: Login 1554 operationId: getOAuthToken 1555 description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens. 1556 tags: 1557 - Session 1558 parameters: 1559 - name: x-peertube-otp 1560 in: header 1561 schema: 1562 type: string 1563 required: false 1564 description: If the user enabled two factor authentication, you need to provide the OTP code in this header 1565 requestBody: 1566 content: 1567 application/x-www-form-urlencoded: 1568 schema: 1569 oneOf: 1570 - $ref: '#/components/schemas/OAuthToken-password' 1571 - $ref: '#/components/schemas/OAuthToken-refresh_token' 1572 discriminator: 1573 propertyName: grant_type 1574 mapping: 1575 password: '#/components/schemas/OAuthToken-password' 1576 refresh_token: '#/components/schemas/OAuthToken-refresh_token' 1577 responses: 1578 '200': 1579 description: successful operation 1580 content: 1581 application/json: 1582 schema: 1583 type: object 1584 properties: 1585 token_type: 1586 type: string 1587 example: Bearer 1588 access_token: 1589 type: string 1590 example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0 1591 description: valid for 1 day 1592 refresh_token: 1593 type: string 1594 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7 1595 description: valid for 2 weeks 1596 expires_in: 1597 type: integer 1598 minimum: 0 1599 example: 14399 1600 refresh_token_expires_in: 1601 type: integer 1602 minimum: 0 1603 example: 1209600 1604 '400': 1605 x-summary: client or credentials are invalid 1606 description: | 1607 Disambiguate via `code`: 1608 - `invalid_client` for an unmatched `client_id` 1609 - `invalid_grant` for unmatched credentials 1610 '401': 1611 x-summary: token expired or two factor header is missing 1612 description: | 1613 Disambiguate via `code`: 1614 - default value for a regular authentication failure 1615 - `invalid_token` for an expired token 1616 - `missing_two_factor` if two factor header is missing 1617 x-codeSamples: 1618 - lang: Shell 1619 source: | 1620 ## DEPENDENCIES: jq 1621 API="https://peertube2.cpy.re/api/v1" 1622 USERNAME="<your_username>" 1623 PASSWORD="<your_password>" 1624 1625 ## AUTH 1626 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id") 1627 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret") 1628 curl -s "$API/users/token" \ 1629 --data client_id="$client_id" \ 1630 --data client_secret="$client_secret" \ 1631 --data grant_type=password \ 1632 --data username="$USERNAME" \ 1633 --data-urlencode password="$PASSWORD" \ 1634 | jq -r ".access_token" 1635 1636 /api/v1/users/revoke-token: 1637 post: 1638 summary: Logout 1639 description: Revokes your access token and its associated refresh token, destroying your current session. 1640 operationId: revokeOAuthToken 1641 tags: 1642 - Session 1643 security: 1644 - OAuth2: [] 1645 responses: 1646 '200': 1647 description: successful operation 1648 1649 /api/v1/users/{id}/token-sessions: 1650 get: 1651 summary: List token sessions 1652 parameters: 1653 - $ref: '#/components/parameters/id' 1654 tags: 1655 - Session 1656 security: 1657 - OAuth2: [] 1658 responses: 1659 '200': 1660 description: successful operation 1661 content: 1662 application/json: 1663 schema: 1664 type: object 1665 properties: 1666 total: 1667 type: integer 1668 example: 1 1669 data: 1670 type: array 1671 items: 1672 $ref: '#/components/schemas/TokenSession' 1673 1674 /api/v1/users/{id}/token-sessions/{tokenSessionId}/revoke: 1675 get: 1676 summary: List token sessions 1677 parameters: 1678 - $ref: '#/components/parameters/id' 1679 - $ref: '#/components/parameters/tokenSessionId' 1680 tags: 1681 - Session 1682 security: 1683 - OAuth2: [] 1684 responses: 1685 '200': 1686 description: successful operation 1687 1688 /api/v1/users/ask-send-verify-email: 1689 post: 1690 summary: Resend user verification link 1691 operationId: resendEmailToVerifyUser 1692 tags: 1693 - Users 1694 - Register 1695 requestBody: 1696 content: 1697 application/json: 1698 schema: 1699 type: object 1700 properties: 1701 email: 1702 type: string 1703 description: User email 1704 required: 1705 - email 1706 responses: 1707 '204': 1708 description: successful operation 1709 1710 /api/v1/users/registrations/ask-send-verify-email: 1711 post: 1712 summary: Resend verification link to registration request email 1713 operationId: resendEmailToVerifyRegistration 1714 tags: 1715 - Register 1716 requestBody: 1717 content: 1718 application/json: 1719 schema: 1720 type: object 1721 properties: 1722 email: 1723 type: string 1724 description: Registration email 1725 required: 1726 - email 1727 responses: 1728 '204': 1729 description: successful operation 1730 1731 /api/v1/users/{id}/verify-email: 1732 post: 1733 summary: Verify a user 1734 operationId: verifyUser 1735 description: | 1736 Following a user registration, the new user will receive an email asking to click a link 1737 containing a secret. 1738 This endpoint can also be used to verify a new email set in the user account. 1739 tags: 1740 - Users 1741 - Register 1742 parameters: 1743 - $ref: '#/components/parameters/id' 1744 requestBody: 1745 content: 1746 application/json: 1747 schema: 1748 type: object 1749 properties: 1750 verificationString: 1751 type: string 1752 format: url 1753 isPendingEmail: 1754 type: boolean 1755 required: 1756 - verificationString 1757 responses: 1758 '204': 1759 description: successful operation 1760 '403': 1761 description: invalid verification string 1762 '404': 1763 description: user not found 1764 1765 /api/v1/users/registrations/{registrationId}/verify-email: 1766 post: 1767 summary: Verify a registration email 1768 operationId: verifyRegistrationEmail 1769 description: | 1770 Following a user registration request, the user will receive an email asking to click a link 1771 containing a secret. 1772 tags: 1773 - Register 1774 parameters: 1775 - $ref: '#/components/parameters/registrationId' 1776 requestBody: 1777 content: 1778 application/json: 1779 schema: 1780 type: object 1781 properties: 1782 verificationString: 1783 type: string 1784 format: url 1785 required: 1786 - verificationString 1787 responses: 1788 '204': 1789 description: successful operation 1790 '403': 1791 description: invalid verification string 1792 '404': 1793 description: registration not found 1794 1795 /api/v1/users/ask-reset-password: 1796 post: 1797 summary: Ask to reset password 1798 description: An email containing a reset password link 1799 tags: 1800 - Users 1801 requestBody: 1802 content: 1803 application/json: 1804 schema: 1805 type: object 1806 properties: 1807 email: 1808 type: string 1809 description: User email 1810 required: 1811 - email 1812 responses: 1813 '204': 1814 description: successful operation 1815 1816 /api/v1/users/{id}/reset-password: 1817 post: 1818 summary: Reset password 1819 tags: 1820 - Users 1821 parameters: 1822 - $ref: '#/components/parameters/id' 1823 requestBody: 1824 content: 1825 application/json: 1826 schema: 1827 type: object 1828 properties: 1829 verificationString: 1830 type: string 1831 format: url 1832 password: 1833 type: string 1834 required: 1835 - verificationString 1836 - password 1837 responses: 1838 '204': 1839 description: successful operation 1840 '403': 1841 description: invalid verification string 1842 '404': 1843 description: user not found 1844 1845 /api/v1/users/{id}/two-factor/request: 1846 post: 1847 summary: Request two factor auth 1848 operationId: requestTwoFactor 1849 description: Request two factor authentication for a user 1850 security: 1851 - OAuth2: [] 1852 tags: 1853 - Users 1854 parameters: 1855 - $ref: '#/components/parameters/id' 1856 requestBody: 1857 content: 1858 application/json: 1859 schema: 1860 type: object 1861 properties: 1862 currentPassword: 1863 type: string 1864 description: Password of the currently authenticated user 1865 responses: 1866 '200': 1867 description: successful operation 1868 content: 1869 application/json: 1870 schema: 1871 type: array 1872 items: 1873 $ref: '#/components/schemas/RequestTwoFactorResponse' 1874 '403': 1875 description: invalid password 1876 '404': 1877 description: user not found 1878 1879 /api/v1/users/{id}/two-factor/confirm-request: 1880 post: 1881 summary: Confirm two factor auth 1882 operationId: confirmTwoFactorRequest 1883 description: Confirm a two factor authentication request 1884 security: 1885 - OAuth2: [] 1886 tags: 1887 - Users 1888 parameters: 1889 - $ref: '#/components/parameters/id' 1890 requestBody: 1891 content: 1892 application/json: 1893 schema: 1894 type: object 1895 properties: 1896 requestToken: 1897 type: string 1898 description: Token to identify the two factor request 1899 otpToken: 1900 type: string 1901 description: OTP token generated by the app 1902 required: 1903 - requestToken 1904 - otpToken 1905 responses: 1906 '204': 1907 description: successful operation 1908 '403': 1909 description: invalid request token or OTP token 1910 '404': 1911 description: user not found 1912 1913 /api/v1/users/{id}/two-factor/disable: 1914 post: 1915 summary: Disable two factor auth 1916 operationId: disableTwoFactor 1917 description: Disable two factor authentication of a user 1918 security: 1919 - OAuth2: [] 1920 tags: 1921 - Users 1922 parameters: 1923 - $ref: '#/components/parameters/id' 1924 requestBody: 1925 content: 1926 application/json: 1927 schema: 1928 type: object 1929 properties: 1930 currentPassword: 1931 type: string 1932 description: Password of the currently authenticated user 1933 responses: 1934 '204': 1935 description: successful operation 1936 '403': 1937 description: invalid password 1938 '404': 1939 description: user not found 1940 1941 /api/v1/users/{userId}/imports/import-resumable: 1942 post: 1943 summary: Initialize the resumable user import 1944 description: "**PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the import of the archive" 1945 operationId: userImportResumableInit 1946 security: 1947 - OAuth2: [] 1948 tags: 1949 - User Imports 1950 parameters: 1951 - $ref: '#/components/parameters/userId' 1952 - $ref: '#/components/parameters/resumableUploadInitContentLengthHeader' 1953 - $ref: '#/components/parameters/resumableUploadInitContentTypeHeader' 1954 requestBody: 1955 content: 1956 application/json: 1957 schema: 1958 $ref: '#/components/schemas/UserImportResumable' 1959 responses: 1960 '201': 1961 description: created 1962 headers: 1963 Location: 1964 schema: 1965 type: string 1966 format: url 1967 Content-Length: 1968 schema: 1969 type: number 1970 example: 0 1971 put: 1972 summary: Send chunk for the resumable user import 1973 description: "**PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the import of the archive" 1974 operationId: userImportResumable 1975 security: 1976 - OAuth2: [] 1977 tags: 1978 - User Imports 1979 parameters: 1980 - $ref: '#/components/parameters/userId' 1981 - $ref: '#/components/parameters/resumableUploadId' 1982 - $ref: '#/components/parameters/resumableUploadChunkContentRangeHeader' 1983 - $ref: '#/components/parameters/resumableUploadChunkContentLengthHeader' 1984 requestBody: 1985 content: 1986 application/octet-stream: 1987 schema: 1988 type: string 1989 format: binary 1990 responses: 1991 '204': 1992 description: 'last chunk received: successful operation' 1993 '308': 1994 description: resume incomplete 1995 headers: 1996 Range: 1997 schema: 1998 type: string 1999 example: bytes=0-262143 2000 Content-Length: 2001 schema: 2002 type: number 2003 example: 0 2004 delete: 2005 summary: Cancel the resumable user import 2006 description: "**PeerTube >= 6.1** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the resumable user import" 2007 operationId: userImportResumableCancel 2008 security: 2009 - OAuth2: [] 2010 tags: 2011 - User Imports 2012 parameters: 2013 - $ref: '#/components/parameters/userId' 2014 - $ref: '#/components/parameters/resumableUploadId' 2015 - name: Content-Length 2016 in: header 2017 required: true 2018 schema: 2019 type: number 2020 example: 0 2021 responses: 2022 '204': 2023 description: import cancelled 2024 headers: 2025 Content-Length: 2026 schema: 2027 type: number 2028 example: 0 2029 2030 /api/v1/users/{userId}/imports/latest: 2031 get: 2032 summary: Get latest user import 2033 description: "**PeerTube >= 6.1**" 2034 operationId: getLatestUserImport 2035 security: 2036 - OAuth2: [] 2037 tags: 2038 - User Imports 2039 parameters: 2040 - $ref: '#/components/parameters/userId' 2041 responses: 2042 '200': 2043 description: successful operation 2044 content: 2045 application/json: 2046 schema: 2047 type: object 2048 properties: 2049 id: 2050 type: integer 2051 state: 2052 type: object 2053 properties: 2054 id: 2055 $ref: '#/components/schemas/UserImportState' 2056 label: 2057 type: string 2058 createdAt: 2059 type: string 2060 format: date-time 2061 2062 /api/v1/users/{userId}/exports/request: 2063 post: 2064 summary: Request user export 2065 operationId: requestUserExport 2066 description: Request an archive of user data. An email is sent when the archive is ready. 2067 security: 2068 - OAuth2: [] 2069 tags: 2070 - User Exports 2071 parameters: 2072 - $ref: '#/components/parameters/userId' 2073 requestBody: 2074 content: 2075 application/json: 2076 schema: 2077 type: object 2078 properties: 2079 withVideoFiles: 2080 type: boolean 2081 description: Whether to include video files in the archive 2082 responses: 2083 '200': 2084 description: successful operation 2085 content: 2086 application/json: 2087 schema: 2088 type: object 2089 properties: 2090 export: 2091 type: object 2092 properties: 2093 id: 2094 type: integer 2095 2096 /api/v1/users/{userId}/exports: 2097 get: 2098 summary: List user exports 2099 description: "**PeerTube >= 6.1**" 2100 operationId: listUserExports 2101 security: 2102 - OAuth2: [] 2103 tags: 2104 - User Exports 2105 parameters: 2106 - $ref: '#/components/parameters/userId' 2107 responses: 2108 '200': 2109 description: successful operation 2110 content: 2111 application/json: 2112 schema: 2113 type: object 2114 properties: 2115 id: 2116 type: integer 2117 state: 2118 type: object 2119 properties: 2120 id: 2121 $ref: '#/components/schemas/UserExportState' 2122 label: 2123 type: string 2124 size: 2125 type: integer 2126 description: Size of the archive file in bytes 2127 privateDownloadUrl: 2128 type: string 2129 description: This URL already contains the JWT token, so no additional authentication credentials are required 2130 createdAt: 2131 type: string 2132 format: date-time 2133 expiresOn: 2134 type: string 2135 format: date-time 2136 /api/v1/users/{userId}/exports/{id}: 2137 delete: 2138 summary: Delete a user export 2139 description: "**PeerTube >= 6.1**" 2140 operationId: deleteUserExport 2141 security: 2142 - OAuth2: [] 2143 tags: 2144 - User Exports 2145 parameters: 2146 - $ref: '#/components/parameters/userId' 2147 - $ref: '#/components/parameters/id' 2148 responses: 2149 '204': 2150 description: successful operation 2151 2152 /api/v1/users/me: 2153 get: 2154 summary: Get my user information 2155 operationId: getUserInfo 2156 security: 2157 - OAuth2: 2158 - user 2159 tags: 2160 - My User 2161 responses: 2162 '200': 2163 description: successful operation 2164 content: 2165 application/json: 2166 schema: 2167 type: array 2168 items: 2169 $ref: '#/components/schemas/User' 2170 put: 2171 summary: Update my user information 2172 operationId: putUserInfo 2173 security: 2174 - OAuth2: 2175 - user 2176 tags: 2177 - My User 2178 responses: 2179 '204': 2180 description: successful operation 2181 requestBody: 2182 content: 2183 application/json: 2184 schema: 2185 $ref: '#/components/schemas/UpdateMe' 2186 required: true 2187 2188 '/api/v1/users/me/videos/comments': 2189 get: 2190 summary: List comments on user's videos 2191 description: "**PeerTube >= 6.2**" 2192 security: 2193 - OAuth2: [] 2194 tags: 2195 - Video Comments 2196 parameters: 2197 - $ref: '#/components/parameters/search' 2198 - $ref: '#/components/parameters/searchAccountForComments' 2199 - $ref: '#/components/parameters/searchVideoForComments' 2200 - $ref: '#/components/parameters/videoId' 2201 - $ref: '#/components/parameters/videoChannelId' 2202 - $ref: '#/components/parameters/autoTagOneOfComment' 2203 - $ref: '#/components/parameters/isHeldForReview' 2204 - $ref: '#/components/parameters/includeCollaborations' 2205 responses: 2206 '200': 2207 description: successful operation 2208 content: 2209 application/json: 2210 schema: 2211 type: object 2212 properties: 2213 total: 2214 type: integer 2215 example: 1 2216 data: 2217 type: array 2218 items: 2219 $ref: '#/components/schemas/VideoCommentForOwnerOrAdmin' 2220 2221 /api/v1/users/me/videos/imports: 2222 get: 2223 summary: Get video imports of my user 2224 security: 2225 - OAuth2: 2226 - user 2227 tags: 2228 - Videos 2229 - My User 2230 parameters: 2231 - $ref: '#/components/parameters/id' 2232 - $ref: '#/components/parameters/start' 2233 - $ref: '#/components/parameters/count' 2234 - $ref: '#/components/parameters/sort' 2235 - $ref: '#/components/parameters/includeCollaborations' 2236 - 2237 name: videoId 2238 in: query 2239 required: false 2240 description: Filter on import video ID 2241 schema: 2242 type: integer 2243 - 2244 name: targetUrl 2245 in: query 2246 required: false 2247 description: Filter on import target URL 2248 schema: 2249 type: string 2250 - 2251 name: videoChannelSyncId 2252 in: query 2253 required: false 2254 description: Filter on imports created by a specific channel synchronization 2255 schema: 2256 type: number 2257 - 2258 name: search 2259 in: query 2260 required: false 2261 description: Search in video names 2262 schema: 2263 type: string 2264 responses: 2265 '200': 2266 description: successful operation 2267 content: 2268 application/json: 2269 schema: 2270 $ref: '#/components/schemas/VideoImportsList' 2271 2272 /api/v1/users/me/video-quota-used: 2273 get: 2274 summary: Get my user used quota 2275 security: 2276 - OAuth2: 2277 - user 2278 tags: 2279 - My User 2280 responses: 2281 '200': 2282 description: successful operation 2283 content: 2284 application/json: 2285 schema: 2286 type: object 2287 properties: 2288 videoQuotaUsed: 2289 type: number 2290 description: The user video quota used so far in bytes 2291 example: 16810141515 2292 videoQuotaUsedDaily: 2293 type: number 2294 description: The user video quota used today in bytes 2295 example: 1681014151 2296 2297 '/api/v1/users/me/videos/{videoId}/rating': 2298 get: 2299 summary: Get rate of my user for a video 2300 security: 2301 - OAuth2: [] 2302 tags: 2303 - My User 2304 - Video Rates 2305 parameters: 2306 - name: videoId 2307 in: path 2308 required: true 2309 description: The video id 2310 schema: 2311 $ref: '#/components/schemas/Video/properties/id' 2312 responses: 2313 '200': 2314 description: successful operation 2315 content: 2316 application/json: 2317 schema: 2318 $ref: '#/components/schemas/GetMeVideoRating' 2319 2320 /api/v1/users/me/videos: 2321 get: 2322 summary: List videos of my user 2323 security: 2324 - OAuth2: 2325 - user 2326 tags: 2327 - My User 2328 - Videos 2329 parameters: 2330 - $ref: '#/components/parameters/channelNameOneOf' 2331 # Common video filter parameters 2332 - $ref: '#/components/parameters/start' 2333 - $ref: '#/components/parameters/count' 2334 - $ref: '#/components/parameters/skipCount' 2335 - $ref: '#/components/parameters/videosSort' 2336 - $ref: '#/components/parameters/nsfw' 2337 - $ref: '#/components/parameters/nsfwFlagsIncluded' 2338 - $ref: '#/components/parameters/nsfwFlagsExcluded' 2339 - $ref: '#/components/parameters/isLive' 2340 - $ref: '#/components/parameters/includeScheduledLive' 2341 - $ref: '#/components/parameters/categoryOneOf' 2342 - $ref: '#/components/parameters/licenceOneOf' 2343 - $ref: '#/components/parameters/languageOneOf' 2344 - $ref: '#/components/parameters/tagsOneOf' 2345 - $ref: '#/components/parameters/tagsAllOf' 2346 - $ref: '#/components/parameters/isLocal' 2347 - $ref: '#/components/parameters/include' 2348 - $ref: '#/components/parameters/hasHLSFiles' 2349 - $ref: '#/components/parameters/hasWebVideoFiles' 2350 - $ref: '#/components/parameters/host' 2351 - $ref: '#/components/parameters/autoTagOneOfVideo' 2352 - $ref: '#/components/parameters/privacyOneOf' 2353 - $ref: '#/components/parameters/excludeAlreadyWatched' 2354 - $ref: '#/components/parameters/search' 2355 - $ref: '#/components/parameters/includeCollaborations' 2356 responses: 2357 '200': 2358 description: successful operation 2359 content: 2360 application/json: 2361 schema: 2362 $ref: '#/components/schemas/VideoListResponse' 2363 2364 /api/v1/users/me/subscriptions: 2365 get: 2366 summary: List my user subscriptions 2367 security: 2368 - OAuth2: 2369 - user 2370 tags: 2371 - My Subscriptions 2372 parameters: 2373 - $ref: '#/components/parameters/start' 2374 - $ref: '#/components/parameters/count' 2375 - $ref: '#/components/parameters/mySubscriptionSort' 2376 responses: 2377 '200': 2378 description: successful operation 2379 content: 2380 application/json: 2381 schema: 2382 $ref: '#/components/schemas/VideoChannelList' 2383 post: 2384 tags: 2385 - My Subscriptions 2386 summary: Add subscription to my user 2387 security: 2388 - OAuth2: 2389 - user 2390 requestBody: 2391 content: 2392 application/json: 2393 schema: 2394 type: object 2395 properties: 2396 uri: 2397 type: string 2398 format: uri 2399 description: uri of the video channels to subscribe to 2400 required: 2401 - uri 2402 examples: 2403 default: 2404 value: 2405 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr 2406 responses: 2407 '204': 2408 description: successful operation 2409 2410 /api/v1/users/me/subscriptions/exist: 2411 get: 2412 summary: Get if subscriptions exist for my user 2413 security: 2414 - OAuth2: 2415 - user 2416 tags: 2417 - My Subscriptions 2418 parameters: 2419 - $ref: '#/components/parameters/subscriptionsUris' 2420 responses: 2421 '200': 2422 description: successful operation 2423 content: 2424 application/json: 2425 schema: 2426 type: object 2427 2428 /api/v1/users/me/subscriptions/videos: 2429 get: 2430 summary: List videos of subscriptions of my user 2431 security: 2432 - OAuth2: 2433 - user 2434 tags: 2435 - My Subscriptions 2436 - Videos 2437 parameters: 2438 # Common video filter parameters 2439 - $ref: '#/components/parameters/start' 2440 - $ref: '#/components/parameters/count' 2441 - $ref: '#/components/parameters/skipCount' 2442 - $ref: '#/components/parameters/videosSort' 2443 - $ref: '#/components/parameters/nsfw' 2444 - $ref: '#/components/parameters/nsfwFlagsIncluded' 2445 - $ref: '#/components/parameters/nsfwFlagsExcluded' 2446 - $ref: '#/components/parameters/isLive' 2447 - $ref: '#/components/parameters/includeScheduledLive' 2448 - $ref: '#/components/parameters/categoryOneOf' 2449 - $ref: '#/components/parameters/licenceOneOf' 2450 - $ref: '#/components/parameters/languageOneOf' 2451 - $ref: '#/components/parameters/tagsOneOf' 2452 - $ref: '#/components/parameters/tagsAllOf' 2453 - $ref: '#/components/parameters/isLocal' 2454 - $ref: '#/components/parameters/include' 2455 - $ref: '#/components/parameters/hasHLSFiles' 2456 - $ref: '#/components/parameters/hasWebVideoFiles' 2457 - $ref: '#/components/parameters/host' 2458 - $ref: '#/components/parameters/autoTagOneOfVideo' 2459 - $ref: '#/components/parameters/privacyOneOf' 2460 - $ref: '#/components/parameters/excludeAlreadyWatched' 2461 - $ref: '#/components/parameters/search' 2462 responses: 2463 '200': 2464 description: successful operation 2465 content: 2466 application/json: 2467 schema: 2468 $ref: '#/components/schemas/VideoListResponse' 2469 2470 '/api/v1/users/me/subscriptions/{subscriptionHandle}': 2471 get: 2472 summary: Get subscription of my user 2473 security: 2474 - OAuth2: 2475 - user 2476 tags: 2477 - My Subscriptions 2478 parameters: 2479 - $ref: '#/components/parameters/subscriptionHandle' 2480 responses: 2481 '200': 2482 description: successful operation 2483 content: 2484 application/json: 2485 schema: 2486 $ref: '#/components/schemas/VideoChannel' 2487 delete: 2488 summary: Delete subscription of my user 2489 security: 2490 - OAuth2: 2491 - user 2492 tags: 2493 - My Subscriptions 2494 parameters: 2495 - $ref: '#/components/parameters/subscriptionHandle' 2496 responses: 2497 '204': 2498 description: successful operation 2499 2500 /api/v1/users/me/notifications: 2501 get: 2502 summary: List my notifications 2503 security: 2504 - OAuth2: [] 2505 tags: 2506 - My Notifications 2507 parameters: 2508 - name: typeOneOf 2509 in: query 2510 description: only list notifications of these types 2511 schema: 2512 type: array 2513 items: 2514 $ref: '#/components/schemas/NotificationType' 2515 - name: unread 2516 in: query 2517 description: only list unread notifications 2518 schema: 2519 type: boolean 2520 - $ref: '#/components/parameters/start' 2521 - $ref: '#/components/parameters/count' 2522 - $ref: '#/components/parameters/sort' 2523 responses: 2524 '200': 2525 description: successful operation 2526 content: 2527 application/json: 2528 schema: 2529 $ref: '#/components/schemas/NotificationListResponse' 2530 2531 /api/v1/users/me/notifications/read: 2532 post: 2533 summary: Mark notifications as read by their id 2534 security: 2535 - OAuth2: [] 2536 tags: 2537 - My Notifications 2538 requestBody: 2539 content: 2540 application/json: 2541 schema: 2542 type: object 2543 properties: 2544 ids: 2545 type: array 2546 description: ids of the notifications to mark as read 2547 items: 2548 type: integer 2549 required: 2550 - ids 2551 responses: 2552 '204': 2553 description: successful operation 2554 2555 /api/v1/users/me/notifications/read-all: 2556 post: 2557 summary: Mark all my notification as read 2558 security: 2559 - OAuth2: [] 2560 tags: 2561 - My Notifications 2562 responses: 2563 '204': 2564 description: successful operation 2565 2566 /api/v1/users/me/notification-settings: 2567 put: 2568 summary: Update my notification settings 2569 security: 2570 - OAuth2: [] 2571 tags: 2572 - My Notifications 2573 requestBody: 2574 content: 2575 application/json: 2576 schema: 2577 $ref: '#/components/schemas/UserNotificationSettings' 2578 2579 responses: 2580 '204': 2581 description: successful operation 2582 2583 /api/v1/users/me/new-feature-info/read: 2584 post: 2585 tags: 2586 - My User 2587 summary: Mark feature info as read 2588 description: "**PeerTube >= v8.0.0" 2589 security: 2590 - OAuth2: 2591 - user 2592 requestBody: 2593 content: 2594 application/json: 2595 schema: 2596 type: object 2597 properties: 2598 feature: 2599 $ref: '#/components/schemas/NewFeatureInfoType' 2600 required: 2601 - feature 2602 responses: 2603 '204': 2604 description: successful operation 2605 2606 /api/v1/users/me/history/videos: 2607 get: 2608 summary: List watched videos history 2609 security: 2610 - OAuth2: [] 2611 tags: 2612 - My History 2613 parameters: 2614 - $ref: '#/components/parameters/start' 2615 - $ref: '#/components/parameters/count' 2616 - $ref: '#/components/parameters/search' 2617 responses: 2618 '200': 2619 description: successful operation 2620 content: 2621 application/json: 2622 schema: 2623 $ref: '#/components/schemas/VideoListResponse' 2624 2625 /api/v1/users/me/history/videos/{videoId}: 2626 delete: 2627 summary: Delete history element 2628 security: 2629 - OAuth2: [] 2630 tags: 2631 - My History 2632 parameters: 2633 - name: videoId 2634 in: path 2635 required: true 2636 schema: 2637 $ref: '#/components/schemas/Video/properties/id' 2638 responses: 2639 '204': 2640 description: successful operation 2641 2642 /api/v1/users/me/history/videos/remove: 2643 post: 2644 summary: Clear video history 2645 security: 2646 - OAuth2: [] 2647 tags: 2648 - My History 2649 requestBody: 2650 content: 2651 multipart/form-data: 2652 schema: 2653 type: object 2654 properties: 2655 beforeDate: 2656 description: history before this date will be deleted 2657 type: string 2658 format: date-time 2659 responses: 2660 '204': 2661 description: successful operation 2662 2663 /api/v1/users/me/avatar/pick: 2664 post: 2665 summary: Update my user avatar 2666 security: 2667 - OAuth2: [] 2668 tags: 2669 - My User 2670 responses: 2671 '200': 2672 description: successful operation 2673 content: 2674 application/json: 2675 schema: 2676 type: object 2677 properties: 2678 avatars: 2679 type: array 2680 items: 2681 $ref: '#/components/schemas/ActorImage' 2682 '413': 2683 description: image file too large 2684 headers: 2685 X-File-Maximum-Size: 2686 schema: 2687 type: string 2688 format: Nginx size 2689 description: Maximum file size for the avatar 2690 requestBody: 2691 content: 2692 multipart/form-data: 2693 schema: 2694 type: object 2695 properties: 2696 avatarfile: 2697 description: The file to upload 2698 type: string 2699 format: binary 2700 encoding: 2701 avatarfile: 2702 contentType: image/png, image/jpeg 2703 2704 /api/v1/users/me/avatar: 2705 delete: 2706 summary: Delete my avatar 2707 security: 2708 - OAuth2: [] 2709 tags: 2710 - My User 2711 responses: 2712 '204': 2713 description: successful operation 2714 2715 /api/v1/users/register: 2716 post: 2717 summary: Register a user 2718 operationId: registerUser 2719 description: Signup has to be enabled and signup approval is not required 2720 tags: 2721 - Register 2722 responses: 2723 '204': 2724 description: successful operation 2725 '400': 2726 description: request error 2727 '403': 2728 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip, requires approval or blocked by a plugin 2729 '409': 2730 description: 'a user with this username, channel name or email already exists' 2731 requestBody: 2732 content: 2733 application/json: 2734 schema: 2735 $ref: '#/components/schemas/RegisterUser' 2736 required: true 2737 2738 /api/v1/users/registrations/request: 2739 post: 2740 summary: Request registration 2741 description: Signup has to be enabled and require approval on the instance 2742 operationId: requestRegistration 2743 tags: 2744 - Register 2745 responses: 2746 '200': 2747 description: successful operation 2748 content: 2749 application/json: 2750 schema: 2751 $ref: '#/components/schemas/UserRegistration' 2752 '400': 2753 description: request error or signup approval is not enabled on the instance 2754 '403': 2755 description: user registration is not enabled, user limit is reached, registration is not allowed for the ip or blocked by a plugin 2756 '409': 2757 description: 'a user or registration with this username, channel name or email already exists' 2758 requestBody: 2759 content: 2760 application/json: 2761 schema: 2762 $ref: '#/components/schemas/UserRegistrationRequest' 2763 2764 /api/v1/users/registrations/{registrationId}/accept: 2765 post: 2766 security: 2767 - OAuth2: 2768 - admin 2769 - moderator 2770 summary: Accept registration 2771 operationId: acceptRegistration 2772 tags: 2773 - Register 2774 parameters: 2775 - $ref: '#/components/parameters/registrationId' 2776 requestBody: 2777 content: 2778 application/json: 2779 schema: 2780 $ref: '#/components/schemas/UserRegistrationAcceptOrReject' 2781 responses: 2782 '204': 2783 description: successful operation 2784 2785 /api/v1/users/registrations/{registrationId}/reject: 2786 post: 2787 security: 2788 - OAuth2: 2789 - admin 2790 - moderator 2791 summary: Reject registration 2792 operationId: rejectRegistration 2793 tags: 2794 - Register 2795 parameters: 2796 - $ref: '#/components/parameters/registrationId' 2797 requestBody: 2798 content: 2799 application/json: 2800 schema: 2801 $ref: '#/components/schemas/UserRegistrationAcceptOrReject' 2802 responses: 2803 '204': 2804 description: successful operation 2805 2806 /api/v1/users/registrations/{registrationId}: 2807 delete: 2808 security: 2809 - OAuth2: 2810 - admin 2811 - moderator 2812 summary: Delete registration 2813 description: 'Delete the registration entry. It will not remove the user associated with this registration (if any)' 2814 operationId: deleteRegistration 2815 tags: 2816 - Register 2817 parameters: 2818 - $ref: '#/components/parameters/registrationId' 2819 responses: 2820 '204': 2821 description: successful operation 2822 2823 /api/v1/users/registrations: 2824 get: 2825 security: 2826 - OAuth2: 2827 - admin 2828 - moderator 2829 summary: List registrations 2830 operationId: listRegistrations 2831 tags: 2832 - Register 2833 parameters: 2834 - $ref: '#/components/parameters/start' 2835 - $ref: '#/components/parameters/count' 2836 - name: search 2837 in: query 2838 required: false 2839 schema: 2840 type: string 2841 - name: sort 2842 in: query 2843 required: false 2844 schema: 2845 type: string 2846 enum: 2847 - -createdAt 2848 - createdAt 2849 - state 2850 - -state 2851 responses: 2852 '200': 2853 description: successful operation 2854 content: 2855 application/json: 2856 schema: 2857 type: object 2858 properties: 2859 total: 2860 type: integer 2861 example: 1 2862 data: 2863 type: array 2864 items: 2865 $ref: '#/components/schemas/UserRegistration' 2866 2867 /api/v1/videos/ownership: 2868 get: 2869 summary: List video ownership changes 2870 tags: 2871 - Video Ownership Change 2872 security: 2873 - OAuth2: [] 2874 responses: 2875 '200': 2876 description: successful operation 2877 2878 '/api/v1/videos/ownership/{id}/accept': 2879 post: 2880 summary: Accept ownership change request 2881 tags: 2882 - Video Ownership Change 2883 security: 2884 - OAuth2: [] 2885 parameters: 2886 - $ref: '#/components/parameters/idOrUUID' 2887 responses: 2888 '204': 2889 description: successful operation 2890 '403': 2891 description: cannot terminate an ownership change of another user 2892 '404': 2893 description: video ownership change not found 2894 2895 '/api/v1/videos/ownership/{id}/refuse': 2896 post: 2897 summary: Refuse ownership change request 2898 tags: 2899 - Video Ownership Change 2900 security: 2901 - OAuth2: [] 2902 parameters: 2903 - $ref: '#/components/parameters/idOrUUID' 2904 responses: 2905 '204': 2906 description: successful operation 2907 '403': 2908 description: cannot terminate an ownership change of another user 2909 '404': 2910 description: video ownership change not found 2911 2912 '/api/v1/videos/{id}/give-ownership': 2913 post: 2914 summary: Request ownership change 2915 tags: 2916 - Video Ownership Change 2917 security: 2918 - OAuth2: [] 2919 parameters: 2920 - $ref: '#/components/parameters/idOrUUID' 2921 requestBody: 2922 required: true 2923 content: 2924 application/json: 2925 schema: 2926 type: object 2927 properties: 2928 username: 2929 type: string 2930 required: 2931 - username 2932 responses: 2933 '204': 2934 description: successful operation 2935 '400': 2936 description: changing video ownership to a remote account is not supported yet 2937 '404': 2938 description: video not found 2939 2940 '/api/v1/videos/{id}/token': 2941 post: 2942 summary: Request video token 2943 operationId: requestVideoToken 2944 description: Request special tokens that expire quickly to use them in some context (like accessing private static files) 2945 tags: 2946 - Video 2947 security: 2948 - OAuth2: [] 2949 parameters: 2950 - $ref: '#/components/parameters/idOrUUID' 2951 - $ref: '#/components/parameters/videoPasswordHeader' 2952 responses: 2953 '200': 2954 description: successful operation 2955 content: 2956 application/json: 2957 schema: 2958 $ref: '#/components/schemas/VideoTokenResponse' 2959 '400': 2960 description: incorrect parameters 2961 '404': 2962 description: video not found 2963 2964 /api/v1/videos/{id}/studio/edit: 2965 post: 2966 summary: Create a studio task 2967 tags: 2968 - Video Transcoding 2969 - Video 2970 description: Create a task to edit a video (cut, add intro/outro etc) 2971 security: 2972 - OAuth2: [] 2973 parameters: 2974 - $ref: '#/components/parameters/idOrUUID' 2975 requestBody: 2976 required: true 2977 content: 2978 multipart/form-data: 2979 schema: 2980 $ref: '#/components/schemas/VideoStudioCreateTask' 2981 responses: 2982 '204': 2983 description: successful operation 2984 '400': 2985 description: incorrect parameters 2986 '404': 2987 description: video not found 2988 2989 /api/v1/videos: 2990 get: 2991 summary: List videos 2992 operationId: getVideos 2993 tags: 2994 - Video 2995 parameters: 2996 # Common video filter parameters 2997 - $ref: '#/components/parameters/start' 2998 - $ref: '#/components/parameters/count' 2999 - $ref: '#/components/parameters/skipCount' 3000 - $ref: '#/components/parameters/videosSort' 3001 - $ref: '#/components/parameters/nsfw' 3002 - $ref: '#/components/parameters/nsfwFlagsIncluded' 3003 - $ref: '#/components/parameters/nsfwFlagsExcluded' 3004 - $ref: '#/components/parameters/isLive' 3005 - $ref: '#/components/parameters/includeScheduledLive' 3006 - $ref: '#/components/parameters/categoryOneOf' 3007 - $ref: '#/components/parameters/licenceOneOf' 3008 - $ref: '#/components/parameters/languageOneOf' 3009 - $ref: '#/components/parameters/tagsOneOf' 3010 - $ref: '#/components/parameters/tagsAllOf' 3011 - $ref: '#/components/parameters/isLocal' 3012 - $ref: '#/components/parameters/include' 3013 - $ref: '#/components/parameters/hasHLSFiles' 3014 - $ref: '#/components/parameters/hasWebVideoFiles' 3015 - $ref: '#/components/parameters/host' 3016 - $ref: '#/components/parameters/autoTagOneOfVideo' 3017 - $ref: '#/components/parameters/privacyOneOf' 3018 - $ref: '#/components/parameters/excludeAlreadyWatched' 3019 - $ref: '#/components/parameters/search' 3020 responses: 3021 '200': 3022 description: successful operation 3023 content: 3024 application/json: 3025 schema: 3026 $ref: '#/components/schemas/VideoListResponse' 3027 3028 /api/v1/videos/categories: 3029 get: 3030 summary: List available video categories 3031 operationId: getCategories 3032 tags: 3033 - Video 3034 responses: 3035 '200': 3036 description: successful operation 3037 content: 3038 application/json: 3039 schema: 3040 type: array 3041 items: 3042 type: string 3043 examples: 3044 nightly: 3045 externalValue: https://peertube2.cpy.re/api/v1/videos/categories 3046 3047 /api/v1/videos/licences: 3048 get: 3049 summary: List available video licences 3050 operationId: getLicences 3051 tags: 3052 - Video 3053 responses: 3054 '200': 3055 description: successful operation 3056 content: 3057 application/json: 3058 schema: 3059 type: array 3060 items: 3061 type: string 3062 examples: 3063 nightly: 3064 externalValue: https://peertube2.cpy.re/api/v1/videos/licences 3065 3066 /api/v1/videos/languages: 3067 get: 3068 summary: List available video languages 3069 operationId: getLanguages 3070 tags: 3071 - Video 3072 responses: 3073 '200': 3074 description: successful operation 3075 content: 3076 application/json: 3077 schema: 3078 type: array 3079 items: 3080 type: string 3081 examples: 3082 nightly: 3083 externalValue: https://peertube2.cpy.re/api/v1/videos/languages 3084 3085 /api/v1/videos/privacies: 3086 get: 3087 summary: List available video privacy policies 3088 operationId: getVideoPrivacyPolicies 3089 tags: 3090 - Video 3091 responses: 3092 '200': 3093 description: successful operation 3094 content: 3095 application/json: 3096 schema: 3097 type: array 3098 items: 3099 type: string 3100 examples: 3101 nightly: 3102 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies 3103 3104 '/api/v1/videos/{id}': 3105 put: 3106 summary: Update a video 3107 operationId: putVideo 3108 security: 3109 - OAuth2: [] 3110 tags: 3111 - Video 3112 parameters: 3113 - $ref: '#/components/parameters/idOrUUID' 3114 responses: 3115 '204': 3116 description: successful operation 3117 requestBody: 3118 content: 3119 multipart/form-data: 3120 schema: 3121 type: object 3122 properties: 3123 channelId: 3124 type: integer 3125 description: 3126 New channel of the video. The channel must be owned by the same account as the previous one. 3127 Use the "change ownership" endpoints to give a video to a channel owned by another account on the local PeerTube instance. 3128 thumbnailfile: 3129 description: Video thumbnail file 3130 type: string 3131 format: binary 3132 previewfile: 3133 description: Video preview file 3134 type: string 3135 format: binary 3136 category: 3137 $ref: '#/components/schemas/VideoCategorySet' 3138 licence: 3139 $ref: '#/components/schemas/VideoLicenceSet' 3140 language: 3141 $ref: '#/components/schemas/VideoLanguageSet' 3142 privacy: 3143 $ref: '#/components/schemas/VideoPrivacySet' 3144 description: 3145 description: Video description 3146 type: string 3147 waitTranscoding: 3148 description: Whether or not we wait transcoding before publish the video 3149 type: string 3150 support: 3151 description: A text tell the audience how to support the video creator 3152 example: Please support our work on https://soutenir.framasoft.org/en/ <3 3153 type: string 3154 nsfw: 3155 description: Whether or not this video contains sensitive content 3156 type: boolean 3157 nsfwSummary: 3158 description: More information about the sensitive content of the video 3159 nsfwFlags: 3160 $ref: '#/components/schemas/NSFWFlag' 3161 name: 3162 description: Video name 3163 type: string 3164 minLength: 3 3165 maxLength: 120 3166 tags: 3167 description: Video tags (maximum 5 tags each between 2 and 30 characters) 3168 type: array 3169 minItems: 1 3170 maxItems: 5 3171 items: 3172 type: string 3173 minLength: 2 3174 maxLength: 30 3175 commentsPolicy: 3176 $ref: '#/components/schemas/VideoCommentsPolicySet' 3177 downloadEnabled: 3178 description: Enable or disable downloading for this video 3179 type: boolean 3180 originallyPublishedAt: 3181 description: Date when the content was originally published 3182 type: string 3183 format: date-time 3184 nullable: true 3185 scheduleUpdate: 3186 $ref: '#/components/schemas/VideoScheduledUpdate' 3187 videoPasswords: 3188 $ref: '#/components/schemas/AddVideoPasswords' 3189 encoding: 3190 thumbnailfile: 3191 contentType: image/jpeg 3192 previewfile: 3193 contentType: image/jpeg 3194 get: 3195 summary: Get a video 3196 operationId: getVideo 3197 tags: 3198 - Video 3199 parameters: 3200 - $ref: '#/components/parameters/idOrUUID' 3201 - $ref: '#/components/parameters/videoPasswordHeader' 3202 responses: 3203 '200': 3204 description: successful operation 3205 content: 3206 application/json: 3207 schema: 3208 $ref: '#/components/schemas/VideoDetails' 3209 '401': 3210 description: Requires authentication or the video requires a password 3211 content: 3212 application/json: 3213 schema: 3214 $ref: '#/components/schemas/ServerError' 3215 '403': 3216 description: Invalid authentication or the video requires a password 3217 content: 3218 application/json: 3219 schema: 3220 $ref: '#/components/schemas/ServerError' 3221 delete: 3222 summary: Delete a video 3223 operationId: delVideo 3224 security: 3225 - OAuth2: [] 3226 tags: 3227 - Video 3228 parameters: 3229 - $ref: '#/components/parameters/idOrUUID' 3230 responses: 3231 '204': 3232 description: successful operation 3233 3234 '/api/v1/videos/{id}/description': 3235 get: 3236 summary: Get complete video description 3237 operationId: getVideoDesc 3238 tags: 3239 - Video 3240 parameters: 3241 - $ref: '#/components/parameters/idOrUUID' 3242 - $ref: '#/components/parameters/videoPasswordHeader' 3243 responses: 3244 '200': 3245 description: successful operation 3246 content: 3247 application/json: 3248 schema: 3249 nullable: true 3250 type: string 3251 minLength: 3 3252 maxLength: 10000 3253 example: | 3254 **[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)** 3255 3256 '/api/v1/videos/{id}/views': 3257 post: 3258 summary: Notify user is watching a video 3259 description: Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time. 3260 operationId: addView 3261 tags: 3262 - Video 3263 parameters: 3264 - $ref: '#/components/parameters/idOrUUID' 3265 requestBody: 3266 content: 3267 application/json: 3268 schema: 3269 $ref: '#/components/schemas/UserViewingVideo' 3270 required: true 3271 responses: 3272 '204': 3273 description: successful operation 3274 3275 '/api/v1/videos/{id}/stats/overall': 3276 get: 3277 summary: Get overall stats of a video 3278 tags: 3279 - Video Stats 3280 security: 3281 - OAuth2: [] 3282 parameters: 3283 - $ref: '#/components/parameters/idOrUUID' 3284 - name: startDate 3285 in: query 3286 description: Filter stats by start date 3287 schema: 3288 type: string 3289 format: date-time 3290 - name: endDate 3291 in: query 3292 description: Filter stats by end date 3293 schema: 3294 type: string 3295 format: date-time 3296 responses: 3297 '200': 3298 description: successful operation 3299 content: 3300 application/json: 3301 schema: 3302 $ref: '#/components/schemas/VideoStatsOverall' 3303 3304 '/api/v1/videos/{id}/stats/user-agent': 3305 get: 3306 summary: Get user agent stats of a video 3307 tags: 3308 - Video Stats 3309 security: 3310 - OAuth2: [] 3311 parameters: 3312 - $ref: '#/components/parameters/idOrUUID' 3313 - name: startDate 3314 in: query 3315 description: Filter stats by start date 3316 schema: 3317 type: string 3318 format: date-time 3319 - name: endDate 3320 in: query 3321 description: Filter stats by end date 3322 schema: 3323 type: string 3324 format: date-time 3325 responses: 3326 '200': 3327 description: successful operation 3328 content: 3329 application/json: 3330 schema: 3331 $ref: '#/components/schemas/VideoStatsUserAgent' 3332 3333 '/api/v1/videos/{id}/stats/retention': 3334 get: 3335 summary: Get retention stats of a video 3336 tags: 3337 - Video Stats 3338 security: 3339 - OAuth2: [] 3340 parameters: 3341 - $ref: '#/components/parameters/idOrUUID' 3342 responses: 3343 '200': 3344 description: successful operation 3345 content: 3346 application/json: 3347 schema: 3348 $ref: '#/components/schemas/VideoStatsRetention' 3349 3350 '/api/v1/videos/{id}/stats/timeseries/{metric}': 3351 get: 3352 summary: Get timeserie stats of a video 3353 tags: 3354 - Video Stats 3355 security: 3356 - OAuth2: [] 3357 parameters: 3358 - $ref: '#/components/parameters/idOrUUID' 3359 - 3360 name: metric 3361 in: path 3362 required: true 3363 description: The metric to get 3364 schema: 3365 type: string 3366 enum: 3367 - 'viewers' 3368 - 'aggregateWatchTime' 3369 - name: startDate 3370 in: query 3371 description: Filter stats by start date 3372 schema: 3373 type: string 3374 format: date-time 3375 - name: endDate 3376 in: query 3377 description: Filter stats by end date 3378 schema: 3379 type: string 3380 format: date-time 3381 responses: 3382 '200': 3383 description: successful operation 3384 content: 3385 application/json: 3386 schema: 3387 $ref: '#/components/schemas/VideoStatsTimeserie' 3388 3389 /api/v1/videos/upload: 3390 post: 3391 summary: Upload a video 3392 description: Uses a single request to upload a video. 3393 operationId: uploadLegacy 3394 security: 3395 - OAuth2: [] 3396 tags: 3397 - Video 3398 - Video Upload 3399 responses: 3400 '200': 3401 description: successful operation 3402 content: 3403 application/json: 3404 schema: 3405 $ref: '#/components/schemas/VideoUploadResponse' 3406 '403': 3407 description: video didn't pass upload filter 3408 '408': 3409 description: upload has timed out 3410 '413': 3411 x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy 3412 description: | 3413 If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `code`: 3414 - `quota_reached` for quota limits whether daily or global 3415 headers: 3416 X-File-Maximum-Size: 3417 schema: 3418 type: string 3419 format: Nginx size 3420 description: Maximum file size for the video 3421 '415': 3422 description: video type unsupported 3423 '422': 3424 description: video unreadable 3425 requestBody: 3426 content: 3427 multipart/form-data: 3428 schema: 3429 $ref: '#/components/schemas/VideoUploadRequestLegacy' 3430 encoding: 3431 videofile: 3432 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream 3433 thumbnailfile: 3434 contentType: image/jpeg 3435 previewfile: 3436 contentType: image/jpeg 3437 x-codeSamples: 3438 - lang: Shell 3439 source: | 3440 ## DEPENDENCIES: jq 3441 USERNAME="<your_username>" 3442 PASSWORD="<your_password>" 3443 FILE_PATH="<your_file_path>" 3444 CHANNEL_ID="<your_channel_id>" 3445 NAME="<video_name>" 3446 API="https://peertube2.cpy.re/api/v1" 3447 3448 ## AUTH 3449 client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id") 3450 client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret") 3451 token=$(curl -s "$API/users/token" \ 3452 --data client_id="$client_id" \ 3453 --data client_secret="$client_secret" \ 3454 --data grant_type=password \ 3455 --data username="$USERNAME" \ 3456 --data password="$PASSWORD" \ 3457 | jq -r ".access_token") 3458 3459 ## VIDEO UPLOAD 3460 curl -s "$API/videos/upload" \ 3461 -H "Authorization: Bearer $token" \ 3462 --max-time 600 \ 3463 --form videofile=@"$FILE_PATH" \ 3464 --form channelId=$CHANNEL_ID \ 3465 --form name="$NAME" 3466 3467 /api/v1/videos/upload-resumable: 3468 post: 3469 summary: Initialize the resumable upload of a video 3470 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video 3471 operationId: uploadResumableInit 3472 security: 3473 - OAuth2: [] 3474 tags: 3475 - Video 3476 - Video Upload 3477 parameters: 3478 - $ref: '#/components/parameters/resumableUploadInitContentLengthHeader' 3479 - $ref: '#/components/parameters/resumableUploadInitContentTypeHeader' 3480 requestBody: 3481 content: 3482 application/json: 3483 schema: 3484 $ref: '#/components/schemas/VideoUploadRequestResumable' 3485 responses: 3486 '200': 3487 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead 3488 '201': 3489 description: created 3490 headers: 3491 Location: 3492 schema: 3493 type: string 3494 format: url 3495 example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51 3496 Content-Length: 3497 schema: 3498 type: number 3499 example: 0 3500 '413': 3501 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit 3502 description: | 3503 Disambiguate via `code`: 3504 - `max_file_size_reached` for the absolute file size limit 3505 - `quota_reached` for quota limits whether daily or global 3506 '415': 3507 description: video type unsupported 3508 put: 3509 summary: Send chunk for the resumable upload of a video 3510 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 3511 operationId: uploadResumable 3512 security: 3513 - OAuth2: [] 3514 tags: 3515 - Video 3516 - Video Upload 3517 parameters: 3518 - $ref: '#/components/parameters/resumableUploadId' 3519 - $ref: '#/components/parameters/resumableUploadChunkContentRangeHeader' 3520 - $ref: '#/components/parameters/resumableUploadChunkContentLengthHeader' 3521 requestBody: 3522 content: 3523 application/octet-stream: 3524 schema: 3525 type: string 3526 format: binary 3527 responses: 3528 '200': 3529 description: last chunk received 3530 headers: 3531 Content-Length: 3532 schema: 3533 type: number 3534 content: 3535 application/json: 3536 schema: 3537 $ref: '#/components/schemas/VideoUploadResponse' 3538 '308': 3539 description: resume incomplete 3540 headers: 3541 Range: 3542 schema: 3543 type: string 3544 example: bytes=0-262143 3545 Content-Length: 3546 schema: 3547 type: number 3548 example: 0 3549 '403': 3550 description: video didn't pass upload filter 3551 '404': 3552 description: upload not found 3553 '409': 3554 description: chunk doesn't match range 3555 '422': 3556 description: video unreadable 3557 '429': 3558 description: too many concurrent requests 3559 '503': 3560 description: upload is already being processed 3561 headers: 3562 'Retry-After': 3563 schema: 3564 type: number 3565 example: 300 3566 delete: 3567 summary: Cancel the resumable upload of a video, deleting any data uploaded so far 3568 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video 3569 operationId: uploadResumableCancel 3570 security: 3571 - OAuth2: [] 3572 tags: 3573 - Video 3574 - Video Upload 3575 parameters: 3576 - $ref: '#/components/parameters/resumableUploadId' 3577 - name: Content-Length 3578 in: header 3579 required: true 3580 schema: 3581 type: number 3582 example: 0 3583 responses: 3584 '204': 3585 description: upload cancelled 3586 headers: 3587 Content-Length: 3588 schema: 3589 type: number 3590 example: 0 3591 '404': 3592 description: upload not found 3593 3594 /api/v1/videos/imports: 3595 post: 3596 summary: Import a video 3597 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator) 3598 operationId: importVideo 3599 security: 3600 - OAuth2: [] 3601 tags: 3602 - Video Imports 3603 - Video Upload 3604 requestBody: 3605 content: 3606 multipart/form-data: 3607 schema: 3608 $ref: '#/components/schemas/VideoCreateImport' 3609 encoding: 3610 torrentfile: 3611 contentType: application/x-bittorrent 3612 thumbnailfile: 3613 contentType: image/jpeg 3614 previewfile: 3615 contentType: image/jpeg 3616 responses: 3617 '200': 3618 description: successful operation 3619 content: 3620 application/json: 3621 schema: 3622 $ref: '#/components/schemas/VideoUploadResponse' 3623 '400': 3624 description: '`magnetUri` or `targetUrl` or a torrent file missing' 3625 '403': 3626 description: video didn't pass pre-import filter 3627 '409': 3628 description: HTTP or Torrent/magnetURI import not enabled 3629 3630 /api/v1/videos/imports/{id}/cancel: 3631 post: 3632 summary: Cancel video import 3633 description: Cancel a pending video import 3634 security: 3635 - OAuth2: [] 3636 tags: 3637 - Video Imports 3638 parameters: 3639 - $ref: '#/components/parameters/id' 3640 responses: 3641 '204': 3642 description: successful operation 3643 3644 /api/v1/videos/imports/{id}/retry: 3645 post: 3646 summary: Retry video import 3647 description: "**PeerTube >= 8.0** Retry a pending video import" 3648 security: 3649 - OAuth2: [] 3650 tags: 3651 - Video Imports 3652 parameters: 3653 - $ref: '#/components/parameters/id' 3654 responses: 3655 '204': 3656 description: successful operation 3657 3658 /api/v1/videos/imports/{id}: 3659 delete: 3660 summary: Delete video import 3661 description: Delete ended video import 3662 security: 3663 - OAuth2: [] 3664 tags: 3665 - Video Imports 3666 parameters: 3667 - $ref: '#/components/parameters/id' 3668 responses: 3669 '204': 3670 description: successful operation 3671 3672 /api/v1/videos/live: 3673 post: 3674 summary: Create a live 3675 operationId: addLive 3676 security: 3677 - OAuth2: [] 3678 tags: 3679 - Live Videos 3680 - Video 3681 responses: 3682 '200': 3683 description: successful operation 3684 content: 3685 application/json: 3686 schema: 3687 $ref: '#/components/schemas/VideoUploadResponse' 3688 '400': 3689 x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set 3690 description: | 3691 Disambiguate via `code`: 3692 - default type for a validation error 3693 - `live_conflicting_permanent_and_save_replay` for conflicting parameters set 3694 '403': 3695 x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded 3696 description: | 3697 Disambiguate via `code`: 3698 - `live_not_enabled` for a disabled live feature 3699 - `live_not_allowing_replay` for a disabled replay feature 3700 - `max_instance_lives_limit_reached` for the absolute concurrent live limit 3701 - `max_user_lives_limit_reached` for the user concurrent live limit 3702 requestBody: 3703 content: 3704 multipart/form-data: 3705 schema: 3706 type: object 3707 properties: 3708 channelId: 3709 description: Channel id that will contain this live video 3710 type: integer 3711 saveReplay: 3712 type: boolean 3713 replaySettings: 3714 $ref: '#/components/schemas/LiveVideoReplaySettings' 3715 permanentLive: 3716 description: User can stream multiple times in a permanent live 3717 type: boolean 3718 latencyMode: 3719 description: User can select live latency mode if enabled by the instance 3720 allOf: 3721 - $ref: '#/components/schemas/LiveVideoLatencyMode' 3722 thumbnailfile: 3723 description: Live video/replay thumbnail file 3724 type: string 3725 format: binary 3726 previewfile: 3727 description: Live video/replay preview file 3728 type: string 3729 format: binary 3730 privacy: 3731 $ref: '#/components/schemas/VideoPrivacySet' 3732 category: 3733 $ref: '#/components/schemas/VideoCategorySet' 3734 licence: 3735 $ref: '#/components/schemas/VideoLicenceSet' 3736 language: 3737 $ref: '#/components/schemas/VideoLanguageSet' 3738 description: 3739 description: Live video/replay description 3740 type: string 3741 support: 3742 description: A text tell the audience how to support the creator 3743 example: Please support our work on https://soutenir.framasoft.org/en/ <3 3744 type: string 3745 nsfw: 3746 description: Whether or not this live video/replay contains sensitive content 3747 type: boolean 3748 nsfwSummary: 3749 description: More information about the sensitive content of the video 3750 nsfwFlags: 3751 $ref: '#/components/schemas/NSFWFlag' 3752 name: 3753 description: Live video/replay name 3754 type: string 3755 minLength: 3 3756 maxLength: 120 3757 tags: 3758 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters) 3759 type: array 3760 minItems: 1 3761 maxItems: 5 3762 items: 3763 type: string 3764 minLength: 2 3765 maxLength: 30 3766 commentsPolicy: 3767 $ref: '#/components/schemas/VideoCommentsPolicySet' 3768 downloadEnabled: 3769 description: Enable or disable downloading for the replay of this live video 3770 type: boolean 3771 schedules: 3772 type: array 3773 items: 3774 $ref: '#/components/schemas/LiveSchedule' 3775 required: 3776 - channelId 3777 - name 3778 encoding: 3779 thumbnailfile: 3780 contentType: image/jpeg 3781 previewfile: 3782 contentType: image/jpeg 3783 3784 /api/v1/videos/live/{id}: 3785 get: 3786 summary: Get information about a live 3787 operationId: getLiveId 3788 security: 3789 - OAuth2: [] 3790 tags: 3791 - Live Videos 3792 - Video 3793 parameters: 3794 - $ref: '#/components/parameters/idOrUUID' 3795 responses: 3796 '200': 3797 description: successful operation 3798 content: 3799 application/json: 3800 schema: 3801 $ref: '#/components/schemas/LiveVideoResponse' 3802 put: 3803 summary: Update information about a live 3804 operationId: updateLiveId 3805 security: 3806 - OAuth2: [] 3807 tags: 3808 - Live Videos 3809 - Video 3810 parameters: 3811 - $ref: '#/components/parameters/idOrUUID' 3812 requestBody: 3813 content: 3814 application/json: 3815 schema: 3816 $ref: '#/components/schemas/LiveVideoUpdate' 3817 responses: 3818 '204': 3819 description: successful operation 3820 '400': 3821 description: bad parameters or trying to update a live that has already started 3822 '403': 3823 description: trying to save replay of the live but saving replay is not enabled on the instance 3824 /api/v1/videos/live/{id}/sessions: 3825 get: 3826 summary: List live sessions 3827 description: List all sessions created in a particular live 3828 security: 3829 - OAuth2: [] 3830 tags: 3831 - Live Videos 3832 parameters: 3833 - $ref: '#/components/parameters/idOrUUID' 3834 - $ref: '#/components/parameters/sort' 3835 responses: 3836 '200': 3837 description: successful operation 3838 content: 3839 application/json: 3840 schema: 3841 type: object 3842 properties: 3843 total: 3844 type: integer 3845 example: 1 3846 data: 3847 type: array 3848 items: 3849 $ref: '#/components/schemas/LiveVideoSessionResponse' 3850 /api/v1/videos/{id}/live-session: 3851 get: 3852 summary: Get live session of a replay 3853 description: If the video is a replay of a live, you can find the associated live session using this endpoint 3854 security: 3855 - OAuth2: [] 3856 tags: 3857 - Live Videos 3858 parameters: 3859 - $ref: '#/components/parameters/idOrUUID' 3860 - $ref: '#/components/parameters/videoPasswordHeader' 3861 responses: 3862 '200': 3863 description: successful operation 3864 content: 3865 application/json: 3866 schema: 3867 $ref: '#/components/schemas/LiveVideoSessionResponse' 3868 3869 '/api/v1/videos/{id}/source': 3870 get: 3871 summary: Get video source file metadata 3872 description: Get metadata and download link of original video file 3873 operationId: getVideoSource 3874 security: 3875 - OAuth2: [] 3876 tags: 3877 - Video 3878 parameters: 3879 - $ref: '#/components/parameters/idOrUUID' 3880 responses: 3881 '200': 3882 description: successful operation 3883 content: 3884 application/json: 3885 schema: 3886 $ref: '#/components/schemas/VideoSource' 3887 3888 '/api/v1/videos/{id}/source/file': 3889 delete: 3890 summary: Delete video source file 3891 operationId: deleteVideoSourceFile 3892 tags: 3893 - Video 3894 security: 3895 - OAuth2: 3896 - admin 3897 - moderator 3898 parameters: 3899 - $ref: '#/components/parameters/idOrUUID' 3900 responses: 3901 '204': 3902 description: successful operation 3903 '404': 3904 description: video source not found 3905 3906 '/api/v1/videos/{id}/source/replace-resumable': 3907 post: 3908 summary: Initialize the resumable replacement of a video 3909 description: "**PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the replacement of a video" 3910 operationId: replaceVideoSourceResumableInit 3911 security: 3912 - OAuth2: [] 3913 tags: 3914 - Video 3915 - Video Upload 3916 parameters: 3917 - $ref: '#/components/parameters/idOrUUID' 3918 - $ref: '#/components/parameters/resumableUploadInitContentLengthHeader' 3919 - $ref: '#/components/parameters/resumableUploadInitContentTypeHeader' 3920 requestBody: 3921 content: 3922 application/json: 3923 schema: 3924 $ref: '#/components/schemas/VideoReplaceSourceRequestResumable' 3925 responses: 3926 '200': 3927 description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead 3928 '201': 3929 description: created 3930 headers: 3931 Location: 3932 schema: 3933 type: string 3934 format: url 3935 Content-Length: 3936 schema: 3937 type: number 3938 example: 0 3939 '413': 3940 x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit 3941 description: | 3942 Disambiguate via `code`: 3943 - `max_file_size_reached` for the absolute file size limit 3944 - `quota_reached` for quota limits whether daily or global 3945 '415': 3946 description: video type unsupported 3947 put: 3948 summary: Send chunk for the resumable replacement of a video 3949 description: "**PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the replacement of a video" 3950 operationId: replaceVideoSourceResumable 3951 security: 3952 - OAuth2: [] 3953 tags: 3954 - Video 3955 - Video Upload 3956 parameters: 3957 - $ref: '#/components/parameters/idOrUUID' 3958 - $ref: '#/components/parameters/resumableUploadId' 3959 - $ref: '#/components/parameters/resumableUploadChunkContentRangeHeader' 3960 - $ref: '#/components/parameters/resumableUploadChunkContentLengthHeader' 3961 requestBody: 3962 content: 3963 application/octet-stream: 3964 schema: 3965 type: string 3966 format: binary 3967 responses: 3968 '204': 3969 description: 'last chunk received: successful operation' 3970 '308': 3971 description: resume incomplete 3972 headers: 3973 Range: 3974 schema: 3975 type: string 3976 example: bytes=0-262143 3977 Content-Length: 3978 schema: 3979 type: number 3980 example: 0 3981 '403': 3982 description: video didn't pass file replacement filter 3983 '404': 3984 description: replace upload not found 3985 '409': 3986 description: chunk doesn't match range 3987 '422': 3988 description: video unreadable 3989 '429': 3990 description: too many concurrent requests 3991 '503': 3992 description: upload is already being processed 3993 headers: 3994 'Retry-After': 3995 schema: 3996 type: number 3997 example: 300 3998 delete: 3999 summary: Cancel the resumable replacement of a video 4000 description: "**PeerTube >= 6.0** Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the replacement of a video" 4001 operationId: replaceVideoSourceResumableCancel 4002 security: 4003 - OAuth2: [] 4004 tags: 4005 - Video 4006 - Video Upload 4007 parameters: 4008 - $ref: '#/components/parameters/idOrUUID' 4009 - $ref: '#/components/parameters/resumableUploadId' 4010 - name: Content-Length 4011 in: header 4012 required: true 4013 schema: 4014 type: number 4015 example: 0 4016 responses: 4017 '204': 4018 description: source file replacement cancelled 4019 headers: 4020 Content-Length: 4021 schema: 4022 type: number 4023 example: 0 4024 '404': 4025 description: source file replacement not found 4026 4027 /api/v1/users/me/abuses: 4028 get: 4029 summary: List my abuses 4030 operationId: getMyAbuses 4031 security: 4032 - OAuth2: [] 4033 tags: 4034 - Abuses 4035 - My User 4036 parameters: 4037 - name: id 4038 in: query 4039 description: only list the report with this id 4040 schema: 4041 type: integer 4042 - name: state 4043 in: query 4044 schema: 4045 $ref: '#/components/schemas/AbuseStateSet' 4046 - $ref: '#/components/parameters/abusesSort' 4047 - $ref: '#/components/parameters/start' 4048 - $ref: '#/components/parameters/count' 4049 responses: 4050 '200': 4051 description: successful operation 4052 content: 4053 application/json: 4054 schema: 4055 type: object 4056 properties: 4057 total: 4058 type: integer 4059 example: 1 4060 data: 4061 type: array 4062 items: 4063 $ref: '#/components/schemas/Abuse' 4064 4065 /api/v1/abuses: 4066 get: 4067 summary: List abuses 4068 operationId: getAbuses 4069 security: 4070 - OAuth2: 4071 - admin 4072 - moderator 4073 tags: 4074 - Abuses 4075 parameters: 4076 - name: id 4077 in: query 4078 description: only list the report with this id 4079 schema: 4080 type: integer 4081 - name: predefinedReason 4082 in: query 4083 description: predefined reason the listed reports should contain 4084 schema: 4085 $ref: '#/components/schemas/PredefinedAbuseReasons' 4086 - name: search 4087 in: query 4088 description: plain search that will match with video titles, reporter names and more 4089 schema: 4090 type: string 4091 - name: state 4092 in: query 4093 schema: 4094 $ref: '#/components/schemas/AbuseStateSet' 4095 - name: searchReporter 4096 in: query 4097 description: only list reports of a specific reporter 4098 schema: 4099 type: string 4100 - name: searchReportee 4101 description: only list reports of a specific reportee 4102 in: query 4103 schema: 4104 type: string 4105 - name: searchVideo 4106 in: query 4107 description: only list reports of a specific video 4108 schema: 4109 type: string 4110 - name: searchVideoChannel 4111 in: query 4112 description: only list reports of a specific video channel 4113 schema: 4114 type: string 4115 - name: videoIs 4116 in: query 4117 description: only list deleted or blocklisted videos 4118 schema: 4119 type: string 4120 enum: 4121 - 'deleted' 4122 - 'blacklisted' 4123 - name: filter 4124 in: query 4125 description: only list account, comment or video reports 4126 schema: 4127 type: string 4128 enum: 4129 - 'video' 4130 - 'comment' 4131 - 'account' 4132 - $ref: '#/components/parameters/start' 4133 - $ref: '#/components/parameters/count' 4134 - $ref: '#/components/parameters/abusesSort' 4135 responses: 4136 '200': 4137 description: successful operation 4138 content: 4139 application/json: 4140 schema: 4141 type: object 4142 properties: 4143 total: 4144 type: integer 4145 example: 1 4146 data: 4147 type: array 4148 items: 4149 $ref: '#/components/schemas/Abuse' 4150 post: 4151 summary: Report an abuse 4152 security: 4153 - OAuth2: [] 4154 tags: 4155 - Abuses 4156 requestBody: 4157 required: true 4158 content: 4159 application/json: 4160 schema: 4161 type: object 4162 properties: 4163 reason: 4164 description: Reason why the user reports this video 4165 type: string 4166 minLength: 2 4167 maxLength: 3000 4168 predefinedReasons: 4169 $ref: '#/components/schemas/PredefinedAbuseReasons' 4170 video: 4171 type: object 4172 properties: 4173 id: 4174 description: Video id to report 4175 allOf: 4176 - $ref: '#/components/schemas/Video/properties/id' 4177 startAt: 4178 type: integer 4179 format: seconds 4180 description: Timestamp in the video that marks the beginning of the report 4181 minimum: 0 4182 endAt: 4183 type: integer 4184 format: seconds 4185 description: Timestamp in the video that marks the ending of the report 4186 minimum: 0 4187 comment: 4188 type: object 4189 properties: 4190 id: 4191 description: Comment id to report 4192 allOf: 4193 - $ref: '#/components/schemas/VideoComment/properties/id' 4194 account: 4195 type: object 4196 properties: 4197 id: 4198 description: Account id to report 4199 type: integer 4200 required: 4201 - reason 4202 responses: 4203 '200': 4204 description: successful operation 4205 content: 4206 application/json: 4207 schema: 4208 type: object 4209 properties: 4210 abuse: 4211 type: object 4212 properties: 4213 id: 4214 $ref: '#/components/schemas/id' 4215 '400': 4216 description: incorrect request parameters 4217 4218 '/api/v1/abuses/{abuseId}': 4219 put: 4220 summary: Update an abuse 4221 security: 4222 - OAuth2: 4223 - admin 4224 - moderator 4225 tags: 4226 - Abuses 4227 parameters: 4228 - $ref: '#/components/parameters/abuseId' 4229 requestBody: 4230 content: 4231 application/json: 4232 schema: 4233 type: object 4234 properties: 4235 state: 4236 $ref: '#/components/schemas/AbuseStateSet' 4237 moderationComment: 4238 type: string 4239 description: Update the report comment visible only to the moderation team 4240 minLength: 2 4241 maxLength: 3000 4242 responses: 4243 '204': 4244 description: successful operation 4245 '404': 4246 description: abuse not found 4247 delete: 4248 tags: 4249 - Abuses 4250 summary: Delete an abuse 4251 security: 4252 - OAuth2: 4253 - admin 4254 - moderator 4255 parameters: 4256 - $ref: '#/components/parameters/abuseId' 4257 responses: 4258 '204': 4259 description: successful operation 4260 '404': 4261 description: block not found 4262 4263 '/api/v1/abuses/{abuseId}/messages': 4264 get: 4265 summary: List messages of an abuse 4266 security: 4267 - OAuth2: [] 4268 tags: 4269 - Abuses 4270 parameters: 4271 - $ref: '#/components/parameters/abuseId' 4272 responses: 4273 '200': 4274 description: successful operation 4275 content: 4276 application/json: 4277 schema: 4278 type: object 4279 properties: 4280 total: 4281 type: integer 4282 example: 1 4283 data: 4284 type: array 4285 items: 4286 $ref: '#/components/schemas/AbuseMessage' 4287 post: 4288 summary: Add message to an abuse 4289 security: 4290 - OAuth2: [] 4291 tags: 4292 - Abuses 4293 parameters: 4294 - $ref: '#/components/parameters/abuseId' 4295 requestBody: 4296 required: true 4297 content: 4298 application/json: 4299 schema: 4300 type: object 4301 properties: 4302 message: 4303 description: Message to send 4304 type: string 4305 minLength: 2 4306 maxLength: 3000 4307 required: 4308 - message 4309 responses: 4310 '200': 4311 description: successful operation 4312 '400': 4313 description: incorrect request parameters 4314 4315 '/api/v1/abuses/{abuseId}/messages/{abuseMessageId}': 4316 delete: 4317 summary: Delete an abuse message 4318 security: 4319 - OAuth2: [] 4320 tags: 4321 - Abuses 4322 parameters: 4323 - $ref: '#/components/parameters/abuseId' 4324 - $ref: '#/components/parameters/abuseMessageId' 4325 responses: 4326 '204': 4327 description: successful operation 4328 4329 '/api/v1/videos/{id}/blacklist': 4330 post: 4331 summary: Block a video 4332 operationId: addVideoBlock 4333 security: 4334 - OAuth2: 4335 - admin 4336 - moderator 4337 tags: 4338 - Video Blocks 4339 parameters: 4340 - $ref: '#/components/parameters/idOrUUID' 4341 responses: 4342 '204': 4343 description: successful operation 4344 delete: 4345 summary: Unblock a video by its id 4346 operationId: delVideoBlock 4347 security: 4348 - OAuth2: 4349 - admin 4350 - moderator 4351 tags: 4352 - Video Blocks 4353 parameters: 4354 - $ref: '#/components/parameters/idOrUUID' 4355 responses: 4356 '204': 4357 description: successful operation 4358 '404': 4359 description: block not found 4360 4361 /api/v1/videos/blacklist: 4362 get: 4363 tags: 4364 - Video Blocks 4365 summary: List video blocks 4366 operationId: getVideoBlocks 4367 security: 4368 - OAuth2: 4369 - admin 4370 - moderator 4371 parameters: 4372 - name: type 4373 in: query 4374 description: > 4375 list only blocks that match this type: 4376 4377 - `1`: manual block 4378 4379 - `2`: automatic block that needs review 4380 schema: 4381 type: integer 4382 enum: 4383 - 1 4384 - 2 4385 - name: search 4386 in: query 4387 description: plain search that will match with video titles, and more 4388 schema: 4389 type: string 4390 - $ref: '#/components/parameters/start' 4391 - $ref: '#/components/parameters/count' 4392 - $ref: '#/components/parameters/blacklistsSort' 4393 responses: 4394 '200': 4395 description: successful operation 4396 content: 4397 application/json: 4398 schema: 4399 type: object 4400 properties: 4401 total: 4402 type: integer 4403 example: 1 4404 data: 4405 type: array 4406 items: 4407 $ref: '#/components/schemas/VideoBlacklist' 4408 4409 /api/v1/videos/{id}/storyboards: 4410 get: 4411 summary: List storyboards of a video 4412 description: "**PeerTube >= 6.0**" 4413 operationId: listVideoStoryboards 4414 tags: 4415 - Video 4416 parameters: 4417 - $ref: '#/components/parameters/idOrUUID' 4418 responses: 4419 '200': 4420 description: successful operation 4421 content: 4422 application/json: 4423 schema: 4424 type: object 4425 properties: 4426 storyboards: 4427 type: array 4428 items: 4429 $ref: '#/components/schemas/Storyboard' 4430 4431 /api/v1/videos/{id}/captions: 4432 get: 4433 summary: List captions of a video 4434 operationId: getVideoCaptions 4435 tags: 4436 - Video Captions 4437 parameters: 4438 - $ref: '#/components/parameters/idOrUUID' 4439 - $ref: '#/components/parameters/videoPasswordHeader' 4440 responses: 4441 '200': 4442 description: successful operation 4443 content: 4444 application/json: 4445 schema: 4446 type: object 4447 properties: 4448 total: 4449 type: integer 4450 example: 1 4451 data: 4452 type: array 4453 items: 4454 $ref: '#/components/schemas/VideoCaption' 4455 4456 /api/v1/videos/{id}/captions/generate: 4457 post: 4458 summary: Generate a video caption 4459 operationId: generateVideoCaption 4460 description: "**PeerTube >= 6.2** This feature has to be enabled by the administrator" 4461 security: 4462 - OAuth2: 4463 - user 4464 tags: 4465 - Video Captions 4466 parameters: 4467 - $ref: '#/components/parameters/idOrUUID' 4468 requestBody: 4469 content: 4470 application/json: 4471 schema: 4472 type: object 4473 properties: 4474 forceTranscription: 4475 type: boolean 4476 default: false 4477 responses: 4478 '204': 4479 description: successful operation 4480 '404': 4481 description: video not found 4482 4483 4484 /api/v1/videos/{id}/captions/{captionLanguage}: 4485 put: 4486 summary: Add or replace a video caption 4487 operationId: addVideoCaption 4488 security: 4489 - OAuth2: 4490 - user 4491 tags: 4492 - Video Captions 4493 parameters: 4494 - $ref: '#/components/parameters/idOrUUID' 4495 - $ref: '#/components/parameters/captionLanguage' 4496 requestBody: 4497 content: 4498 multipart/form-data: 4499 schema: 4500 type: object 4501 properties: 4502 captionfile: 4503 description: The file to upload. 4504 type: string 4505 format: binary 4506 encoding: 4507 captionfile: 4508 contentType: text/vtt, application/x-subrip, text/plain 4509 responses: 4510 '204': 4511 description: successful operation 4512 '404': 4513 description: video or language not found 4514 delete: 4515 summary: Delete a video caption 4516 operationId: delVideoCaption 4517 security: 4518 - OAuth2: 4519 - user 4520 tags: 4521 - Video Captions 4522 parameters: 4523 - $ref: '#/components/parameters/idOrUUID' 4524 - $ref: '#/components/parameters/captionLanguage' 4525 responses: 4526 '204': 4527 description: successful operation 4528 '404': 4529 description: video or language or caption for that language not found 4530 4531 /api/v1/videos/{id}/chapters: 4532 get: 4533 summary: Get chapters of a video 4534 description: "**PeerTube >= 6.0**" 4535 operationId: getVideoChapters 4536 tags: 4537 - Video Chapters 4538 parameters: 4539 - $ref: '#/components/parameters/idOrUUID' 4540 - $ref: '#/components/parameters/videoPasswordHeader' 4541 responses: 4542 '200': 4543 description: successful operation 4544 content: 4545 application/json: 4546 schema: 4547 $ref: '#/components/schemas/VideoChapters' 4548 put: 4549 summary: Replace video chapters 4550 description: "**PeerTube >= 6.0**" 4551 operationId: replaceVideoChapters 4552 security: 4553 - OAuth2: 4554 - user 4555 tags: 4556 - Video Chapters 4557 parameters: 4558 - $ref: '#/components/parameters/idOrUUID' 4559 requestBody: 4560 content: 4561 application/json: 4562 schema: 4563 type: object 4564 properties: 4565 chapters: 4566 type: array 4567 items: 4568 type: object 4569 properties: 4570 title: 4571 type: string 4572 timecode: 4573 type: integer 4574 responses: 4575 '204': 4576 description: successful operation 4577 '404': 4578 description: video not found 4579 4580 /api/v1/videos/{id}/passwords: 4581 get: 4582 summary: List video passwords 4583 description: "**PeerTube >= 6.0**" 4584 operationId: listVideoPasswords 4585 security: 4586 - OAuth2: 4587 - user 4588 tags: 4589 - Video Passwords 4590 parameters: 4591 - $ref: '#/components/parameters/idOrUUID' 4592 - $ref: '#/components/parameters/start' 4593 - $ref: '#/components/parameters/count' 4594 - $ref: '#/components/parameters/sort' 4595 responses: 4596 '204': 4597 description: successful operation 4598 content: 4599 application/json: 4600 schema: 4601 $ref: '#/components/schemas/VideoPasswordList' 4602 '400': 4603 description: video is not password protected 4604 put: 4605 summary: Update video passwords 4606 description: "**PeerTube >= 6.0**" 4607 operationId: updateVideoPasswordList 4608 security: 4609 - OAuth2: 4610 - user 4611 tags: 4612 - Video Passwords 4613 parameters: 4614 - $ref: '#/components/parameters/idOrUUID' 4615 requestBody: 4616 content: 4617 application/json: 4618 schema: 4619 type: object 4620 properties: 4621 passwords: 4622 $ref: '#/components/schemas/AddVideoPasswords' 4623 responses: 4624 '204': 4625 description: successful operation 4626 '400': 4627 description: video is not password protected 4628 post: 4629 summary: Add a video password 4630 description: "**PeerTube >= 8.0**" 4631 operationId: addVideoPassword 4632 security: 4633 - OAuth2: 4634 - user 4635 tags: 4636 - Video Passwords 4637 parameters: 4638 - $ref: '#/components/parameters/idOrUUID' 4639 requestBody: 4640 content: 4641 application/json: 4642 schema: 4643 type: object 4644 properties: 4645 password: 4646 type: string 4647 responses: 4648 '204': 4649 description: successful operation 4650 '400': 4651 description: video is not password protected 4652 4653 /api/v1/videos/{id}/passwords/{videoPasswordId}: 4654 delete: 4655 summary: Delete a video password 4656 description: "**PeerTube >= 6.0**" 4657 operationId: removeVideoPassword 4658 security: 4659 - OAuth2: 4660 - user 4661 tags: 4662 - Video Passwords 4663 parameters: 4664 - $ref: '#/components/parameters/idOrUUID' 4665 - $ref: '#/components/parameters/videoPasswordId' 4666 responses: 4667 '204': 4668 description: successful operation 4669 '403': 4670 description: cannot delete the last password of the protected video 4671 '400': 4672 description: video is not password protected 4673 4674 /api/v1/video-channels: 4675 get: 4676 summary: List video channels 4677 operationId: getVideoChannels 4678 tags: 4679 - Video Channels 4680 parameters: 4681 - $ref: '#/components/parameters/start' 4682 - $ref: '#/components/parameters/count' 4683 - $ref: '#/components/parameters/sort' 4684 responses: 4685 '200': 4686 description: successful operation 4687 content: 4688 application/json: 4689 schema: 4690 $ref: '#/components/schemas/VideoChannelList' 4691 post: 4692 summary: Create a video channel 4693 operationId: addVideoChannel 4694 security: 4695 - OAuth2: [] 4696 tags: 4697 - Video Channels 4698 responses: 4699 '200': 4700 description: successful operation 4701 content: 4702 application/json: 4703 schema: 4704 type: object 4705 properties: 4706 videoChannel: 4707 type: object 4708 properties: 4709 id: 4710 $ref: '#/components/schemas/id' 4711 requestBody: 4712 content: 4713 application/json: 4714 schema: 4715 $ref: '#/components/schemas/VideoChannelCreate' 4716 4717 '/api/v1/video-channels/{channelHandle}': 4718 get: 4719 summary: Get a video channel 4720 operationId: getVideoChannel 4721 tags: 4722 - Video Channels 4723 parameters: 4724 - $ref: '#/components/parameters/channelHandle' 4725 responses: 4726 '200': 4727 description: successful operation 4728 content: 4729 application/json: 4730 schema: 4731 $ref: '#/components/schemas/VideoChannel' 4732 put: 4733 summary: Update a video channel 4734 operationId: putVideoChannel 4735 security: 4736 - OAuth2: [] 4737 tags: 4738 - Video Channels 4739 parameters: 4740 - $ref: '#/components/parameters/channelHandle' 4741 responses: 4742 '204': 4743 description: successful operation 4744 requestBody: 4745 content: 4746 application/json: 4747 schema: 4748 $ref: '#/components/schemas/VideoChannelUpdate' 4749 delete: 4750 summary: Delete a video channel 4751 operationId: delVideoChannel 4752 security: 4753 - OAuth2: [] 4754 tags: 4755 - Video Channels 4756 parameters: 4757 - $ref: '#/components/parameters/channelHandle' 4758 responses: 4759 '204': 4760 description: successful operation 4761 4762 '/api/v1/video-channels/{channelHandle}/videos': 4763 get: 4764 summary: List videos of a video channel 4765 operationId: getVideoChannelVideos 4766 tags: 4767 - Video 4768 - Video Channels 4769 parameters: 4770 - $ref: '#/components/parameters/channelHandle' 4771 # Common video filter parameters 4772 - $ref: '#/components/parameters/start' 4773 - $ref: '#/components/parameters/count' 4774 - $ref: '#/components/parameters/skipCount' 4775 - $ref: '#/components/parameters/videosSort' 4776 - $ref: '#/components/parameters/nsfw' 4777 - $ref: '#/components/parameters/nsfwFlagsIncluded' 4778 - $ref: '#/components/parameters/nsfwFlagsExcluded' 4779 - $ref: '#/components/parameters/isLive' 4780 - $ref: '#/components/parameters/includeScheduledLive' 4781 - $ref: '#/components/parameters/categoryOneOf' 4782 - $ref: '#/components/parameters/licenceOneOf' 4783 - $ref: '#/components/parameters/languageOneOf' 4784 - $ref: '#/components/parameters/tagsOneOf' 4785 - $ref: '#/components/parameters/tagsAllOf' 4786 - $ref: '#/components/parameters/isLocal' 4787 - $ref: '#/components/parameters/include' 4788 - $ref: '#/components/parameters/hasHLSFiles' 4789 - $ref: '#/components/parameters/hasWebVideoFiles' 4790 - $ref: '#/components/parameters/host' 4791 - $ref: '#/components/parameters/autoTagOneOfVideo' 4792 - $ref: '#/components/parameters/privacyOneOf' 4793 - $ref: '#/components/parameters/excludeAlreadyWatched' 4794 - $ref: '#/components/parameters/search' 4795 responses: 4796 '200': 4797 description: successful operation 4798 content: 4799 application/json: 4800 schema: 4801 $ref: '#/components/schemas/VideoListResponse' 4802 4803 '/api/v1/video-channels/{channelHandle}/activities': 4804 get: 4805 summary: List activities of a video channel 4806 description: "**PeerTube >= 8.0**" 4807 operationId: listVideoChannelActivities 4808 tags: 4809 - Video Channels 4810 parameters: 4811 - $ref: '#/components/parameters/channelHandle' 4812 - $ref: '#/components/parameters/start' 4813 - $ref: '#/components/parameters/count' 4814 - $ref: '#/components/parameters/sort' 4815 responses: 4816 '200': 4817 description: successful operation 4818 content: 4819 application/json: 4820 schema: 4821 $ref: '#/components/schemas/ChannelActivityListResponse' 4822 4823 '/api/v1/video-channels/{channelHandle}/video-playlists': 4824 get: 4825 summary: List playlists of a channel 4826 tags: 4827 - Video Playlists 4828 - Video Channels 4829 parameters: 4830 - $ref: '#/components/parameters/channelHandle' 4831 - $ref: '#/components/parameters/start' 4832 - $ref: '#/components/parameters/count' 4833 - $ref: '#/components/parameters/sort' 4834 - $ref: '#/components/parameters/videoPlaylistType' 4835 responses: 4836 '200': 4837 description: successful operation 4838 content: 4839 application/json: 4840 schema: 4841 type: object 4842 properties: 4843 total: 4844 type: integer 4845 example: 1 4846 data: 4847 type: array 4848 items: 4849 $ref: '#/components/schemas/VideoPlaylist' 4850 4851 '/api/v1/video-channels/{channelHandle}/video-playlists/reorder': 4852 post: 4853 summary: Reorder channel playlists 4854 operationId: reorderVideoPlaylistsOfChannel 4855 security: 4856 - OAuth2: [] 4857 tags: 4858 - Video Playlists 4859 - Video Channels 4860 parameters: 4861 - $ref: '#/components/parameters/channelHandle' 4862 responses: 4863 '204': 4864 description: successful operation 4865 requestBody: 4866 content: 4867 application/json: 4868 schema: 4869 type: object 4870 properties: 4871 startPosition: 4872 type: integer 4873 description: 'Start position of the element to reorder' 4874 minimum: 1 4875 insertAfterPosition: 4876 type: integer 4877 description: 'New position for the block to reorder, to add the block before the first element' 4878 minimum: 0 4879 reorderLength: 4880 type: integer 4881 description: 'How many element from `startPosition` to reorder' 4882 minimum: 1 4883 required: 4884 - startPosition 4885 - insertAfterPosition 4886 4887 '/api/v1/video-channels/{channelHandle}/followers': 4888 get: 4889 tags: 4890 - Video Channels 4891 summary: 'List followers of a video channel' 4892 security: 4893 - OAuth2: [] 4894 operationId: getVideoChannelFollowers 4895 parameters: 4896 - $ref: '#/components/parameters/channelHandle' 4897 - $ref: '#/components/parameters/start' 4898 - $ref: '#/components/parameters/count' 4899 - $ref: '#/components/parameters/followersSort' 4900 - $ref: '#/components/parameters/search' 4901 responses: 4902 '200': 4903 description: successful operation 4904 content: 4905 application/json: 4906 schema: 4907 type: object 4908 properties: 4909 total: 4910 type: integer 4911 example: 1 4912 data: 4913 type: array 4914 items: 4915 $ref: '#/components/schemas/Follow' 4916 4917 '/api/v1/video-channels/{channelHandle}/avatar/pick': 4918 post: 4919 summary: Update channel avatar 4920 security: 4921 - OAuth2: [] 4922 tags: 4923 - Video Channels 4924 parameters: 4925 - $ref: '#/components/parameters/channelHandle' 4926 responses: 4927 '200': 4928 description: successful operation 4929 content: 4930 application/json: 4931 schema: 4932 type: object 4933 properties: 4934 avatars: 4935 type: array 4936 items: 4937 $ref: '#/components/schemas/ActorImage' 4938 '413': 4939 description: image file too large 4940 headers: 4941 X-File-Maximum-Size: 4942 schema: 4943 type: string 4944 format: Nginx size 4945 description: Maximum file size for the avatar 4946 requestBody: 4947 content: 4948 multipart/form-data: 4949 schema: 4950 type: object 4951 properties: 4952 avatarfile: 4953 description: The file to upload. 4954 type: string 4955 format: binary 4956 encoding: 4957 avatarfile: 4958 contentType: image/png, image/jpeg 4959 4960 '/api/v1/video-channels/{channelHandle}/avatar': 4961 delete: 4962 summary: Delete channel avatar 4963 security: 4964 - OAuth2: [] 4965 tags: 4966 - Video Channels 4967 parameters: 4968 - $ref: '#/components/parameters/channelHandle' 4969 responses: 4970 '204': 4971 description: successful operation 4972 4973 '/api/v1/video-channels/{channelHandle}/banner/pick': 4974 post: 4975 summary: Update channel banner 4976 security: 4977 - OAuth2: [] 4978 tags: 4979 - Video Channels 4980 parameters: 4981 - $ref: '#/components/parameters/channelHandle' 4982 responses: 4983 '200': 4984 description: successful operation 4985 content: 4986 application/json: 4987 schema: 4988 type: object 4989 properties: 4990 banners: 4991 type: array 4992 items: 4993 $ref: '#/components/schemas/ActorImage' 4994 '413': 4995 description: image file too large 4996 headers: 4997 X-File-Maximum-Size: 4998 schema: 4999 type: string 5000 format: Nginx size 5001 description: Maximum file size for the banner 5002 requestBody: 5003 content: 5004 multipart/form-data: 5005 schema: 5006 type: object 5007 properties: 5008 bannerfile: 5009 description: The file to upload. 5010 type: string 5011 format: binary 5012 encoding: 5013 bannerfile: 5014 contentType: image/png, image/jpeg 5015 5016 '/api/v1/video-channels/{channelHandle}/banner': 5017 delete: 5018 summary: Delete channel banner 5019 security: 5020 - OAuth2: [] 5021 tags: 5022 - Video Channels 5023 parameters: 5024 - $ref: '#/components/parameters/channelHandle' 5025 responses: 5026 '204': 5027 description: successful operation 5028 5029 '/api/v1/video-channels/{channelHandle}/import-videos': 5030 post: 5031 summary: Import videos in channel 5032 description: Import a remote channel/playlist videos into a channel 5033 security: 5034 - OAuth2: [] 5035 tags: 5036 - Video Channels 5037 - Channels Sync 5038 parameters: 5039 - $ref: '#/components/parameters/channelHandle' 5040 requestBody: 5041 content: 5042 application/json: 5043 schema: 5044 $ref: '#/components/schemas/ImportVideosInChannelCreate' 5045 responses: 5046 '204': 5047 description: successful operation 5048 5049 '/api/v1/video-channel-syncs': 5050 post: 5051 summary: Create a synchronization for a video channel 5052 operationId: addVideoChannelSync 5053 security: 5054 - OAuth2: [] 5055 tags: 5056 - Channels Sync 5057 requestBody: 5058 content: 5059 application/json: 5060 schema: 5061 $ref: '#/components/schemas/VideoChannelSyncCreate' 5062 responses: 5063 '200': 5064 description: successful operation 5065 content: 5066 application/json: 5067 schema: 5068 type: object 5069 properties: 5070 videoChannelSync: 5071 $ref: "#/components/schemas/VideoChannelSync" 5072 5073 '/api/v1/video-channel-syncs/{channelSyncId}': 5074 delete: 5075 summary: Delete a video channel synchronization 5076 operationId: delVideoChannelSync 5077 security: 5078 - OAuth2: [] 5079 tags: 5080 - Channels Sync 5081 parameters: 5082 - $ref: '#/components/parameters/channelSyncId' 5083 responses: 5084 '204': 5085 description: successful operation 5086 5087 '/api/v1/video-channel-syncs/{channelSyncId}/sync': 5088 post: 5089 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel 5090 operationId: triggerVideoChannelSync 5091 security: 5092 - OAuth2: [] 5093 tags: 5094 - Channels Sync 5095 parameters: 5096 - $ref: '#/components/parameters/channelSyncId' 5097 responses: 5098 '204': 5099 description: successful operation 5100 5101 5102 '/api/v1/player-settings/videos/{id}': 5103 get: 5104 summary: Get video player settings 5105 description: Get player settings for a specific video. Returns video-specific settings merged with channel player settings. 5106 operationId: getVideoPlayerSettings 5107 tags: 5108 - Player Settings 5109 parameters: 5110 - $ref: '#/components/parameters/idOrUUID' 5111 - name: raw 5112 in: query 5113 required: false 5114 description: Return raw settings without merging channel defaults 5115 schema: 5116 type: boolean 5117 default: false 5118 responses: 5119 '200': 5120 description: successful operation 5121 content: 5122 application/json: 5123 schema: 5124 $ref: '#/components/schemas/PlayerVideoSettings' 5125 '404': 5126 description: video not found 5127 put: 5128 summary: Update video player settings 5129 description: Update player settings for a specific video 5130 operationId: updateVideoPlayerSettings 5131 security: 5132 - OAuth2: [] 5133 tags: 5134 - Player Settings 5135 parameters: 5136 - $ref: '#/components/parameters/idOrUUID' 5137 requestBody: 5138 content: 5139 application/json: 5140 schema: 5141 $ref: '#/components/schemas/PlayerVideoSettingsUpdate' 5142 responses: 5143 '200': 5144 description: successful operation 5145 content: 5146 application/json: 5147 schema: 5148 $ref: '#/components/schemas/PlayerVideoSettings' 5149 '404': 5150 description: video not found 5151 5152 '/api/v1/player-settings/video-channels/{channelHandle}': 5153 get: 5154 summary: Get channel player settings 5155 description: Get player settings for a video channel. 5156 operationId: getChannelPlayerSettings 5157 tags: 5158 - Player Settings 5159 parameters: 5160 - $ref: '#/components/parameters/channelHandle' 5161 - name: raw 5162 in: query 5163 required: false 5164 description: Return raw settings without applying instance defaults 5165 schema: 5166 type: boolean 5167 default: false 5168 responses: 5169 '200': 5170 description: successful operation 5171 content: 5172 application/json: 5173 schema: 5174 $ref: '#/components/schemas/PlayerChannelSettings' 5175 '404': 5176 description: video channel not found 5177 put: 5178 summary: Update channel player settings 5179 description: Update default player settings for a video channel. 5180 operationId: updateChannelPlayerSettings 5181 security: 5182 - OAuth2: [] 5183 tags: 5184 - Player Settings 5185 parameters: 5186 - $ref: '#/components/parameters/channelHandle' 5187 requestBody: 5188 content: 5189 application/json: 5190 schema: 5191 $ref: '#/components/schemas/PlayerChannelSettingsUpdate' 5192 responses: 5193 '200': 5194 description: successful operation 5195 content: 5196 application/json: 5197 schema: 5198 $ref: '#/components/schemas/PlayerChannelSettings' 5199 '404': 5200 description: video channel not found 5201 5202 5203 /api/v1/video-playlists/privacies: 5204 get: 5205 summary: List available playlist privacy policies 5206 operationId: getPlaylistPrivacyPolicies 5207 tags: 5208 - Video Playlists 5209 responses: 5210 '200': 5211 description: successful operation 5212 content: 5213 application/json: 5214 schema: 5215 type: array 5216 items: 5217 type: string 5218 examples: 5219 nightly: 5220 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies 5221 5222 /api/v1/video-playlists: 5223 get: 5224 summary: List video playlists 5225 operationId: getPlaylists 5226 tags: 5227 - Video Playlists 5228 parameters: 5229 - $ref: '#/components/parameters/start' 5230 - $ref: '#/components/parameters/count' 5231 - $ref: '#/components/parameters/sort' 5232 - $ref: '#/components/parameters/videoPlaylistType' 5233 responses: 5234 '200': 5235 description: successful operation 5236 content: 5237 application/json: 5238 schema: 5239 type: object 5240 properties: 5241 total: 5242 type: integer 5243 example: 1 5244 data: 5245 type: array 5246 items: 5247 $ref: '#/components/schemas/VideoPlaylist' 5248 post: 5249 summary: Create a video playlist 5250 description: If the video playlist is set as public, `videoChannelId` is mandatory. 5251 operationId: addPlaylist 5252 security: 5253 - OAuth2: [] 5254 tags: 5255 - Video Playlists 5256 responses: 5257 '200': 5258 description: successful operation 5259 content: 5260 application/json: 5261 schema: 5262 type: object 5263 properties: 5264 videoPlaylist: 5265 type: object 5266 properties: 5267 id: 5268 $ref: '#/components/schemas/VideoPlaylist/properties/id' 5269 uuid: 5270 $ref: '#/components/schemas/VideoPlaylist/properties/uuid' 5271 shortUUID: 5272 $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID' 5273 requestBody: 5274 content: 5275 multipart/form-data: 5276 schema: 5277 type: object 5278 properties: 5279 displayName: 5280 description: Video playlist display name 5281 type: string 5282 minLength: 1 5283 maxLength: 120 5284 thumbnailfile: 5285 description: Video playlist thumbnail file 5286 type: string 5287 format: binary 5288 privacy: 5289 $ref: '#/components/schemas/VideoPlaylistPrivacySet' 5290 description: 5291 description: Video playlist description 5292 type: string 5293 minLength: 3 5294 maxLength: 1000 5295 videoChannelId: 5296 allOf: 5297 - $ref: '#/components/schemas/id' 5298 description: Video channel in which the playlist will be published 5299 required: 5300 - displayName 5301 encoding: 5302 thumbnailfile: 5303 contentType: image/jpeg 5304 5305 /api/v1/video-playlists/{playlistId}: 5306 get: 5307 summary: Get a video playlist 5308 tags: 5309 - Video Playlists 5310 parameters: 5311 - $ref: '#/components/parameters/playlistId' 5312 responses: 5313 '200': 5314 description: successful operation 5315 content: 5316 application/json: 5317 schema: 5318 $ref: '#/components/schemas/VideoPlaylist' 5319 put: 5320 summary: Update a video playlist 5321 description: 'If the video playlist is set as public, the playlist must have a assigned channel.' 5322 security: 5323 - OAuth2: [] 5324 tags: 5325 - Video Playlists 5326 responses: 5327 '204': 5328 description: successful operation 5329 parameters: 5330 - $ref: '#/components/parameters/playlistId' 5331 requestBody: 5332 content: 5333 multipart/form-data: 5334 schema: 5335 type: object 5336 properties: 5337 displayName: 5338 description: Video playlist display name 5339 type: string 5340 minLength: 1 5341 maxLength: 120 5342 thumbnailfile: 5343 description: Video playlist thumbnail file 5344 type: string 5345 format: binary 5346 privacy: 5347 $ref: '#/components/schemas/VideoPlaylistPrivacySet' 5348 description: 5349 description: Video playlist description 5350 type: string 5351 videoChannelId: 5352 allOf: 5353 - $ref: '#/components/schemas/id' 5354 description: Video channel in which the playlist will be published 5355 encoding: 5356 thumbnailfile: 5357 contentType: image/jpeg 5358 delete: 5359 summary: Delete a video playlist 5360 security: 5361 - OAuth2: [] 5362 tags: 5363 - Video Playlists 5364 parameters: 5365 - $ref: '#/components/parameters/playlistId' 5366 responses: 5367 '204': 5368 description: successful operation 5369 5370 /api/v1/video-playlists/{playlistId}/videos: 5371 get: 5372 summary: 'List videos of a playlist' 5373 operationId: getVideoPlaylistVideos 5374 tags: 5375 - Videos 5376 - Video Playlists 5377 parameters: 5378 - $ref: '#/components/parameters/playlistId' 5379 - $ref: '#/components/parameters/start' 5380 - $ref: '#/components/parameters/count' 5381 responses: 5382 '200': 5383 description: successful operation 5384 content: 5385 application/json: 5386 schema: 5387 properties: 5388 total: 5389 type: integer 5390 example: 1 5391 data: 5392 type: array 5393 maxItems: 100 5394 items: 5395 5396 type: object 5397 properties: 5398 id: 5399 description: Playlist element id 5400 allOf: 5401 - $ref: '#/components/schemas/id' 5402 position: 5403 type: integer 5404 example: 2 5405 startTimestamp: 5406 type: integer 5407 nullable: true 5408 example: 10 5409 format: seconds 5410 stopTimestamp: 5411 type: integer 5412 nullable: true 5413 example: 41 5414 format: seconds 5415 video: 5416 $ref: '#/components/schemas/Video' 5417 post: 5418 summary: Add a video in a playlist 5419 operationId: addVideoPlaylistVideo 5420 security: 5421 - OAuth2: [] 5422 tags: 5423 - Videos 5424 - Video Playlists 5425 parameters: 5426 - $ref: '#/components/parameters/playlistId' 5427 responses: 5428 '200': 5429 description: successful operation 5430 content: 5431 application/json: 5432 schema: 5433 type: object 5434 properties: 5435 videoPlaylistElement: 5436 type: object 5437 properties: 5438 id: 5439 type: integer 5440 example: 2 5441 requestBody: 5442 content: 5443 application/json: 5444 schema: 5445 type: object 5446 properties: 5447 videoId: 5448 oneOf: 5449 - $ref: '#/components/schemas/Video/properties/uuid' 5450 - $ref: '#/components/schemas/Video/properties/id' 5451 description: Video to add in the playlist 5452 startTimestamp: 5453 type: integer 5454 format: seconds 5455 description: Start the video at this specific timestamp 5456 stopTimestamp: 5457 type: integer 5458 format: seconds 5459 description: Stop the video at this specific timestamp 5460 required: 5461 - videoId 5462 5463 /api/v1/video-playlists/{playlistId}/videos/reorder: 5464 post: 5465 summary: Reorder playlist elements 5466 operationId: reorderVideoPlaylist 5467 security: 5468 - OAuth2: [] 5469 tags: 5470 - Video Playlists 5471 parameters: 5472 - $ref: '#/components/parameters/playlistId' 5473 responses: 5474 '204': 5475 description: successful operation 5476 requestBody: 5477 content: 5478 application/json: 5479 schema: 5480 type: object 5481 properties: 5482 startPosition: 5483 type: integer 5484 description: 'Start position of the element to reorder' 5485 minimum: 1 5486 insertAfterPosition: 5487 type: integer 5488 description: 'New position for the block to reorder, to add the block before the first element' 5489 minimum: 0 5490 reorderLength: 5491 type: integer 5492 description: 'How many element from `startPosition` to reorder' 5493 minimum: 1 5494 required: 5495 - startPosition 5496 - insertAfterPosition 5497 5498 /api/v1/video-playlists/{playlistId}/videos/{playlistElementId}: 5499 put: 5500 summary: Update a playlist element 5501 operationId: putVideoPlaylistVideo 5502 security: 5503 - OAuth2: [] 5504 tags: 5505 - Video Playlists 5506 parameters: 5507 - $ref: '#/components/parameters/playlistId' 5508 - $ref: '#/components/parameters/playlistElementId' 5509 responses: 5510 '204': 5511 description: successful operation 5512 requestBody: 5513 content: 5514 application/json: 5515 schema: 5516 type: object 5517 properties: 5518 startTimestamp: 5519 type: integer 5520 format: seconds 5521 description: Start the video at this specific timestamp 5522 stopTimestamp: 5523 type: integer 5524 format: seconds 5525 description: Stop the video at this specific timestamp 5526 delete: 5527 summary: Delete an element from a playlist 5528 operationId: delVideoPlaylistVideo 5529 security: 5530 - OAuth2: [] 5531 tags: 5532 - Video Playlists 5533 parameters: 5534 - $ref: '#/components/parameters/playlistId' 5535 - $ref: '#/components/parameters/playlistElementId' 5536 responses: 5537 '204': 5538 description: successful operation 5539 5540 '/api/v1/users/me/video-playlists/videos-exist': 5541 get: 5542 summary: Check video exists in my playlists 5543 security: 5544 - OAuth2: [] 5545 tags: 5546 - Video Playlists 5547 parameters: 5548 - name: videoIds 5549 in: query 5550 required: true 5551 description: The video ids to check 5552 schema: 5553 type: array 5554 items: 5555 $ref: '#/components/schemas/Video/properties/id' 5556 responses: 5557 '200': 5558 description: successful operation 5559 content: 5560 application/json: 5561 schema: 5562 type: object 5563 properties: 5564 videoId: 5565 type: array 5566 items: 5567 type: object 5568 properties: 5569 playlistElementId: 5570 type: integer 5571 playlistId: 5572 type: integer 5573 startTimestamp: 5574 type: integer 5575 format: seconds 5576 nullable: true 5577 stopTimestamp: 5578 type: integer 5579 format: seconds 5580 nullable: true 5581 5582 '/api/v1/accounts/{name}/video-playlists': 5583 get: 5584 summary: List playlists of an account 5585 tags: 5586 - Video Playlists 5587 - Accounts 5588 parameters: 5589 - $ref: '#/components/parameters/name' 5590 - $ref: '#/components/parameters/start' 5591 - $ref: '#/components/parameters/count' 5592 - $ref: '#/components/parameters/sort' 5593 - $ref: '#/components/parameters/search' 5594 - $ref: '#/components/parameters/videoPlaylistType' 5595 - $ref: '#/components/parameters/includeCollaborations' 5596 - name: channelNameOneOf 5597 in: query 5598 required: false 5599 description: "**PeerTube >= 8.0** Filter on playlists that are published on a channel with one of these names" 5600 schema: 5601 oneOf: 5602 - type: string 5603 - type: array 5604 items: 5605 type: string 5606 style: form 5607 explode: true 5608 responses: 5609 '200': 5610 description: successful operation 5611 content: 5612 application/json: 5613 schema: 5614 type: object 5615 properties: 5616 total: 5617 type: integer 5618 example: 1 5619 data: 5620 type: array 5621 items: 5622 $ref: '#/components/schemas/VideoPlaylist' 5623 5624 '/api/v1/accounts/{name}/video-channels': 5625 get: 5626 summary: List video channels of an account 5627 tags: 5628 - Video Channels 5629 - Accounts 5630 parameters: 5631 - $ref: '#/components/parameters/name' 5632 - name: withStats 5633 in: query 5634 description: include daily view statistics for the last 30 days and total views (only if authenticated as the account user) 5635 schema: 5636 type: boolean 5637 - $ref: '#/components/parameters/start' 5638 - $ref: '#/components/parameters/count' 5639 - $ref: '#/components/parameters/search' 5640 - $ref: '#/components/parameters/sort' 5641 - $ref: '#/components/parameters/includeCollaborations' 5642 responses: 5643 '200': 5644 description: successful operation 5645 content: 5646 application/json: 5647 schema: 5648 $ref: '#/components/schemas/VideoChannelList' 5649 5650 '/api/v1/accounts/{name}/video-channel-syncs': 5651 get: 5652 summary: List the synchronizations of video channels of an account 5653 tags: 5654 - Video Channels 5655 - Channels Sync 5656 - Accounts 5657 parameters: 5658 - $ref: '#/components/parameters/name' 5659 - $ref: '#/components/parameters/start' 5660 - $ref: '#/components/parameters/count' 5661 - $ref: '#/components/parameters/sort' 5662 - $ref: '#/components/parameters/includeCollaborations' 5663 responses: 5664 '200': 5665 description: successful operation 5666 content: 5667 application/json: 5668 schema: 5669 $ref: '#/components/schemas/VideoChannelSyncList' 5670 5671 '/api/v1/accounts/{name}/ratings': 5672 get: 5673 summary: List ratings of an account 5674 security: 5675 - OAuth2: [] 5676 tags: 5677 - Accounts 5678 parameters: 5679 - $ref: '#/components/parameters/name' 5680 - $ref: '#/components/parameters/start' 5681 - $ref: '#/components/parameters/count' 5682 - $ref: '#/components/parameters/sort' 5683 - name: rating 5684 in: query 5685 required: false 5686 description: Optionally filter which ratings to retrieve 5687 schema: 5688 type: string 5689 enum: 5690 - like 5691 - dislike 5692 responses: 5693 '200': 5694 description: successful operation 5695 content: 5696 application/json: 5697 schema: 5698 type: array 5699 items: 5700 $ref: '#/components/schemas/VideoRating' 5701 5702 '/api/v1/videos/{id}/comment-threads': 5703 get: 5704 summary: List threads of a video 5705 tags: 5706 - Video Comments 5707 parameters: 5708 - $ref: '#/components/parameters/idOrUUID' 5709 - $ref: '#/components/parameters/start' 5710 - $ref: '#/components/parameters/count' 5711 - $ref: '#/components/parameters/commentsSort' 5712 - $ref: '#/components/parameters/videoPasswordHeader' 5713 responses: 5714 '200': 5715 description: successful operation 5716 content: 5717 application/json: 5718 schema: 5719 $ref: '#/components/schemas/CommentThreadResponse' 5720 post: 5721 summary: Create a thread 5722 security: 5723 - OAuth2: [] 5724 tags: 5725 - Video Comments 5726 parameters: 5727 - $ref: '#/components/parameters/idOrUUID' 5728 responses: 5729 '200': 5730 description: successful operation 5731 content: 5732 application/json: 5733 schema: 5734 $ref: '#/components/schemas/CommentThreadPostResponse' 5735 '404': 5736 description: video does not exist 5737 requestBody: 5738 content: 5739 application/json: 5740 schema: 5741 type: object 5742 properties: 5743 text: 5744 allOf: 5745 - $ref: '#/components/schemas/VideoComment/properties/text' 5746 format: markdown 5747 maxLength: 10000 5748 required: 5749 - text 5750 5751 '/api/v1/videos/{id}/comment-threads/{threadId}': 5752 get: 5753 summary: Get a thread 5754 tags: 5755 - Video Comments 5756 parameters: 5757 - $ref: '#/components/parameters/idOrUUID' 5758 - $ref: '#/components/parameters/threadId' 5759 - $ref: '#/components/parameters/videoPasswordHeader' 5760 responses: 5761 '200': 5762 description: successful operation 5763 content: 5764 application/json: 5765 schema: 5766 $ref: '#/components/schemas/VideoCommentThreadTree' 5767 5768 '/api/v1/videos/comments': 5769 get: 5770 summary: List instance comments 5771 security: 5772 - OAuth2: 5773 - admin 5774 - moderator 5775 tags: 5776 - Video Comments 5777 parameters: 5778 - $ref: '#/components/parameters/search' 5779 - $ref: '#/components/parameters/searchAccountForComments' 5780 - $ref: '#/components/parameters/searchVideoForComments' 5781 - $ref: '#/components/parameters/videoId' 5782 - $ref: '#/components/parameters/videoChannelId' 5783 - $ref: '#/components/parameters/autoTagOneOfComment' 5784 - $ref: '#/components/parameters/isLocal' 5785 - $ref: '#/components/parameters/onLocalVideo' 5786 5787 responses: 5788 '200': 5789 description: successful operation 5790 content: 5791 application/json: 5792 schema: 5793 type: object 5794 properties: 5795 total: 5796 type: integer 5797 example: 1 5798 data: 5799 type: array 5800 items: 5801 $ref: '#/components/schemas/VideoCommentForOwnerOrAdmin' 5802 5803 '/api/v1/videos/{id}/comments/{commentId}': 5804 post: 5805 summary: Reply to a thread of a video 5806 security: 5807 - OAuth2: [] 5808 tags: 5809 - Video Comments 5810 parameters: 5811 - $ref: '#/components/parameters/idOrUUID' 5812 - $ref: '#/components/parameters/commentId' 5813 - $ref: '#/components/parameters/videoPasswordHeader' 5814 responses: 5815 '200': 5816 description: successful operation 5817 content: 5818 application/json: 5819 schema: 5820 $ref: '#/components/schemas/CommentThreadPostResponse' 5821 '404': 5822 description: thread or video does not exist 5823 requestBody: 5824 content: 5825 application/json: 5826 schema: 5827 type: object 5828 properties: 5829 text: 5830 allOf: 5831 - $ref: '#/components/schemas/VideoComment/properties/text' 5832 format: markdown 5833 maxLength: 10000 5834 required: 5835 - text 5836 delete: 5837 summary: Delete a comment or a reply 5838 security: 5839 - OAuth2: [] 5840 tags: 5841 - Video Comments 5842 parameters: 5843 - $ref: '#/components/parameters/idOrUUID' 5844 - $ref: '#/components/parameters/commentId' 5845 responses: 5846 '204': 5847 description: successful operation 5848 '403': 5849 description: cannot remove comment of another user 5850 '404': 5851 description: comment or video does not exist 5852 '409': 5853 description: comment is already deleted 5854 5855 '/api/v1/videos/{id}/comments/{commentId}/approve': 5856 post: 5857 summary: Approve a comment 5858 description: "**PeerTube >= 6.2** Approve a comment that requires a review" 5859 security: 5860 - OAuth2: [] 5861 tags: 5862 - Video Comments 5863 parameters: 5864 - $ref: '#/components/parameters/idOrUUID' 5865 - $ref: '#/components/parameters/commentId' 5866 responses: 5867 '204': 5868 description: successful operation 5869 5870 '/api/v1/videos/{id}/rate': 5871 put: 5872 summary: Like/dislike a video 5873 security: 5874 - OAuth2: [] 5875 tags: 5876 - Video Rates 5877 parameters: 5878 - $ref: '#/components/parameters/idOrUUID' 5879 - $ref: '#/components/parameters/videoPasswordHeader' 5880 requestBody: 5881 content: 5882 application/json: 5883 schema: 5884 type: object 5885 properties: 5886 rating: 5887 type: string 5888 enum: 5889 - like 5890 - dislike 5891 required: 5892 - rating 5893 responses: 5894 '204': 5895 description: successful operation 5896 '404': 5897 description: video does not exist 5898 5899 '/api/v1/videos/{id}/hls': 5900 delete: 5901 summary: Delete video HLS files 5902 security: 5903 - OAuth2: 5904 - admin 5905 tags: 5906 - Video Files 5907 operationId: delVideoHLS 5908 parameters: 5909 - $ref: '#/components/parameters/idOrUUID' 5910 responses: 5911 '204': 5912 description: successful operation 5913 '404': 5914 description: video does not exist 5915 '/api/v1/videos/{id}/web-videos': 5916 delete: 5917 summary: Delete video Web Video files 5918 description: "**PeerTube >= 6.0**" 5919 security: 5920 - OAuth2: 5921 - admin 5922 tags: 5923 - Video Files 5924 operationId: delVideoWebVideos 5925 parameters: 5926 - $ref: '#/components/parameters/idOrUUID' 5927 responses: 5928 '204': 5929 description: successful operation 5930 '404': 5931 description: video does not exist 5932 5933 '/api/v1/videos/{id}/transcoding': 5934 post: 5935 summary: Create a transcoding job 5936 security: 5937 - OAuth2: 5938 - admin 5939 tags: 5940 - Video Transcoding 5941 operationId: createVideoTranscoding 5942 parameters: 5943 - $ref: '#/components/parameters/idOrUUID' 5944 requestBody: 5945 content: 5946 application/json: 5947 schema: 5948 type: object 5949 properties: 5950 transcodingType: 5951 type: string 5952 enum: 5953 - hls 5954 - web-video 5955 forceTranscoding: 5956 type: boolean 5957 default: false 5958 description: If the video is stuck in transcoding state, do it anyway 5959 required: 5960 - transcodingType 5961 responses: 5962 '204': 5963 description: successful operation 5964 '404': 5965 description: video does not exist 5966 5967 /api/v1/search/videos: 5968 get: 5969 tags: 5970 - Search 5971 - Video 5972 summary: Search videos 5973 operationId: searchVideos 5974 parameters: 5975 - name: search 5976 in: query 5977 required: true 5978 allowEmptyValue: false 5979 description: > 5980 String to search. If the user can make a remote URI search, and the string is an URI then the 5981 PeerTube instance will fetch the remote object and add it to its database. Then, 5982 you can use the REST API to fetch the complete video information and interact with it. 5983 schema: 5984 type: string 5985 - $ref: '#/components/parameters/uuids' 5986 - $ref: '#/components/parameters/searchTarget' 5987 # Common video filter parameters 5988 - $ref: '#/components/parameters/start' 5989 - $ref: '#/components/parameters/count' 5990 - $ref: '#/components/parameters/skipCount' 5991 - $ref: '#/components/parameters/videosSort' 5992 - $ref: '#/components/parameters/nsfw' 5993 - $ref: '#/components/parameters/nsfwFlagsIncluded' 5994 - $ref: '#/components/parameters/nsfwFlagsExcluded' 5995 - $ref: '#/components/parameters/isLive' 5996 - $ref: '#/components/parameters/includeScheduledLive' 5997 - $ref: '#/components/parameters/categoryOneOf' 5998 - $ref: '#/components/parameters/licenceOneOf' 5999 - $ref: '#/components/parameters/languageOneOf' 6000 - $ref: '#/components/parameters/tagsOneOf' 6001 - $ref: '#/components/parameters/tagsAllOf' 6002 - $ref: '#/components/parameters/isLocal' 6003 - $ref: '#/components/parameters/include' 6004 - $ref: '#/components/parameters/hasHLSFiles' 6005 - $ref: '#/components/parameters/hasWebVideoFiles' 6006 - $ref: '#/components/parameters/host' 6007 - $ref: '#/components/parameters/autoTagOneOfVideo' 6008 - $ref: '#/components/parameters/privacyOneOf' 6009 - $ref: '#/components/parameters/excludeAlreadyWatched' 6010 - name: startDate 6011 in: query 6012 description: Get videos that are published after this date 6013 schema: 6014 type: string 6015 format: date-time 6016 - name: endDate 6017 in: query 6018 description: Get videos that are published before this date 6019 schema: 6020 type: string 6021 format: date-time 6022 - name: originallyPublishedStartDate 6023 in: query 6024 description: Get videos that are originally published after this date 6025 schema: 6026 type: string 6027 format: date-time 6028 - name: originallyPublishedEndDate 6029 in: query 6030 description: Get videos that are originally published before this date 6031 schema: 6032 type: string 6033 format: date-time 6034 - name: durationMin 6035 in: query 6036 description: Get videos that have this minimum duration 6037 schema: 6038 type: integer 6039 - name: durationMax 6040 in: query 6041 description: Get videos that have this maximum duration 6042 schema: 6043 type: integer 6044 responses: 6045 '200': 6046 description: successful operation 6047 content: 6048 application/json: 6049 schema: 6050 $ref: '#/components/schemas/VideoListResponse' 6051 '500': 6052 description: search index unavailable 6053 6054 /api/v1/search/video-channels: 6055 get: 6056 tags: 6057 - Search 6058 - Video Channels 6059 summary: Search channels 6060 operationId: searchChannels 6061 parameters: 6062 - name: search 6063 in: query 6064 required: true 6065 description: > 6066 String to search. If the user can make a remote URI search, and the string is an URI then the 6067 PeerTube instance will fetch the remote object and add it to its database. Then, 6068 you can use the REST API to fetch the complete channel information and interact with it. 6069 schema: 6070 type: string 6071 - $ref: '#/components/parameters/start' 6072 - $ref: '#/components/parameters/count' 6073 - $ref: '#/components/parameters/searchTarget' 6074 - $ref: '#/components/parameters/sort' 6075 - $ref: '#/components/parameters/host' 6076 - $ref: '#/components/parameters/handles' 6077 responses: 6078 '200': 6079 description: successful operation 6080 content: 6081 application/json: 6082 schema: 6083 $ref: '#/components/schemas/VideoChannelList' 6084 '500': 6085 description: search index unavailable 6086 6087 /api/v1/search/video-playlists: 6088 get: 6089 tags: 6090 - Search 6091 - Video Playlists 6092 summary: Search playlists 6093 operationId: searchPlaylists 6094 parameters: 6095 - name: search 6096 in: query 6097 required: true 6098 description: > 6099 String to search. If the user can make a remote URI search, and the string is an URI then the 6100 PeerTube instance will fetch the remote object and add it to its database. Then, 6101 you can use the REST API to fetch the complete playlist information and interact with it. 6102 schema: 6103 type: string 6104 - $ref: '#/components/parameters/start' 6105 - $ref: '#/components/parameters/count' 6106 - $ref: '#/components/parameters/searchTarget' 6107 - $ref: '#/components/parameters/sort' 6108 - $ref: '#/components/parameters/host' 6109 - $ref: '#/components/parameters/uuids' 6110 responses: 6111 '200': 6112 description: successful operation 6113 content: 6114 application/json: 6115 schema: 6116 type: object 6117 properties: 6118 total: 6119 type: integer 6120 example: 1 6121 data: 6122 type: array 6123 items: 6124 $ref: '#/components/schemas/VideoPlaylist' 6125 '500': 6126 description: search index unavailable 6127 6128 /api/v1/blocklist/status: 6129 get: 6130 tags: 6131 - Account Blocks 6132 - Server Blocks 6133 summary: Get block status of accounts/hosts 6134 parameters: 6135 - 6136 name: 'accounts' 6137 in: query 6138 description: 'Check if these accounts are blocked' 6139 example: [ 'goofy@example.com', 'donald@example.com' ] 6140 schema: 6141 type: array 6142 items: 6143 type: string 6144 - 6145 name: 'hosts' 6146 in: query 6147 description: 'Check if these hosts are blocked' 6148 example: [ 'example.com' ] 6149 schema: 6150 type: array 6151 items: 6152 type: string 6153 responses: 6154 '200': 6155 description: successful operation 6156 content: 6157 'application/json': 6158 schema: 6159 $ref: '#/components/schemas/BlockStatus' 6160 6161 /api/v1/server/blocklist/accounts: 6162 get: 6163 tags: 6164 - Account Blocks 6165 summary: List account blocks 6166 security: 6167 - OAuth2: 6168 - admin 6169 parameters: 6170 - $ref: '#/components/parameters/start' 6171 - $ref: '#/components/parameters/count' 6172 - $ref: '#/components/parameters/sort' 6173 responses: 6174 '200': 6175 description: successful operation 6176 post: 6177 tags: 6178 - Account Blocks 6179 summary: Block an account 6180 security: 6181 - OAuth2: 6182 - admin 6183 requestBody: 6184 content: 6185 application/json: 6186 schema: 6187 type: object 6188 properties: 6189 accountName: 6190 type: string 6191 example: chocobozzz@example.org 6192 description: account to block, in the form `username@domain` 6193 required: 6194 - accountName 6195 responses: 6196 '200': 6197 description: successful operation 6198 '409': 6199 description: self-blocking forbidden 6200 6201 '/api/v1/server/blocklist/accounts/{accountName}': 6202 delete: 6203 tags: 6204 - Account Blocks 6205 summary: Unblock an account by its handle 6206 security: 6207 - OAuth2: 6208 - admin 6209 parameters: 6210 - name: accountName 6211 in: path 6212 required: true 6213 description: account to unblock, in the form `username@domain` 6214 schema: 6215 type: string 6216 responses: 6217 '201': 6218 description: successful operation 6219 '404': 6220 description: account or account block does not exist 6221 6222 /api/v1/server/blocklist/servers: 6223 get: 6224 tags: 6225 - Server Blocks 6226 summary: List server blocks 6227 security: 6228 - OAuth2: 6229 - admin 6230 parameters: 6231 - $ref: '#/components/parameters/start' 6232 - $ref: '#/components/parameters/count' 6233 - $ref: '#/components/parameters/sort' 6234 responses: 6235 '200': 6236 description: successful operation 6237 post: 6238 tags: 6239 - Server Blocks 6240 summary: Block a server 6241 security: 6242 - OAuth2: 6243 - admin 6244 requestBody: 6245 content: 6246 application/json: 6247 schema: 6248 type: object 6249 properties: 6250 host: 6251 type: string 6252 format: hostname 6253 description: server domain to block 6254 required: 6255 - host 6256 responses: 6257 '204': 6258 description: successful operation 6259 '409': 6260 description: self-blocking forbidden 6261 6262 '/api/v1/server/blocklist/servers/{host}': 6263 delete: 6264 tags: 6265 - Server Blocks 6266 summary: Unblock a server by its domain 6267 security: 6268 - OAuth2: 6269 - admin 6270 parameters: 6271 - name: host 6272 in: path 6273 required: true 6274 description: server domain to unblock 6275 schema: 6276 type: string 6277 format: hostname 6278 responses: 6279 '204': 6280 description: successful operation 6281 '404': 6282 description: account block does not exist 6283 6284 /api/v1/server/redundancy/{host}: 6285 put: 6286 tags: 6287 - Instance Redundancy 6288 summary: Update a server redundancy policy 6289 security: 6290 - OAuth2: 6291 - admin 6292 parameters: 6293 - name: host 6294 in: path 6295 required: true 6296 description: server domain to mirror 6297 schema: 6298 type: string 6299 format: hostname 6300 requestBody: 6301 content: 6302 application/json: 6303 schema: 6304 type: object 6305 properties: 6306 redundancyAllowed: 6307 type: boolean 6308 description: allow mirroring of the host's local videos 6309 required: 6310 - redundancyAllowed 6311 responses: 6312 '204': 6313 description: successful operation 6314 '404': 6315 description: server is not already known 6316 6317 /api/v1/server/redundancy/videos: 6318 get: 6319 tags: 6320 - Video Mirroring 6321 summary: List videos being mirrored 6322 operationId: getMirroredVideos 6323 security: 6324 - OAuth2: 6325 - admin 6326 parameters: 6327 - name: target 6328 in: query 6329 required: true 6330 description: direction of the mirror 6331 schema: 6332 type: string 6333 enum: 6334 - my-videos 6335 - remote-videos 6336 - $ref: '#/components/parameters/start' 6337 - $ref: '#/components/parameters/count' 6338 - $ref: '#/components/parameters/videoRedundanciesSort' 6339 responses: 6340 '200': 6341 description: successful operation 6342 content: 6343 application/json: 6344 schema: 6345 type: array 6346 items: 6347 $ref: '#/components/schemas/VideoRedundancy' 6348 post: 6349 tags: 6350 - Video Mirroring 6351 summary: Mirror a video 6352 operationId: putMirroredVideo 6353 security: 6354 - OAuth2: 6355 - admin 6356 requestBody: 6357 content: 6358 application/json: 6359 schema: 6360 type: object 6361 properties: 6362 videoId: 6363 $ref: '#/components/schemas/Video/properties/id' 6364 required: 6365 - videoId 6366 responses: 6367 '204': 6368 description: successful operation 6369 '400': 6370 description: cannot mirror a local video 6371 '404': 6372 description: video does not exist 6373 '409': 6374 description: video is already mirrored 6375 6376 /api/v1/server/redundancy/videos/{redundancyId}: 6377 delete: 6378 tags: 6379 - Video Mirroring 6380 summary: Delete a mirror done on a video 6381 operationId: delMirroredVideo 6382 security: 6383 - OAuth2: 6384 - admin 6385 parameters: 6386 - name: redundancyId 6387 in: path 6388 required: true 6389 description: id of an existing redundancy on a video 6390 schema: 6391 type: string 6392 responses: 6393 '204': 6394 description: successful operation 6395 '404': 6396 description: video redundancy not found 6397 6398 /api/v1/server/stats: 6399 get: 6400 tags: 6401 - Stats 6402 summary: Get instance stats 6403 description: Get instance public statistics. This endpoint is cached. 6404 operationId: getInstanceStats 6405 responses: 6406 '200': 6407 description: successful operation 6408 content: 6409 application/json: 6410 schema: 6411 $ref: '#/components/schemas/ServerStats' 6412 6413 /api/v1/server/logs/client: 6414 post: 6415 tags: 6416 - Logs 6417 summary: Send client log 6418 operationId: sendClientLog 6419 requestBody: 6420 content: 6421 application/json: 6422 schema: 6423 $ref: '#/components/schemas/SendClientLog' 6424 responses: 6425 '204': 6426 description: successful operation 6427 6428 /api/v1/server/logs: 6429 get: 6430 tags: 6431 - Logs 6432 summary: Get instance logs 6433 operationId: getInstanceLogs 6434 security: 6435 - OAuth2: 6436 - admin 6437 responses: 6438 '200': 6439 description: successful operation 6440 content: 6441 application/json: 6442 schema: 6443 type: array 6444 items: 6445 type: string 6446 6447 /api/v1/server/audit-logs: 6448 get: 6449 tags: 6450 - Logs 6451 summary: Get instance audit logs 6452 operationId: getInstanceAuditLogs 6453 security: 6454 - OAuth2: 6455 - admin 6456 responses: 6457 '200': 6458 description: successful operation 6459 content: 6460 application/json: 6461 schema: 6462 type: array 6463 items: 6464 type: string 6465 6466 /api/v1/plugins: 6467 get: 6468 tags: 6469 - Plugins 6470 summary: List plugins 6471 operationId: getPlugins 6472 security: 6473 - OAuth2: 6474 - admin 6475 parameters: 6476 - name: pluginType 6477 in: query 6478 schema: 6479 type: integer 6480 - name: uninstalled 6481 in: query 6482 schema: 6483 type: boolean 6484 - $ref: '#/components/parameters/start' 6485 - $ref: '#/components/parameters/count' 6486 - $ref: '#/components/parameters/sort' 6487 responses: 6488 '200': 6489 description: successful operation 6490 content: 6491 application/json: 6492 schema: 6493 $ref: '#/components/schemas/PluginResponse' 6494 6495 /api/v1/plugins/available: 6496 get: 6497 tags: 6498 - Plugins 6499 summary: List available plugins 6500 operationId: getAvailablePlugins 6501 security: 6502 - OAuth2: 6503 - admin 6504 parameters: 6505 - name: search 6506 in: query 6507 schema: 6508 type: string 6509 - name: pluginType 6510 in: query 6511 schema: 6512 type: integer 6513 - name: currentPeerTubeEngine 6514 in: query 6515 schema: 6516 type: string 6517 - $ref: '#/components/parameters/start' 6518 - $ref: '#/components/parameters/count' 6519 - $ref: '#/components/parameters/sort' 6520 responses: 6521 '200': 6522 description: successful operation 6523 content: 6524 application/json: 6525 schema: 6526 $ref: '#/components/schemas/PluginResponse' 6527 '503': 6528 description: plugin index unavailable 6529 6530 /api/v1/plugins/install: 6531 post: 6532 tags: 6533 - Plugins 6534 summary: Install a plugin 6535 operationId: addPlugin 6536 security: 6537 - OAuth2: 6538 - admin 6539 requestBody: 6540 content: 6541 application/json: 6542 schema: 6543 oneOf: 6544 - type: object 6545 properties: 6546 npmName: 6547 type: string 6548 example: peertube-plugin-auth-ldap 6549 required: 6550 - npmName 6551 additionalProperties: false 6552 - type: object 6553 properties: 6554 path: 6555 type: string 6556 required: 6557 - path 6558 additionalProperties: false 6559 responses: 6560 '204': 6561 description: successful operation 6562 '400': 6563 description: should have either `npmName` or `path` set 6564 6565 /api/v1/plugins/update: 6566 post: 6567 tags: 6568 - Plugins 6569 summary: Update a plugin 6570 operationId: updatePlugin 6571 security: 6572 - OAuth2: 6573 - admin 6574 requestBody: 6575 content: 6576 application/json: 6577 schema: 6578 oneOf: 6579 - type: object 6580 properties: 6581 npmName: 6582 type: string 6583 example: peertube-plugin-auth-ldap 6584 required: 6585 - npmName 6586 additionalProperties: false 6587 - type: object 6588 properties: 6589 path: 6590 type: string 6591 required: 6592 - path 6593 additionalProperties: false 6594 responses: 6595 '204': 6596 description: successful operation 6597 '400': 6598 description: should have either `npmName` or `path` set 6599 '404': 6600 description: existing plugin not found 6601 6602 /api/v1/plugins/uninstall: 6603 post: 6604 tags: 6605 - Plugins 6606 summary: Uninstall a plugin 6607 operationId: uninstallPlugin 6608 security: 6609 - OAuth2: 6610 - admin 6611 requestBody: 6612 content: 6613 application/json: 6614 schema: 6615 type: object 6616 properties: 6617 npmName: 6618 type: string 6619 description: name of the plugin/theme in its package.json 6620 example: peertube-plugin-auth-ldap 6621 required: 6622 - npmName 6623 responses: 6624 '204': 6625 description: successful operation 6626 '404': 6627 description: existing plugin not found 6628 6629 /api/v1/plugins/{npmName}: 6630 get: 6631 tags: 6632 - Plugins 6633 summary: Get a plugin 6634 operationId: getPlugin 6635 security: 6636 - OAuth2: 6637 - admin 6638 parameters: 6639 - $ref: '#/components/parameters/npmName' 6640 responses: 6641 '200': 6642 description: successful operation 6643 content: 6644 application/json: 6645 schema: 6646 $ref: '#/components/schemas/Plugin' 6647 '404': 6648 description: plugin not found 6649 6650 /api/v1/plugins/{npmName}/settings: 6651 put: 6652 tags: 6653 - Plugins 6654 summary: Set a plugin's settings 6655 security: 6656 - OAuth2: 6657 - admin 6658 parameters: 6659 - $ref: '#/components/parameters/npmName' 6660 requestBody: 6661 content: 6662 application/json: 6663 schema: 6664 type: object 6665 properties: 6666 settings: 6667 type: object 6668 additionalProperties: true 6669 responses: 6670 '204': 6671 description: successful operation 6672 '404': 6673 description: plugin not found 6674 6675 /api/v1/plugins/{npmName}/public-settings: 6676 get: 6677 tags: 6678 - Plugins 6679 summary: Get a plugin's public settings 6680 parameters: 6681 - $ref: '#/components/parameters/npmName' 6682 responses: 6683 '200': 6684 description: successful operation 6685 content: 6686 application/json: 6687 schema: 6688 type: object 6689 additionalProperties: true 6690 '404': 6691 description: plugin not found 6692 6693 /api/v1/plugins/{npmName}/registered-settings: 6694 get: 6695 tags: 6696 - Plugins 6697 summary: Get a plugin's registered settings 6698 security: 6699 - OAuth2: 6700 - admin 6701 parameters: 6702 - $ref: '#/components/parameters/npmName' 6703 responses: 6704 '200': 6705 description: successful operation 6706 content: 6707 application/json: 6708 schema: 6709 type: object 6710 additionalProperties: true 6711 '404': 6712 description: plugin not found 6713 6714 /api/v1/metrics/playback: 6715 post: 6716 summary: Create playback metrics 6717 description: These metrics are exposed by OpenTelemetry metrics exporter if enabled. 6718 tags: 6719 - Stats 6720 requestBody: 6721 content: 6722 application/json: 6723 schema: 6724 $ref: '#/components/schemas/PlaybackMetricCreate' 6725 responses: 6726 '204': 6727 description: successful operation 6728 6729 /api/v1/runners/registration-tokens/generate: 6730 post: 6731 summary: Generate registration token 6732 description: Generate a new runner registration token 6733 security: 6734 - OAuth2: 6735 - admin 6736 tags: 6737 - Runner Registration Token 6738 responses: 6739 '204': 6740 description: successful operation 6741 6742 /api/v1/runners/registration-tokens/{registrationTokenId}: 6743 delete: 6744 summary: Remove registration token 6745 description: Remove a registration token. Runners that used this token for their registration are automatically removed. 6746 security: 6747 - OAuth2: 6748 - admin 6749 tags: 6750 - Runner Registration Token 6751 parameters: 6752 - $ref: '#/components/parameters/registrationTokenId' 6753 responses: 6754 '204': 6755 description: successful operation 6756 6757 /api/v1/runners/registration-tokens: 6758 get: 6759 summary: List registration tokens 6760 security: 6761 - OAuth2: 6762 - admin 6763 tags: 6764 - Runner Registration Token 6765 parameters: 6766 - $ref: '#/components/parameters/start' 6767 - $ref: '#/components/parameters/count' 6768 - $ref: '#/components/parameters/registrationTokenSort' 6769 responses: 6770 '200': 6771 description: successful operation 6772 content: 6773 application/json: 6774 schema: 6775 type: object 6776 properties: 6777 total: 6778 type: integer 6779 example: 1 6780 data: 6781 type: array 6782 items: 6783 $ref: '#/components/schemas/RunnerRegistrationToken' 6784 6785 /api/v1/runners/register: 6786 post: 6787 summary: Register a new runner 6788 description: API used by PeerTube runners 6789 tags: 6790 - Runners 6791 requestBody: 6792 content: 6793 application/json: 6794 schema: 6795 type: object 6796 properties: 6797 registrationToken: 6798 type: string 6799 name: 6800 type: string 6801 description: 6802 type: string 6803 required: 6804 - registrationToken 6805 - name 6806 responses: 6807 '200': 6808 description: successful operation 6809 content: 6810 application/json: 6811 schema: 6812 type: object 6813 properties: 6814 id: 6815 type: integer 6816 description: Runner id 6817 runnerToken: 6818 type: string 6819 6820 /api/v1/runners/unregister: 6821 post: 6822 summary: Unregister a runner 6823 description: API used by PeerTube runners 6824 tags: 6825 - Runners 6826 requestBody: 6827 content: 6828 application/json: 6829 schema: 6830 type: object 6831 properties: 6832 runnerToken: 6833 type: string 6834 required: 6835 - runnerToken 6836 responses: 6837 '204': 6838 description: successful operation 6839 6840 /api/v1/runners/{runnerId}: 6841 delete: 6842 summary: Delete a runner 6843 security: 6844 - OAuth2: 6845 - admin 6846 tags: 6847 - Runners 6848 parameters: 6849 - $ref: '#/components/parameters/runnerId' 6850 requestBody: 6851 content: 6852 application/json: 6853 schema: 6854 type: object 6855 properties: 6856 runnerToken: 6857 type: string 6858 required: 6859 - runnerToken 6860 responses: 6861 '204': 6862 description: successful operation 6863 6864 /api/v1/runners: 6865 get: 6866 summary: List runners 6867 security: 6868 - OAuth2: 6869 - admin 6870 tags: 6871 - Runners 6872 parameters: 6873 - $ref: '#/components/parameters/start' 6874 - $ref: '#/components/parameters/count' 6875 - $ref: '#/components/parameters/runnerSort' 6876 responses: 6877 '200': 6878 description: successful operation 6879 content: 6880 application/json: 6881 schema: 6882 type: object 6883 properties: 6884 total: 6885 type: integer 6886 example: 1 6887 data: 6888 type: array 6889 items: 6890 $ref: '#/components/schemas/Runner' 6891 6892 6893 /api/v1/runners/jobs/request: 6894 post: 6895 summary: Request a new job 6896 description: API used by PeerTube runners 6897 tags: 6898 - Runner Jobs 6899 requestBody: 6900 content: 6901 application/json: 6902 schema: 6903 type: object 6904 properties: 6905 runnerToken: 6906 type: string 6907 jobTypes: 6908 type: array 6909 description: Filter jobs depending on their types 6910 items: 6911 type: string 6912 required: 6913 - runnerToken 6914 responses: 6915 '200': 6916 description: successful operation 6917 content: 6918 application/json: 6919 schema: 6920 type: object 6921 properties: 6922 availableJobs: 6923 type: array 6924 items: 6925 type: object 6926 properties: 6927 uuid: 6928 $ref: '#/components/schemas/UUIDv4' 6929 type: 6930 $ref: '#/components/schemas/RunnerJobType' 6931 payload: 6932 $ref: '#/components/schemas/RunnerJobPayload' 6933 6934 /api/v1/runners/jobs/{jobUUID}/accept: 6935 post: 6936 summary: Accept job 6937 description: API used by PeerTube runners 6938 tags: 6939 - Runner Jobs 6940 parameters: 6941 - $ref: '#/components/parameters/jobUUID' 6942 requestBody: 6943 content: 6944 application/json: 6945 schema: 6946 type: object 6947 properties: 6948 runnerToken: 6949 type: string 6950 required: 6951 - runnerToken 6952 responses: 6953 '200': 6954 description: successful operation 6955 content: 6956 application/json: 6957 schema: 6958 type: object 6959 properties: 6960 job: 6961 allOf: 6962 - $ref: '#/components/schemas/RunnerJob' 6963 - type: object 6964 properties: 6965 jobToken: 6966 type: string 6967 6968 /api/v1/runners/jobs/{jobUUID}/abort: 6969 post: 6970 summary: Abort job 6971 description: API used by PeerTube runners 6972 tags: 6973 - Runner Jobs 6974 parameters: 6975 - $ref: '#/components/parameters/jobUUID' 6976 requestBody: 6977 content: 6978 application/json: 6979 schema: 6980 type: object 6981 properties: 6982 runnerToken: 6983 type: string 6984 jobToken: 6985 type: string 6986 reason: 6987 type: string 6988 description: Why the runner aborts this job 6989 required: 6990 - runnerToken 6991 - jobToken 6992 - reason 6993 responses: 6994 '204': 6995 description: successful operation 6996 6997 /api/v1/runners/jobs/{jobUUID}/update: 6998 post: 6999 summary: Update job 7000 description: API used by PeerTube runners 7001 tags: 7002 - Runner Jobs 7003 parameters: 7004 - $ref: '#/components/parameters/jobUUID' 7005 requestBody: 7006 content: 7007 application/json: 7008 schema: 7009 type: object 7010 properties: 7011 runnerToken: 7012 type: string 7013 jobToken: 7014 type: string 7015 progress: 7016 type: integer 7017 description: Update job progression percentage (optional) 7018 payload: 7019 anyOf: 7020 - type: object 7021 description: Provide live transcoding chunks update 7022 properties: 7023 type: 7024 type: string 7025 enum: 7026 - 'add-chunk' 7027 - 'remove-chunk' 7028 masterPlaylistFile: 7029 type: string 7030 format: binary 7031 resolutionPlaylistFile: 7032 type: string 7033 format: binary 7034 resolutionPlaylistFilename: 7035 type: string 7036 videoChunkFile: 7037 type: string 7038 format: binary 7039 videoChunkFilename: 7040 type: string 7041 required: 7042 - runnerToken 7043 - jobToken 7044 responses: 7045 '204': 7046 description: successful operation 7047 7048 /api/v1/runners/jobs/{jobUUID}/error: 7049 post: 7050 summary: Post job error 7051 description: API used by PeerTube runners 7052 tags: 7053 - Runner Jobs 7054 parameters: 7055 - $ref: '#/components/parameters/jobUUID' 7056 requestBody: 7057 content: 7058 application/json: 7059 schema: 7060 type: object 7061 properties: 7062 runnerToken: 7063 type: string 7064 jobToken: 7065 type: string 7066 message: 7067 type: string 7068 description: Why the runner failed to process this job 7069 required: 7070 - runnerToken 7071 - jobToken 7072 - message 7073 responses: 7074 '204': 7075 description: successful operation 7076 7077 /api/v1/runners/jobs/{jobUUID}/success: 7078 post: 7079 summary: Post job success 7080 description: API used by PeerTube runners 7081 tags: 7082 - Runner Jobs 7083 parameters: 7084 - $ref: '#/components/parameters/jobUUID' 7085 requestBody: 7086 content: 7087 application/json: 7088 schema: 7089 type: object 7090 properties: 7091 runnerToken: 7092 type: string 7093 jobToken: 7094 type: string 7095 payload: 7096 anyOf: 7097 - type: object 7098 title: VOD web video transcoding 7099 properties: 7100 videoFile: 7101 type: string 7102 format: binary 7103 - type: object 7104 title: VOD HLS transcoding 7105 properties: 7106 videoFile: 7107 type: string 7108 format: binary 7109 resolutionPlaylistFile: 7110 type: string 7111 format: binary 7112 - type: object 7113 title: VOD audio merge transcoding 7114 properties: 7115 videoFile: 7116 type: string 7117 format: binary 7118 - type: object 7119 title: Live RTMP to HLS transcoding 7120 required: 7121 - runnerToken 7122 - jobToken 7123 - payload 7124 responses: 7125 '204': 7126 description: successful operation 7127 7128 /api/v1/runners/jobs/{jobUUID}/cancel: 7129 get: 7130 summary: Cancel a job 7131 security: 7132 - OAuth2: 7133 - admin 7134 tags: 7135 - Runner Jobs 7136 parameters: 7137 - $ref: '#/components/parameters/jobUUID' 7138 responses: 7139 '204': 7140 description: successful operation 7141 7142 /api/v1/runners/jobs/{jobUUID}: 7143 delete: 7144 summary: Delete a job 7145 description: The endpoint will first cancel the job if needed, and then remove it from the database. Children jobs will also be removed 7146 security: 7147 - OAuth2: 7148 - admin 7149 tags: 7150 - Runner Jobs 7151 parameters: 7152 - $ref: '#/components/parameters/jobUUID' 7153 responses: 7154 '204': 7155 description: successful operation 7156 7157 /api/v1/runners/jobs: 7158 get: 7159 summary: List jobs 7160 security: 7161 - OAuth2: 7162 - admin 7163 tags: 7164 - Runner Jobs 7165 parameters: 7166 - $ref: '#/components/parameters/start' 7167 - $ref: '#/components/parameters/count' 7168 - $ref: '#/components/parameters/runnerJobSort' 7169 - $ref: '#/components/parameters/search' 7170 - name: stateOneOf 7171 in: query 7172 required: false 7173 schema: 7174 type: array 7175 items: 7176 $ref: '#/components/schemas/RunnerJobState' 7177 responses: 7178 '200': 7179 description: successful operation 7180 content: 7181 application/json: 7182 schema: 7183 type: object 7184 properties: 7185 total: 7186 type: integer 7187 example: 1 7188 data: 7189 type: array 7190 items: 7191 $ref: '#/components/schemas/RunnerJobAdmin' 7192 7193 /api/v1/automatic-tags/policies/accounts/{accountName}/comments: 7194 get: 7195 tags: 7196 - Automatic Tags 7197 summary: Get account auto tag policies on comments 7198 description: "**PeerTube >= 6.2**" 7199 security: 7200 - OAuth2: [] 7201 parameters: 7202 - name: accountName 7203 in: path 7204 required: true 7205 description: account name to get auto tag policies 7206 schema: 7207 type: string 7208 responses: 7209 '200': 7210 description: successful operation 7211 content: 7212 application/json: 7213 schema: 7214 $ref: '#/components/schemas/CommentAutoTagPolicies' 7215 put: 7216 tags: 7217 - Automatic Tags 7218 summary: Update account auto tag policies on comments 7219 description: "**PeerTube >= 6.2**" 7220 security: 7221 - OAuth2: [] 7222 parameters: 7223 - name: accountName 7224 in: path 7225 required: true 7226 description: account name to update auto tag policies 7227 schema: 7228 type: string 7229 requestBody: 7230 content: 7231 application/json: 7232 schema: 7233 type: object 7234 properties: 7235 review: 7236 description: 'Auto tags that automatically set the comment in review state' 7237 type: array 7238 items: 7239 type: string 7240 responses: 7241 '204': 7242 description: successful operation 7243 7244 /api/v1/automatic-tags/accounts/{accountName}/available: 7245 get: 7246 tags: 7247 - Automatic Tags 7248 summary: Get account available auto tags 7249 description: "**PeerTube >= 6.2**" 7250 security: 7251 - OAuth2: [] 7252 parameters: 7253 - name: accountName 7254 in: path 7255 required: true 7256 description: account name to get auto tag policies 7257 schema: 7258 type: string 7259 responses: 7260 '200': 7261 description: successful operation 7262 content: 7263 application/json: 7264 schema: 7265 $ref: '#/components/schemas/AutomaticTagAvailable' 7266 /api/v1/automatic-tags/server/available: 7267 get: 7268 tags: 7269 - Automatic Tags 7270 summary: Get server available auto tags 7271 description: "**PeerTube >= 6.2**" 7272 security: 7273 - OAuth2: 7274 - admin 7275 - moderator 7276 responses: 7277 '200': 7278 description: successful operation 7279 content: 7280 application/json: 7281 schema: 7282 $ref: '#/components/schemas/AutomaticTagAvailable' 7283 7284 /api/v1/watched-words/accounts/{accountName}/lists: 7285 get: 7286 tags: 7287 - Watched Words 7288 summary: List account watched words 7289 description: "**PeerTube >= 6.2**" 7290 security: 7291 - OAuth2: [] 7292 parameters: 7293 - name: accountName 7294 in: path 7295 required: true 7296 description: account name to list watched words 7297 schema: 7298 type: string 7299 responses: 7300 '200': 7301 description: successful operation 7302 content: 7303 application/json: 7304 schema: 7305 properties: 7306 total: 7307 type: integer 7308 example: 1 7309 data: 7310 type: array 7311 items: 7312 $ref: '#/components/schemas/WatchedWordsLists' 7313 post: 7314 tags: 7315 - Watched Words 7316 summary: Add account watched words 7317 description: "**PeerTube >= 6.2**" 7318 security: 7319 - OAuth2: [] 7320 parameters: 7321 - name: accountName 7322 in: path 7323 required: true 7324 schema: 7325 type: string 7326 requestBody: 7327 content: 7328 application/json: 7329 schema: 7330 type: object 7331 properties: 7332 listName: 7333 type: string 7334 words: 7335 type: array 7336 items: 7337 type: string 7338 responses: 7339 '200': 7340 description: successful operation 7341 content: 7342 application/json: 7343 schema: 7344 type: object 7345 properties: 7346 watchedWordsList: 7347 type: object 7348 properties: 7349 id: 7350 type: integer 7351 7352 /api/v1/watched-words/accounts/{accountName}/lists/{listId}: 7353 put: 7354 tags: 7355 - Watched Words 7356 summary: Update account watched words 7357 description: "**PeerTube >= 6.2**" 7358 security: 7359 - OAuth2: [] 7360 parameters: 7361 - name: accountName 7362 in: path 7363 required: true 7364 schema: 7365 type: string 7366 - name: listId 7367 in: path 7368 required: true 7369 description: list of watched words to update 7370 schema: 7371 type: string 7372 requestBody: 7373 content: 7374 application/json: 7375 schema: 7376 type: object 7377 properties: 7378 listName: 7379 type: string 7380 words: 7381 type: array 7382 items: 7383 type: string 7384 responses: 7385 '204': 7386 description: successful operation 7387 delete: 7388 tags: 7389 - Watched Words 7390 summary: Delete account watched words 7391 description: "**PeerTube >= 6.2**" 7392 security: 7393 - OAuth2: [] 7394 parameters: 7395 - name: accountName 7396 in: path 7397 required: true 7398 schema: 7399 type: string 7400 - name: listId 7401 in: path 7402 required: true 7403 description: list of watched words to delete 7404 schema: 7405 type: string 7406 responses: 7407 '204': 7408 description: successful operation 7409 7410 /api/v1/watched-words/server/lists: 7411 get: 7412 tags: 7413 - Watched Words 7414 summary: List server watched words 7415 description: "**PeerTube >= 6.2**" 7416 security: 7417 - OAuth2: 7418 - admin 7419 - moderator 7420 responses: 7421 '200': 7422 description: successful operation 7423 content: 7424 application/json: 7425 schema: 7426 properties: 7427 total: 7428 type: integer 7429 example: 1 7430 data: 7431 type: array 7432 items: 7433 $ref: '#/components/schemas/WatchedWordsLists' 7434 post: 7435 tags: 7436 - Watched Words 7437 summary: Add server watched words 7438 description: "**PeerTube >= 6.2**" 7439 security: 7440 - OAuth2: 7441 - admin 7442 - moderator 7443 requestBody: 7444 content: 7445 application/json: 7446 schema: 7447 type: object 7448 properties: 7449 listName: 7450 type: string 7451 words: 7452 type: array 7453 items: 7454 type: string 7455 responses: 7456 '200': 7457 description: successful operation 7458 content: 7459 application/json: 7460 schema: 7461 type: object 7462 properties: 7463 watchedWordsList: 7464 type: object 7465 properties: 7466 id: 7467 type: integer 7468 7469 /api/v1/watched-words/server/lists/{listId}: 7470 put: 7471 tags: 7472 - Watched Words 7473 summary: Update server watched words 7474 description: "**PeerTube >= 6.2**" 7475 security: 7476 - OAuth2: 7477 - admin 7478 - moderator 7479 parameters: 7480 - name: listId 7481 in: path 7482 required: true 7483 description: list of watched words to update 7484 schema: 7485 type: string 7486 requestBody: 7487 content: 7488 application/json: 7489 schema: 7490 type: object 7491 properties: 7492 listName: 7493 type: string 7494 words: 7495 type: array 7496 items: 7497 type: string 7498 responses: 7499 '204': 7500 description: successful operation 7501 delete: 7502 tags: 7503 - Watched Words 7504 summary: Delete server watched words 7505 description: "**PeerTube >= 6.2**" 7506 security: 7507 - OAuth2: 7508 - admin 7509 - moderator 7510 parameters: 7511 - name: listId 7512 in: path 7513 required: true 7514 description: list of watched words to delete 7515 schema: 7516 type: string 7517 responses: 7518 '204': 7519 description: successful operation 7520 /api/v1/client-config/update-language: 7521 post: 7522 tags: 7523 - Client Config 7524 summary: Update client language 7525 description: Set a cookie so that, the next time the client refreshes the HTML of the web interface, PeerTube will use the next language 7526 operationId: updateClientLanguage 7527 requestBody: 7528 content: 7529 application/json: 7530 schema: 7531 type: object 7532 properties: 7533 language: 7534 type: string 7535 description: Language code to set 7536 example: 'en-US' 7537 required: 7538 - language 7539 responses: 7540 '204': 7541 description: successful operation 7542 7543 /api/v1/video-channels/{channelHandle}/collaborators: 7544 get: 7545 tags: 7546 - Video Channels 7547 summary: "*List channel collaborators" 7548 description: "**PeerTube >= 8.0**" 7549 operationId: listVideoChannelCollaborators 7550 security: 7551 - OAuth2: [] 7552 parameters: 7553 - $ref: '#/components/parameters/channelHandle' 7554 responses: 7555 '200': 7556 description: successful operation 7557 content: 7558 application/json: 7559 schema: 7560 type: object 7561 properties: 7562 total: 7563 type: integer 7564 example: 1 7565 data: 7566 type: array 7567 items: 7568 $ref: '#/components/schemas/VideoChannelCollaborator' 7569 7570 /api/v1/video-channels/{channelHandle}/collaborators/invite: 7571 post: 7572 tags: 7573 - Video Channels 7574 summary: Invite a collaborator 7575 operationId: inviteVideoChannelCollaborator 7576 description: "**PeerTube >= 8.0** Invite a local user to collaborate on the specified video channel." 7577 security: 7578 - OAuth2: [] 7579 parameters: 7580 - $ref: '#/components/parameters/channelHandle' 7581 requestBody: 7582 required: true 7583 content: 7584 application/json: 7585 schema: 7586 type: object 7587 properties: 7588 accountHandle: 7589 type: string 7590 description: Local user username to invite 7591 responses: 7592 '200': 7593 description: Collaborator invited 7594 content: 7595 application/json: 7596 schema: 7597 type: object 7598 properties: 7599 collaborator: 7600 $ref: '#/components/schemas/VideoChannelCollaborator' 7601 7602 /api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/accept: 7603 post: 7604 tags: 7605 - Video Channels 7606 summary: Accept a collaboration invitation 7607 description: "**PeerTube >= 8.0**" 7608 operationId: acceptVideoChannelCollaborator 7609 security: 7610 - OAuth2: [] 7611 parameters: 7612 - $ref: '#/components/parameters/channelHandle' 7613 - $ref: '#/components/parameters/collaboratorId' 7614 responses: 7615 '204': 7616 description: Collaboration accepted 7617 7618 /api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}/reject: 7619 post: 7620 tags: 7621 - Video Channels 7622 summary: Reject a collaboration invitation 7623 description: "**PeerTube >= 8.0**" 7624 operationId: rejectVideoChannelCollaborator 7625 security: 7626 - OAuth2: [] 7627 parameters: 7628 - $ref: '#/components/parameters/channelHandle' 7629 - $ref: '#/components/parameters/collaboratorId' 7630 responses: 7631 '204': 7632 description: Collaboration rejected 7633 7634 /api/v1/video-channels/{channelHandle}/collaborators/{collaboratorId}: 7635 delete: 7636 tags: 7637 - Video Channels 7638 summary: Remove a channel collaborator 7639 description: "**PeerTube >= 8.0** Only the channel owner or the collaborator themselves can remove a collaborator from a channel" 7640 operationId: removeVideoChannelCollaborator 7641 security: 7642 - OAuth2: [] 7643 parameters: 7644 - $ref: '#/components/parameters/channelHandle' 7645 - $ref: '#/components/parameters/collaboratorId' 7646 responses: 7647 '204': 7648 description: successful operation 7649 7650servers: 7651 - url: 'https://peertube2.cpy.re' 7652 description: Live Test Server (live data - latest nightly version) 7653 - url: 'https://peertube3.cpy.re' 7654 description: Live Test Server (live data - latest RC version) 7655 - url: 'https://peertube.cpy.re' 7656 description: Live Test Server (live data - stable version) 7657components: 7658 parameters: 7659 start: 7660 name: start 7661 in: query 7662 required: false 7663 description: Offset used to paginate results 7664 schema: 7665 type: integer 7666 minimum: 0 7667 count: 7668 name: count 7669 in: query 7670 required: false 7671 description: "Number of items to return" 7672 schema: 7673 type: integer 7674 default: 15 7675 maximum: 100 7676 minimum: 1 7677 sort: 7678 name: sort 7679 in: query 7680 required: false 7681 description: Sort column 7682 schema: 7683 type: string 7684 example: -createdAt 7685 search: 7686 name: search 7687 in: query 7688 required: false 7689 description: Plain text search, applied to various parts of the model depending on endpoint 7690 schema: 7691 type: string 7692 searchTarget: 7693 name: searchTarget 7694 in: query 7695 required: false 7696 description: > 7697 If the administrator enabled search index support, you can override the default search target. 7698 7699 7700 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. 7701 It means the instance may not yet know the objects you fetched. If you want to load video/channel information: 7702 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), 7703 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. 7704 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it 7705 * 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 7706 the data from the origin instance API 7707 schema: 7708 type: string 7709 enum: 7710 - 'local' 7711 - 'search-index' 7712 mySubscriptionSort: 7713 name: sort 7714 in: query 7715 required: false 7716 schema: 7717 type: string 7718 enum: 7719 - -id 7720 - -createdAt 7721 - -channelUpdatedAt 7722 videosSort: 7723 name: sort 7724 in: query 7725 required: false 7726 schema: 7727 type: string 7728 enum: 7729 - name 7730 - -duration 7731 - -createdAt 7732 - -publishedAt 7733 - -views 7734 - -likes 7735 - -comments 7736 - -trending 7737 - -hot 7738 - -best 7739 description: > 7740 Sort videos by criteria (prefixing with `-` means `DESC` order): 7741 * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date 7742 * `best` - Same than `hot`, but also takes into account user video history 7743 * `trending` - Sort videos by recent views ("recent" is defined by the admin) 7744 * `views` - Sort videos using their `views` counter 7745 * `publishedAt` - Sort by video publication date (when it became publicly available) 7746 videosSearchSort: 7747 name: sort 7748 in: query 7749 required: false 7750 description: > 7751 Sort videos by criteria (prefixing with `-` means `DESC` order): 7752 schema: 7753 type: string 7754 enum: 7755 - name 7756 - -duration 7757 - -createdAt 7758 - -publishedAt 7759 - -views 7760 - -likes 7761 - -match 7762 commentsSort: 7763 name: sort 7764 in: query 7765 required: false 7766 description: Sort comments by criteria 7767 schema: 7768 type: string 7769 enum: 7770 - -createdAt 7771 - -totalReplies 7772 blacklistsSort: 7773 name: sort 7774 in: query 7775 required: false 7776 description: Sort blocklists by criteria 7777 schema: 7778 type: string 7779 enum: 7780 - -id 7781 - name 7782 - -duration 7783 - -views 7784 - -likes 7785 - -dislikes 7786 - -uuid 7787 - -createdAt 7788 usersSearch: 7789 name: search 7790 in: query 7791 required: false 7792 description: Plain text search that will match with user usernames or emails 7793 schema: 7794 type: string 7795 usersBlocked: 7796 name: blocked 7797 in: query 7798 required: false 7799 description: Filter results down to (un)banned users 7800 schema: 7801 type: boolean 7802 usersSort: 7803 name: sort 7804 in: query 7805 required: false 7806 description: Sort users by criteria 7807 schema: 7808 type: string 7809 enum: 7810 - -id 7811 - -username 7812 - -createdAt 7813 abusesSort: 7814 name: sort 7815 in: query 7816 required: false 7817 description: Sort abuses by criteria 7818 schema: 7819 type: string 7820 enum: 7821 - -id 7822 - -createdAt 7823 - -state 7824 videoRedundanciesSort: 7825 name: sort 7826 in: query 7827 required: false 7828 description: Sort abuses by criteria 7829 schema: 7830 type: string 7831 enum: 7832 - name 7833 followersSort: 7834 name: sort 7835 in: query 7836 required: false 7837 description: Sort followers by criteria 7838 schema: 7839 type: string 7840 enum: 7841 - createdAt 7842 registrationTokenSort: 7843 name: sort 7844 in: query 7845 required: false 7846 description: Sort registration tokens by criteria 7847 schema: 7848 type: string 7849 enum: 7850 - createdAt 7851 runnerSort: 7852 name: sort 7853 in: query 7854 required: false 7855 description: Sort runners by criteria 7856 schema: 7857 type: string 7858 enum: 7859 - createdAt 7860 runnerJobSort: 7861 name: sort 7862 in: query 7863 required: false 7864 description: Sort runner jobs by criteria 7865 schema: 7866 type: string 7867 enum: 7868 - updatedAt 7869 - createdAt 7870 - priority 7871 - state 7872 - progress 7873 7874 name: 7875 name: name 7876 in: path 7877 required: true 7878 description: The username or handle of the account 7879 schema: 7880 type: string 7881 example: chocobozzz | chocobozzz@example.org 7882 id: 7883 name: id 7884 in: path 7885 required: true 7886 description: Entity id 7887 schema: 7888 $ref: '#/components/schemas/id' 7889 tokenSessionId: 7890 name: tokenSessionId 7891 in: path 7892 required: true 7893 description: Token session Id 7894 schema: 7895 $ref: '#/components/schemas/id' 7896 userId: 7897 name: userId 7898 in: path 7899 required: true 7900 description: User id 7901 schema: 7902 $ref: '#/components/schemas/id' 7903 registrationId: 7904 name: registrationId 7905 in: path 7906 required: true 7907 description: Registration ID 7908 schema: 7909 $ref: '#/components/schemas/id' 7910 idOrUUID: 7911 name: id 7912 in: path 7913 required: true 7914 description: The object id, uuid or short uuid 7915 schema: 7916 oneOf: 7917 - $ref: '#/components/schemas/id' 7918 - $ref: '#/components/schemas/UUIDv4' 7919 - $ref: '#/components/schemas/shortUUID' 7920 playlistId: 7921 name: playlistId 7922 in: path 7923 required: true 7924 description: Playlist id 7925 schema: 7926 $ref: '#/components/schemas/VideoPlaylist/properties/id' 7927 playlistElementId: 7928 name: playlistElementId 7929 in: path 7930 required: true 7931 description: Playlist element id 7932 schema: 7933 $ref: '#/components/schemas/id' 7934 abuseId: 7935 name: abuseId 7936 in: path 7937 required: true 7938 description: Abuse id 7939 schema: 7940 $ref: '#/components/schemas/Abuse/properties/id' 7941 abuseMessageId: 7942 name: abuseMessageId 7943 in: path 7944 required: true 7945 description: Abuse message id 7946 schema: 7947 $ref: '#/components/schemas/AbuseMessage/properties/id' 7948 captionLanguage: 7949 name: captionLanguage 7950 in: path 7951 required: true 7952 description: The caption language 7953 schema: 7954 $ref: '#/components/schemas/VideoLanguageSet' 7955 channelHandle: 7956 name: channelHandle 7957 in: path 7958 required: true 7959 description: The video channel handle 7960 schema: 7961 type: string 7962 example: my_username | my_username@example.com 7963 channelSyncId: 7964 name: channelSyncId 7965 in: path 7966 required: true 7967 description: Channel Sync id 7968 schema: 7969 $ref: '#/components/schemas/Abuse/properties/id' 7970 subscriptionHandle: 7971 name: subscriptionHandle 7972 in: path 7973 required: true 7974 description: The subscription handle 7975 schema: 7976 type: string 7977 example: my_username | my_username@example.com 7978 threadId: 7979 name: threadId 7980 in: path 7981 required: true 7982 description: The thread id (root comment id) 7983 schema: 7984 type: integer 7985 commentId: 7986 name: commentId 7987 in: path 7988 required: true 7989 description: The comment id 7990 schema: 7991 $ref: '#/components/schemas/VideoComment/properties/id' 7992 isLive: 7993 name: isLive 7994 in: query 7995 required: false 7996 description: whether or not the video is a live 7997 schema: 7998 type: boolean 7999 includeScheduledLive: 8000 name: includeScheduledLive 8001 in: query 8002 required: false 8003 description: whether or not include live that are scheduled for later 8004 schema: 8005 type: boolean 8006 categoryOneOf: 8007 name: categoryOneOf 8008 in: query 8009 required: false 8010 description: category id of the video (see [/videos/categories](#operation/getCategories)) 8011 schema: 8012 oneOf: 8013 - $ref: '#/components/schemas/VideoCategorySet' 8014 - type: array 8015 items: 8016 $ref: '#/components/schemas/VideoCategorySet' 8017 style: form 8018 explode: true 8019 tagsOneOf: 8020 name: tagsOneOf 8021 in: query 8022 required: false 8023 description: tag(s) of the video 8024 schema: 8025 oneOf: 8026 - type: string 8027 - type: array 8028 maxItems: 5 8029 items: 8030 type: string 8031 style: form 8032 explode: true 8033 tagsAllOf: 8034 name: tagsAllOf 8035 in: query 8036 required: false 8037 description: tag(s) of the video, where all should be present in the video 8038 schema: 8039 oneOf: 8040 - type: string 8041 - type: array 8042 items: 8043 type: string 8044 style: form 8045 explode: true 8046 languageOneOf: 8047 name: languageOneOf 8048 in: query 8049 required: false 8050 description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language 8051 schema: 8052 oneOf: 8053 - $ref: '#/components/schemas/VideoLanguageSet' 8054 - type: array 8055 items: 8056 $ref: '#/components/schemas/VideoLanguageSet' 8057 style: form 8058 explode: true 8059 autoTagOneOfVideo: 8060 name: autoTagOneOf 8061 in: query 8062 required: false 8063 description: "**PeerTube >= 6.2** **Admins and moderators only** filter on videos that contain one of these automatic tags" 8064 schema: 8065 oneOf: 8066 - type: string 8067 - type: array 8068 items: 8069 type: string 8070 style: form 8071 explode: true 8072 channelNameOneOf: 8073 name: channelNameOneOf 8074 in: query 8075 required: false 8076 description: "**PeerTube >= 7.2** Filter on videos that are published by a channel with one of these names" 8077 schema: 8078 oneOf: 8079 - type: string 8080 - type: array 8081 items: 8082 type: string 8083 style: form 8084 explode: true 8085 autoTagOneOfComment: 8086 name: autoTagOneOf 8087 in: query 8088 required: false 8089 description: "**PeerTube >= 6.2** filter on comments that contain one of these automatic tags" 8090 schema: 8091 oneOf: 8092 - type: string 8093 - type: array 8094 items: 8095 type: string 8096 style: form 8097 explode: true 8098 isHeldForReview: 8099 name: isHeldForReview 8100 in: query 8101 required: false 8102 description: only display comments that are held for review 8103 schema: 8104 type: boolean 8105 licenceOneOf: 8106 name: licenceOneOf 8107 in: query 8108 required: false 8109 description: licence id of the video (see [/videos/licences](#operation/getLicences)) 8110 schema: 8111 oneOf: 8112 - $ref: '#/components/schemas/VideoLicenceSet' 8113 - type: array 8114 items: 8115 $ref: '#/components/schemas/VideoLicenceSet' 8116 style: form 8117 explode: true 8118 skipCount: 8119 name: skipCount 8120 in: query 8121 required: false 8122 description: if you don't need the `total` in the response 8123 schema: 8124 type: string 8125 enum: 8126 - 'true' 8127 - 'false' 8128 default: 'false' 8129 nsfw: 8130 name: nsfw 8131 in: query 8132 required: false 8133 description: whether to include nsfw videos, if any 8134 schema: 8135 type: string 8136 enum: 8137 - 'true' 8138 - 'false' 8139 nsfwFlagsIncluded: 8140 name: nsfwFlagsIncluded 8141 in: query 8142 required: false 8143 schema: 8144 $ref: '#/components/schemas/NSFWFlag' 8145 nsfwFlagsExcluded: 8146 name: nsfwFlagsExcluded 8147 in: query 8148 required: false 8149 schema: 8150 $ref: '#/components/schemas/NSFWFlag' 8151 isLocal: 8152 name: isLocal 8153 in: query 8154 required: false 8155 schema: 8156 type: boolean 8157 description: '**PeerTube >= 4.0** Display only local or remote objects' 8158 hasHLSFiles: 8159 name: hasHLSFiles 8160 in: query 8161 required: false 8162 schema: 8163 type: boolean 8164 description: '**PeerTube >= 4.0** Display only videos that have HLS files' 8165 hasWebVideoFiles: 8166 name: hasWebVideoFiles 8167 in: query 8168 required: false 8169 schema: 8170 type: boolean 8171 description: '**PeerTube >= 6.0** Display only videos that have Web Video files' 8172 privacyOneOf: 8173 name: privacyOneOf 8174 in: query 8175 required: false 8176 schema: 8177 $ref: '#/components/schemas/VideoPrivacySet' 8178 description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies' 8179 excludeAlreadyWatched: 8180 name: excludeAlreadyWatched 8181 in: query 8182 description: Whether or not to exclude videos that are in the user's video history 8183 schema: 8184 type: boolean 8185 uuids: 8186 name: uuids 8187 in: query 8188 required: false 8189 schema: 8190 items: 8191 type: string 8192 description: 'Find elements with specific UUIDs' 8193 host: 8194 name: host 8195 in: query 8196 required: false 8197 schema: 8198 type: string 8199 description: 'Find elements owned by this host' 8200 handles: 8201 name: handles 8202 in: query 8203 required: false 8204 schema: 8205 items: 8206 type: string 8207 description: 'Find elements with these handles' 8208 include: 8209 name: include 8210 in: query 8211 required: false 8212 schema: 8213 type: integer 8214 enum: 8215 - 0 8216 - 1 8217 - 2 8218 - 4 8219 - 8 8220 - 16 8221 - 32 8222 description: > 8223 **Only administrators and moderators can use this parameter** 8224 8225 8226 Include additional videos in results (can be combined using bitwise or operator) 8227 8228 - `0` NONE 8229 8230 - `1` NOT_PUBLISHED_STATE 8231 8232 - `2` BLACKLISTED 8233 8234 - `4` BLOCKED_OWNER 8235 8236 - `8` FILES 8237 8238 - `16` CAPTIONS 8239 8240 - `32` VIDEO SOURCE 8241 subscriptionsUris: 8242 name: uris 8243 in: query 8244 required: true 8245 description: list of uris to check if each is part of the user subscriptions 8246 schema: 8247 type: array 8248 items: 8249 type: string 8250 format: uri 8251 npmName: 8252 name: npmName 8253 in: path 8254 required: true 8255 description: name of the plugin/theme on npmjs.com or in its package.json 8256 schema: 8257 type: string 8258 example: peertube-plugin-auth-ldap 8259 jobType: 8260 name: jobType 8261 in: query 8262 required: false 8263 description: job type 8264 schema: 8265 type: string 8266 enum: 8267 - activitypub-follow 8268 - activitypub-http-broadcast 8269 - activitypub-http-fetcher 8270 - activitypub-http-unicast 8271 - email 8272 - video-transcoding 8273 - video-file-import 8274 - video-import 8275 - videos-views-stats 8276 - activitypub-refresher 8277 - video-redundancy 8278 - video-live-ending 8279 - video-channel-import 8280 followState: 8281 name: state 8282 in: query 8283 schema: 8284 type: string 8285 enum: 8286 - pending 8287 - accepted 8288 actorType: 8289 name: actorType 8290 in: query 8291 schema: 8292 type: string 8293 enum: 8294 - Person 8295 - Application 8296 - Group 8297 - Service 8298 - Organization 8299 staticFilename: 8300 name: filename 8301 in: path 8302 required: true 8303 description: Filename 8304 schema: 8305 type: string 8306 videoFileToken: 8307 name: videoFileToken 8308 in: query 8309 required: false 8310 description: Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. 8311 schema: 8312 type: string 8313 reinjectVideoFileToken: 8314 name: reinjectVideoFileToken 8315 in: query 8316 required: false 8317 description: Ask the server to reinject videoFileToken in URLs in m3u8 playlist 8318 schema: 8319 type: boolean 8320 videoPlaylistType: 8321 name: playlistType 8322 in: query 8323 required: false 8324 schema: 8325 $ref: '#/components/schemas/VideoPlaylistTypeSet' 8326 registrationTokenId: 8327 name: registrationTokenId 8328 in: path 8329 required: true 8330 schema: 8331 type: integer 8332 runnerId: 8333 name: runnerId 8334 in: path 8335 required: true 8336 schema: 8337 type: integer 8338 jobUUID: 8339 name: jobUUID 8340 in: path 8341 required: true 8342 schema: 8343 $ref: '#/components/schemas/UUIDv4' 8344 videoPasswordId: 8345 name: videoPasswordId 8346 in: path 8347 required: true 8348 description: The video password id 8349 schema: 8350 $ref: '#/components/schemas/id' 8351 onLocalVideo: 8352 name: onLocalVideo 8353 in: query 8354 required: false 8355 schema: 8356 type: boolean 8357 description: 'Display only objects of local or remote videos' 8358 videoChannelId: 8359 name: videoChannelId 8360 in: query 8361 required: false 8362 schema: 8363 type: integer 8364 description: 'Limit results on this specific video channel' 8365 videoId: 8366 name: videoId 8367 in: query 8368 required: false 8369 schema: 8370 type: integer 8371 description: 'Limit results on this specific video' 8372 searchVideoForComments: 8373 name: searchVideo 8374 in: query 8375 required: false 8376 description: Filter comments by searching on the video 8377 schema: 8378 type: string 8379 searchAccountForComments: 8380 name: searchAccount 8381 in: query 8382 required: false 8383 description: Filter comments by searching on the account 8384 schema: 8385 type: string 8386 videoPasswordHeader: 8387 name: x-peertube-video-password 8388 description: Required on password protected video 8389 in: header 8390 required: false 8391 schema: 8392 type: string 8393 resumableUploadInitContentLengthHeader: 8394 name: X-Upload-Content-Length 8395 in: header 8396 schema: 8397 type: number 8398 example: 2469036 8399 required: true 8400 description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading. 8401 resumableUploadInitContentTypeHeader: 8402 name: X-Upload-Content-Type 8403 in: header 8404 schema: 8405 type: string 8406 format: mimetype 8407 example: video/mp4 8408 required: true 8409 description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary. 8410 resumableUploadChunkContentRangeHeader: 8411 name: Content-Range 8412 in: header 8413 schema: 8414 type: string 8415 example: bytes 0-262143/2469036 8416 required: true 8417 description: | 8418 Specifies the bytes in the file that the request is uploading. 8419 8420 For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first 8421 262144 bytes (256 x 1024) in a 2,469,036 byte file. 8422 resumableUploadChunkContentLengthHeader: 8423 name: Content-Length 8424 in: header 8425 schema: 8426 type: number 8427 example: 262144 8428 required: true 8429 description: | 8430 Size of the chunk that the request is sending. 8431 8432 Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from 8433 1048576 bytes (~1MB) and increases or reduces size depending on connection health. 8434 resumableUploadId: 8435 name: upload_id 8436 in: query 8437 required: true 8438 description: | 8439 Created session id to proceed with. If you didn't send chunks in the last hour, it is 8440 not valid anymore and you need to initialize a new upload. 8441 schema: 8442 type: string 8443 logoTypeParam: 8444 name: logoType 8445 in: path 8446 required: true 8447 schema: 8448 type: string 8449 enum: 8450 - 'favicon' 8451 - 'header-wide' 8452 - 'header-square' 8453 - 'opengraph' 8454 includeCollaborations: 8455 name: includeCollaborations 8456 in: query 8457 required: false 8458 description: "**PeerTube >= 8.0** Include objects from collaborated channels" 8459 schema: 8460 type: boolean 8461 collaboratorId: 8462 name: collaboratorId 8463 in: path 8464 required: true 8465 description: The collaborator id 8466 schema: 8467 $ref: '#/components/schemas/id' 8468 8469 securitySchemes: 8470 OAuth2: 8471 description: | 8472 Authenticating via OAuth requires the following steps: 8473 - Have an activated account 8474 - [Generate] an access token for that account at `/api/v1/users/token`. 8475 - Make requests with the *Authorization: Bearer <token\>* header 8476 - Profit, depending on the role assigned to the account 8477 8478 Note that the __access token is valid for 1 day__ and is given 8479 along with a __refresh token valid for 2 weeks__. 8480 8481 [Generate]: https://docs.joinpeertube.org/api/rest-getting-started 8482 type: oauth2 8483 flows: 8484 password: 8485 tokenUrl: /api/v1/users/token 8486 scopes: 8487 admin: Admin scope 8488 moderator: Moderator scope 8489 user: User scope 8490 schemas: 8491 # Reusable core properties 8492 id: 8493 type: integer 8494 minimum: 1 8495 example: 42 8496 UUIDv4: 8497 type: string 8498 format: uuid 8499 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d 8500 pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' 8501 minLength: 36 8502 maxLength: 36 8503 shortUUID: 8504 type: string 8505 description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid 8506 example: 2y84q2MQUMWPbiEcxNXMgC 8507 username: 8508 type: string 8509 description: immutable name of the user, used to find or mention its actor 8510 example: chocobozzz 8511 pattern: '/^[a-z0-9._]+$/' 8512 minLength: 1 8513 maxLength: 50 8514 usernameChannel: 8515 type: string 8516 description: immutable name of the channel, used to interact with its actor 8517 example: framasoft_videos 8518 pattern: '/^[a-zA-Z0-9\\-_.:]+$/' 8519 minLength: 1 8520 maxLength: 50 8521 password: 8522 type: string 8523 format: password 8524 minLength: 6 8525 maxLength: 50 8526 8527 VideoCategorySet: 8528 type: integer 8529 description: category id of the video (see [/videos/categories](#operation/getCategories)) 8530 example: 15 8531 VideoConstantNumber-Category: 8532 properties: 8533 id: 8534 $ref: '#/components/schemas/VideoCategorySet' 8535 label: 8536 type: string 8537 example: Science & Technology 8538 8539 VideoLicenceSet: 8540 type: integer 8541 description: licence id of the video (see [/videos/licences](#operation/getLicences)) 8542 example: 2 8543 VideoConstantNumber-Licence: 8544 properties: 8545 id: 8546 $ref: '#/components/schemas/VideoLicenceSet' 8547 label: 8548 type: string 8549 example: Attribution - Share Alike 8550 8551 VideoLanguageSet: 8552 type: string 8553 description: language id of the video (see [/videos/languages](#operation/getLanguages)) 8554 example: en 8555 VideoConstantString-Language: 8556 properties: 8557 id: 8558 $ref: '#/components/schemas/VideoLanguageSet' 8559 label: 8560 type: string 8561 example: English 8562 8563 VideoPlaylistPrivacySet: 8564 type: integer 8565 enum: 8566 - 1 8567 - 2 8568 - 3 8569 description: Video playlist privacy policy (see [/video-playlists/privacies](#operation/getPlaylistPrivacyPolicies)) 8570 VideoPlaylistPrivacyConstant: 8571 properties: 8572 id: 8573 $ref: '#/components/schemas/VideoPlaylistPrivacySet' 8574 label: 8575 type: string 8576 8577 VideoPlaylistTypeSet: 8578 type: integer 8579 enum: 8580 - 1 8581 - 2 8582 description: The video playlist type (Regular = `1`, Watch Later = `2`) 8583 VideoPlaylistTypeConstant: 8584 properties: 8585 id: 8586 $ref: '#/components/schemas/VideoPlaylistTypeSet' 8587 label: 8588 type: string 8589 8590 VideoPrivacySet: 8591 type: integer 8592 enum: 8593 - 1 8594 - 2 8595 - 3 8596 - 4 8597 - 5 8598 description: privacy id of the video (see [/videos/privacies](#operation/getVideoPrivacyPolicies)) 8599 VideoPrivacyConstant: 8600 properties: 8601 id: 8602 $ref: '#/components/schemas/VideoPrivacySet' 8603 label: 8604 type: string 8605 8606 VideoCommentsPolicySet: 8607 type: integer 8608 enum: 8609 - 1 8610 - 2 8611 - 3 8612 description: Comments policy of the video (Enabled = `1`, Disabled = `2`, Requires Approval = `3`) 8613 VideoCommentsPolicyConstant: 8614 properties: 8615 id: 8616 $ref: '#/components/schemas/VideoCommentsPolicySet' 8617 label: 8618 type: string 8619 8620 BlockStatus: 8621 properties: 8622 accounts: 8623 type: object 8624 additionalProperties: 8625 x-additionalPropertiesName: account 8626 type: object 8627 properties: 8628 blockedByServer: 8629 type: boolean 8630 blockedByUser: 8631 type: boolean 8632 hosts: 8633 type: object 8634 additionalProperties: 8635 x-additionalPropertiesName: host 8636 type: object 8637 properties: 8638 blockedByServer: 8639 type: boolean 8640 blockedByUser: 8641 type: boolean 8642 8643 NSFWPolicy: 8644 type: string 8645 enum: 8646 - display 8647 - warn 8648 - do_not_list 8649 8650 NSFWFlag: 8651 type: integer 8652 enum: 8653 - 0 8654 - 1 8655 - 2 8656 - 4 8657 description: > 8658 8659 NSFW flags (can be combined using bitwise or operator) 8660 8661 - `0` NONE 8662 8663 - `1` VIOLENT 8664 8665 - `2` EXPLICIT_SEX 8666 8667 UserRole: 8668 type: integer 8669 enum: 8670 - 0 8671 - 1 8672 - 2 8673 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)' 8674 example: 2 8675 UserAdminFlags: 8676 type: integer 8677 enum: 8678 - 0 8679 - 1 8680 description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)' 8681 example: 1 8682 8683 LiveVideoLatencyMode: 8684 type: integer 8685 enum: 8686 - 1 8687 - 2 8688 - 3 8689 description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)' 8690 8691 LiveVideoReplaySettings: 8692 type: object 8693 properties: 8694 privacy: 8695 # description: Video playlist privacy policy (see [../video-playlists/privacies]) 8696 $ref: '#/components/schemas/VideoPrivacySet' 8697 8698 VideoChannelActivityAction: 8699 type: integer 8700 enum: 8701 - 1 8702 - 2 8703 - 3 8704 - 4 8705 - 5 8706 - 6 8707 - 7 8708 - 8 8709 - 9 8710 - 10 8711 - 11 8712 description: | 8713 The activity action: 8714 - CREATE: 1 8715 - UPDATE: 2 8716 - DELETE: 3 8717 - UPDATE_CAPTIONS: 4 8718 - UPDATE_CHAPTERS: 5 8719 - UPDATE_PASSWORDS: 6 8720 - CREATE_STUDIO_TASKS: 7 8721 - UPDATE_SOURCE_FILE: 8 8722 - UPDATE_ELEMENTS: 9 8723 - REMOVE_CHANNEL_OWNERSHIP: 10 8724 - CREATE_CHANNEL_OWNERSHIP: 11 8725 8726 VideoChannelActivityTarget: 8727 type: integer 8728 enum: 8729 - 1 8730 - 2 8731 - 3 8732 - 4 8733 - 5 8734 description: | 8735 The activity target: 8736 - VIDEO: 1, 8737 - PLAYLIST: 2, 8738 - CHANNEL: 3, 8739 - CHANNEL_SYNC: 4, 8740 - VIDEO_IMPORT: 5 8741 8742 VideoStateConstant: 8743 properties: 8744 id: 8745 type: integer 8746 enum: 8747 - 1 8748 - 2 8749 - 3 8750 - 4 8751 - 5 8752 - 6 8753 - 7 8754 - 8 8755 - 9 8756 description: | 8757 The video state: 8758 - `1`: Published 8759 - `2`: To transcode 8760 - `3`: To import 8761 - `4`: Waiting for live stream 8762 - `5`: Live ended 8763 - `6`: To move to an external storage (object storage...) 8764 - `7`: Transcoding failed 8765 - `8`: Moving to an external storage failed 8766 - `9`: To edit using studio edition feature 8767 label: 8768 type: string 8769 8770 UserExportState: 8771 type: integer 8772 enum: 8773 - 1 8774 - 2 8775 - 3 8776 - 4 8777 description: | 8778 The user export state: 8779 - `1`: Pending 8780 - `2`: Processing 8781 - `3`: Completed 8782 - `4`: Errored 8783 8784 UserImportState: 8785 type: integer 8786 enum: 8787 - 1 8788 - 2 8789 - 3 8790 - 4 8791 description: | 8792 The user import state: 8793 - `1`: Pending 8794 - `2`: Processing 8795 - `3`: Completed 8796 - `4`: Errored 8797 8798 AbuseStateSet: 8799 type: integer 8800 enum: 8801 - 1 8802 - 2 8803 - 3 8804 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)' 8805 AbuseStateConstant: 8806 properties: 8807 id: 8808 $ref: '#/components/schemas/AbuseStateSet' 8809 label: 8810 type: string 8811 AbusePredefinedReasons: 8812 type: array 8813 items: 8814 type: string 8815 enum: 8816 - violentOrAbusive 8817 - hatefulOrAbusive 8818 - spamOrMisleading 8819 - privacy 8820 - rights 8821 - serverRules 8822 - thumbnails 8823 - captions 8824 example: [spamOrMisleading] 8825 8826 VideoResolutionSet: 8827 type: integer 8828 description: | 8829 Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`) 8830 8831 `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos. 8832 example: 240 8833 VideoResolutionConstant: 8834 description: resolutions and their labels for the video 8835 properties: 8836 id: 8837 $ref: '#/components/schemas/VideoResolutionSet' 8838 label: 8839 type: string 8840 example: 240p 8841 VideoScheduledUpdate: 8842 properties: 8843 privacy: 8844 $ref: '#/components/schemas/VideoPrivacySet' 8845 updateAt: 8846 type: string 8847 format: date-time 8848 description: When to update the video 8849 required: 8850 - updateAt 8851 AccountSummary: 8852 properties: 8853 id: 8854 type: integer 8855 name: 8856 type: string 8857 displayName: 8858 type: string 8859 url: 8860 type: string 8861 format: url 8862 host: 8863 type: string 8864 format: hostname 8865 avatars: 8866 type: array 8867 items: 8868 $ref: '#/components/schemas/ActorImage' 8869 VideoChannelSummary: 8870 properties: 8871 id: 8872 $ref: '#/components/schemas/id' 8873 name: 8874 type: string 8875 displayName: 8876 type: string 8877 url: 8878 type: string 8879 format: url 8880 host: 8881 type: string 8882 format: hostname 8883 avatars: 8884 type: array 8885 items: 8886 $ref: '#/components/schemas/ActorImage' 8887 PlaylistElement: 8888 properties: 8889 position: 8890 type: integer 8891 startTimestamp: 8892 type: integer 8893 format: seconds 8894 stopTimestamp: 8895 type: integer 8896 format: seconds 8897 video: 8898 nullable: true 8899 allOf: 8900 - $ref: '#/components/schemas/Video' 8901 VideoFile: 8902 properties: 8903 id: 8904 $ref: '#/components/schemas/id' 8905 magnetUri: 8906 type: string 8907 format: uri 8908 description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file 8909 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i 8910 resolution: 8911 $ref: '#/components/schemas/VideoResolutionConstant' 8912 size: 8913 type: integer 8914 description: Video file size in bytes 8915 torrentUrl: 8916 type: string 8917 description: Direct URL of the torrent file 8918 format: url 8919 torrentDownloadUrl: 8920 type: string 8921 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog) 8922 format: url 8923 fileUrl: 8924 type: string 8925 description: Direct URL of the video 8926 format: url 8927 playlistUrl: 8928 type: string 8929 description: Playlist URL of the file if it is owned by a playlist 8930 format: url 8931 fileDownloadUrl: 8932 type: string 8933 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog) 8934 format: url 8935 fps: 8936 type: number 8937 description: Frames per second of the video file 8938 width: 8939 type: number 8940 description: "**PeerTube >= 6.1** Video stream width" 8941 height: 8942 type: number 8943 description: "**PeerTube >= 6.1** Video stream height" 8944 metadataUrl: 8945 type: string 8946 format: url 8947 description: URL dereferencing the output of ffprobe on the file 8948 hasAudio: 8949 type: boolean 8950 description: "**PeerTube >= 6.2** The file container has an audio stream" 8951 hasVideo: 8952 type: boolean 8953 description: "**PeerTube >= 6.2** The file container has a video stream" 8954 storage: 8955 $ref: '#/components/schemas/FileStorage' 8956 8957 VideoStreamingPlaylists: 8958 allOf: 8959 - type: object 8960 properties: 8961 id: 8962 $ref: '#/components/schemas/id' 8963 type: 8964 type: integer 8965 enum: 8966 - 1 8967 description: | 8968 Playlist type: 8969 - `1`: HLS 8970 - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS' 8971 VideoStreamingPlaylists-HLS: 8972 properties: 8973 playlistUrl: 8974 type: string 8975 format: url 8976 segmentsSha256Url: 8977 type: string 8978 format: url 8979 files: 8980 type: array 8981 description: | 8982 Video files associated to this playlist. 8983 8984 The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.) 8985 items: 8986 $ref: '#/components/schemas/VideoFile' 8987 redundancies: 8988 type: array 8989 items: 8990 type: object 8991 properties: 8992 baseUrl: 8993 type: string 8994 format: url 8995 VideoInfo: 8996 properties: 8997 id: 8998 $ref: '#/components/schemas/Video/properties/id' 8999 uuid: 9000 $ref: '#/components/schemas/Video/properties/uuid' 9001 name: 9002 $ref: '#/components/schemas/Video/properties/name' 9003 state: 9004 $ref: '#/components/schemas/Video/properties/state' 9005 Video: 9006 properties: 9007 id: 9008 description: object id for the video 9009 allOf: 9010 - $ref: '#/components/schemas/id' 9011 uuid: 9012 description: universal identifier for the video, that can be used across instances 9013 allOf: 9014 - $ref: '#/components/schemas/UUIDv4' 9015 shortUUID: 9016 allOf: 9017 - $ref: '#/components/schemas/shortUUID' 9018 isLive: 9019 type: boolean 9020 liveSchedules: 9021 type: array 9022 items: 9023 $ref: '#/components/schemas/LiveSchedule' 9024 createdAt: 9025 type: string 9026 format: date-time 9027 example: 2017-10-01T10:52:46.396Z 9028 description: time at which the video object was first drafted 9029 publishedAt: 9030 type: string 9031 format: date-time 9032 example: 2018-10-01T10:52:46.396Z 9033 description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution. 9034 updatedAt: 9035 type: string 9036 format: date-time 9037 example: 2021-05-04T08:01:01.502Z 9038 description: last time the video's metadata was modified 9039 originallyPublishedAt: 9040 type: string 9041 nullable: true 9042 format: date-time 9043 example: 2010-10-01T10:52:46.396Z 9044 description: used to represent a date of first publication, prior to the practical publication date of `publishedAt` 9045 category: 9046 allOf: 9047 - $ref: '#/components/schemas/VideoConstantNumber-Category' 9048 description: category in which the video is classified 9049 licence: 9050 allOf: 9051 - $ref: '#/components/schemas/VideoConstantNumber-Licence' 9052 description: licence under which the video is distributed 9053 language: 9054 allOf: 9055 - $ref: '#/components/schemas/VideoConstantString-Language' 9056 description: main language used in the video 9057 privacy: 9058 allOf: 9059 - $ref: '#/components/schemas/VideoPrivacyConstant' 9060 description: privacy policy used to distribute the video 9061 truncatedDescription: 9062 type: string 9063 nullable: true 9064 example: | 9065 **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n 9066 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr... 9067 minLength: 3 9068 maxLength: 250 9069 description: | 9070 truncated description of the video, written in Markdown. 9071 duration: 9072 type: integer 9073 example: 1419 9074 format: seconds 9075 description: duration of the video in seconds 9076 aspectRatio: 9077 type: number 9078 nullable: true 9079 format: float 9080 example: 1.778 9081 description: "**PeerTube >= 6.1** Aspect ratio of the video stream" 9082 isLocal: 9083 type: boolean 9084 name: 9085 type: string 9086 description: title of the video 9087 example: What is PeerTube? 9088 minLength: 3 9089 maxLength: 120 9090 thumbnailPath: 9091 type: string 9092 example: /lazy-static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg 9093 previewPath: 9094 type: string 9095 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg 9096 embedPath: 9097 type: string 9098 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee 9099 views: 9100 type: integer 9101 example: 1337 9102 likes: 9103 type: integer 9104 example: 42 9105 dislikes: 9106 type: integer 9107 example: 7 9108 comments: 9109 description: "**PeerTube >= 7.2** Number of comments on the video" 9110 type: integer 9111 nsfw: 9112 type: boolean 9113 nsfwFlags: 9114 allOf: 9115 - $ref: '#/components/schemas/NSFWFlag' 9116 nsfwSummary: 9117 type: string 9118 description: "**PeerTube >= 7.2** More information about the sensitive content of the video" 9119 waitTranscoding: 9120 type: boolean 9121 nullable: true 9122 state: 9123 allOf: 9124 - $ref: '#/components/schemas/VideoStateConstant' 9125 description: represents the internal state of the video processing within the PeerTube instance 9126 scheduledUpdate: 9127 nullable: true 9128 allOf: 9129 - $ref: '#/components/schemas/VideoScheduledUpdate' 9130 blacklisted: 9131 nullable: true 9132 type: boolean 9133 blacklistedReason: 9134 nullable: true 9135 type: string 9136 account: 9137 $ref: '#/components/schemas/AccountSummary' 9138 channel: 9139 $ref: '#/components/schemas/VideoChannelSummary' 9140 userHistory: 9141 nullable: true 9142 type: object 9143 properties: 9144 currentTime: 9145 type: integer 9146 ServerError: 9147 properties: 9148 type: 9149 type: string 9150 example: 'https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/video_requires_password' 9151 detail: 9152 type: string 9153 example: 'Please provide a password to access this password protected video' 9154 status: 9155 type: integer 9156 example: 403 9157 code: 9158 type: string 9159 example: video_requires_password 9160 VideoDetails: 9161 allOf: 9162 - $ref: '#/components/schemas/Video' 9163 - type: object 9164 properties: 9165 viewers: 9166 type: integer 9167 description: If the video is a live, you have the amount of current viewers 9168 description: 9169 type: string 9170 nullable: true 9171 example: | 9172 "**[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n 9173 **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, 9174 based on free/libre software!*\r\n\r\n**Animation Produced by:** [LILA](https://libreart.info) - [ZeMarmot Team](https://film.zemarmot.net)\r\n 9175 *Directed by* Aryeom\r\n*Assistant* Jehan\r\n**Licence**: [CC-By-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)\r\n\r\n 9176 **Sponsored by** [Framasoft](https://framasoft.org)\r\n\r\n**Music**: [Red Step Forward](http://play.dogmazic.net/song.php?song_id=52491) - CC-By Ken Bushima\r\n\r\n 9177 **Movie Clip**: [Caminades 3: Llamigos](http://www.caminandes.com/) CC-By Blender Institute\r\n\r\n**Video sources**: https://gitlab.gnome.org/Jehan/what-is-peertube/" 9178 minLength: 3 9179 maxLength: 1000 9180 description: | 9181 full description of the video, written in Markdown. 9182 support: 9183 type: string 9184 nullable: true 9185 description: A text tell the audience how to support the video creator 9186 example: Please support our work on https://soutenir.framasoft.org/en/ <3 9187 minLength: 3 9188 maxLength: 1000 9189 channel: 9190 $ref: '#/components/schemas/VideoChannel' 9191 account: 9192 $ref: '#/components/schemas/Account' 9193 tags: 9194 example: [flowers, gardening] 9195 type: array 9196 minItems: 1 9197 maxItems: 5 9198 items: 9199 type: string 9200 minLength: 2 9201 maxLength: 30 9202 commentsPolicy: 9203 $ref: '#/components/schemas/VideoCommentsPolicyConstant' 9204 downloadEnabled: 9205 type: boolean 9206 inputFileUpdatedAt: 9207 type: string 9208 format: date-time 9209 nullable: true 9210 description: Latest input file update. Null if the file has never been replaced since the original upload 9211 trackerUrls: 9212 type: array 9213 items: 9214 type: string 9215 format: url 9216 example: 9217 - https://peertube2.cpy.re/tracker/announce 9218 - wss://peertube2.cpy.re/tracker/socket 9219 files: 9220 type: array 9221 items: 9222 $ref: '#/components/schemas/VideoFile' 9223 description: | 9224 Web compatible video files. If Web Video is disabled on the server: 9225 9226 - field will be empty 9227 - video files will be found in `streamingPlaylists[].files` field 9228 streamingPlaylists: 9229 type: array 9230 items: 9231 $ref: '#/components/schemas/VideoStreamingPlaylists' 9232 description: | 9233 HLS playlists/manifest files. If HLS is disabled on the server: 9234 9235 - field will be empty 9236 - video files will be found in `files` field 9237 FileRedundancyInformation: 9238 properties: 9239 id: 9240 $ref: '#/components/schemas/id' 9241 fileUrl: 9242 type: string 9243 format: url 9244 strategy: 9245 type: string 9246 enum: 9247 - manual 9248 - most-views 9249 - trending 9250 - recently-added 9251 size: 9252 type: integer 9253 createdAt: 9254 type: string 9255 format: date-time 9256 updatedAt: 9257 type: string 9258 format: date-time 9259 expiresOn: 9260 type: string 9261 format: date-time 9262 VideoRedundancy: 9263 properties: 9264 id: 9265 $ref: '#/components/schemas/id' 9266 name: 9267 type: string 9268 url: 9269 type: string 9270 format: url 9271 uuid: 9272 $ref: '#/components/schemas/UUIDv4' 9273 redundancies: 9274 type: object 9275 properties: 9276 streamingPlaylists: 9277 type: array 9278 items: 9279 $ref: '#/components/schemas/FileRedundancyInformation' 9280 CommentAutoTagPolicies: 9281 properties: 9282 review: 9283 type: array 9284 description: 'Auto tags that automatically set the comment in review state' 9285 items: 9286 type: string 9287 AutomaticTagAvailable: 9288 properties: 9289 available: 9290 type: array 9291 description: 'Available auto tags that can be used to filter objects or set a comment in review state' 9292 items: 9293 type: object 9294 properties: 9295 name: 9296 type: string 9297 description: tag name 9298 type: 9299 type: string 9300 enum: 9301 - 'core' 9302 - 'watched-words-list' 9303 9304 VideoImportStateConstant: 9305 properties: 9306 id: 9307 type: integer 9308 enum: 9309 - 1 9310 - 2 9311 - 3 9312 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' 9313 label: 9314 type: string 9315 example: Pending 9316 VideoCreateImport: 9317 allOf: 9318 - type: object 9319 additionalProperties: false 9320 oneOf: 9321 - properties: 9322 targetUrl: 9323 $ref: '#/components/schemas/VideoImport/properties/targetUrl' 9324 required: [targetUrl] 9325 - properties: 9326 magnetUri: 9327 $ref: '#/components/schemas/VideoImport/properties/magnetUri' 9328 required: [magnetUri] 9329 - properties: 9330 torrentfile: 9331 $ref: '#/components/schemas/VideoImport/properties/torrentfile' 9332 required: [torrentfile] 9333 - $ref: '#/components/schemas/VideoUploadRequestCommon' 9334 required: 9335 - channelId 9336 - name 9337 VideoImport: 9338 properties: 9339 id: 9340 $ref: '#/components/schemas/id' 9341 targetUrl: 9342 type: string 9343 format: url 9344 description: remote URL where to find the import's source video 9345 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d 9346 magnetUri: 9347 type: string 9348 format: uri 9349 description: magnet URI allowing to resolve the import's source video 9350 pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i 9351 torrentfile: 9352 type: string 9353 format: binary 9354 description: Torrent file containing only the video file 9355 torrentName: 9356 type: string 9357 state: 9358 allOf: 9359 - $ref: '#/components/schemas/VideoImportStateConstant' 9360 error: 9361 type: string 9362 createdAt: 9363 type: string 9364 format: date-time 9365 updatedAt: 9366 type: string 9367 format: date-time 9368 video: 9369 nullable: true 9370 allOf: 9371 - $ref: '#/components/schemas/Video' 9372 VideoImportsList: 9373 properties: 9374 total: 9375 type: integer 9376 example: 1 9377 data: 9378 type: array 9379 maxItems: 100 9380 items: 9381 $ref: '#/components/schemas/VideoImport' 9382 Abuse: 9383 properties: 9384 id: 9385 $ref: '#/components/schemas/id' 9386 reason: 9387 type: string 9388 example: The video is a spam 9389 minLength: 2 9390 maxLength: 3000 9391 predefinedReasons: 9392 $ref: '#/components/schemas/AbusePredefinedReasons' 9393 reporterAccount: 9394 $ref: '#/components/schemas/Account' 9395 state: 9396 $ref: '#/components/schemas/AbuseStateConstant' 9397 moderationComment: 9398 type: string 9399 example: Decided to ban the server since it spams us regularly 9400 minLength: 2 9401 maxLength: 3000 9402 video: 9403 type: object 9404 properties: 9405 id: 9406 type: integer 9407 uuid: 9408 $ref: '#/components/schemas/UUIDv4' 9409 shortUUID: 9410 $ref: '#/components/schemas/shortUUID' 9411 name: 9412 type: string 9413 nsfw: 9414 type: boolean 9415 startAt: 9416 type: string 9417 format: date-time 9418 endAt: 9419 type: string 9420 format: date-time 9421 deleted: 9422 type: boolean 9423 blacklisted: 9424 type: boolean 9425 thumbnailPath: 9426 type: string 9427 channel: 9428 $ref: '#/components/schemas/VideoChannel' 9429 createdAt: 9430 type: string 9431 format: date-time 9432 AbuseMessage: 9433 properties: 9434 id: 9435 $ref: '#/components/schemas/id' 9436 message: 9437 type: string 9438 minLength: 2 9439 maxLength: 3000 9440 byModerator: 9441 type: boolean 9442 createdAt: 9443 type: string 9444 format: date-time 9445 account: 9446 $ref: '#/components/schemas/AccountSummary' 9447 VideoBlacklist: 9448 properties: 9449 id: 9450 $ref: '#/components/schemas/id' 9451 videoId: 9452 $ref: '#/components/schemas/Video/properties/id' 9453 createdAt: 9454 type: string 9455 format: date-time 9456 updatedAt: 9457 type: string 9458 format: date-time 9459 name: 9460 type: string 9461 minLength: 3 9462 maxLength: 120 9463 uuid: 9464 $ref: '#/components/schemas/UUIDv4' 9465 description: 9466 type: string 9467 minLength: 3 9468 maxLength: 10000 9469 duration: 9470 type: integer 9471 views: 9472 type: integer 9473 likes: 9474 type: integer 9475 dislikes: 9476 type: integer 9477 nsfw: 9478 type: boolean 9479 VideoPlaylist: 9480 properties: 9481 id: 9482 $ref: '#/components/schemas/id' 9483 uuid: 9484 $ref: '#/components/schemas/UUIDv4' 9485 shortUUID: 9486 allOf: 9487 - $ref: '#/components/schemas/shortUUID' 9488 createdAt: 9489 type: string 9490 format: date-time 9491 updatedAt: 9492 type: string 9493 format: date-time 9494 description: 9495 type: string 9496 minLength: 3 9497 maxLength: 1000 9498 displayName: 9499 type: string 9500 minLength: 1 9501 maxLength: 120 9502 isLocal: 9503 type: boolean 9504 videoLength: 9505 type: integer 9506 minimum: 0 9507 thumbnailPath: 9508 type: string 9509 privacy: 9510 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant' 9511 type: 9512 $ref: '#/components/schemas/VideoPlaylistTypeConstant' 9513 ownerAccount: 9514 $ref: '#/components/schemas/AccountSummary' 9515 videoChannel: 9516 $ref: '#/components/schemas/VideoChannelSummary' 9517 videoChannelPosition: 9518 type: integer 9519 minimum: 1 9520 description: Position of the playlist in the channel 9521 VideoComment: 9522 properties: 9523 id: 9524 $ref: '#/components/schemas/id' 9525 url: 9526 type: string 9527 format: url 9528 text: 9529 type: string 9530 format: html 9531 description: Text of the comment 9532 minLength: 1 9533 example: This video is wonderful! 9534 threadId: 9535 $ref: '#/components/schemas/id' 9536 inReplyToCommentId: 9537 nullable: true 9538 allOf: 9539 - $ref: '#/components/schemas/id' 9540 videoId: 9541 $ref: '#/components/schemas/Video/properties/id' 9542 createdAt: 9543 type: string 9544 format: date-time 9545 updatedAt: 9546 type: string 9547 format: date-time 9548 deletedAt: 9549 nullable: true 9550 type: string 9551 format: date-time 9552 default: null 9553 isDeleted: 9554 type: boolean 9555 default: false 9556 heldForReview: 9557 type: boolean 9558 totalRepliesFromVideoAuthor: 9559 type: integer 9560 minimum: 0 9561 totalReplies: 9562 type: integer 9563 minimum: 0 9564 account: 9565 $ref: '#/components/schemas/Account' 9566 VideoCommentThreadTree: 9567 properties: 9568 comment: 9569 $ref: '#/components/schemas/VideoComment' 9570 children: 9571 type: array 9572 items: 9573 $ref: '#/components/schemas/VideoCommentThreadTree' 9574 VideoCommentForOwnerOrAdmin: 9575 properties: 9576 id: 9577 $ref: '#/components/schemas/id' 9578 url: 9579 $ref: '#/components/schemas/VideoComment/properties/url' 9580 text: 9581 $ref: '#/components/schemas/VideoComment/properties/text' 9582 heldForReview: 9583 $ref: '#/components/schemas/VideoComment/properties/heldForReview' 9584 threadId: 9585 $ref: '#/components/schemas/VideoComment/properties/threadId' 9586 inReplyToCommentId: 9587 $ref: '#/components/schemas/VideoComment/properties/inReplyToCommentId' 9588 createdAt: 9589 $ref: '#/components/schemas/VideoComment/properties/createdAt' 9590 updatedAt: 9591 $ref: '#/components/schemas/VideoComment/properties/updatedAt' 9592 account: 9593 $ref: '#/components/schemas/VideoComment/properties/account' 9594 video: 9595 $ref: '#/components/schemas/VideoInfo' 9596 automaticTags: 9597 type: array 9598 items: 9599 type: string 9600 9601 Storyboard: 9602 properties: 9603 storyboardPath: 9604 description: Deprecated in PeerTube v8.0, use fileUrl instead 9605 deprecated: true 9606 type: string 9607 fileUrl: 9608 description: "**PeerTube >= 7.1**" 9609 type: string 9610 totalHeight: 9611 type: integer 9612 totalWidth: 9613 type: integer 9614 spriteHeight: 9615 type: integer 9616 spriteWidth: 9617 type: integer 9618 spriteDuration: 9619 type: integer 9620 9621 VideoCaption: 9622 properties: 9623 language: 9624 $ref: '#/components/schemas/VideoConstantString-Language' 9625 automaticallyGenerated: 9626 type: boolean 9627 captionPath: 9628 type: string 9629 deprecated: true 9630 description: Deprecated in PeerTube v8.0, use fileUrl instead 9631 fileUrl: 9632 description: "**PeerTube >= 7.1**" 9633 type: string 9634 m3u8Url: 9635 type: string 9636 updatedAt: 9637 type: string 9638 format: date-time 9639 9640 VideoChapters: 9641 properties: 9642 chapters: 9643 type: object 9644 properties: 9645 title: 9646 type: string 9647 timecode: 9648 type: integer 9649 VideoSource: 9650 properties: 9651 inputFilename: 9652 type: string 9653 description: 'Uploaded/imported filename' 9654 fileDownloadUrl: 9655 type: string 9656 description: "**PeerTube >= 6.1** If enabled by the admin, the video source file is kept on the server and can be downloaded by the owner" 9657 resolution: 9658 description: "**PeerTube >= 6.1**" 9659 allOf: 9660 - $ref: '#/components/schemas/VideoResolutionConstant' 9661 size: 9662 type: integer 9663 description: "**PeerTube >= 6.1** Video file size in bytes" 9664 fps: 9665 type: number 9666 description: "**PeerTube >= 6.1** Frames per second of the video file" 9667 width: 9668 type: integer 9669 description: "**PeerTube >= 6.1** Video stream width" 9670 height: 9671 type: integer 9672 description: "**PeerTube >= 6.1** Video stream height" 9673 createdAt: 9674 type: string 9675 format: date-time 9676 ActorImage: 9677 properties: 9678 path: 9679 description: Deprecated in PeerTube v8.0, use fileUrl instead 9680 deprecated: true 9681 type: string 9682 fileUrl: 9683 description: "**PeerTube >= 7.1**" 9684 type: string 9685 width: 9686 type: integer 9687 height: 9688 type: integer 9689 description: "**PeerTube >= 7.3**" 9690 createdAt: 9691 type: string 9692 format: date-time 9693 updatedAt: 9694 type: string 9695 format: date-time 9696 ActorInfo: 9697 properties: 9698 id: 9699 $ref: '#/components/schemas/id' 9700 name: 9701 type: string 9702 displayName: 9703 type: string 9704 host: 9705 type: string 9706 format: hostname 9707 avatars: 9708 type: array 9709 items: 9710 $ref: '#/components/schemas/ActorImage' 9711 Actor: 9712 properties: 9713 id: 9714 $ref: '#/components/schemas/id' 9715 url: 9716 type: string 9717 format: url 9718 name: 9719 description: immutable name of the actor, used to find or mention it 9720 allOf: 9721 - $ref: '#/components/schemas/username' 9722 avatars: 9723 type: array 9724 items: 9725 $ref: '#/components/schemas/ActorImage' 9726 host: 9727 type: string 9728 format: hostname 9729 description: server on which the actor is resident 9730 hostRedundancyAllowed: 9731 type: boolean 9732 nullable: true 9733 description: whether this actor's host allows redundancy of its videos 9734 followingCount: 9735 type: integer 9736 minimum: 0 9737 description: number of actors subscribed to by this actor, as seen by this instance 9738 followersCount: 9739 type: integer 9740 minimum: 0 9741 description: number of followers of this actor, as seen by this instance 9742 createdAt: 9743 type: string 9744 format: date-time 9745 updatedAt: 9746 type: string 9747 format: date-time 9748 Account: 9749 allOf: 9750 - $ref: '#/components/schemas/Actor' 9751 - properties: 9752 userId: 9753 description: object id for the user tied to this account 9754 nullable: true 9755 allOf: 9756 - $ref: '#/components/schemas/User/properties/id' 9757 displayName: 9758 type: string 9759 description: editable name of the account, displayed in its representations 9760 minLength: 3 9761 maxLength: 120 9762 description: 9763 type: string 9764 nullable: true 9765 description: text or bio displayed on the account's profile 9766 UserViewingVideo: 9767 required: 9768 - currentTime 9769 properties: 9770 currentTime: 9771 type: integer 9772 format: seconds 9773 description: timestamp within the video, in seconds 9774 example: 5 9775 viewEvent: 9776 type: string 9777 enum: 9778 - seek 9779 description: > 9780 Event since last viewing call: 9781 * `seek` - If the user seeked the video 9782 sessionId: 9783 type: string 9784 description: > 9785 Optional param to represent the current viewer session. 9786 Used by the backend to properly count one view per session per video. 9787 PeerTube admin can configure the server to not trust this `sessionId` parameter but use the request IP address instead to identify a viewer. 9788 client: 9789 type: string 9790 description: > 9791 Client software used to watch the video. For example "Firefox", "PeerTube Approval Android", etc. 9792 device: 9793 description: > 9794 Device used to watch the video. For example "desktop", "mobile", "smarttv", etc. 9795 allOf: 9796 - $ref: '#/components/schemas/VideoStatsUserAgentDevice' 9797 operatingSystem: 9798 type: string 9799 description: > 9800 Operating system used to watch the video. For example "Windows", "Ubuntu", etc. 9801 9802 VideoStatsOverall: 9803 properties: 9804 averageWatchTime: 9805 type: number 9806 totalWatchTime: 9807 type: number 9808 viewersPeak: 9809 type: number 9810 totalViewers: 9811 type: number 9812 viewersPeakDate: 9813 type: string 9814 format: date-time 9815 countries: 9816 type: array 9817 items: 9818 type: object 9819 properties: 9820 isoCode: 9821 type: string 9822 viewers: 9823 type: number 9824 subdivisions: 9825 type: array 9826 items: 9827 type: object 9828 properties: 9829 name: 9830 type: string 9831 viewers: 9832 type: number 9833 9834 VideoStatsUserAgentDevice: 9835 enum: 9836 - 'console' 9837 - 'embedded' 9838 - 'mobile' 9839 - 'smarttv' 9840 - 'tablet' 9841 - 'wearable' 9842 - 'xr' 9843 - 'desktop' 9844 9845 VideoStatsUserAgent: 9846 properties: 9847 clients: 9848 type: array 9849 items: 9850 type: object 9851 properties: 9852 name: 9853 type: string 9854 viewers: 9855 type: number 9856 devices: 9857 type: array 9858 items: 9859 type: object 9860 properties: 9861 name: 9862 $ref: '#/components/schemas/VideoStatsUserAgentDevice' 9863 viewers: 9864 type: number 9865 operatingSystem: 9866 type: array 9867 items: 9868 type: object 9869 properties: 9870 name: 9871 type: string 9872 viewers: 9873 type: number 9874 9875 VideoStatsRetention: 9876 properties: 9877 data: 9878 type: array 9879 items: 9880 type: object 9881 properties: 9882 second: 9883 type: number 9884 retentionPercent: 9885 type: number 9886 9887 VideoStatsTimeserie: 9888 properties: 9889 data: 9890 type: array 9891 items: 9892 type: object 9893 properties: 9894 date: 9895 type: string 9896 value: 9897 type: number 9898 9899 ServerConfig: 9900 properties: 9901 instance: 9902 type: object 9903 properties: 9904 name: 9905 type: string 9906 shortDescription: 9907 type: string 9908 defaultClientRoute: 9909 type: string 9910 isNSFW: 9911 type: boolean 9912 defaultNSFWPolicy: 9913 type: string 9914 serverCountry: 9915 type: string 9916 defaultLanguage: 9917 type: string 9918 support: 9919 type: object 9920 properties: 9921 text: 9922 type: string 9923 social: 9924 type: object 9925 properties: 9926 externalLink: 9927 type: string 9928 mastodonLink: 9929 type: string 9930 blueskyLink: 9931 type: string 9932 xLink: 9933 type: string 9934 customizations: 9935 type: object 9936 properties: 9937 javascript: 9938 type: string 9939 css: 9940 type: string 9941 avatars: 9942 type: array 9943 items: 9944 $ref: '#/components/schemas/ActorImage' 9945 banners: 9946 type: array 9947 items: 9948 $ref: '#/components/schemas/ActorImage' 9949 search: 9950 type: object 9951 properties: 9952 remoteUri: 9953 type: object 9954 properties: 9955 users: 9956 type: boolean 9957 anonymous: 9958 type: boolean 9959 plugin: 9960 type: object 9961 properties: 9962 registered: 9963 type: array 9964 items: 9965 type: string 9966 theme: 9967 type: object 9968 properties: 9969 registered: 9970 type: array 9971 items: 9972 type: string 9973 email: 9974 type: object 9975 properties: 9976 enabled: 9977 type: boolean 9978 contactForm: 9979 type: object 9980 properties: 9981 enabled: 9982 type: boolean 9983 serverVersion: 9984 type: string 9985 serverCommit: 9986 type: string 9987 signup: 9988 type: object 9989 properties: 9990 allowed: 9991 type: boolean 9992 allowedForCurrentIP: 9993 type: boolean 9994 requiresEmailVerification: 9995 type: boolean 9996 transcoding: 9997 type: object 9998 properties: 9999 hls: 10000 type: object 10001 properties: 10002 enabled: 10003 type: boolean 10004 web_videos: 10005 type: object 10006 properties: 10007 enabled: 10008 type: boolean 10009 enabledResolutions: 10010 type: array 10011 items: 10012 $ref: '#/components/schemas/VideoResolutionSet' 10013 import: 10014 type: object 10015 properties: 10016 videos: 10017 type: object 10018 properties: 10019 http: 10020 type: object 10021 properties: 10022 enabled: 10023 type: boolean 10024 torrent: 10025 type: object 10026 properties: 10027 enabled: 10028 type: boolean 10029 videoChannelSynchronization: 10030 type: object 10031 properties: 10032 enabled: 10033 type: boolean 10034 users: 10035 type: object 10036 properties: 10037 enabled: 10038 type: boolean 10039 export: 10040 type: object 10041 properties: 10042 users: 10043 type: object 10044 properties: 10045 enabled: 10046 type: boolean 10047 exportExpiration: 10048 type: number 10049 description: In milliseconds 10050 maxUserVideoQuota: 10051 type: number 10052 description: In bytes 10053 autoBlacklist: 10054 type: object 10055 properties: 10056 videos: 10057 type: object 10058 properties: 10059 ofUsers: 10060 type: object 10061 properties: 10062 enabled: 10063 type: boolean 10064 avatar: 10065 type: object 10066 properties: 10067 file: 10068 type: object 10069 properties: 10070 size: 10071 type: object 10072 properties: 10073 max: 10074 type: integer 10075 extensions: 10076 type: array 10077 items: 10078 type: string 10079 video: 10080 type: object 10081 properties: 10082 image: 10083 type: object 10084 properties: 10085 extensions: 10086 type: array 10087 items: 10088 type: string 10089 size: 10090 type: object 10091 properties: 10092 max: 10093 type: integer 10094 file: 10095 type: object 10096 properties: 10097 extensions: 10098 type: array 10099 items: 10100 type: string 10101 videoCaption: 10102 type: object 10103 properties: 10104 file: 10105 type: object 10106 properties: 10107 size: 10108 type: object 10109 properties: 10110 max: 10111 type: integer 10112 extensions: 10113 type: array 10114 items: 10115 type: string 10116 user: 10117 type: object 10118 properties: 10119 videoQuota: 10120 type: integer 10121 description: In bytes 10122 example: 16810141515 10123 videoQuotaDaily: 10124 type: integer 10125 description: In bytes 10126 example: 1681014151 10127 trending: 10128 type: object 10129 properties: 10130 videos: 10131 type: object 10132 properties: 10133 intervalDays: 10134 type: integer 10135 tracker: 10136 type: object 10137 properties: 10138 enabled: 10139 type: boolean 10140 followings: 10141 type: object 10142 properties: 10143 instance: 10144 type: object 10145 properties: 10146 autoFollowIndex: 10147 type: object 10148 properties: 10149 indexUrl: 10150 type: string 10151 format: url 10152 federation: 10153 type: object 10154 properties: 10155 enabled: 10156 type: boolean 10157 homepage: 10158 type: object 10159 properties: 10160 enabled: 10161 type: boolean 10162 10163 openTelemetry: 10164 type: object 10165 description: 'PeerTube >= 6.1' 10166 properties: 10167 metrics: 10168 type: object 10169 properties: 10170 enabled: 10171 type: boolean 10172 playbackStatsInterval: 10173 type: number 10174 description: 'Milliseconds' 10175 10176 views: 10177 type: object 10178 description: 'PeerTube >= 6.1' 10179 properties: 10180 views: 10181 type: object 10182 properties: 10183 watchingInterval: 10184 type: object 10185 properties: 10186 anonymous: 10187 type: number 10188 description: 'Milliseconds' 10189 users: 10190 type: number 10191 description: 'Milliseconds' 10192 10193 SendClientLog: 10194 properties: 10195 message: 10196 type: string 10197 url: 10198 type: string 10199 description: URL of the current user page 10200 level: 10201 enum: 10202 - error 10203 - warn 10204 stackTrace: 10205 type: string 10206 description: Stack trace of the error if there is one 10207 userAgent: 10208 type: string 10209 description: User agent of the web browser that sends the message 10210 meta: 10211 type: string 10212 description: Additional information regarding this log 10213 required: 10214 - message 10215 - url 10216 - level 10217 10218 ServerStats: 10219 properties: 10220 totalUsers: 10221 type: number 10222 totalDailyActiveUsers: 10223 type: number 10224 totalWeeklyActiveUsers: 10225 type: number 10226 totalMonthlyActiveUsers: 10227 type: number 10228 totalModerators: 10229 type: number 10230 description: "**PeerTube >= 6.1** Value is null if the admin disabled total moderators stats" 10231 totalAdmins: 10232 type: number 10233 description: "**PeerTube >= 6.1** Value is null if the admin disabled total admins stats" 10234 totalLocalVideos: 10235 type: number 10236 totalLocalVideoViews: 10237 type: number 10238 description: Total video views made on the instance 10239 totalLocalVideoComments: 10240 type: number 10241 description: Total comments made by local users 10242 totalLocalVideoFilesSize: 10243 type: number 10244 totalVideos: 10245 type: number 10246 totalVideoComments: 10247 type: number 10248 totalLocalVideoChannels: 10249 type: number 10250 totalLocalDailyActiveVideoChannels: 10251 type: number 10252 totalLocalWeeklyActiveVideoChannels: 10253 type: number 10254 totalLocalMonthlyActiveVideoChannels: 10255 type: number 10256 totalLocalPlaylists: 10257 type: number 10258 totalInstanceFollowers: 10259 type: number 10260 totalInstanceFollowing: 10261 type: number 10262 videosRedundancy: 10263 type: array 10264 items: 10265 type: object 10266 properties: 10267 strategy: 10268 type: string 10269 totalSize: 10270 type: number 10271 totalUsed: 10272 type: number 10273 totalVideoFiles: 10274 type: number 10275 totalVideos: 10276 type: number 10277 totalActivityPubMessagesProcessed: 10278 type: number 10279 totalActivityPubMessagesSuccesses: 10280 type: number 10281 totalActivityPubMessagesErrors: 10282 type: number 10283 10284 activityPubMessagesProcessedPerSecond: 10285 type: number 10286 totalActivityPubMessagesWaiting: 10287 type: number 10288 10289 averageRegistrationRequestResponseTimeMs: 10290 type: number 10291 description: "**PeerTube >= 6.1** Value is null if the admin disabled registration requests stats" 10292 totalRegistrationRequestsProcessed: 10293 type: number 10294 description: "**PeerTube >= 6.1** Value is null if the admin disabled registration requests stats" 10295 totalRegistrationRequests: 10296 type: number 10297 description: "**PeerTube >= 6.1** Value is null if the admin disabled registration requests stats" 10298 10299 averageAbuseResponseTimeMs: 10300 type: number 10301 description: "**PeerTube >= 6.1** Value is null if the admin disabled abuses stats" 10302 totalAbusesProcessed: 10303 type: number 10304 description: "**PeerTube >= 6.1** Value is null if the admin disabled abuses stats" 10305 totalAbuses: 10306 type: number 10307 description: "**PeerTube >= 6.1** Value is null if the admin disabled abuses stats" 10308 10309 ServerConfigAbout: 10310 properties: 10311 instance: 10312 type: object 10313 properties: 10314 name: 10315 type: string 10316 shortDescription: 10317 type: string 10318 description: 10319 type: string 10320 terms: 10321 type: string 10322 codeOfConduct: 10323 type: string 10324 hardwareInformation: 10325 type: string 10326 creationReason: 10327 type: string 10328 moderationInformation: 10329 type: string 10330 administrator: 10331 type: string 10332 maintenanceLifetime: 10333 type: string 10334 businessModel: 10335 type: string 10336 languages: 10337 type: array 10338 items: 10339 type: string 10340 categories: 10341 type: array 10342 items: 10343 type: integer 10344 avatars: 10345 type: array 10346 items: 10347 $ref: '#/components/schemas/ActorImage' 10348 banners: 10349 type: array 10350 items: 10351 $ref: '#/components/schemas/ActorImage' 10352 ServerConfigCustom: 10353 properties: 10354 instance: 10355 type: object 10356 properties: 10357 name: 10358 type: string 10359 shortDescription: 10360 type: string 10361 description: 10362 type: string 10363 terms: 10364 type: string 10365 codeOfConduct: 10366 type: string 10367 creationReason: 10368 type: string 10369 moderationInformation: 10370 type: string 10371 administrator: 10372 type: string 10373 maintenanceLifetime: 10374 type: string 10375 businessModel: 10376 type: string 10377 hardwareInformation: 10378 type: string 10379 languages: 10380 type: array 10381 items: 10382 type: string 10383 categories: 10384 type: array 10385 items: 10386 type: number 10387 isNSFW: 10388 type: boolean 10389 defaultNSFWPolicy: 10390 type: string 10391 serverCountry: 10392 type: string 10393 support: 10394 type: object 10395 properties: 10396 text: 10397 type: string 10398 social: 10399 type: object 10400 properties: 10401 externalLink: 10402 type: string 10403 mastodonLink: 10404 type: string 10405 blueskyLink: 10406 type: string 10407 xLink: 10408 type: string 10409 defaultClientRoute: 10410 type: string 10411 customizations: 10412 type: object 10413 properties: 10414 javascript: 10415 type: string 10416 css: 10417 type: string 10418 theme: 10419 type: object 10420 properties: 10421 default: 10422 type: string 10423 services: 10424 type: object 10425 properties: 10426 twitter: 10427 type: object 10428 properties: 10429 username: 10430 type: string 10431 cache: 10432 type: object 10433 properties: 10434 previews: 10435 type: object 10436 properties: 10437 size: 10438 type: integer 10439 captions: 10440 type: object 10441 properties: 10442 size: 10443 type: integer 10444 signup: 10445 type: object 10446 properties: 10447 enabled: 10448 type: boolean 10449 limit: 10450 type: integer 10451 requiresEmailVerification: 10452 type: boolean 10453 admin: 10454 type: object 10455 properties: 10456 email: 10457 type: string 10458 format: email 10459 contactForm: 10460 type: object 10461 properties: 10462 enabled: 10463 type: boolean 10464 user: 10465 type: object 10466 description: Settings that apply to new users, if registration is enabled 10467 properties: 10468 videoQuota: 10469 type: integer 10470 example: 16810141515 10471 videoQuotaDaily: 10472 type: integer 10473 example: 1681014151 10474 transcoding: 10475 type: object 10476 description: Settings pertaining to transcoding jobs 10477 properties: 10478 enabled: 10479 type: boolean 10480 originalFile: 10481 type: object 10482 properties: 10483 keep: 10484 type: boolean 10485 allowAdditionalExtensions: 10486 type: boolean 10487 description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos 10488 allowAudioFiles: 10489 type: boolean 10490 description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file 10491 threads: 10492 type: integer 10493 description: Amount of threads used by ffmpeg for 1 transcoding job 10494 concurrency: 10495 type: number 10496 description: Amount of transcoding jobs to execute in parallel 10497 profile: 10498 type: string 10499 enum: 10500 - default 10501 description: | 10502 New profiles can be added by plugins ; available in core PeerTube: 'default'. 10503 resolutions: 10504 type: object 10505 description: Resolutions to transcode _new videos_ to 10506 properties: 10507 0p: 10508 type: boolean 10509 144p: 10510 type: boolean 10511 240p: 10512 type: boolean 10513 360p: 10514 type: boolean 10515 480p: 10516 type: boolean 10517 720p: 10518 type: boolean 10519 1080p: 10520 type: boolean 10521 1440p: 10522 type: boolean 10523 2160p: 10524 type: boolean 10525 web_videos: 10526 type: object 10527 description: Web Video specific settings 10528 properties: 10529 enabled: 10530 type: boolean 10531 hls: 10532 type: object 10533 description: HLS specific settings 10534 properties: 10535 enabled: 10536 type: boolean 10537 splitAudioAndVideo: 10538 type: boolean 10539 import: 10540 type: object 10541 properties: 10542 videos: 10543 type: object 10544 properties: 10545 http: 10546 type: object 10547 properties: 10548 enabled: 10549 type: boolean 10550 torrent: 10551 type: object 10552 properties: 10553 enabled: 10554 type: boolean 10555 video_channel_synchronization: 10556 type: object 10557 properties: 10558 enabled: 10559 type: boolean 10560 autoBlacklist: 10561 type: object 10562 properties: 10563 videos: 10564 type: object 10565 properties: 10566 ofUsers: 10567 type: object 10568 properties: 10569 enabled: 10570 type: boolean 10571 followers: 10572 type: object 10573 properties: 10574 instance: 10575 type: object 10576 properties: 10577 enabled: 10578 type: boolean 10579 manualApproval: 10580 type: boolean 10581 storyboard: 10582 type: object 10583 properties: 10584 enabled: 10585 type: boolean 10586 defaults: 10587 type: object 10588 properties: 10589 publish: 10590 type: object 10591 properties: 10592 downloadEnabled: 10593 type: boolean 10594 commentsPolicy: 10595 $ref: '#/components/schemas/VideoCommentsPolicySet' 10596 privacy: 10597 $ref: '#/components/schemas/VideoPrivacySet' 10598 licence: 10599 $ref: '#/components/schemas/VideoLicenceSet' 10600 p2p: 10601 type: object 10602 properties: 10603 webapp: 10604 type: object 10605 properties: 10606 enabled: 10607 type: boolean 10608 embed: 10609 type: object 10610 properties: 10611 enabled: 10612 type: boolean 10613 player: 10614 type: object 10615 properties: 10616 autoPlay: 10617 type: boolean 10618 10619 CustomHomepage: 10620 properties: 10621 content: 10622 type: string 10623 10624 Follow: 10625 properties: 10626 id: 10627 $ref: '#/components/schemas/id' 10628 follower: 10629 $ref: '#/components/schemas/Actor' 10630 following: 10631 $ref: '#/components/schemas/Actor' 10632 score: 10633 type: number 10634 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`. 10635 state: 10636 type: string 10637 enum: 10638 - pending 10639 - accepted 10640 createdAt: 10641 type: string 10642 format: date-time 10643 updatedAt: 10644 type: string 10645 format: date-time 10646 10647 PredefinedAbuseReasons: 10648 description: Reason categories that help triage reports 10649 type: array 10650 maxItems: 8 10651 items: 10652 type: string 10653 enum: 10654 - violentOrAbusive 10655 - hatefulOrAbusive 10656 - spamOrMisleading 10657 - privacy 10658 - rights 10659 - serverRules 10660 - thumbnails 10661 - captions 10662 10663 Job: 10664 properties: 10665 id: 10666 $ref: '#/components/schemas/id' 10667 state: 10668 type: string 10669 enum: 10670 - active 10671 - completed 10672 - failed 10673 - waiting 10674 - delayed 10675 type: 10676 type: string 10677 enum: 10678 - activitypub-http-unicast 10679 - activitypub-http-broadcast 10680 - activitypub-http-fetcher 10681 - activitypub-follow 10682 - video-file-import 10683 - video-transcoding 10684 - email 10685 - video-import 10686 - videos-views-stats 10687 - activitypub-refresher 10688 - video-redundancy 10689 - video-channel-import 10690 data: 10691 type: object 10692 additionalProperties: true 10693 error: 10694 type: object 10695 additionalProperties: true 10696 createdAt: 10697 type: string 10698 format: date-time 10699 finishedOn: 10700 type: string 10701 format: date-time 10702 processedOn: 10703 type: string 10704 format: date-time 10705 AddUserResponse: 10706 properties: 10707 user: 10708 type: object 10709 properties: 10710 id: 10711 $ref: '#/components/schemas/id' 10712 account: 10713 type: object 10714 properties: 10715 id: 10716 $ref: '#/components/schemas/id' 10717 10718 VideoUploadRequestCommon: 10719 properties: 10720 name: 10721 description: Video name 10722 type: string 10723 example: What is PeerTube? 10724 minLength: 3 10725 maxLength: 120 10726 channelId: 10727 description: Channel id that will contain this video 10728 type: integer 10729 example: 3 10730 minimum: 1 10731 privacy: 10732 $ref: '#/components/schemas/VideoPrivacySet' 10733 category: 10734 $ref: '#/components/schemas/VideoCategorySet' 10735 licence: 10736 $ref: '#/components/schemas/VideoLicenceSet' 10737 language: 10738 $ref: '#/components/schemas/VideoLanguageSet' 10739 description: 10740 description: Video description 10741 type: string 10742 example: | 10743 **[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)** 10744 waitTranscoding: 10745 description: Whether or not we wait transcoding before publish the video 10746 type: boolean 10747 generateTranscription: 10748 description: "**PeerTube >= 6.2** If enabled by the admin, automatically generate a subtitle of the video" 10749 type: boolean 10750 support: 10751 description: A text tell the audience how to support the video creator 10752 example: Please support our work on https://soutenir.framasoft.org/en/ <3 10753 type: string 10754 nsfw: 10755 description: Whether or not this video contains sensitive content 10756 type: boolean 10757 nsfwSummary: 10758 description: More information about the sensitive content of the video 10759 nsfwFlags: 10760 $ref: '#/components/schemas/NSFWFlag' 10761 tags: 10762 description: Video tags (maximum 5 tags each between 2 and 30 characters) 10763 type: array 10764 minItems: 1 10765 maxItems: 5 10766 uniqueItems: true 10767 example: 10768 - framasoft 10769 - peertube 10770 items: 10771 type: string 10772 minLength: 2 10773 maxLength: 30 10774 commentsPolicy: 10775 $ref: '#/components/schemas/VideoCommentsPolicySet' 10776 downloadEnabled: 10777 description: Enable or disable downloading for this video 10778 type: boolean 10779 originallyPublishedAt: 10780 description: Date when the content was originally published 10781 type: string 10782 format: date-time 10783 scheduleUpdate: 10784 $ref: '#/components/schemas/VideoScheduledUpdate' 10785 thumbnailfile: 10786 description: Video thumbnail file 10787 type: string 10788 format: binary 10789 previewfile: 10790 description: Video preview file 10791 type: string 10792 format: binary 10793 videoPasswords: 10794 $ref: '#/components/schemas/AddVideoPasswords' 10795 required: 10796 - channelId 10797 - name 10798 VideoUploadRequestLegacy: 10799 allOf: 10800 - $ref: '#/components/schemas/VideoUploadRequestCommon' 10801 - type: object 10802 required: 10803 - videofile 10804 properties: 10805 videofile: 10806 description: Video file 10807 type: string 10808 format: binary 10809 VideoUploadRequestResumable: 10810 allOf: 10811 - $ref: '#/components/schemas/VideoUploadRequestCommon' 10812 - type: object 10813 required: 10814 - filename 10815 properties: 10816 filename: 10817 description: Video filename including extension 10818 type: string 10819 format: filename 10820 example: what_is_peertube.mp4 10821 thumbnailfile: 10822 description: Video thumbnail file 10823 type: string 10824 format: binary 10825 previewfile: 10826 description: Video preview file 10827 type: string 10828 format: binary 10829 VideoUploadResponse: 10830 properties: 10831 video: 10832 type: object 10833 properties: 10834 id: 10835 $ref: '#/components/schemas/Video/properties/id' 10836 uuid: 10837 $ref: '#/components/schemas/Video/properties/uuid' 10838 shortUUID: 10839 $ref: '#/components/schemas/Video/properties/shortUUID' 10840 VideoReplaceSourceRequestResumable: 10841 properties: 10842 filename: 10843 description: Video filename including extension 10844 type: string 10845 format: filename 10846 example: what_is_peertube.mp4 10847 UserImportResumable: 10848 properties: 10849 filename: 10850 description: Archive filename including extension 10851 type: string 10852 format: filename 10853 example: "user-export-6-2024-02-09T10_12_11.682Z" 10854 CommentThreadResponse: 10855 properties: 10856 total: 10857 type: integer 10858 description: Total threads (included deleted ones) on this video 10859 totalNotDeletedComments: 10860 type: integer 10861 description: Total not-deleted threads (included deleted ones) on this video 10862 data: 10863 type: array 10864 maxItems: 100 10865 items: 10866 $ref: '#/components/schemas/VideoComment' 10867 CommentThreadPostResponse: 10868 properties: 10869 comment: 10870 $ref: '#/components/schemas/VideoComment' 10871 VideoTokenResponse: 10872 properties: 10873 files: 10874 type: object 10875 properties: 10876 token: 10877 type: string 10878 expires: 10879 type: string 10880 format: date-time 10881 VideoListResponse: 10882 properties: 10883 total: 10884 type: integer 10885 example: 1 10886 data: 10887 type: array 10888 maxItems: 100 10889 items: 10890 $ref: '#/components/schemas/Video' 10891 10892 ChannelActivityListResponse: 10893 properties: 10894 total: 10895 type: integer 10896 example: 1 10897 data: 10898 type: array 10899 items: 10900 type: object 10901 properties: 10902 id: 10903 type: integer 10904 account: 10905 nullable: true 10906 description: The account may have been deleted 10907 $ref: '#/components/schemas/AccountSummary' 10908 action: 10909 type: object 10910 properties: 10911 id: 10912 $ref: '#/components/schemas/VideoChannelActivityAction' 10913 label: 10914 type: string 10915 targetType: 10916 type: object 10917 properties: 10918 id: 10919 $ref: '#/components/schemas/VideoChannelActivityTarget' 10920 label: 10921 type: string 10922 details: 10923 type: object 10924 additionalProperties: true 10925 createdAt: 10926 type: string 10927 format: date-time 10928 channel: 10929 type: object 10930 properties: 10931 id: 10932 $ref: '#/components/schemas/id' 10933 name: 10934 type: string 10935 displayName: 10936 type: string 10937 url: 10938 type: string 10939 format: url 10940 video: 10941 nullable: true 10942 type: object 10943 properties: 10944 id: 10945 $ref: '#/components/schemas/id' 10946 name: 10947 type: string 10948 uuid: 10949 $ref: '#/components/schemas/UUIDv4' 10950 shortUUID: 10951 $ref: '#/components/schemas/shortUUID' 10952 url: 10953 type: string 10954 format: url 10955 isLive: 10956 type: boolean 10957 videoImport: 10958 nullable: true 10959 type: object 10960 properties: 10961 id: 10962 $ref: '#/components/schemas/id' 10963 name: 10964 type: string 10965 uuid: 10966 $ref: '#/components/schemas/UUIDv4' 10967 shortUUID: 10968 $ref: '#/components/schemas/shortUUID' 10969 url: 10970 type: string 10971 format: url 10972 targetUrl: 10973 type: string 10974 format: uri 10975 playlist: 10976 nullable: true 10977 type: object 10978 properties: 10979 id: 10980 $ref: '#/components/schemas/id' 10981 name: 10982 type: string 10983 uuid: 10984 $ref: '#/components/schemas/UUIDv4' 10985 shortUUID: 10986 $ref: '#/components/schemas/shortUUID' 10987 url: 10988 type: string 10989 format: url 10990 channelSync: 10991 nullable: true 10992 type: object 10993 properties: 10994 id: 10995 $ref: '#/components/schemas/id' 10996 externalChannelUrl: 10997 type: string 10998 format: uri 10999 11000 UserNotificationSettings: 11001 properties: 11002 abuseAsModerator: 11003 $ref: '#/components/schemas/NotificationSettingValue' 11004 videoAutoBlacklistAsModerator: 11005 $ref: '#/components/schemas/NotificationSettingValue' 11006 newUserRegistration: 11007 $ref: '#/components/schemas/NotificationSettingValue' 11008 11009 newVideoFromSubscription: 11010 $ref: '#/components/schemas/NotificationSettingValue' 11011 11012 blacklistOnMyVideo: 11013 $ref: '#/components/schemas/NotificationSettingValue' 11014 myVideoPublished: 11015 $ref: '#/components/schemas/NotificationSettingValue' 11016 myVideoImportFinished: 11017 $ref: '#/components/schemas/NotificationSettingValue' 11018 11019 commentMention: 11020 $ref: '#/components/schemas/NotificationSettingValue' 11021 newCommentOnMyVideo: 11022 $ref: '#/components/schemas/NotificationSettingValue' 11023 11024 newFollow: 11025 $ref: '#/components/schemas/NotificationSettingValue' 11026 newInstanceFollower: 11027 $ref: '#/components/schemas/NotificationSettingValue' 11028 autoInstanceFollowing: 11029 $ref: '#/components/schemas/NotificationSettingValue' 11030 11031 abuseStateChange: 11032 $ref: '#/components/schemas/NotificationSettingValue' 11033 abuseNewMessage: 11034 $ref: '#/components/schemas/NotificationSettingValue' 11035 11036 newPeerTubeVersion: 11037 $ref: '#/components/schemas/NotificationSettingValue' 11038 newPluginVersion: 11039 $ref: '#/components/schemas/NotificationSettingValue' 11040 11041 myVideoStudioEditionFinished: 11042 $ref: '#/components/schemas/NotificationSettingValue' 11043 11044 myVideoTranscriptionGenerated: 11045 $ref: '#/components/schemas/NotificationSettingValue' 11046 11047 User: 11048 properties: 11049 id: 11050 $ref: '#/components/schemas/id' 11051 username: 11052 $ref: '#/components/schemas/username' 11053 email: 11054 type: string 11055 format: email 11056 description: The user email 11057 emailVerified: 11058 type: boolean 11059 description: Has the user confirmed their email address? 11060 emailPublic: 11061 type: boolean 11062 description: Has the user accepted to display the email publicly? 11063 11064 nsfwPolicy: 11065 $ref: '#/components/schemas/NSFWPolicy' 11066 nsfwFlagsDisplayed: 11067 $ref: '#/components/schemas/NSFWFlag' 11068 nsfwFlagsHidden: 11069 $ref: '#/components/schemas/NSFWFlag' 11070 nsfwFlagsWarned: 11071 $ref: '#/components/schemas/NSFWFlag' 11072 nsfwFlagsBlurred: 11073 $ref: '#/components/schemas/NSFWFlag' 11074 11075 adminFlags: 11076 $ref: '#/components/schemas/UserAdminFlags' 11077 11078 autoPlayNextVideo: 11079 type: boolean 11080 description: Automatically start playing the upcoming video after the currently playing video 11081 autoPlayNextVideoPlaylist: 11082 type: boolean 11083 description: Automatically start playing the video on the playlist after the currently playing video 11084 autoPlayVideo: 11085 type: boolean 11086 description: Automatically start playing the video on the watch page 11087 11088 p2pEnabled: 11089 type: boolean 11090 description: whether to enable P2P in the player or not 11091 11092 videosHistoryEnabled: 11093 type: boolean 11094 description: whether to keep track of watched history or not 11095 videoLanguages: 11096 type: array 11097 items: 11098 type: string 11099 description: list of languages to filter videos down to 11100 language: 11101 type: string 11102 description: default language for this user 11103 11104 videoQuota: 11105 type: integer 11106 description: The user video quota in bytes 11107 example: -1 11108 videoQuotaDaily: 11109 type: integer 11110 description: The user daily video quota in bytes 11111 example: -1 11112 11113 role: 11114 type: object 11115 properties: 11116 id: 11117 $ref: '#/components/schemas/UserRole' 11118 label: 11119 type: string 11120 enum: 11121 - User 11122 - Moderator 11123 - Administrator 11124 11125 theme: 11126 type: string 11127 description: Theme enabled by this user 11128 11129 account: 11130 $ref: '#/components/schemas/Account' 11131 11132 notificationSettings: 11133 $ref: '#/components/schemas/UserNotificationSettings' 11134 11135 videoChannels: 11136 type: array 11137 items: 11138 $ref: '#/components/schemas/VideoChannel' 11139 11140 blocked: 11141 type: boolean 11142 blockedReason: 11143 type: string 11144 11145 noInstanceConfigWarningModal: 11146 type: boolean 11147 noAccountSetupWarningModal: 11148 type: boolean 11149 noWelcomeModal: 11150 type: boolean 11151 11152 createdAt: 11153 type: string 11154 11155 pluginAuth: 11156 type: string 11157 description: Auth plugin to use to authenticate the user 11158 11159 lastLoginDate: 11160 type: string 11161 format: date-time 11162 11163 twoFactorEnabled: 11164 type: boolean 11165 description: Whether the user has enabled two-factor authentication or not 11166 11167 newFeaturesInfoRead: 11168 type: number 11169 description: New features information the user has read 11170 11171 UserWithStats: 11172 allOf: 11173 - $ref: '#/components/schemas/User' 11174 - properties: 11175 # optionally present fields: they require WITH_STATS scope 11176 videosCount: 11177 type: integer 11178 description: Count of videos published 11179 abusesCount: 11180 type: integer 11181 description: Count of reports/abuses of which the user is a target 11182 abusesAcceptedCount: 11183 type: integer 11184 description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team 11185 abusesCreatedCount: 11186 type: integer 11187 description: Count of reports/abuses created by the user 11188 videoCommentsCount: 11189 type: integer 11190 description: Count of comments published 11191 AddUser: 11192 properties: 11193 username: 11194 $ref: '#/components/schemas/username' 11195 password: 11196 $ref: '#/components/schemas/password' 11197 email: 11198 type: string 11199 format: email 11200 description: The user email 11201 videoQuota: 11202 type: integer 11203 description: The user video quota in bytes 11204 example: -1 11205 videoQuotaDaily: 11206 type: integer 11207 description: The user daily video quota in bytes 11208 example: -1 11209 channelName: 11210 $ref: '#/components/schemas/usernameChannel' 11211 role: 11212 $ref: '#/components/schemas/UserRole' 11213 adminFlags: 11214 $ref: '#/components/schemas/UserAdminFlags' 11215 required: 11216 - username 11217 - password 11218 - email 11219 - role 11220 UpdateUser: 11221 properties: 11222 email: 11223 description: The updated email of the user 11224 allOf: 11225 - $ref: '#/components/schemas/User/properties/email' 11226 emailVerified: 11227 type: boolean 11228 description: Set the email as verified 11229 videoQuota: 11230 type: integer 11231 description: The updated video quota of the user in bytes 11232 videoQuotaDaily: 11233 type: integer 11234 description: The updated daily video quota of the user in bytes 11235 pluginAuth: 11236 type: string 11237 nullable: true 11238 description: The auth plugin to use to authenticate the user 11239 example: 'peertube-plugin-auth-saml2' 11240 role: 11241 $ref: '#/components/schemas/UserRole' 11242 adminFlags: 11243 $ref: '#/components/schemas/UserAdminFlags' 11244 password: 11245 $ref: '#/components/schemas/password' 11246 UpdateMe: 11247 properties: 11248 password: 11249 $ref: '#/components/schemas/password' 11250 currentPassword: 11251 $ref: '#/components/schemas/password' 11252 email: 11253 description: new email used for login and service communications 11254 allOf: 11255 - $ref: '#/components/schemas/User/properties/email' 11256 displayName: 11257 type: string 11258 description: new name of the user in its representations 11259 minLength: 3 11260 maxLength: 120 11261 nsfwPolicy: 11262 type: string 11263 description: new NSFW display policy 11264 enum: 11265 - 'true' 11266 - 'false' 11267 - both 11268 nsfwFlagsDisplayed: 11269 $ref: '#/components/schemas/NSFWFlag' 11270 nsfwFlagsHidden: 11271 $ref: '#/components/schemas/NSFWFlag' 11272 nsfwFlagsWarned: 11273 $ref: '#/components/schemas/NSFWFlag' 11274 nsfwFlagsBlurred: 11275 $ref: '#/components/schemas/NSFWFlag' 11276 p2pEnabled: 11277 type: boolean 11278 description: whether to enable P2P in the player or not 11279 autoPlayVideo: 11280 type: boolean 11281 description: new preference regarding playing videos automatically 11282 autoPlayNextVideo: 11283 type: boolean 11284 description: new preference regarding playing following videos automatically 11285 autoPlayNextVideoPlaylist: 11286 type: boolean 11287 description: new preference regarding playing following playlist videos automatically 11288 videosHistoryEnabled: 11289 type: boolean 11290 description: whether to keep track of watched history or not 11291 videoLanguages: 11292 type: array 11293 items: 11294 type: string 11295 description: list of languages to filter videos down to 11296 language: 11297 type: string 11298 description: default language for this user 11299 theme: 11300 type: string 11301 noInstanceConfigWarningModal: 11302 type: boolean 11303 noAccountSetupWarningModal: 11304 type: boolean 11305 noWelcomeModal: 11306 type: boolean 11307 GetMeVideoRating: 11308 properties: 11309 id: 11310 $ref: '#/components/schemas/id' 11311 rating: 11312 type: string 11313 enum: 11314 - like 11315 - dislike 11316 - none 11317 description: Rating of the video 11318 required: 11319 - id 11320 - rating 11321 VideoRating: 11322 properties: 11323 video: 11324 $ref: '#/components/schemas/Video' 11325 rating: 11326 type: string 11327 enum: 11328 - like 11329 - dislike 11330 - none 11331 description: Rating of the video 11332 required: 11333 - video 11334 - rating 11335 11336 RegisterUser: 11337 properties: 11338 username: 11339 description: immutable name of the user, used to find or mention its actor 11340 allOf: 11341 - $ref: '#/components/schemas/username' 11342 password: 11343 $ref: '#/components/schemas/password' 11344 email: 11345 type: string 11346 format: email 11347 description: email of the user, used for login or service communications 11348 displayName: 11349 type: string 11350 description: editable name of the user, displayed in its representations 11351 minLength: 1 11352 maxLength: 120 11353 channel: 11354 type: object 11355 description: channel base information used to create the first channel of the user 11356 properties: 11357 name: 11358 $ref: '#/components/schemas/usernameChannel' 11359 displayName: 11360 type: string 11361 required: 11362 - username 11363 - password 11364 - email 11365 11366 UserRegistrationRequest: 11367 allOf: 11368 - $ref: '#/components/schemas/RegisterUser' 11369 - type: object 11370 properties: 11371 registrationReason: 11372 type: string 11373 description: reason for the user to register on the instance 11374 required: 11375 - registrationReason 11376 11377 UserRegistrationAcceptOrReject: 11378 type: object 11379 properties: 11380 moderationResponse: 11381 type: string 11382 description: Moderation response to send to the user 11383 preventEmailDelivery: 11384 type: boolean 11385 description: Set it to true if you don't want PeerTube to send an email to the user 11386 required: 11387 - moderationResponse 11388 11389 UserRegistration: 11390 properties: 11391 id: 11392 $ref: '#/components/schemas/id' 11393 state: 11394 type: object 11395 properties: 11396 id: 11397 type: integer 11398 enum: 11399 - 1 11400 - 2 11401 - 3 11402 description: 'The registration state (Pending = `1`, Rejected = `2`, Accepted = `3`)' 11403 label: 11404 type: string 11405 registrationReason: 11406 type: string 11407 moderationResponse: 11408 type: string 11409 nullable: true 11410 username: 11411 type: string 11412 email: 11413 type: string 11414 format: email 11415 emailVerified: 11416 type: boolean 11417 accountDisplayName: 11418 type: string 11419 channelHandle: 11420 type: string 11421 channelDisplayName: 11422 type: string 11423 createdAt: 11424 type: string 11425 format: date-time 11426 updatedAt: 11427 type: string 11428 format: date-time 11429 user: 11430 type: object 11431 nullable: true 11432 description: If the registration has been accepted, this is a partial user object created by the registration 11433 properties: 11434 id: 11435 $ref: '#/components/schemas/id' 11436 11437 OAuthClient: 11438 properties: 11439 client_id: 11440 type: string 11441 pattern: /^[a-z0-9]$/ 11442 maxLength: 32 11443 minLength: 32 11444 example: v1ikx5hnfop4mdpnci8nsqh93c45rldf 11445 client_secret: 11446 type: string 11447 pattern: /^[a-zA-Z0-9]$/ 11448 maxLength: 32 11449 minLength: 32 11450 example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt 11451 OAuthToken-password: 11452 allOf: 11453 - $ref: '#/components/schemas/OAuthClient' 11454 - type: object 11455 properties: 11456 grant_type: 11457 type: string 11458 enum: 11459 - password 11460 username: 11461 $ref: '#/components/schemas/User/properties/username' 11462 password: 11463 $ref: '#/components/schemas/password' 11464 externalAuthToken: 11465 type: string 11466 description: If you want to authenticate using an external authentication token you got from an auth plugin (like `peertube-plugin-auth-openid-connect` for example) instead of a password or a refresh token, provide it here. 11467 required: 11468 - client_id 11469 - client_secret 11470 - grant_type 11471 - username 11472 OAuthToken-refresh_token: 11473 allOf: 11474 - $ref: '#/components/schemas/OAuthClient' 11475 - type: object 11476 properties: 11477 grant_type: 11478 type: string 11479 enum: 11480 - refresh_token 11481 refresh_token: 11482 type: string 11483 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7 11484 required: 11485 - client_id 11486 - client_secret 11487 - grant_type 11488 - refresh_token 11489 11490 VideoChannel: 11491 allOf: 11492 - $ref: '#/components/schemas/Actor' 11493 - type: object 11494 properties: 11495 displayName: 11496 type: string 11497 description: editable name of the channel, displayed in its representations 11498 example: Videos of Framasoft 11499 minLength: 1 11500 maxLength: 120 11501 description: 11502 type: string 11503 nullable: true 11504 example: Videos made with <3 by Framasoft 11505 minLength: 3 11506 maxLength: 1000 11507 support: 11508 type: string 11509 nullable: true 11510 description: text shown by default on all videos of this channel, to tell the audience how to support it 11511 example: Please support our work on https://soutenir.framasoft.org/en/ <3 11512 minLength: 3 11513 maxLength: 1000 11514 isLocal: 11515 type: boolean 11516 updatedAt: 11517 type: string 11518 format: date-time 11519 banners: 11520 type: array 11521 items: 11522 $ref: '#/components/schemas/ActorImage' 11523 ownerAccount: 11524 $ref: '#/components/schemas/Account' 11525 11526 VideoChannelEdit: 11527 properties: 11528 displayName: 11529 description: Channel display name 11530 description: 11531 description: Channel description 11532 support: 11533 description: How to support/fund the channel 11534 11535 VideoChannelCreate: 11536 allOf: 11537 - $ref: '#/components/schemas/VideoChannelEdit' 11538 - properties: 11539 name: 11540 description: username of the channel to create 11541 allOf: 11542 - $ref: '#/components/schemas/usernameChannel' 11543 required: 11544 - name 11545 - displayName 11546 VideoChannelUpdate: 11547 allOf: 11548 - $ref: '#/components/schemas/VideoChannelEdit' 11549 - properties: 11550 bulkVideosSupportUpdate: 11551 type: boolean 11552 description: Update the support field for all videos of this channel 11553 11554 VideoChannelList: 11555 properties: 11556 total: 11557 type: integer 11558 example: 1 11559 data: 11560 type: array 11561 items: 11562 allOf: 11563 - $ref: '#/components/schemas/VideoChannel' 11564 - $ref: '#/components/schemas/Actor' 11565 11566 ImportVideosInChannelCreate: 11567 type: object 11568 properties: 11569 externalChannelUrl: 11570 type: string 11571 example: https://youtube.com/c/UC_myfancychannel 11572 videoChannelSyncId: 11573 type: integer 11574 description: If part of a channel sync process, specify its id to assign video imports to this channel synchronization 11575 required: 11576 - 'externalChannelUrl' 11577 11578 VideoChannelSync: 11579 type: object 11580 properties: 11581 id: 11582 $ref: '#/components/schemas/id' 11583 state: 11584 type: object 11585 properties: 11586 id: 11587 type: integer 11588 example: 2 11589 label: 11590 type: string 11591 example: PROCESSING 11592 externalChannelUrl: 11593 type: string 11594 example: 'https://youtube.com/c/UC_myfancychannel' 11595 createdAt: 11596 type: string 11597 format: date-time 11598 lastSyncAt: 11599 type: string 11600 format: date-time 11601 nullable: true 11602 channel: 11603 $ref: '#/components/schemas/VideoChannel' 11604 VideoChannelSyncList: 11605 type: object 11606 properties: 11607 total: 11608 type: integer 11609 example: 1 11610 data: 11611 type: array 11612 items: 11613 allOf: 11614 - $ref: '#/components/schemas/VideoChannelSync' 11615 VideoChannelSyncCreate: 11616 type: object 11617 properties: 11618 externalChannelUrl: 11619 type: string 11620 example: https://youtube.com/c/UC_myfancychannel 11621 videoChannelId: 11622 $ref: '#/components/schemas/id' 11623 MRSSPeerLink: 11624 type: object 11625 xml: 11626 name: 'media:peerLink' 11627 properties: 11628 href: 11629 type: string 11630 xml: 11631 attribute: true 11632 type: 11633 type: string 11634 enum: 11635 - application/x-bittorrent 11636 xml: 11637 attribute: true 11638 MRSSGroupContent: 11639 type: object 11640 xml: 11641 name: 'media:content' 11642 properties: 11643 url: 11644 type: string 11645 format: url 11646 xml: 11647 attribute: true 11648 fileSize: 11649 type: integer 11650 xml: 11651 attribute: true 11652 type: 11653 type: string 11654 xml: 11655 attribute: true 11656 framerate: 11657 type: integer 11658 xml: 11659 attribute: true 11660 duration: 11661 type: integer 11662 xml: 11663 attribute: true 11664 height: 11665 type: integer 11666 xml: 11667 attribute: true 11668 lang: 11669 type: string 11670 xml: 11671 attribute: true 11672 VideoCommentsForXML: 11673 type: array 11674 xml: 11675 wrapped: true 11676 name: 'channel' 11677 items: 11678 type: object 11679 xml: 11680 name: 'item' 11681 properties: 11682 link: 11683 type: string 11684 format: url 11685 guid: 11686 type: string 11687 pubDate: 11688 type: string 11689 format: date-time 11690 'content:encoded': 11691 type: string 11692 'dc:creator': 11693 type: string 11694 VideosForXML: 11695 type: array 11696 xml: 11697 wrapped: true 11698 name: 'channel' 11699 items: 11700 type: object 11701 xml: 11702 name: 'item' 11703 properties: 11704 link: 11705 type: string 11706 format: url 11707 description: video watch page URL 11708 guid: 11709 type: string 11710 description: video canonical URL 11711 pubDate: 11712 type: string 11713 format: date-time 11714 description: video publication date 11715 description: 11716 type: string 11717 description: video description 11718 'content:encoded': 11719 type: string 11720 description: video description 11721 'dc:creator': 11722 type: string 11723 description: publisher user name 11724 'media:category': 11725 type: integer 11726 description: video category (MRSS) 11727 'media:community': 11728 type: object 11729 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS) 11730 properties: 11731 'media:statistics': 11732 type: object 11733 properties: 11734 views: 11735 type: integer 11736 xml: 11737 attribute: true 11738 'media:embed': 11739 type: object 11740 properties: 11741 url: 11742 type: string 11743 format: url 11744 description: video embed path, relative to the canonical URL domain (MRSS) 11745 xml: 11746 attribute: true 11747 'media:player': 11748 type: object 11749 properties: 11750 url: 11751 type: string 11752 format: url 11753 description: video watch path, relative to the canonical URL domain (MRSS) 11754 xml: 11755 attribute: true 11756 'media:thumbnail': 11757 type: object 11758 properties: 11759 url: 11760 type: string 11761 format: url 11762 xml: 11763 attribute: true 11764 height: 11765 type: integer 11766 xml: 11767 attribute: true 11768 width: 11769 type: integer 11770 xml: 11771 attribute: true 11772 'media:title': 11773 type: string 11774 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles. 11775 'media:description': 11776 type: string 11777 'media:rating': 11778 type: string 11779 enum: 11780 - nonadult 11781 - adult 11782 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS) 11783 'enclosure': 11784 type: object 11785 description: main streamable file for the video 11786 properties: 11787 url: 11788 type: string 11789 format: url 11790 xml: 11791 attribute: true 11792 type: 11793 type: string 11794 enum: 11795 - application/x-bittorrent 11796 xml: 11797 attribute: true 11798 length: 11799 type: integer 11800 xml: 11801 attribute: true 11802 'media:group': 11803 type: array 11804 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) 11805 items: 11806 anyOf: 11807 - $ref: '#/components/schemas/MRSSPeerLink' 11808 - $ref: '#/components/schemas/MRSSGroupContent' 11809 NotificationSettingValue: 11810 type: integer 11811 description: > 11812 Notification type. One of the following values, or a sum of multiple values: 11813 11814 - `0` NONE 11815 11816 - `1` WEB 11817 11818 - `2` EMAIL 11819 NotificationType: 11820 type: integer 11821 enum: 11822 - 1 11823 - 2 11824 - 3 11825 - 4 11826 - 5 11827 - 6 11828 - 7 11829 - 8 11830 - 9 11831 - 10 11832 - 11 11833 - 12 11834 - 13 11835 - 14 11836 - 15 11837 - 16 11838 - 17 11839 - 18 11840 - 19 11841 - 20 11842 - 21 11843 - 22 11844 description: > 11845 Notification type. One of the following values: 11846 11847 - `1` NEW_VIDEO_FROM_SUBSCRIPTION 11848 11849 - `2` NEW_COMMENT_ON_MY_VIDEO 11850 11851 - `3` NEW_ABUSE_FOR_MODERATORS 11852 11853 - `4` BLACKLIST_ON_MY_VIDEO 11854 11855 - `5` UNBLACKLIST_ON_MY_VIDEO 11856 11857 - `6` MY_VIDEO_PUBLISHED 11858 11859 - `7` MY_VIDEO_IMPORT_SUCCESS 11860 11861 - `8` MY_VIDEO_IMPORT_ERROR 11862 11863 - `9` NEW_USER_REGISTRATION 11864 11865 - `10` NEW_FOLLOW 11866 11867 - `11` COMMENT_MENTION 11868 11869 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS 11870 11871 - `13` NEW_INSTANCE_FOLLOWER 11872 11873 - `14` AUTO_INSTANCE_FOLLOWING 11874 11875 - `15` ABUSE_STATE_CHANGE 11876 11877 - `16` ABUSE_NEW_MESSAGE 11878 11879 - `17` NEW_PLUGIN_VERSION 11880 11881 - `18` NEW_PEERTUBE_VERSION 11882 11883 - `19` MY_VIDEO_STUDIO_EDITION_FINISHED 11884 11885 - `20` NEW_USER_REGISTRATION_REQUEST 11886 11887 - `21` NEW_LIVE_FROM_SUBSCRIPTION 11888 11889 - `22` MY_VIDEO_TRANSCRIPTION_GENERATED 11890 11891 NewFeatureInfoType: 11892 type: integer 11893 enum: 11894 - 1 11895 description: > 11896 Represent a new feature that can be displayed to inform users. One of the following values: 11897 11898 - `1` CHANNEL_COLLABORATION 11899 11900 Notification: 11901 properties: 11902 id: 11903 $ref: '#/components/schemas/id' 11904 type: 11905 $ref: '#/components/schemas/NotificationType' 11906 read: 11907 type: boolean 11908 video: 11909 nullable: true 11910 allOf: 11911 - $ref: '#/components/schemas/VideoInfo' 11912 - type: object 11913 properties: 11914 channel: 11915 $ref: '#/components/schemas/ActorInfo' 11916 videoImport: 11917 nullable: true 11918 type: object 11919 properties: 11920 id: 11921 $ref: '#/components/schemas/id' 11922 video: 11923 nullable: true 11924 allOf: 11925 - $ref: '#/components/schemas/VideoInfo' 11926 torrentName: 11927 type: string 11928 nullable: true 11929 magnetUri: 11930 $ref: '#/components/schemas/VideoImport/properties/magnetUri' 11931 targetUri: 11932 type: string 11933 format: uri 11934 nullable: true 11935 comment: 11936 nullable: true 11937 type: object 11938 properties: 11939 id: 11940 $ref: '#/components/schemas/id' 11941 threadId: 11942 type: integer 11943 video: 11944 $ref: '#/components/schemas/VideoInfo' 11945 account: 11946 $ref: '#/components/schemas/ActorInfo' 11947 heldForReview: 11948 type: boolean 11949 videoAbuse: 11950 nullable: true 11951 type: object 11952 properties: 11953 id: 11954 $ref: '#/components/schemas/id' 11955 video: 11956 allOf: 11957 - $ref: '#/components/schemas/VideoInfo' 11958 videoBlacklist: 11959 nullable: true 11960 type: object 11961 properties: 11962 id: 11963 $ref: '#/components/schemas/id' 11964 video: 11965 allOf: 11966 - $ref: '#/components/schemas/VideoInfo' 11967 account: 11968 nullable: true 11969 allOf: 11970 - $ref: '#/components/schemas/ActorInfo' 11971 actorFollow: 11972 type: object 11973 nullable: true 11974 properties: 11975 id: 11976 $ref: '#/components/schemas/id' 11977 follower: 11978 $ref: '#/components/schemas/ActorInfo' 11979 state: 11980 type: string 11981 enum: 11982 - pending 11983 - accepted 11984 following: 11985 type: object 11986 properties: 11987 type: 11988 type: string 11989 enum: 11990 - account 11991 - channel 11992 - instance 11993 name: 11994 type: string 11995 displayName: 11996 type: string 11997 host: 11998 type: string 11999 format: hostname 12000 createdAt: 12001 type: string 12002 format: date-time 12003 updatedAt: 12004 type: string 12005 format: date-time 12006 NotificationListResponse: 12007 properties: 12008 total: 12009 type: integer 12010 example: 1 12011 data: 12012 type: array 12013 maxItems: 100 12014 items: 12015 $ref: '#/components/schemas/Notification' 12016 Plugin: 12017 properties: 12018 name: 12019 type: string 12020 example: peertube-plugin-auth-ldap 12021 type: 12022 type: integer 12023 description: > 12024 - `1`: PLUGIN 12025 12026 - `2`: THEME 12027 enum: 12028 - 1 12029 - 2 12030 latestVersion: 12031 type: string 12032 example: 0.0.3 12033 version: 12034 type: string 12035 example: 0.0.1 12036 enabled: 12037 type: boolean 12038 uninstalled: 12039 type: boolean 12040 peertubeEngine: 12041 type: string 12042 example: 2.2.0 12043 description: 12044 type: string 12045 homepage: 12046 type: string 12047 format: url 12048 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap 12049 settings: 12050 type: object 12051 additionalProperties: true 12052 createdAt: 12053 type: string 12054 format: date-time 12055 updatedAt: 12056 type: string 12057 format: date-time 12058 PluginResponse: 12059 properties: 12060 total: 12061 type: integer 12062 example: 1 12063 data: 12064 type: array 12065 maxItems: 100 12066 items: 12067 $ref: '#/components/schemas/Plugin' 12068 12069 LiveVideoUpdate: 12070 properties: 12071 saveReplay: 12072 type: boolean 12073 replaySettings: 12074 $ref: '#/components/schemas/LiveVideoReplaySettings' 12075 permanentLive: 12076 description: User can stream multiple times in a permanent live 12077 type: boolean 12078 latencyMode: 12079 description: User can select live latency mode if enabled by the instance 12080 allOf: 12081 - $ref: '#/components/schemas/LiveVideoLatencyMode' 12082 schedules: 12083 type: array 12084 items: 12085 $ref: '#/components/schemas/LiveSchedule' 12086 12087 LiveVideoResponse: 12088 properties: 12089 rtmpUrl: 12090 type: string 12091 description: Included in the response if an appropriate token is provided 12092 rtmpsUrl: 12093 type: string 12094 description: Included in the response if an appropriate token is provided 12095 streamKey: 12096 type: string 12097 description: RTMP stream key to use to stream into this live video. Included in the response if an appropriate token is provided 12098 saveReplay: 12099 type: boolean 12100 replaySettings: 12101 $ref: '#/components/schemas/LiveVideoReplaySettings' 12102 permanentLive: 12103 description: User can stream multiple times in a permanent live 12104 type: boolean 12105 latencyMode: 12106 description: User can select live latency mode if enabled by the instance 12107 allOf: 12108 - $ref: '#/components/schemas/LiveVideoLatencyMode' 12109 schedules: 12110 type: array 12111 items: 12112 $ref: '#/components/schemas/LiveSchedule' 12113 12114 LiveSchedule: 12115 properties: 12116 startAt: 12117 type: string 12118 format: date-time 12119 description: Date when the stream is scheduled to air at 12120 12121 TokenSession: 12122 properties: 12123 id: 12124 type: integer 12125 currentSession: 12126 type: boolean 12127 description: Is this session the current one? 12128 loginDevice: 12129 type: string 12130 description: Device used to login 12131 loginIP: 12132 type: string 12133 format: ipv4 12134 description: IP address used to login 12135 loginDate: 12136 type: string 12137 format: date-time 12138 description: Date of the login 12139 lastActivityDevice: 12140 type: string 12141 lastActivityIP: 12142 type: string 12143 format: ipv4 12144 lastActivityDate: 12145 type: string 12146 format: date-time 12147 createdAt: 12148 type: string 12149 format: date-time 12150 12151 RequestTwoFactorResponse: 12152 properties: 12153 otpRequest: 12154 type: object 12155 properties: 12156 requestToken: 12157 type: string 12158 description: The token to send to confirm this request 12159 secret: 12160 type: string 12161 description: The OTP secret 12162 uri: 12163 type: string 12164 description: The OTP URI 12165 12166 VideoStudioCreateTask: 12167 type: array 12168 items: 12169 anyOf: 12170 - 12171 title: cut 12172 type: object 12173 properties: 12174 name: 12175 type: string 12176 enum: 12177 - 'cut' 12178 options: 12179 type: object 12180 properties: 12181 start: 12182 type: integer 12183 end: 12184 type: integer 12185 - 12186 title: add-intro 12187 type: object 12188 properties: 12189 name: 12190 type: string 12191 enum: 12192 - 'add-intro' 12193 options: 12194 type: object 12195 properties: 12196 file: 12197 type: string 12198 format: binary 12199 - 12200 title: add-outro 12201 type: object 12202 properties: 12203 name: 12204 type: string 12205 enum: 12206 - 'add-outro' 12207 options: 12208 type: object 12209 properties: 12210 file: 12211 type: string 12212 format: binary 12213 - 12214 title: add-watermark 12215 type: object 12216 properties: 12217 name: 12218 type: string 12219 enum: 12220 - 'add-watermark' 12221 options: 12222 type: object 12223 properties: 12224 file: 12225 type: string 12226 format: binary 12227 12228 LiveVideoSessionResponse: 12229 properties: 12230 id: 12231 type: integer 12232 startDate: 12233 type: string 12234 format: date-time 12235 description: Start date of the live session 12236 endDate: 12237 type: string 12238 format: date-time 12239 nullable: true 12240 description: End date of the live session 12241 error: 12242 type: integer 12243 enum: 12244 - 1 12245 - 2 12246 - 3 12247 - 4 12248 - 5 12249 nullable: true 12250 description: > 12251 Error type if an error occurred during the live session: 12252 - `1`: Bad socket health (transcoding is too slow) 12253 - `2`: Max duration exceeded 12254 - `3`: Quota exceeded 12255 - `4`: Quota FFmpeg error 12256 - `5`: Video has been blacklisted during the live 12257 replayVideo: 12258 type: object 12259 description: Video replay information 12260 properties: 12261 id: 12262 type: number 12263 uuid: 12264 $ref: '#/components/schemas/UUIDv4' 12265 shortUUID: 12266 $ref: '#/components/schemas/shortUUID' 12267 12268 PlaybackMetricCreate: 12269 properties: 12270 playerMode: 12271 type: string 12272 enum: 12273 - 'p2p-media-loader' 12274 - 'web-video' 12275 resolution: 12276 type: number 12277 description: Current player video resolution 12278 fps: 12279 type: number 12280 description: Current player video fps 12281 p2pEnabled: 12282 type: boolean 12283 p2pPeers: 12284 type: number 12285 description: P2P peers connected (doesn't include WebSeed peers) 12286 resolutionChanges: 12287 type: number 12288 description: How many resolution changes occurred since the last metric creation 12289 bufferStalled: 12290 type: number 12291 description: How many times buffer has been stalled since the last metric creation 12292 errors: 12293 type: number 12294 description: How many errors occurred since the last metric creation 12295 downloadedBytesP2P: 12296 type: number 12297 description: How many bytes were downloaded with P2P since the last metric creation 12298 downloadedBytesHTTP: 12299 type: number 12300 description: How many bytes were downloaded with HTTP since the last metric creation 12301 uploadedBytesP2P: 12302 type: number 12303 description: How many bytes were uploaded with P2P since the last metric creation 12304 videoId: 12305 oneOf: 12306 - $ref: '#/components/schemas/id' 12307 - $ref: '#/components/schemas/UUIDv4' 12308 - $ref: '#/components/schemas/shortUUID' 12309 required: 12310 - playerMode 12311 - resolutionChanges 12312 - errors 12313 - downloadedBytesP2P 12314 - downloadedBytesHTTP 12315 - uploadedBytesP2P 12316 - p2pEnabled 12317 - videoId 12318 12319 RunnerRegistrationToken: 12320 properties: 12321 id: 12322 type: integer 12323 registrationToken: 12324 type: string 12325 createdAt: 12326 type: string 12327 format: date-time 12328 updatedAt: 12329 type: string 12330 format: date-time 12331 registeredRunnersCount: 12332 type: integer 12333 12334 Runner: 12335 properties: 12336 id: 12337 type: integer 12338 name: 12339 type: string 12340 description: 12341 type: string 12342 ip: 12343 type: string 12344 updatedAt: 12345 type: string 12346 format: date-time 12347 createdAt: 12348 type: string 12349 format: date-time 12350 lastContact: 12351 type: string 12352 format: date-time 12353 12354 RunnerJobType: 12355 type: string 12356 enum: 12357 - vod-web-video-transcoding 12358 - vod-hls-transcoding 12359 - vod-audio-merge-transcoding 12360 - live-rtmp-hls-transcoding 12361 12362 RunnerJobState: 12363 type: integer 12364 enum: 12365 - 1 12366 - 2 12367 - 3 12368 - 4 12369 - 5 12370 - 6 12371 - 7 12372 - 8 12373 description: > 12374 The runner job state: 12375 - `1` Pending 12376 - `2` Processing 12377 - `3` Completed 12378 - `4` Errored 12379 - `5` Waiting for a parent job 12380 - `6` Cancelled 12381 - `7` Parent had an error 12382 - `8` Parent has been cancelled 12383 12384 RunnerJobStateConstant: 12385 type: object 12386 properties: 12387 id: 12388 $ref: '#/components/schemas/RunnerJobState' 12389 label: 12390 type: string 12391 example: 'Processing' 12392 12393 RunnerJobPayload: 12394 anyOf: 12395 - type: object 12396 title: VOD web video transcoding 12397 properties: 12398 input: 12399 type: object 12400 properties: 12401 videoFileUrl: 12402 type: string 12403 output: 12404 type: object 12405 properties: 12406 resolution: 12407 type: number 12408 fps: 12409 type: number 12410 - type: object 12411 title: VOD HLS transcoding 12412 properties: 12413 input: 12414 type: object 12415 properties: 12416 videoFileUrl: 12417 type: string 12418 output: 12419 type: object 12420 properties: 12421 resolution: 12422 type: number 12423 fps: 12424 type: number 12425 - type: object 12426 title: VOD audio merge transcoding 12427 properties: 12428 input: 12429 type: object 12430 properties: 12431 audioFileUrl: 12432 type: string 12433 previewFileUrl: 12434 type: string 12435 output: 12436 type: object 12437 properties: 12438 resolution: 12439 type: number 12440 fps: 12441 type: number 12442 12443 RunnerJob: 12444 properties: 12445 uuid: 12446 $ref: '#/components/schemas/UUIDv4' 12447 type: 12448 $ref: '#/components/schemas/RunnerJobType' 12449 state: 12450 $ref: '#/components/schemas/RunnerJobStateConstant' 12451 payload: 12452 $ref: '#/components/schemas/RunnerJobPayload' 12453 failures: 12454 type: integer 12455 description: Number of times a remote runner failed to process this job. After too many failures, the job in "error" state 12456 error: 12457 nullable: true 12458 type: string 12459 description: Error message if the job is errored 12460 progress: 12461 type: integer 12462 description: Percentage progress 12463 priority: 12464 type: integer 12465 description: Job priority (less has more priority) 12466 updatedAt: 12467 type: string 12468 format: date-time 12469 createdAt: 12470 type: string 12471 format: date-time 12472 startedAt: 12473 type: string 12474 format: date-time 12475 finishedAt: 12476 type: string 12477 format: date-time 12478 parent: 12479 nullable: true 12480 description: If job has a parent job 12481 type: object 12482 properties: 12483 type: 12484 $ref: '#/components/schemas/RunnerJobType' 12485 state: 12486 $ref: '#/components/schemas/RunnerJobStateConstant' 12487 uuid: 12488 $ref: '#/components/schemas/UUIDv4' 12489 runner: 12490 nullable: true 12491 description: If job is associated to a runner 12492 properties: 12493 id: 12494 type: number 12495 name: 12496 type: string 12497 description: 12498 type: string 12499 12500 RunnerJobAdmin: 12501 allOf: 12502 - $ref: '#/components/schemas/RunnerJob' 12503 - type: object 12504 properties: 12505 privatePayload: 12506 type: object 12507 12508 WatchedWordsLists: 12509 properties: 12510 id: 12511 $ref: '#/components/schemas/id' 12512 listName: 12513 type: string 12514 words: 12515 type: array 12516 items: 12517 type: string 12518 updatedAt: 12519 type: string 12520 format: date-time 12521 example: 2021-05-04T08:01:01.502Z 12522 createdAt: 12523 type: string 12524 format: date-time 12525 example: 2021-05-04T08:01:01.502Z 12526 12527 VideoPassword: 12528 properties: 12529 id: 12530 $ref: '#/components/schemas/id' 12531 password: 12532 type: string 12533 minLength: 2 12534 videoId: 12535 $ref: '#/components/schemas/id' 12536 VideoPasswordList: 12537 properties: 12538 total: 12539 type: integer 12540 example: 1 12541 data: 12542 type: array 12543 items: 12544 $ref: '#/components/schemas/VideoPassword' 12545 AddVideoPasswords: 12546 type: array 12547 items: 12548 $ref: "#/components/schemas/VideoPassword/properties/password" 12549 uniqueItems: true 12550 12551 PlayerTheme: 12552 type: string 12553 enum: 12554 - galaxy 12555 - lucide 12556 description: The player theme to use 12557 12558 PlayerThemeChannelSetting: 12559 type: string 12560 enum: 12561 - instance-default 12562 - galaxy 12563 - lucide 12564 description: > 12565 Player theme setting for a channel: 12566 - `instance-default` Use the instance default theme 12567 - `galaxy` Use the galaxy theme 12568 - `lucide` Use the lucide theme 12569 12570 PlayerThemeVideoSetting: 12571 type: string 12572 enum: 12573 - channel-default 12574 - instance-default 12575 - galaxy 12576 - lucide 12577 description: > 12578 Player theme setting for a video: 12579 - `channel-default` Use the channel default theme 12580 - `instance-default` Use the instance default theme 12581 - `galaxy` Use the galaxy theme 12582 - `lucide` Use the lucide theme 12583 12584 PlayerVideoSettings: 12585 type: object 12586 properties: 12587 theme: 12588 $ref: '#/components/schemas/PlayerThemeVideoSetting' 12589 description: Player settings for a video 12590 12591 PlayerChannelSettings: 12592 type: object 12593 properties: 12594 theme: 12595 $ref: '#/components/schemas/PlayerThemeChannelSetting' 12596 description: Player settings for a channel 12597 12598 PlayerVideoSettingsUpdate: 12599 type: object 12600 properties: 12601 theme: 12602 $ref: '#/components/schemas/PlayerThemeVideoSetting' 12603 required: 12604 - theme 12605 description: Player settings update for a video 12606 12607 PlayerChannelSettingsUpdate: 12608 type: object 12609 properties: 12610 theme: 12611 $ref: '#/components/schemas/PlayerThemeChannelSetting' 12612 required: 12613 - theme 12614 description: Player settings update for a channel 12615 12616 FileStorage: 12617 type: integer 12618 enum: 12619 - 0 12620 - 1 12621 description: > 12622 The file storage type: 12623 - `0` File system 12624 - `1` Object storage 12625 12626 VideoChannelCollaborator: 12627 type: object 12628 description: Representation of a channel collaboration 12629 properties: 12630 id: 12631 $ref: '#/components/schemas/id' 12632 account: 12633 $ref: '#/components/schemas/AccountSummary' 12634 state: 12635 type: object 12636 properties: 12637 id: 12638 $ref: '#/components/schemas/VideoChannelCollaboratorState' 12639 label: 12640 type: string 12641 createdAt: 12642 type: string 12643 format: date-time 12644 updatedAt: 12645 type: string 12646 format: date-time 12647 12648 VideoChannelCollaboratorState: 12649 type: integer 12650 enum: 12651 - 1 12652 - 2 12653 description: | 12654 The user import state: 12655 - `1`: Pending 12656 - `2`: Accepted