aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-12 16:09:02 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-10-24 14:48:24 +0200
commit3545e72c686ff1725bbdfd8d16d693e2f4aa75a3 (patch)
treee7f1d12ef5dae1e1142c3a8d0b681c1dbbb0de10 /support
parent38a3ccc7f8ad0ea94362b58c732af7c387ab46be (diff)
downloadPeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.tar.gz
PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.tar.zst
PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.zip
Put private videos under a specific subdirectory
Diffstat (limited to 'support')
-rw-r--r--support/doc/api/openapi.yaml912
-rw-r--r--support/nginx/peertube4
2 files changed, 519 insertions, 397 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 2fb154dbd..7ffe8c67b 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -276,8 +276,8 @@ tags:
276 description: Video transcoding related operations 276 description: Video transcoding related operations
277 - name: Video stats 277 - name: Video stats
278 description: Video statistics 278 description: Video statistics
279 - name: Feeds 279 - name: Video Feeds
280 description: Server syndication feeds 280 description: Server syndication feeds of videos
281 - name: Search 281 - name: Search
282 description: | 282 description: |
283 The search helps to find _videos_ or _channels_ from within the instance and beyond. 283 The search helps to find _videos_ or _channels_ from within the instance and beyond.
@@ -299,6 +299,12 @@ tags:
299 Statistics 299 Statistics
300 300
301x-tagGroups: 301x-tagGroups:
302 - name: Static endpoints
303 tags:
304 - Static Video Files
305 - name: Feeds
306 tags:
307 - Video Feeds
302 - name: Auth 308 - name: Auth
303 tags: 309 tags:
304 - Register 310 - Register
@@ -327,7 +333,6 @@ x-tagGroups:
327 - Video Files 333 - Video Files
328 - Video Transcoding 334 - Video Transcoding
329 - Live Videos 335 - Live Videos
330 - Feeds
331 - Channels Sync 336 - Channels Sync
332 - name: Search 337 - name: Search
333 tags: 338 tags:
@@ -349,7 +354,326 @@ x-tagGroups:
349 - Logs 354 - Logs
350 - Job 355 - Job
351paths: 356paths:
352 '/accounts/{name}': 357 '/static/webseed/{filename}':
358 get:
359 tags:
360 - Static Video Files
361 summary: Get public WebTorrent video file
362 parameters:
363 - $ref: '#/components/parameters/staticFilename'
364 responses:
365 '200':
366 description: successful operation
367 '404':
368 description: not found
369 '/static/webseed/private/{filename}':
370 get:
371 tags:
372 - Static Video Files
373 summary: Get private WebTorrent video file
374 parameters:
375 - $ref: '#/components/parameters/staticFilename'
376 - $ref: '#/components/parameters/videoFileToken'
377 security:
378 - OAuth2: []
379 responses:
380 '200':
381 description: successful operation
382 '403':
383 description: invalid auth
384 '404':
385 description: not found
386
387 '/static/streaming-playlists/hls/{filename}':
388 get:
389 tags:
390 - Static Video Files
391 summary: Get public HLS video file
392 parameters:
393 - $ref: '#/components/parameters/staticFilename'
394 security:
395 - OAuth2: []
396 responses:
397 '200':
398 description: successful operation
399 '403':
400 description: invalid auth
401 '404':
402 description: not found
403 '/static/streaming-playlists/hls/private/{filename}':
404 get:
405 tags:
406 - Static Video Files
407 summary: Get private HLS video file
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
422 '/feeds/video-comments.{format}':
423 get:
424 tags:
425 - Video Feeds
426 summary: List comments on videos
427 operationId: getSyndicatedComments
428 parameters:
429 - name: format
430 in: path
431 required: true
432 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
433 schema:
434 type: string
435 enum:
436 - xml
437 - rss
438 - rss2
439 - atom
440 - atom1
441 - json
442 - json1
443 - name: videoId
444 in: query
445 description: 'limit listing to a specific video'
446 schema:
447 type: string
448 - name: accountId
449 in: query
450 description: 'limit listing to a specific account'
451 schema:
452 type: string
453 - name: accountName
454 in: query
455 description: 'limit listing to a specific account'
456 schema:
457 type: string
458 - name: videoChannelId
459 in: query
460 description: 'limit listing to a specific video channel'
461 schema:
462 type: string
463 - name: videoChannelName
464 in: query
465 description: 'limit listing to a specific video channel'
466 schema:
467 type: string
468 responses:
469 '204':
470 description: successful operation
471 headers:
472 Cache-Control:
473 schema:
474 type: string
475 default: 'max-age=900' # 15 min cache
476 content:
477 application/xml:
478 schema:
479 $ref: '#/components/schemas/VideoCommentsForXML'
480 examples:
481 nightly:
482 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
483 application/rss+xml:
484 schema:
485 $ref: '#/components/schemas/VideoCommentsForXML'
486 examples:
487 nightly:
488 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
489 text/xml:
490 schema:
491 $ref: '#/components/schemas/VideoCommentsForXML'
492 examples:
493 nightly:
494 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
495 application/atom+xml:
496 schema:
497 $ref: '#/components/schemas/VideoCommentsForXML'
498 examples:
499 nightly:
500 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
501 application/json:
502 schema:
503 type: object
504 examples:
505 nightly:
506 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
507 '400':
508 x-summary: field inconsistencies
509 description: >
510 Arises when:
511 - videoId filter is mixed with a channel filter
512 '404':
513 description: video, video channel or account not found
514 '406':
515 description: accept header unsupported
516
517 '/feeds/videos.{format}':
518 get:
519 tags:
520 - Video Feeds
521 summary: List videos
522 operationId: getSyndicatedVideos
523 parameters:
524 - name: format
525 in: path
526 required: true
527 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
528 schema:
529 type: string
530 enum:
531 - xml
532 - rss
533 - rss2
534 - atom
535 - atom1
536 - json
537 - json1
538 - name: accountId
539 in: query
540 description: 'limit listing to a specific account'
541 schema:
542 type: string
543 - name: accountName
544 in: query
545 description: 'limit listing to a specific account'
546 schema:
547 type: string
548 - name: videoChannelId
549 in: query
550 description: 'limit listing to a specific video channel'
551 schema:
552 type: string
553 - name: videoChannelName
554 in: query
555 description: 'limit listing to a specific video channel'
556 schema:
557 type: string
558 - $ref: '#/components/parameters/sort'
559 - $ref: '#/components/parameters/nsfw'
560 - $ref: '#/components/parameters/isLocal'
561 - $ref: '#/components/parameters/include'
562 - $ref: '#/components/parameters/privacyOneOf'
563 - $ref: '#/components/parameters/hasHLSFiles'
564 - $ref: '#/components/parameters/hasWebtorrentFiles'
565 responses:
566 '204':
567 description: successful operation
568 headers:
569 Cache-Control:
570 schema:
571 type: string
572 default: 'max-age=900' # 15 min cache
573 content:
574 application/xml:
575 schema:
576 $ref: '#/components/schemas/VideosForXML'
577 examples:
578 nightly:
579 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
580 application/rss+xml:
581 schema:
582 $ref: '#/components/schemas/VideosForXML'
583 examples:
584 nightly:
585 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
586 text/xml:
587 schema:
588 $ref: '#/components/schemas/VideosForXML'
589 examples:
590 nightly:
591 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
592 application/atom+xml:
593 schema:
594 $ref: '#/components/schemas/VideosForXML'
595 examples:
596 nightly:
597 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
598 application/json:
599 schema:
600 type: object
601 examples:
602 nightly:
603 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
604 '404':
605 description: video channel or account not found
606 '406':
607 description: accept header unsupported
608
609 '/feeds/subscriptions.{format}':
610 get:
611 tags:
612 - Video Feeds
613 summary: List videos of subscriptions tied to a token
614 operationId: getSyndicatedSubscriptionVideos
615 parameters:
616 - name: format
617 in: path
618 required: true
619 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
620 schema:
621 type: string
622 enum:
623 - xml
624 - rss
625 - rss2
626 - atom
627 - atom1
628 - json
629 - json1
630 - name: accountId
631 in: query
632 description: limit listing to a specific account
633 schema:
634 type: string
635 required: true
636 - name: token
637 in: query
638 description: private token allowing access
639 schema:
640 type: string
641 required: true
642 - $ref: '#/components/parameters/sort'
643 - $ref: '#/components/parameters/nsfw'
644 - $ref: '#/components/parameters/isLocal'
645 - $ref: '#/components/parameters/include'
646 - $ref: '#/components/parameters/privacyOneOf'
647 - $ref: '#/components/parameters/hasHLSFiles'
648 - $ref: '#/components/parameters/hasWebtorrentFiles'
649 responses:
650 '204':
651 description: successful operation
652 headers:
653 Cache-Control:
654 schema:
655 type: string
656 default: 'max-age=900' # 15 min cache
657 content:
658 application/xml:
659 schema:
660 $ref: '#/components/schemas/VideosForXML'
661 application/rss+xml:
662 schema:
663 $ref: '#/components/schemas/VideosForXML'
664 text/xml:
665 schema:
666 $ref: '#/components/schemas/VideosForXML'
667 application/atom+xml:
668 schema:
669 $ref: '#/components/schemas/VideosForXML'
670 application/json:
671 schema:
672 type: object
673 '406':
674 description: accept header unsupported
675
676 '/api/v1/accounts/{name}':
353 get: 677 get:
354 tags: 678 tags:
355 - Accounts 679 - Accounts
@@ -367,7 +691,7 @@ paths:
367 '404': 691 '404':
368 description: account not found 692 description: account not found
369 693
370 '/accounts/{name}/videos': 694 '/api/v1/accounts/{name}/videos':
371 get: 695 get:
372 tags: 696 tags:
373 - Accounts 697 - Accounts
@@ -434,7 +758,7 @@ paths:
434 758
435 print(json) 759 print(json)
436 760
437 '/accounts/{name}/followers': 761 '/api/v1/accounts/{name}/followers':
438 get: 762 get:
439 tags: 763 tags:
440 - Accounts 764 - Accounts
@@ -464,7 +788,7 @@ paths:
464 items: 788 items:
465 $ref: '#/components/schemas/Follow' 789 $ref: '#/components/schemas/Follow'
466 790
467 /accounts: 791 /api/v1/accounts:
468 get: 792 get:
469 tags: 793 tags:
470 - Accounts 794 - Accounts
@@ -484,7 +808,7 @@ paths:
484 items: 808 items:
485 $ref: '#/components/schemas/Account' 809 $ref: '#/components/schemas/Account'
486 810
487 /config: 811 /api/v1/config:
488 get: 812 get:
489 tags: 813 tags:
490 - Config 814 - Config
@@ -501,7 +825,7 @@ paths:
501 nightly: 825 nightly:
502 externalValue: https://peertube2.cpy.re/api/v1/config 826 externalValue: https://peertube2.cpy.re/api/v1/config
503 827
504 /config/about: 828 /api/v1/config/about:
505 get: 829 get:
506 summary: Get instance "About" information 830 summary: Get instance "About" information
507 operationId: getAbout 831 operationId: getAbout
@@ -518,7 +842,7 @@ paths:
518 nightly: 842 nightly:
519 externalValue: https://peertube2.cpy.re/api/v1/config/about 843 externalValue: https://peertube2.cpy.re/api/v1/config/about
520 844
521 /config/custom: 845 /api/v1/config/custom:
522 get: 846 get:
523 summary: Get instance runtime configuration 847 summary: Get instance runtime configuration
524 operationId: getCustomConfig 848 operationId: getCustomConfig
@@ -563,7 +887,7 @@ paths:
563 '200': 887 '200':
564 description: successful operation 888 description: successful operation
565 889
566 /custom-pages/homepage/instance: 890 /api/v1/custom-pages/homepage/instance:
567 get: 891 get:
568 summary: Get instance custom homepage 892 summary: Get instance custom homepage
569 tags: 893 tags:
@@ -597,7 +921,7 @@ paths:
597 '204': 921 '204':
598 description: successful operation 922 description: successful operation
599 923
600 /jobs/pause: 924 /api/v1/jobs/pause:
601 post: 925 post:
602 summary: Pause job queue 926 summary: Pause job queue
603 security: 927 security:
@@ -609,7 +933,7 @@ paths:
609 '204': 933 '204':
610 description: successful operation 934 description: successful operation
611 935
612 /jobs/resume: 936 /api/v1/jobs/resume:
613 post: 937 post:
614 summary: Resume job queue 938 summary: Resume job queue
615 security: 939 security:
@@ -621,7 +945,7 @@ paths:
621 '204': 945 '204':
622 description: successful operation 946 description: successful operation
623 947
624 /jobs/{state}: 948 /api/v1/jobs/{state}:
625 get: 949 get:
626 summary: List instance jobs 950 summary: List instance jobs
627 operationId: getJobs 951 operationId: getJobs
@@ -665,7 +989,7 @@ paths:
665 items: 989 items:
666 $ref: '#/components/schemas/Job' 990 $ref: '#/components/schemas/Job'
667 991
668 /server/followers: 992 /api/v1/server/followers:
669 get: 993 get:
670 tags: 994 tags:
671 - Instance Follows 995 - Instance Follows
@@ -692,7 +1016,7 @@ paths:
692 items: 1016 items:
693 $ref: '#/components/schemas/Follow' 1017 $ref: '#/components/schemas/Follow'
694 1018
695 '/server/followers/{nameWithHost}': 1019 '/api/v1/server/followers/{nameWithHost}':
696 delete: 1020 delete:
697 summary: Remove or reject a follower to your server 1021 summary: Remove or reject a follower to your server
698 security: 1022 security:
@@ -714,7 +1038,7 @@ paths:
714 '404': 1038 '404':
715 description: follower not found 1039 description: follower not found
716 1040
717 '/server/followers/{nameWithHost}/reject': 1041 '/api/v1/server/followers/{nameWithHost}/reject':
718 post: 1042 post:
719 summary: Reject a pending follower to your server 1043 summary: Reject a pending follower to your server
720 security: 1044 security:
@@ -736,7 +1060,7 @@ paths:
736 '404': 1060 '404':
737 description: follower not found 1061 description: follower not found
738 1062
739 '/server/followers/{nameWithHost}/accept': 1063 '/api/v1/server/followers/{nameWithHost}/accept':
740 post: 1064 post:
741 summary: Accept a pending follower to your server 1065 summary: Accept a pending follower to your server
742 security: 1066 security:
@@ -758,7 +1082,7 @@ paths:
758 '404': 1082 '404':
759 description: follower not found 1083 description: follower not found
760 1084
761 /server/following: 1085 /api/v1/server/following:
762 get: 1086 get:
763 tags: 1087 tags:
764 - Instance Follows 1088 - Instance Follows
@@ -814,7 +1138,7 @@ paths:
814 type: string 1138 type: string
815 uniqueItems: true 1139 uniqueItems: true
816 1140
817 '/server/following/{hostOrHandle}': 1141 '/api/v1/server/following/{hostOrHandle}':
818 delete: 1142 delete:
819 summary: Unfollow an actor (PeerTube instance, channel or account) 1143 summary: Unfollow an actor (PeerTube instance, channel or account)
820 security: 1144 security:
@@ -835,7 +1159,7 @@ paths:
835 '404': 1159 '404':
836 description: host or handle not found 1160 description: host or handle not found
837 1161
838 /users: 1162 /api/v1/users:
839 post: 1163 post:
840 summary: Create a user 1164 summary: Create a user
841 operationId: addUser 1165 operationId: addUser
@@ -902,7 +1226,7 @@ paths:
902 items: 1226 items:
903 $ref: '#/components/schemas/User' 1227 $ref: '#/components/schemas/User'
904 1228
905 '/users/{id}': 1229 '/api/v1/users/{id}':
906 parameters: 1230 parameters:
907 - $ref: '#/components/parameters/id' 1231 - $ref: '#/components/parameters/id'
908 delete: 1232 delete:
@@ -958,7 +1282,7 @@ paths:
958 $ref: '#/components/schemas/UpdateUser' 1282 $ref: '#/components/schemas/UpdateUser'
959 required: true 1283 required: true
960 1284
961 /oauth-clients/local: 1285 /api/v1/oauth-clients/local:
962 get: 1286 get:
963 summary: Login prerequisite 1287 summary: Login prerequisite
964 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken). 1288 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
@@ -986,7 +1310,7 @@ paths:
986 ## AUTH 1310 ## AUTH
987 curl -s "$API/oauth-clients/local" 1311 curl -s "$API/oauth-clients/local"
988 1312
989 /users/token: 1313 /api/v1/users/token:
990 post: 1314 post:
991 summary: Login 1315 summary: Login
992 operationId: getOAuthToken 1316 operationId: getOAuthToken
@@ -1063,7 +1387,7 @@ paths:
1063 --data password="$PASSWORD" \ 1387 --data password="$PASSWORD" \
1064 | jq -r ".access_token" 1388 | jq -r ".access_token"
1065 1389
1066 /users/revoke-token: 1390 /api/v1/users/revoke-token:
1067 post: 1391 post:
1068 summary: Logout 1392 summary: Logout
1069 description: Revokes your access token and its associated refresh token, destroying your current session. 1393 description: Revokes your access token and its associated refresh token, destroying your current session.
@@ -1076,7 +1400,7 @@ paths:
1076 '200': 1400 '200':
1077 description: successful operation 1401 description: successful operation
1078 1402
1079 /users/register: 1403 /api/v1/users/register:
1080 post: 1404 post:
1081 summary: Register a user 1405 summary: Register a user
1082 operationId: registerUser 1406 operationId: registerUser
@@ -1093,7 +1417,7 @@ paths:
1093 $ref: '#/components/schemas/RegisterUser' 1417 $ref: '#/components/schemas/RegisterUser'
1094 required: true 1418 required: true
1095 1419
1096 /users/{id}/verify-email: 1420 /api/v1/users/{id}/verify-email:
1097 post: 1421 post:
1098 summary: Verify a user 1422 summary: Verify a user
1099 operationId: verifyUser 1423 operationId: verifyUser
@@ -1126,7 +1450,7 @@ paths:
1126 '404': 1450 '404':
1127 description: user not found 1451 description: user not found
1128 1452
1129 /users/{id}/two-factor/request: 1453 /api/v1/users/{id}/two-factor/request:
1130 post: 1454 post:
1131 summary: Request two factor auth 1455 summary: Request two factor auth
1132 operationId: requestTwoFactor 1456 operationId: requestTwoFactor
@@ -1158,7 +1482,7 @@ paths:
1158 '404': 1482 '404':
1159 description: user not found 1483 description: user not found
1160 1484
1161 /users/{id}/two-factor/confirm-request: 1485 /api/v1/users/{id}/two-factor/confirm-request:
1162 post: 1486 post:
1163 summary: Confirm two factor auth 1487 summary: Confirm two factor auth
1164 operationId: confirmTwoFactorRequest 1488 operationId: confirmTwoFactorRequest
@@ -1190,7 +1514,7 @@ paths:
1190 '404': 1514 '404':
1191 description: user not found 1515 description: user not found
1192 1516
1193 /users/{id}/two-factor/disable: 1517 /api/v1/users/{id}/two-factor/disable:
1194 post: 1518 post:
1195 summary: Disable two factor auth 1519 summary: Disable two factor auth
1196 operationId: disableTwoFactor 1520 operationId: disableTwoFactor
@@ -1217,7 +1541,7 @@ paths:
1217 description: user not found 1541 description: user not found
1218 1542
1219 1543
1220 /users/ask-send-verify-email: 1544 /api/v1/users/ask-send-verify-email:
1221 post: 1545 post:
1222 summary: Resend user verification link 1546 summary: Resend user verification link
1223 operationId: resendEmailToVerifyUser 1547 operationId: resendEmailToVerifyUser
@@ -1228,7 +1552,7 @@ paths:
1228 '204': 1552 '204':
1229 description: successful operation 1553 description: successful operation
1230 1554
1231 /users/me: 1555 /api/v1/users/me:
1232 get: 1556 get:
1233 summary: Get my user information 1557 summary: Get my user information
1234 operationId: getUserInfo 1558 operationId: getUserInfo
@@ -1264,7 +1588,7 @@ paths:
1264 $ref: '#/components/schemas/UpdateMe' 1588 $ref: '#/components/schemas/UpdateMe'
1265 required: true 1589 required: true
1266 1590
1267 /users/me/videos/imports: 1591 /api/v1/users/me/videos/imports:
1268 get: 1592 get:
1269 summary: Get video imports of my user 1593 summary: Get video imports of my user
1270 security: 1594 security:
@@ -1306,7 +1630,7 @@ paths:
1306 schema: 1630 schema:
1307 $ref: '#/components/schemas/VideoImportsList' 1631 $ref: '#/components/schemas/VideoImportsList'
1308 1632
1309 /users/me/video-quota-used: 1633 /api/v1/users/me/video-quota-used:
1310 get: 1634 get:
1311 summary: Get my user used quota 1635 summary: Get my user used quota
1312 security: 1636 security:
@@ -1331,7 +1655,7 @@ paths:
1331 description: The user video quota used today in bytes 1655 description: The user video quota used today in bytes
1332 example: 1681014151 1656 example: 1681014151
1333 1657
1334 '/users/me/videos/{videoId}/rating': 1658 '/api/v1/users/me/videos/{videoId}/rating':
1335 get: 1659 get:
1336 summary: Get rate of my user for a video 1660 summary: Get rate of my user for a video
1337 security: 1661 security:
@@ -1354,7 +1678,7 @@ paths:
1354 schema: 1678 schema:
1355 $ref: '#/components/schemas/GetMeVideoRating' 1679 $ref: '#/components/schemas/GetMeVideoRating'
1356 1680
1357 /users/me/videos: 1681 /api/v1/users/me/videos:
1358 get: 1682 get:
1359 summary: Get videos of my user 1683 summary: Get videos of my user
1360 security: 1684 security:
@@ -1375,7 +1699,7 @@ paths:
1375 schema: 1699 schema:
1376 $ref: '#/components/schemas/VideoListResponse' 1700 $ref: '#/components/schemas/VideoListResponse'
1377 1701
1378 /users/me/subscriptions: 1702 /api/v1/users/me/subscriptions:
1379 get: 1703 get:
1380 summary: Get my user subscriptions 1704 summary: Get my user subscriptions
1381 security: 1705 security:
@@ -1421,7 +1745,7 @@ paths:
1421 '200': 1745 '200':
1422 description: successful operation 1746 description: successful operation
1423 1747
1424 /users/me/subscriptions/exist: 1748 /api/v1/users/me/subscriptions/exist:
1425 get: 1749 get:
1426 summary: Get if subscriptions exist for my user 1750 summary: Get if subscriptions exist for my user
1427 security: 1751 security:
@@ -1439,7 +1763,7 @@ paths:
1439 schema: 1763 schema:
1440 type: object 1764 type: object
1441 1765
1442 /users/me/subscriptions/videos: 1766 /api/v1/users/me/subscriptions/videos:
1443 get: 1767 get:
1444 summary: List videos of subscriptions of my user 1768 summary: List videos of subscriptions of my user
1445 security: 1769 security:
@@ -1473,7 +1797,7 @@ paths:
1473 schema: 1797 schema:
1474 $ref: '#/components/schemas/VideoListResponse' 1798 $ref: '#/components/schemas/VideoListResponse'
1475 1799
1476 '/users/me/subscriptions/{subscriptionHandle}': 1800 '/api/v1/users/me/subscriptions/{subscriptionHandle}':
1477 get: 1801 get:
1478 summary: Get subscription of my user 1802 summary: Get subscription of my user
1479 security: 1803 security:
@@ -1503,7 +1827,7 @@ paths:
1503 '200': 1827 '200':
1504 description: successful operation 1828 description: successful operation
1505 1829
1506 /users/me/notifications: 1830 /api/v1/users/me/notifications:
1507 get: 1831 get:
1508 summary: List my notifications 1832 summary: List my notifications
1509 security: 1833 security:
@@ -1527,7 +1851,7 @@ paths:
1527 schema: 1851 schema:
1528 $ref: '#/components/schemas/NotificationListResponse' 1852 $ref: '#/components/schemas/NotificationListResponse'
1529 1853
1530 /users/me/notifications/read: 1854 /api/v1/users/me/notifications/read:
1531 post: 1855 post:
1532 summary: Mark notifications as read by their id 1856 summary: Mark notifications as read by their id
1533 security: 1857 security:
@@ -1551,7 +1875,7 @@ paths:
1551 '204': 1875 '204':
1552 description: successful operation 1876 description: successful operation
1553 1877
1554 /users/me/notifications/read-all: 1878 /api/v1/users/me/notifications/read-all:
1555 post: 1879 post:
1556 summary: Mark all my notification as read 1880 summary: Mark all my notification as read
1557 security: 1881 security:
@@ -1562,7 +1886,7 @@ paths:
1562 '204': 1886 '204':
1563 description: successful operation 1887 description: successful operation
1564 1888
1565 /users/me/notification-settings: 1889 /api/v1/users/me/notification-settings:
1566 put: 1890 put:
1567 summary: Update my notification settings 1891 summary: Update my notification settings
1568 security: 1892 security:
@@ -1603,7 +1927,7 @@ paths:
1603 '204': 1927 '204':
1604 description: successful operation 1928 description: successful operation
1605 1929
1606 /users/me/history/videos: 1930 /api/v1/users/me/history/videos:
1607 get: 1931 get:
1608 summary: List watched videos history 1932 summary: List watched videos history
1609 security: 1933 security:
@@ -1622,7 +1946,7 @@ paths:
1622 schema: 1946 schema:
1623 $ref: '#/components/schemas/VideoListResponse' 1947 $ref: '#/components/schemas/VideoListResponse'
1624 1948
1625 /users/me/history/videos/{videoId}: 1949 /api/v1/users/me/history/videos/{videoId}:
1626 delete: 1950 delete:
1627 summary: Delete history element 1951 summary: Delete history element
1628 security: 1952 security:
@@ -1639,7 +1963,7 @@ paths:
1639 '204': 1963 '204':
1640 description: successful operation 1964 description: successful operation
1641 1965
1642 /users/me/history/videos/remove: 1966 /api/v1/users/me/history/videos/remove:
1643 post: 1967 post:
1644 summary: Clear video history 1968 summary: Clear video history
1645 security: 1969 security:
@@ -1660,7 +1984,7 @@ paths:
1660 '204': 1984 '204':
1661 description: successful operation 1985 description: successful operation
1662 1986
1663 /users/me/avatar/pick: 1987 /api/v1/users/me/avatar/pick:
1664 post: 1988 post:
1665 summary: Update my user avatar 1989 summary: Update my user avatar
1666 security: 1990 security:
@@ -1701,7 +2025,7 @@ paths:
1701 avatarfile: 2025 avatarfile:
1702 contentType: image/png, image/jpeg 2026 contentType: image/png, image/jpeg
1703 2027
1704 /users/me/avatar: 2028 /api/v1/users/me/avatar:
1705 delete: 2029 delete:
1706 summary: Delete my avatar 2030 summary: Delete my avatar
1707 security: 2031 security:
@@ -1712,7 +2036,7 @@ paths:
1712 '204': 2036 '204':
1713 description: successful operation 2037 description: successful operation
1714 2038
1715 /videos/ownership: 2039 /api/v1/videos/ownership:
1716 get: 2040 get:
1717 summary: List video ownership changes 2041 summary: List video ownership changes
1718 tags: 2042 tags:
@@ -1723,7 +2047,7 @@ paths:
1723 '200': 2047 '200':
1724 description: successful operation 2048 description: successful operation
1725 2049
1726 '/videos/ownership/{id}/accept': 2050 '/api/v1/videos/ownership/{id}/accept':
1727 post: 2051 post:
1728 summary: Accept ownership change request 2052 summary: Accept ownership change request
1729 tags: 2053 tags:
@@ -1740,7 +2064,7 @@ paths:
1740 '404': 2064 '404':
1741 description: video ownership change not found 2065 description: video ownership change not found
1742 2066
1743 '/videos/ownership/{id}/refuse': 2067 '/api/v1/videos/ownership/{id}/refuse':
1744 post: 2068 post:
1745 summary: Refuse ownership change request 2069 summary: Refuse ownership change request
1746 tags: 2070 tags:
@@ -1757,7 +2081,7 @@ paths:
1757 '404': 2081 '404':
1758 description: video ownership change not found 2082 description: video ownership change not found
1759 2083
1760 '/videos/{id}/give-ownership': 2084 '/api/v1/videos/{id}/give-ownership':
1761 post: 2085 post:
1762 summary: Request ownership change 2086 summary: Request ownership change
1763 tags: 2087 tags:
@@ -1785,7 +2109,30 @@ paths:
1785 '404': 2109 '404':
1786 description: video not found 2110 description: video not found
1787 2111
1788 /videos/{id}/studio/edit: 2112 '/api/v1/videos/{id}/token':
2113 post:
2114 summary: Request video token
2115 operationId: requestVideoToken
2116 description: Request special tokens that expire quickly to use them in some context (like accessing private static files)
2117 tags:
2118 - Video
2119 security:
2120 - OAuth2: []
2121 parameters:
2122 - $ref: '#/components/parameters/idOrUUID'
2123 responses:
2124 '200':
2125 description: successful operation
2126 content:
2127 application/json:
2128 schema:
2129 $ref: '#/components/schemas/VideoTokenResponse'
2130 '400':
2131 description: incorrect parameters
2132 '404':
2133 description: video not found
2134
2135 /api/v1/videos/{id}/studio/edit:
1789 post: 2136 post:
1790 summary: Create a studio task 2137 summary: Create a studio task
1791 tags: 2138 tags:
@@ -1810,7 +2157,7 @@ paths:
1810 '404': 2157 '404':
1811 description: video not found 2158 description: video not found
1812 2159
1813 /videos: 2160 /api/v1/videos:
1814 get: 2161 get:
1815 summary: List videos 2162 summary: List videos
1816 operationId: getVideos 2163 operationId: getVideos
@@ -1841,7 +2188,7 @@ paths:
1841 schema: 2188 schema:
1842 $ref: '#/components/schemas/VideoListResponse' 2189 $ref: '#/components/schemas/VideoListResponse'
1843 2190
1844 /videos/categories: 2191 /api/v1/videos/categories:
1845 get: 2192 get:
1846 summary: List available video categories 2193 summary: List available video categories
1847 operationId: getCategories 2194 operationId: getCategories
@@ -1860,7 +2207,7 @@ paths:
1860 nightly: 2207 nightly:
1861 externalValue: https://peertube2.cpy.re/api/v1/videos/categories 2208 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1862 2209
1863 /videos/licences: 2210 /api/v1/videos/licences:
1864 get: 2211 get:
1865 summary: List available video licences 2212 summary: List available video licences
1866 operationId: getLicences 2213 operationId: getLicences
@@ -1879,7 +2226,7 @@ paths:
1879 nightly: 2226 nightly:
1880 externalValue: https://peertube2.cpy.re/api/v1/videos/licences 2227 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1881 2228
1882 /videos/languages: 2229 /api/v1/videos/languages:
1883 get: 2230 get:
1884 summary: List available video languages 2231 summary: List available video languages
1885 operationId: getLanguages 2232 operationId: getLanguages
@@ -1898,7 +2245,7 @@ paths:
1898 nightly: 2245 nightly:
1899 externalValue: https://peertube2.cpy.re/api/v1/videos/languages 2246 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1900 2247
1901 /videos/privacies: 2248 /api/v1/videos/privacies:
1902 get: 2249 get:
1903 summary: List available video privacy policies 2250 summary: List available video privacy policies
1904 operationId: getPrivacyPolicies 2251 operationId: getPrivacyPolicies
@@ -1917,7 +2264,7 @@ paths:
1917 nightly: 2264 nightly:
1918 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies 2265 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1919 2266
1920 '/videos/{id}': 2267 '/api/v1/videos/{id}':
1921 put: 2268 put:
1922 summary: Update a video 2269 summary: Update a video
1923 operationId: putVideo 2270 operationId: putVideo
@@ -2023,7 +2370,7 @@ paths:
2023 '204': 2370 '204':
2024 description: successful operation 2371 description: successful operation
2025 2372
2026 '/videos/{id}/description': 2373 '/api/v1/videos/{id}/description':
2027 get: 2374 get:
2028 summary: Get complete video description 2375 summary: Get complete video description
2029 operationId: getVideoDesc 2376 operationId: getVideoDesc
@@ -2044,7 +2391,7 @@ paths:
2044 example: | 2391 example: |
2045 **[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)** 2392 **[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)**
2046 2393
2047 '/videos/{id}/source': 2394 '/api/v1/videos/{id}/source':
2048 post: 2395 post:
2049 summary: Get video source file metadata 2396 summary: Get video source file metadata
2050 operationId: getVideoSource 2397 operationId: getVideoSource
@@ -2060,7 +2407,7 @@ paths:
2060 schema: 2407 schema:
2061 $ref: '#/components/schemas/VideoSource' 2408 $ref: '#/components/schemas/VideoSource'
2062 2409
2063 '/videos/{id}/views': 2410 '/api/v1/videos/{id}/views':
2064 post: 2411 post:
2065 summary: Notify user is watching a video 2412 summary: Notify user is watching a video
2066 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. 2413 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.
@@ -2079,7 +2426,7 @@ paths:
2079 '204': 2426 '204':
2080 description: successful operation 2427 description: successful operation
2081 2428
2082 '/videos/{id}/watching': 2429 '/api/v1/videos/{id}/watching':
2083 put: 2430 put:
2084 summary: Set watching progress of a video 2431 summary: Set watching progress of a video
2085 deprecated: true 2432 deprecated: true
@@ -2100,7 +2447,7 @@ paths:
2100 '204': 2447 '204':
2101 description: successful operation 2448 description: successful operation
2102 2449
2103 '/videos/{id}/stats/overall': 2450 '/api/v1/videos/{id}/stats/overall':
2104 get: 2451 get:
2105 summary: Get overall stats of a video 2452 summary: Get overall stats of a video
2106 tags: 2453 tags:
@@ -2129,7 +2476,7 @@ paths:
2129 schema: 2476 schema:
2130 $ref: '#/components/schemas/VideoStatsOverall' 2477 $ref: '#/components/schemas/VideoStatsOverall'
2131 2478
2132 '/videos/{id}/stats/retention': 2479 '/api/v1/videos/{id}/stats/retention':
2133 get: 2480 get:
2134 summary: Get retention stats of a video 2481 summary: Get retention stats of a video
2135 tags: 2482 tags:
@@ -2146,7 +2493,7 @@ paths:
2146 schema: 2493 schema:
2147 $ref: '#/components/schemas/VideoStatsRetention' 2494 $ref: '#/components/schemas/VideoStatsRetention'
2148 2495
2149 '/videos/{id}/stats/timeseries/{metric}': 2496 '/api/v1/videos/{id}/stats/timeseries/{metric}':
2150 get: 2497 get:
2151 summary: Get timeserie stats of a video 2498 summary: Get timeserie stats of a video
2152 tags: 2499 tags:
@@ -2185,7 +2532,7 @@ paths:
2185 schema: 2532 schema:
2186 $ref: '#/components/schemas/VideoStatsTimeserie' 2533 $ref: '#/components/schemas/VideoStatsTimeserie'
2187 2534
2188 /videos/upload: 2535 /api/v1/videos/upload:
2189 post: 2536 post:
2190 summary: Upload a video 2537 summary: Upload a video
2191 description: Uses a single request to upload a video. 2538 description: Uses a single request to upload a video.
@@ -2263,7 +2610,7 @@ paths:
2263 --form channelId=$CHANNEL_ID \ 2610 --form channelId=$CHANNEL_ID \
2264 --form name="$NAME" 2611 --form name="$NAME"
2265 2612
2266 /videos/upload-resumable: 2613 /api/v1/videos/upload-resumable:
2267 post: 2614 post:
2268 summary: Initialize the resumable upload of a video 2615 summary: Initialize the resumable upload of a video
2269 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video 2616 description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video
@@ -2437,7 +2784,7 @@ paths:
2437 '404': 2784 '404':
2438 description: upload not found 2785 description: upload not found
2439 2786
2440 /videos/imports: 2787 /api/v1/videos/imports:
2441 post: 2788 post:
2442 summary: Import a video 2789 summary: Import a video
2443 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator) 2790 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
@@ -2473,7 +2820,7 @@ paths:
2473 '409': 2820 '409':
2474 description: HTTP or Torrent/magnetURI import not enabled 2821 description: HTTP or Torrent/magnetURI import not enabled
2475 2822
2476 /videos/imports/{id}/cancel: 2823 /api/v1/videos/imports/{id}/cancel:
2477 post: 2824 post:
2478 summary: Cancel video import 2825 summary: Cancel video import
2479 description: Cancel a pending video import 2826 description: Cancel a pending video import
@@ -2487,7 +2834,7 @@ paths:
2487 '204': 2834 '204':
2488 description: successful operation 2835 description: successful operation
2489 2836
2490 /videos/imports/{id}: 2837 /api/v1/videos/imports/{id}:
2491 delete: 2838 delete:
2492 summary: Delete video import 2839 summary: Delete video import
2493 description: Delete ended video import 2840 description: Delete ended video import
@@ -2501,7 +2848,7 @@ paths:
2501 '204': 2848 '204':
2502 description: successful operation 2849 description: successful operation
2503 2850
2504 /videos/live: 2851 /api/v1/videos/live:
2505 post: 2852 post:
2506 summary: Create a live 2853 summary: Create a live
2507 operationId: addLive 2854 operationId: addLive
@@ -2603,7 +2950,7 @@ paths:
2603 previewfile: 2950 previewfile:
2604 contentType: image/jpeg 2951 contentType: image/jpeg
2605 2952
2606 /videos/live/{id}: 2953 /api/v1/videos/live/{id}:
2607 get: 2954 get:
2608 summary: Get information about a live 2955 summary: Get information about a live
2609 operationId: getLiveId 2956 operationId: getLiveId
@@ -2643,7 +2990,7 @@ paths:
2643 description: bad parameters or trying to update a live that has already started 2990 description: bad parameters or trying to update a live that has already started
2644 '403': 2991 '403':
2645 description: trying to save replay of the live but saving replay is not enabled on the instance 2992 description: trying to save replay of the live but saving replay is not enabled on the instance
2646 /videos/live/{id}/sessions: 2993 /api/v1/videos/live/{id}/sessions:
2647 get: 2994 get:
2648 summary: List live sessions 2995 summary: List live sessions
2649 description: List all sessions created in a particular live 2996 description: List all sessions created in a particular live
@@ -2668,7 +3015,7 @@ paths:
2668 type: array 3015 type: array
2669 items: 3016 items:
2670 $ref: '#/components/schemas/LiveVideoSessionResponse' 3017 $ref: '#/components/schemas/LiveVideoSessionResponse'
2671 /videos/{id}/live-session: 3018 /api/v1/videos/{id}/live-session:
2672 get: 3019 get:
2673 summary: Get live session of a replay 3020 summary: Get live session of a replay
2674 description: If the video is a replay of a live, you can find the associated live session using this endpoint 3021 description: If the video is a replay of a live, you can find the associated live session using this endpoint
@@ -2686,7 +3033,7 @@ paths:
2686 schema: 3033 schema:
2687 $ref: '#/components/schemas/LiveVideoSessionResponse' 3034 $ref: '#/components/schemas/LiveVideoSessionResponse'
2688 3035
2689 /users/me/abuses: 3036 /api/v1/users/me/abuses:
2690 get: 3037 get:
2691 summary: List my abuses 3038 summary: List my abuses
2692 operationId: getMyAbuses 3039 operationId: getMyAbuses
@@ -2724,7 +3071,7 @@ paths:
2724 items: 3071 items:
2725 $ref: '#/components/schemas/Abuse' 3072 $ref: '#/components/schemas/Abuse'
2726 3073
2727 /abuses: 3074 /api/v1/abuses:
2728 get: 3075 get:
2729 summary: List abuses 3076 summary: List abuses
2730 operationId: getAbuses 3077 operationId: getAbuses
@@ -2877,7 +3224,7 @@ paths:
2877 '400': 3224 '400':
2878 description: incorrect request parameters 3225 description: incorrect request parameters
2879 3226
2880 '/abuses/{abuseId}': 3227 '/api/v1/abuses/{abuseId}':
2881 put: 3228 put:
2882 summary: Update an abuse 3229 summary: Update an abuse
2883 security: 3230 security:
@@ -2922,7 +3269,7 @@ paths:
2922 '404': 3269 '404':
2923 description: block not found 3270 description: block not found
2924 3271
2925 '/abuses/{abuseId}/messages': 3272 '/api/v1/abuses/{abuseId}/messages':
2926 get: 3273 get:
2927 summary: List messages of an abuse 3274 summary: List messages of an abuse
2928 security: 3275 security:
@@ -2974,7 +3321,7 @@ paths:
2974 '400': 3321 '400':
2975 description: incorrect request parameters 3322 description: incorrect request parameters
2976 3323
2977 '/abuses/{abuseId}/messages/{abuseMessageId}': 3324 '/api/v1/abuses/{abuseId}/messages/{abuseMessageId}':
2978 delete: 3325 delete:
2979 summary: Delete an abuse message 3326 summary: Delete an abuse message
2980 security: 3327 security:
@@ -2988,7 +3335,7 @@ paths:
2988 '204': 3335 '204':
2989 description: successful operation 3336 description: successful operation
2990 3337
2991 '/videos/{id}/blacklist': 3338 '/api/v1/videos/{id}/blacklist':
2992 post: 3339 post:
2993 summary: Block a video 3340 summary: Block a video
2994 operationId: addVideoBlock 3341 operationId: addVideoBlock
@@ -3020,7 +3367,7 @@ paths:
3020 '404': 3367 '404':
3021 description: block not found 3368 description: block not found
3022 3369
3023 /videos/blacklist: 3370 /api/v1/videos/blacklist:
3024 get: 3371 get:
3025 tags: 3372 tags:
3026 - Video Blocks 3373 - Video Blocks
@@ -3068,7 +3415,7 @@ paths:
3068 items: 3415 items:
3069 $ref: '#/components/schemas/VideoBlacklist' 3416 $ref: '#/components/schemas/VideoBlacklist'
3070 3417
3071 /videos/{id}/captions: 3418 /api/v1/videos/{id}/captions:
3072 get: 3419 get:
3073 summary: List captions of a video 3420 summary: List captions of a video
3074 operationId: getVideoCaptions 3421 operationId: getVideoCaptions
@@ -3092,7 +3439,7 @@ paths:
3092 items: 3439 items:
3093 $ref: '#/components/schemas/VideoCaption' 3440 $ref: '#/components/schemas/VideoCaption'
3094 3441
3095 /videos/{id}/captions/{captionLanguage}: 3442 /api/v1/videos/{id}/captions/{captionLanguage}:
3096 put: 3443 put:
3097 summary: Add or replace a video caption 3444 summary: Add or replace a video caption
3098 operationId: addVideoCaption 3445 operationId: addVideoCaption
@@ -3139,7 +3486,7 @@ paths:
3139 '404': 3486 '404':
3140 description: video or language or caption for that language not found 3487 description: video or language or caption for that language not found
3141 3488
3142 /video-channels: 3489 /api/v1/video-channels:
3143 get: 3490 get:
3144 summary: List video channels 3491 summary: List video channels
3145 operationId: getVideoChannels 3492 operationId: getVideoChannels
@@ -3182,7 +3529,7 @@ paths:
3182 schema: 3529 schema:
3183 $ref: '#/components/schemas/VideoChannelCreate' 3530 $ref: '#/components/schemas/VideoChannelCreate'
3184 3531
3185 '/video-channels/{channelHandle}': 3532 '/api/v1/video-channels/{channelHandle}':
3186 get: 3533 get:
3187 summary: Get a video channel 3534 summary: Get a video channel
3188 operationId: getVideoChannel 3535 operationId: getVideoChannel
@@ -3227,7 +3574,7 @@ paths:
3227 '204': 3574 '204':
3228 description: successful operation 3575 description: successful operation
3229 3576
3230 '/video-channels/{channelHandle}/videos': 3577 '/api/v1/video-channels/{channelHandle}/videos':
3231 get: 3578 get:
3232 summary: List videos of a video channel 3579 summary: List videos of a video channel
3233 operationId: getVideoChannelVideos 3580 operationId: getVideoChannelVideos
@@ -3260,7 +3607,7 @@ paths:
3260 schema: 3607 schema:
3261 $ref: '#/components/schemas/VideoListResponse' 3608 $ref: '#/components/schemas/VideoListResponse'
3262 3609
3263 '/video-channels/{channelHandle}/followers': 3610 '/api/v1/video-channels/{channelHandle}/followers':
3264 get: 3611 get:
3265 tags: 3612 tags:
3266 - Video Channels 3613 - Video Channels
@@ -3290,7 +3637,7 @@ paths:
3290 items: 3637 items:
3291 $ref: '#/components/schemas/Follow' 3638 $ref: '#/components/schemas/Follow'
3292 3639
3293 '/video-channels/{channelHandle}/avatar/pick': 3640 '/api/v1/video-channels/{channelHandle}/avatar/pick':
3294 post: 3641 post:
3295 summary: Update channel avatar 3642 summary: Update channel avatar
3296 security: 3643 security:
@@ -3333,7 +3680,7 @@ paths:
3333 avatarfile: 3680 avatarfile:
3334 contentType: image/png, image/jpeg 3681 contentType: image/png, image/jpeg
3335 3682
3336 '/video-channels/{channelHandle}/avatar': 3683 '/api/v1/video-channels/{channelHandle}/avatar':
3337 delete: 3684 delete:
3338 summary: Delete channel avatar 3685 summary: Delete channel avatar
3339 security: 3686 security:
@@ -3346,7 +3693,7 @@ paths:
3346 '204': 3693 '204':
3347 description: successful operation 3694 description: successful operation
3348 3695
3349 '/video-channels/{channelHandle}/banner/pick': 3696 '/api/v1/video-channels/{channelHandle}/banner/pick':
3350 post: 3697 post:
3351 summary: Update channel banner 3698 summary: Update channel banner
3352 security: 3699 security:
@@ -3389,7 +3736,7 @@ paths:
3389 bannerfile: 3736 bannerfile:
3390 contentType: image/png, image/jpeg 3737 contentType: image/png, image/jpeg
3391 3738
3392 '/video-channels/{channelHandle}/banner': 3739 '/api/v1/video-channels/{channelHandle}/banner':
3393 delete: 3740 delete:
3394 summary: Delete channel banner 3741 summary: Delete channel banner
3395 security: 3742 security:
@@ -3402,7 +3749,7 @@ paths:
3402 '204': 3749 '204':
3403 description: successful operation 3750 description: successful operation
3404 3751
3405 '/video-channels/{channelHandle}/import-videos': 3752 '/api/v1/video-channels/{channelHandle}/import-videos':
3406 post: 3753 post:
3407 summary: Import videos in channel 3754 summary: Import videos in channel
3408 description: Import a remote channel/playlist videos into a channel 3755 description: Import a remote channel/playlist videos into a channel
@@ -3422,7 +3769,7 @@ paths:
3422 '204': 3769 '204':
3423 description: successful operation 3770 description: successful operation
3424 3771
3425 '/video-channel-syncs': 3772 '/api/v1/video-channel-syncs':
3426 post: 3773 post:
3427 summary: Create a synchronization for a video channel 3774 summary: Create a synchronization for a video channel
3428 operationId: addVideoChannelSync 3775 operationId: addVideoChannelSync
@@ -3446,7 +3793,7 @@ paths:
3446 videoChannelSync: 3793 videoChannelSync:
3447 $ref: "#/components/schemas/VideoChannelSync" 3794 $ref: "#/components/schemas/VideoChannelSync"
3448 3795
3449 '/video-channel-syncs/{channelSyncId}': 3796 '/api/v1/video-channel-syncs/{channelSyncId}':
3450 delete: 3797 delete:
3451 summary: Delete a video channel synchronization 3798 summary: Delete a video channel synchronization
3452 operationId: delVideoChannelSync 3799 operationId: delVideoChannelSync
@@ -3460,7 +3807,7 @@ paths:
3460 '204': 3807 '204':
3461 description: successful operation 3808 description: successful operation
3462 3809
3463 '/video-channel-syncs/{channelSyncId}/sync': 3810 '/api/v1/video-channel-syncs/{channelSyncId}/sync':
3464 post: 3811 post:
3465 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel 3812 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel
3466 operationId: triggerVideoChannelSync 3813 operationId: triggerVideoChannelSync
@@ -3475,7 +3822,7 @@ paths:
3475 description: successful operation 3822 description: successful operation
3476 3823
3477 3824
3478 /video-playlists/privacies: 3825 /api/v1/video-playlists/privacies:
3479 get: 3826 get:
3480 summary: List available playlist privacy policies 3827 summary: List available playlist privacy policies
3481 operationId: getPlaylistPrivacyPolicies 3828 operationId: getPlaylistPrivacyPolicies
@@ -3494,7 +3841,7 @@ paths:
3494 nightly: 3841 nightly:
3495 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies 3842 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
3496 3843
3497 /video-playlists: 3844 /api/v1/video-playlists:
3498 get: 3845 get:
3499 summary: List video playlists 3846 summary: List video playlists
3500 operationId: getPlaylists 3847 operationId: getPlaylists
@@ -3576,7 +3923,7 @@ paths:
3576 thumbnailfile: 3923 thumbnailfile:
3577 contentType: image/jpeg 3924 contentType: image/jpeg
3578 3925
3579 /video-playlists/{playlistId}: 3926 /api/v1/video-playlists/{playlistId}:
3580 get: 3927 get:
3581 summary: Get a video playlist 3928 summary: Get a video playlist
3582 tags: 3929 tags:
@@ -3641,7 +3988,7 @@ paths:
3641 '204': 3988 '204':
3642 description: successful operation 3989 description: successful operation
3643 3990
3644 /video-playlists/{playlistId}/videos: 3991 /api/v1/video-playlists/{playlistId}/videos:
3645 get: 3992 get:
3646 summary: 'List videos of a playlist' 3993 summary: 'List videos of a playlist'
3647 operationId: getVideoPlaylistVideos 3994 operationId: getVideoPlaylistVideos
@@ -3705,7 +4052,7 @@ paths:
3705 required: 4052 required:
3706 - videoId 4053 - videoId
3707 4054
3708 /video-playlists/{playlistId}/videos/reorder: 4055 /api/v1/video-playlists/{playlistId}/videos/reorder:
3709 post: 4056 post:
3710 summary: 'Reorder a playlist' 4057 summary: 'Reorder a playlist'
3711 operationId: reorderVideoPlaylist 4058 operationId: reorderVideoPlaylist
@@ -3740,7 +4087,7 @@ paths:
3740 - startPosition 4087 - startPosition
3741 - insertAfterPosition 4088 - insertAfterPosition
3742 4089
3743 /video-playlists/{playlistId}/videos/{playlistElementId}: 4090 /api/v1/video-playlists/{playlistId}/videos/{playlistElementId}:
3744 put: 4091 put:
3745 summary: Update a playlist element 4092 summary: Update a playlist element
3746 operationId: putVideoPlaylistVideo 4093 operationId: putVideoPlaylistVideo
@@ -3782,7 +4129,7 @@ paths:
3782 '204': 4129 '204':
3783 description: successful operation 4130 description: successful operation
3784 4131
3785 '/users/me/video-playlists/videos-exist': 4132 '/api/v1/users/me/video-playlists/videos-exist':
3786 get: 4133 get:
3787 summary: Check video exists in my playlists 4134 summary: Check video exists in my playlists
3788 security: 4135 security:
@@ -3822,7 +4169,7 @@ paths:
3822 type: integer 4169 type: integer
3823 format: seconds 4170 format: seconds
3824 4171
3825 '/accounts/{name}/video-channels': 4172 '/api/v1/accounts/{name}/video-channels':
3826 get: 4173 get:
3827 summary: List video channels of an account 4174 summary: List video channels of an account
3828 tags: 4175 tags:
@@ -3846,7 +4193,7 @@ paths:
3846 schema: 4193 schema:
3847 $ref: '#/components/schemas/VideoChannelList' 4194 $ref: '#/components/schemas/VideoChannelList'
3848 4195
3849 '/accounts/{name}/video-channel-syncs': 4196 '/api/v1/accounts/{name}/video-channel-syncs':
3850 get: 4197 get:
3851 summary: List the synchronizations of video channels of an account 4198 summary: List the synchronizations of video channels of an account
3852 tags: 4199 tags:
@@ -3866,7 +4213,7 @@ paths:
3866 schema: 4213 schema:
3867 $ref: '#/components/schemas/VideoChannelSyncList' 4214 $ref: '#/components/schemas/VideoChannelSyncList'
3868 4215
3869 '/accounts/{name}/ratings': 4216 '/api/v1/accounts/{name}/ratings':
3870 get: 4217 get:
3871 summary: List ratings of an account 4218 summary: List ratings of an account
3872 security: 4219 security:
@@ -3897,7 +4244,7 @@ paths:
3897 items: 4244 items:
3898 $ref: '#/components/schemas/VideoRating' 4245 $ref: '#/components/schemas/VideoRating'
3899 4246
3900 '/videos/{id}/comment-threads': 4247 '/api/v1/videos/{id}/comment-threads':
3901 get: 4248 get:
3902 summary: List threads of a video 4249 summary: List threads of a video
3903 tags: 4250 tags:
@@ -3945,7 +4292,7 @@ paths:
3945 required: 4292 required:
3946 - text 4293 - text
3947 4294
3948 '/videos/{id}/comment-threads/{threadId}': 4295 '/api/v1/videos/{id}/comment-threads/{threadId}':
3949 get: 4296 get:
3950 summary: Get a thread 4297 summary: Get a thread
3951 tags: 4298 tags:
@@ -3961,7 +4308,7 @@ paths:
3961 schema: 4308 schema:
3962 $ref: '#/components/schemas/VideoCommentThreadTree' 4309 $ref: '#/components/schemas/VideoCommentThreadTree'
3963 4310
3964 '/videos/{id}/comments/{commentId}': 4311 '/api/v1/videos/{id}/comments/{commentId}':
3965 post: 4312 post:
3966 summary: Reply to a thread of a video 4313 summary: Reply to a thread of a video
3967 security: 4314 security:
@@ -4012,7 +4359,7 @@ paths:
4012 '409': 4359 '409':
4013 description: comment is already deleted 4360 description: comment is already deleted
4014 4361
4015 '/videos/{id}/rate': 4362 '/api/v1/videos/{id}/rate':
4016 put: 4363 put:
4017 summary: Like/dislike a video 4364 summary: Like/dislike a video
4018 security: 4365 security:
@@ -4040,7 +4387,7 @@ paths:
4040 '404': 4387 '404':
4041 description: video does not exist 4388 description: video does not exist
4042 4389
4043 '/videos/{id}/hls': 4390 '/api/v1/videos/{id}/hls':
4044 delete: 4391 delete:
4045 summary: Delete video HLS files 4392 summary: Delete video HLS files
4046 security: 4393 security:
@@ -4056,7 +4403,7 @@ paths:
4056 description: successful operation 4403 description: successful operation
4057 '404': 4404 '404':
4058 description: video does not exist 4405 description: video does not exist
4059 '/videos/{id}/webtorrent': 4406 '/api/v1/videos/{id}/webtorrent':
4060 delete: 4407 delete:
4061 summary: Delete video WebTorrent files 4408 summary: Delete video WebTorrent files
4062 security: 4409 security:
@@ -4073,7 +4420,7 @@ paths:
4073 '404': 4420 '404':
4074 description: video does not exist 4421 description: video does not exist
4075 4422
4076 '/videos/{id}/transcoding': 4423 '/api/v1/videos/{id}/transcoding':
4077 post: 4424 post:
4078 summary: Create a transcoding job 4425 summary: Create a transcoding job
4079 security: 4426 security:
@@ -4103,7 +4450,7 @@ paths:
4103 '404': 4450 '404':
4104 description: video does not exist 4451 description: video does not exist
4105 4452
4106 /search/videos: 4453 /api/v1/search/videos:
4107 get: 4454 get:
4108 tags: 4455 tags:
4109 - Search 4456 - Search
@@ -4184,7 +4531,7 @@ paths:
4184 '500': 4531 '500':
4185 description: search index unavailable 4532 description: search index unavailable
4186 4533
4187 /search/video-channels: 4534 /api/v1/search/video-channels:
4188 get: 4535 get:
4189 tags: 4536 tags:
4190 - Search 4537 - Search
@@ -4217,7 +4564,7 @@ paths:
4217 '500': 4564 '500':
4218 description: search index unavailable 4565 description: search index unavailable
4219 4566
4220 /search/video-playlists: 4567 /api/v1/search/video-playlists:
4221 get: 4568 get:
4222 tags: 4569 tags:
4223 - Search 4570 - Search
@@ -4258,7 +4605,7 @@ paths:
4258 '500': 4605 '500':
4259 description: search index unavailable 4606 description: search index unavailable
4260 4607
4261 /blocklist/status: 4608 /api/v1/blocklist/status:
4262 get: 4609 get:
4263 tags: 4610 tags:
4264 - Account Blocks 4611 - Account Blocks
@@ -4291,7 +4638,7 @@ paths:
4291 schema: 4638 schema:
4292 $ref: '#/components/schemas/BlockStatus' 4639 $ref: '#/components/schemas/BlockStatus'
4293 4640
4294 /server/blocklist/accounts: 4641 /api/v1/server/blocklist/accounts:
4295 get: 4642 get:
4296 tags: 4643 tags:
4297 - Account Blocks 4644 - Account Blocks
@@ -4331,7 +4678,7 @@ paths:
4331 '409': 4678 '409':
4332 description: self-blocking forbidden 4679 description: self-blocking forbidden
4333 4680
4334 '/server/blocklist/accounts/{accountName}': 4681 '/api/v1/server/blocklist/accounts/{accountName}':
4335 delete: 4682 delete:
4336 tags: 4683 tags:
4337 - Account Blocks 4684 - Account Blocks
@@ -4352,7 +4699,7 @@ paths:
4352 '404': 4699 '404':
4353 description: account or account block does not exist 4700 description: account or account block does not exist
4354 4701
4355 /server/blocklist/servers: 4702 /api/v1/server/blocklist/servers:
4356 get: 4703 get:
4357 tags: 4704 tags:
4358 - Server Blocks 4705 - Server Blocks
@@ -4392,7 +4739,7 @@ paths:
4392 '409': 4739 '409':
4393 description: self-blocking forbidden 4740 description: self-blocking forbidden
4394 4741
4395 '/server/blocklist/servers/{host}': 4742 '/api/v1/server/blocklist/servers/{host}':
4396 delete: 4743 delete:
4397 tags: 4744 tags:
4398 - Server Blocks 4745 - Server Blocks
@@ -4414,7 +4761,7 @@ paths:
4414 '404': 4761 '404':
4415 description: account block does not exist 4762 description: account block does not exist
4416 4763
4417 /server/redundancy/{host}: 4764 /api/v1/server/redundancy/{host}:
4418 put: 4765 put:
4419 tags: 4766 tags:
4420 - Instance Redundancy 4767 - Instance Redundancy
@@ -4447,7 +4794,7 @@ paths:
4447 '404': 4794 '404':
4448 description: server is not already known 4795 description: server is not already known
4449 4796
4450 /server/redundancy/videos: 4797 /api/v1/server/redundancy/videos:
4451 get: 4798 get:
4452 tags: 4799 tags:
4453 - Video Mirroring 4800 - Video Mirroring
@@ -4506,7 +4853,7 @@ paths:
4506 '409': 4853 '409':
4507 description: video is already mirrored 4854 description: video is already mirrored
4508 4855
4509 /server/redundancy/videos/{redundancyId}: 4856 /api/v1/server/redundancy/videos/{redundancyId}:
4510 delete: 4857 delete:
4511 tags: 4858 tags:
4512 - Video Mirroring 4859 - Video Mirroring
@@ -4528,7 +4875,7 @@ paths:
4528 '404': 4875 '404':
4529 description: video redundancy not found 4876 description: video redundancy not found
4530 4877
4531 /server/stats: 4878 /api/v1/server/stats:
4532 get: 4879 get:
4533 tags: 4880 tags:
4534 - Stats 4881 - Stats
@@ -4543,7 +4890,7 @@ paths:
4543 schema: 4890 schema:
4544 $ref: '#/components/schemas/ServerStats' 4891 $ref: '#/components/schemas/ServerStats'
4545 4892
4546 /server/logs/client: 4893 /api/v1/server/logs/client:
4547 post: 4894 post:
4548 tags: 4895 tags:
4549 - Logs 4896 - Logs
@@ -4558,7 +4905,7 @@ paths:
4558 '204': 4905 '204':
4559 description: successful operation 4906 description: successful operation
4560 4907
4561 /server/logs: 4908 /api/v1/server/logs:
4562 get: 4909 get:
4563 tags: 4910 tags:
4564 - Logs 4911 - Logs
@@ -4577,7 +4924,7 @@ paths:
4577 items: 4924 items:
4578 type: string 4925 type: string
4579 4926
4580 /server/audit-logs: 4927 /api/v1/server/audit-logs:
4581 get: 4928 get:
4582 tags: 4929 tags:
4583 - Logs 4930 - Logs
@@ -4596,262 +4943,7 @@ paths:
4596 items: 4943 items:
4597 type: string 4944 type: string
4598 4945
4599 '/feeds/video-comments.{format}': 4946 /api/v1/plugins:
4600 get:
4601 tags:
4602 - Feeds
4603 summary: List comments on videos
4604 operationId: getSyndicatedComments
4605 parameters:
4606 - name: format
4607 in: path
4608 required: true
4609 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4610 schema:
4611 type: string
4612 enum:
4613 - xml
4614 - rss
4615 - rss2
4616 - atom
4617 - atom1
4618 - json
4619 - json1
4620 - name: videoId
4621 in: query
4622 description: 'limit listing to a specific video'
4623 schema:
4624 type: string
4625 - name: accountId
4626 in: query
4627 description: 'limit listing to a specific account'
4628 schema:
4629 type: string
4630 - name: accountName
4631 in: query
4632 description: 'limit listing to a specific account'
4633 schema:
4634 type: string
4635 - name: videoChannelId
4636 in: query
4637 description: 'limit listing to a specific video channel'
4638 schema:
4639 type: string
4640 - name: videoChannelName
4641 in: query
4642 description: 'limit listing to a specific video channel'
4643 schema:
4644 type: string
4645 responses:
4646 '204':
4647 description: successful operation
4648 headers:
4649 Cache-Control:
4650 schema:
4651 type: string
4652 default: 'max-age=900' # 15 min cache
4653 content:
4654 application/xml:
4655 schema:
4656 $ref: '#/components/schemas/VideoCommentsForXML'
4657 examples:
4658 nightly:
4659 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4660 application/rss+xml:
4661 schema:
4662 $ref: '#/components/schemas/VideoCommentsForXML'
4663 examples:
4664 nightly:
4665 externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local
4666 text/xml:
4667 schema:
4668 $ref: '#/components/schemas/VideoCommentsForXML'
4669 examples:
4670 nightly:
4671 externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local
4672 application/atom+xml:
4673 schema:
4674 $ref: '#/components/schemas/VideoCommentsForXML'
4675 examples:
4676 nightly:
4677 externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local
4678 application/json:
4679 schema:
4680 type: object
4681 examples:
4682 nightly:
4683 externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local
4684 '400':
4685 x-summary: field inconsistencies
4686 description: >
4687 Arises when:
4688 - videoId filter is mixed with a channel filter
4689 '404':
4690 description: video, video channel or account not found
4691 '406':
4692 description: accept header unsupported
4693
4694 '/feeds/videos.{format}':
4695 get:
4696 tags:
4697 - Feeds
4698 summary: List videos
4699 operationId: getSyndicatedVideos
4700 parameters:
4701 - name: format
4702 in: path
4703 required: true
4704 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4705 schema:
4706 type: string
4707 enum:
4708 - xml
4709 - rss
4710 - rss2
4711 - atom
4712 - atom1
4713 - json
4714 - json1
4715 - name: accountId
4716 in: query
4717 description: 'limit listing to a specific account'
4718 schema:
4719 type: string
4720 - name: accountName
4721 in: query
4722 description: 'limit listing to a specific account'
4723 schema:
4724 type: string
4725 - name: videoChannelId
4726 in: query
4727 description: 'limit listing to a specific video channel'
4728 schema:
4729 type: string
4730 - name: videoChannelName
4731 in: query
4732 description: 'limit listing to a specific video channel'
4733 schema:
4734 type: string
4735 - $ref: '#/components/parameters/sort'
4736 - $ref: '#/components/parameters/nsfw'
4737 - $ref: '#/components/parameters/isLocal'
4738 - $ref: '#/components/parameters/include'
4739 - $ref: '#/components/parameters/privacyOneOf'
4740 - $ref: '#/components/parameters/hasHLSFiles'
4741 - $ref: '#/components/parameters/hasWebtorrentFiles'
4742 responses:
4743 '204':
4744 description: successful operation
4745 headers:
4746 Cache-Control:
4747 schema:
4748 type: string
4749 default: 'max-age=900' # 15 min cache
4750 content:
4751 application/xml:
4752 schema:
4753 $ref: '#/components/schemas/VideosForXML'
4754 examples:
4755 nightly:
4756 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4757 application/rss+xml:
4758 schema:
4759 $ref: '#/components/schemas/VideosForXML'
4760 examples:
4761 nightly:
4762 externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local
4763 text/xml:
4764 schema:
4765 $ref: '#/components/schemas/VideosForXML'
4766 examples:
4767 nightly:
4768 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
4769 application/atom+xml:
4770 schema:
4771 $ref: '#/components/schemas/VideosForXML'
4772 examples:
4773 nightly:
4774 externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local
4775 application/json:
4776 schema:
4777 type: object
4778 examples:
4779 nightly:
4780 externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local
4781 '404':
4782 description: video channel or account not found
4783 '406':
4784 description: accept header unsupported
4785
4786 '/feeds/subscriptions.{format}':
4787 get:
4788 tags:
4789 - Feeds
4790 - Account
4791 summary: List videos of subscriptions tied to a token
4792 operationId: getSyndicatedSubscriptionVideos
4793 parameters:
4794 - name: format
4795 in: path
4796 required: true
4797 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
4798 schema:
4799 type: string
4800 enum:
4801 - xml
4802 - rss
4803 - rss2
4804 - atom
4805 - atom1
4806 - json
4807 - json1
4808 - name: accountId
4809 in: query
4810 description: limit listing to a specific account
4811 schema:
4812 type: string
4813 required: true
4814 - name: token
4815 in: query
4816 description: private token allowing access
4817 schema:
4818 type: string
4819 required: true
4820 - $ref: '#/components/parameters/sort'
4821 - $ref: '#/components/parameters/nsfw'
4822 - $ref: '#/components/parameters/isLocal'
4823 - $ref: '#/components/parameters/include'
4824 - $ref: '#/components/parameters/privacyOneOf'
4825 - $ref: '#/components/parameters/hasHLSFiles'
4826 - $ref: '#/components/parameters/hasWebtorrentFiles'
4827 responses:
4828 '204':
4829 description: successful operation
4830 headers:
4831 Cache-Control:
4832 schema:
4833 type: string
4834 default: 'max-age=900' # 15 min cache
4835 content:
4836 application/xml:
4837 schema:
4838 $ref: '#/components/schemas/VideosForXML'
4839 application/rss+xml:
4840 schema:
4841 $ref: '#/components/schemas/VideosForXML'
4842 text/xml:
4843 schema:
4844 $ref: '#/components/schemas/VideosForXML'
4845 application/atom+xml:
4846 schema:
4847 $ref: '#/components/schemas/VideosForXML'
4848 application/json:
4849 schema:
4850 type: object
4851 '406':
4852 description: accept header unsupported
4853
4854 /plugins:
4855 get: 4947 get:
4856 tags: 4948 tags:
4857 - Plugins 4949 - Plugins
@@ -4880,7 +4972,7 @@ paths:
4880 schema: 4972 schema:
4881 $ref: '#/components/schemas/PluginResponse' 4973 $ref: '#/components/schemas/PluginResponse'
4882 4974
4883 /plugins/available: 4975 /api/v1/plugins/available:
4884 get: 4976 get:
4885 tags: 4977 tags:
4886 - Plugins 4978 - Plugins
@@ -4915,7 +5007,7 @@ paths:
4915 '503': 5007 '503':
4916 description: plugin index unavailable 5008 description: plugin index unavailable
4917 5009
4918 /plugins/install: 5010 /api/v1/plugins/install:
4919 post: 5011 post:
4920 tags: 5012 tags:
4921 - Plugins 5013 - Plugins
@@ -4950,7 +5042,7 @@ paths:
4950 '400': 5042 '400':
4951 description: should have either `npmName` or `path` set 5043 description: should have either `npmName` or `path` set
4952 5044
4953 /plugins/update: 5045 /api/v1/plugins/update:
4954 post: 5046 post:
4955 tags: 5047 tags:
4956 - Plugins 5048 - Plugins
@@ -4987,7 +5079,7 @@ paths:
4987 '404': 5079 '404':
4988 description: existing plugin not found 5080 description: existing plugin not found
4989 5081
4990 /plugins/uninstall: 5082 /api/v1/plugins/uninstall:
4991 post: 5083 post:
4992 tags: 5084 tags:
4993 - Plugins 5085 - Plugins
@@ -5014,7 +5106,7 @@ paths:
5014 '404': 5106 '404':
5015 description: existing plugin not found 5107 description: existing plugin not found
5016 5108
5017 /plugins/{npmName}: 5109 /api/v1/plugins/{npmName}:
5018 get: 5110 get:
5019 tags: 5111 tags:
5020 - Plugins 5112 - Plugins
@@ -5035,7 +5127,7 @@ paths:
5035 '404': 5127 '404':
5036 description: plugin not found 5128 description: plugin not found
5037 5129
5038 /plugins/{npmName}/settings: 5130 /api/v1/plugins/{npmName}/settings:
5039 put: 5131 put:
5040 tags: 5132 tags:
5041 - Plugins 5133 - Plugins
@@ -5060,7 +5152,7 @@ paths:
5060 '404': 5152 '404':
5061 description: plugin not found 5153 description: plugin not found
5062 5154
5063 /plugins/{npmName}/public-settings: 5155 /api/v1/plugins/{npmName}/public-settings:
5064 get: 5156 get:
5065 tags: 5157 tags:
5066 - Plugins 5158 - Plugins
@@ -5078,7 +5170,7 @@ paths:
5078 '404': 5170 '404':
5079 description: plugin not found 5171 description: plugin not found
5080 5172
5081 /plugins/{npmName}/registered-settings: 5173 /api/v1/plugins/{npmName}/registered-settings:
5082 get: 5174 get:
5083 tags: 5175 tags:
5084 - Plugins 5176 - Plugins
@@ -5099,7 +5191,7 @@ paths:
5099 '404': 5191 '404':
5100 description: plugin not found 5192 description: plugin not found
5101 5193
5102 /metrics/playback: 5194 /api/v1/metrics/playback:
5103 post: 5195 post:
5104 summary: Create playback metrics 5196 summary: Create playback metrics
5105 description: These metrics are exposed by OpenTelemetry metrics exporter if enabled. 5197 description: These metrics are exposed by OpenTelemetry metrics exporter if enabled.
@@ -5115,11 +5207,11 @@ paths:
5115 description: successful operation 5207 description: successful operation
5116 5208
5117servers: 5209servers:
5118 - url: 'https://peertube2.cpy.re/api/v1' 5210 - url: 'https://peertube2.cpy.re'
5119 description: Live Test Server (live data - latest nightly version) 5211 description: Live Test Server (live data - latest nightly version)
5120 - url: 'https://peertube3.cpy.re/api/v1' 5212 - url: 'https://peertube3.cpy.re'
5121 description: Live Test Server (live data - latest RC version) 5213 description: Live Test Server (live data - latest RC version)
5122 - url: 'https://peertube.cpy.re/api/v1' 5214 - url: 'https://peertube.cpy.re'
5123 description: Live Test Server (live data - stable version) 5215 description: Live Test Server (live data - stable version)
5124components: 5216components:
5125 parameters: 5217 parameters:
@@ -5596,6 +5688,22 @@ components:
5596 - Group 5688 - Group
5597 - Service 5689 - Service
5598 - Organization 5690 - Organization
5691 staticFilename:
5692 name: filename
5693 in: path
5694 required: true
5695 description: Filename
5696 schema:
5697 type: string
5698 videoFileToken:
5699 name: videoFileToken
5700 in: query
5701 required: false
5702 description: Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header.
5703 schema:
5704 type: string
5705
5706
5599 securitySchemes: 5707 securitySchemes:
5600 OAuth2: 5708 OAuth2:
5601 description: | 5709 description: |
@@ -7349,6 +7457,16 @@ components:
7349 properties: 7457 properties:
7350 comment: 7458 comment:
7351 $ref: '#/components/schemas/VideoComment' 7459 $ref: '#/components/schemas/VideoComment'
7460 VideoTokenResponse:
7461 properties:
7462 files:
7463 type: object
7464 properties:
7465 token:
7466 type: string
7467 expires:
7468 type: string
7469 format: date-time
7352 VideoListResponse: 7470 VideoListResponse:
7353 properties: 7471 properties:
7354 total: 7472 total:
diff --git a/support/nginx/peertube b/support/nginx/peertube
index f6f754b58..cf200ba00 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -214,6 +214,10 @@ server {
214 try_files $uri @api; 214 try_files $uri @api;
215 } 215 }
216 216
217 location ~ ^/static/(webseed|streaming-playlists)/private/ {
218 try_files /dev/null @api;
219 }
220
217 # Bypass PeerTube for performance reasons. Optional. 221 # Bypass PeerTube for performance reasons. Optional.
218 location ~ ^/static/(webseed|redundancy|streaming-playlists)/ { 222 location ~ ^/static/(webseed|redundancy|streaming-playlists)/ {
219 limit_rate_after 5M; 223 limit_rate_after 5M;