aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/api/openapi.yaml118
1 files changed, 111 insertions, 7 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index db89153d7..61fd6c95a 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -65,7 +65,7 @@ info:
65 65
66 { 66 {
67 "errors": { 67 "errors": {
68 "id": { // 68 "id": {
69 "value": "a117eb-c6a9-4756-bb09-2a956239f", 69 "value": "a117eb-c6a9-4756-bb09-2a956239f",
70 "msg": "Should have a valid id", 70 "msg": "Should have a valid id",
71 "param": "id", 71 "param": "id",
@@ -302,6 +302,7 @@ paths:
302 tags: 302 tags:
303 - Accounts 303 - Accounts
304 summary: Get an account 304 summary: Get an account
305 operationId: getAccount
305 parameters: 306 parameters:
306 - $ref: '#/components/parameters/name' 307 - $ref: '#/components/parameters/name'
307 responses: 308 responses:
@@ -313,12 +314,14 @@ paths:
313 $ref: '#/components/schemas/Account' 314 $ref: '#/components/schemas/Account'
314 '404': 315 '404':
315 description: account not found 316 description: account not found
317
316 '/accounts/{name}/videos': 318 '/accounts/{name}/videos':
317 get: 319 get:
318 tags: 320 tags:
319 - Accounts 321 - Accounts
320 - Video 322 - Video
321 summary: 'List videos of an account' 323 summary: 'List videos of an account'
324 operationId: getAccountVideos
322 parameters: 325 parameters:
323 - $ref: '#/components/parameters/name' 326 - $ref: '#/components/parameters/name'
324 - $ref: '#/components/parameters/categoryOneOf' 327 - $ref: '#/components/parameters/categoryOneOf'
@@ -374,11 +377,13 @@ paths:
374 json = r.json() 377 json = r.json()
375 378
376 print(json) 379 print(json)
380
377 /accounts: 381 /accounts:
378 get: 382 get:
379 tags: 383 tags:
380 - Accounts 384 - Accounts
381 summary: List accounts 385 summary: List accounts
386 operationId: getAccounts
382 parameters: 387 parameters:
383 - $ref: '#/components/parameters/start' 388 - $ref: '#/components/parameters/start'
384 - $ref: '#/components/parameters/count' 389 - $ref: '#/components/parameters/count'
@@ -392,11 +397,13 @@ paths:
392 type: array 397 type: array
393 items: 398 items:
394 $ref: '#/components/schemas/Account' 399 $ref: '#/components/schemas/Account'
400
395 /config: 401 /config:
396 get: 402 get:
397 tags: 403 tags:
398 - Config 404 - Config
399 summary: Get instance public configuration 405 summary: Get instance public configuration
406 operationId: getConfig
400 responses: 407 responses:
401 '200': 408 '200':
402 description: successful operation 409 description: successful operation
@@ -407,9 +414,11 @@ paths:
407 examples: 414 examples:
408 nightly: 415 nightly:
409 externalValue: https://peertube2.cpy.re/api/v1/config 416 externalValue: https://peertube2.cpy.re/api/v1/config
417
410 /config/about: 418 /config/about:
411 get: 419 get:
412 summary: Get instance "About" information 420 summary: Get instance "About" information
421 operationId: getAbout
413 tags: 422 tags:
414 - Config 423 - Config
415 responses: 424 responses:
@@ -422,9 +431,11 @@ paths:
422 examples: 431 examples:
423 nightly: 432 nightly:
424 externalValue: https://peertube2.cpy.re/api/v1/config/about 433 externalValue: https://peertube2.cpy.re/api/v1/config/about
434
425 /config/custom: 435 /config/custom:
426 get: 436 get:
427 summary: Get instance runtime configuration 437 summary: Get instance runtime configuration
438 operationId: getCustomConfig
428 tags: 439 tags:
429 - Config 440 - Config
430 security: 441 security:
@@ -439,6 +450,7 @@ paths:
439 $ref: '#/components/schemas/ServerConfigCustom' 450 $ref: '#/components/schemas/ServerConfigCustom'
440 put: 451 put:
441 summary: Set instance runtime configuration 452 summary: Set instance runtime configuration
453 operationId: putCustomConfig
442 tags: 454 tags:
443 - Config 455 - Config
444 security: 456 security:
@@ -455,6 +467,7 @@ paths:
455 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled 467 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
456 delete: 468 delete:
457 summary: Delete instance runtime configuration 469 summary: Delete instance runtime configuration
470 operationId: delCustomConfig
458 tags: 471 tags:
459 - Config 472 - Config
460 security: 473 security:
@@ -463,9 +476,11 @@ paths:
463 responses: 476 responses:
464 '200': 477 '200':
465 description: successful operation 478 description: successful operation
479
466 /jobs/{state}: 480 /jobs/{state}:
467 get: 481 get:
468 summary: List instance jobs 482 summary: List instance jobs
483 operationId: getJobs
469 security: 484 security:
470 - OAuth2: 485 - OAuth2:
471 - admin 486 - admin
@@ -532,6 +547,7 @@ paths:
532 type: array 547 type: array
533 items: 548 items:
534 $ref: '#/components/schemas/Follow' 549 $ref: '#/components/schemas/Follow'
550
535 '/server/followers/{nameWithHost}': 551 '/server/followers/{nameWithHost}':
536 delete: 552 delete:
537 summary: Remove or reject a follower to your server 553 summary: Remove or reject a follower to your server
@@ -553,6 +569,7 @@ paths:
553 description: successful operation 569 description: successful operation
554 '404': 570 '404':
555 description: follower not found 571 description: follower not found
572
556 '/server/followers/{nameWithHost}/reject': 573 '/server/followers/{nameWithHost}/reject':
557 post: 574 post:
558 summary: Reject a pending follower to your server 575 summary: Reject a pending follower to your server
@@ -574,6 +591,7 @@ paths:
574 description: successful operation 591 description: successful operation
575 '404': 592 '404':
576 description: follower not found 593 description: follower not found
594
577 '/server/followers/{nameWithHost}/accept': 595 '/server/followers/{nameWithHost}/accept':
578 post: 596 post:
579 summary: Accept a pending follower to your server 597 summary: Accept a pending follower to your server
@@ -646,6 +664,7 @@ paths:
646 type: string 664 type: string
647 format: hostname 665 format: hostname
648 uniqueItems: true 666 uniqueItems: true
667
649 '/server/following/{host}': 668 '/server/following/{host}':
650 delete: 669 delete:
651 summary: Unfollow a server 670 summary: Unfollow a server
@@ -713,6 +732,7 @@ paths:
713 required: true 732 required: true
714 get: 733 get:
715 summary: List users 734 summary: List users
735 operationId: getUsers
716 security: 736 security:
717 - OAuth2: 737 - OAuth2:
718 - admin 738 - admin
@@ -733,6 +753,7 @@ paths:
733 type: array 753 type: array
734 items: 754 items:
735 $ref: '#/components/schemas/User' 755 $ref: '#/components/schemas/User'
756
736 '/users/{id}': 757 '/users/{id}':
737 parameters: 758 parameters:
738 - $ref: '#/components/parameters/id' 759 - $ref: '#/components/parameters/id'
@@ -792,7 +813,7 @@ paths:
792 /oauth-clients/local: 813 /oauth-clients/local:
793 get: 814 get:
794 summary: Login prerequisite 815 summary: Login prerequisite
795 description: You need to retrieve a client id and secret before [logging in](#operation/getOauthToken). 816 description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken).
796 operationId: getOAuthClient 817 operationId: getOAuthClient
797 tags: 818 tags:
798 - Session 819 - Session
@@ -816,6 +837,7 @@ paths:
816 837
817 ## AUTH 838 ## AUTH
818 curl -s "$API/oauth-clients/local" 839 curl -s "$API/oauth-clients/local"
840
819 /users/token: 841 /users/token:
820 post: 842 post:
821 summary: Login 843 summary: Login
@@ -880,6 +902,7 @@ paths:
880 --data username="$USERNAME" \ 902 --data username="$USERNAME" \
881 --data password="$PASSWORD" \ 903 --data password="$PASSWORD" \
882 | jq -r ".access_token" 904 | jq -r ".access_token"
905
883 /users/revoke-token: 906 /users/revoke-token:
884 post: 907 post:
885 summary: Logout 908 summary: Logout
@@ -896,6 +919,7 @@ paths:
896 /users/register: 919 /users/register:
897 post: 920 post:
898 summary: Register a user 921 summary: Register a user
922 operationId: registerUser
899 tags: 923 tags:
900 - Users 924 - Users
901 - Register 925 - Register
@@ -908,9 +932,11 @@ paths:
908 schema: 932 schema:
909 $ref: '#/components/schemas/RegisterUser' 933 $ref: '#/components/schemas/RegisterUser'
910 required: true 934 required: true
935
911 /users/{id}/verify-email: 936 /users/{id}/verify-email:
912 post: 937 post:
913 summary: Verify a user 938 summary: Verify a user
939 operationId: verifyUser
914 description: | 940 description: |
915 Following a user registration, the new user will receive an email asking to click a link 941 Following a user registration, the new user will receive an email asking to click a link
916 containing a secret. 942 containing a secret.
@@ -939,9 +965,11 @@ paths:
939 description: invalid verification string 965 description: invalid verification string
940 '404': 966 '404':
941 description: user not found 967 description: user not found
968
942 /users/ask-send-verify-email: 969 /users/ask-send-verify-email:
943 post: 970 post:
944 summary: Resend user verification link 971 summary: Resend user verification link
972 operationId: resendEmailToVerifyUser
945 tags: 973 tags:
946 - Users 974 - Users
947 - Register 975 - Register
@@ -952,6 +980,7 @@ paths:
952 /users/me: 980 /users/me:
953 get: 981 get:
954 summary: Get my user information 982 summary: Get my user information
983 operationId: getUserInfo
955 security: 984 security:
956 - OAuth2: 985 - OAuth2:
957 - user 986 - user
@@ -968,6 +997,7 @@ paths:
968 $ref: '#/components/schemas/User' 997 $ref: '#/components/schemas/User'
969 put: 998 put:
970 summary: Update my user information 999 summary: Update my user information
1000 operationId: putUserInfo
971 security: 1001 security:
972 - OAuth2: 1002 - OAuth2:
973 - user 1003 - user
@@ -982,6 +1012,7 @@ paths:
982 schema: 1012 schema:
983 $ref: '#/components/schemas/UpdateMe' 1013 $ref: '#/components/schemas/UpdateMe'
984 required: true 1014 required: true
1015
985 /users/me/videos/imports: 1016 /users/me/videos/imports:
986 get: 1017 get:
987 summary: Get video imports of my user 1018 summary: Get video imports of my user
@@ -1002,6 +1033,7 @@ paths:
1002 application/json: 1033 application/json:
1003 schema: 1034 schema:
1004 $ref: '#/components/schemas/VideoImportsList' 1035 $ref: '#/components/schemas/VideoImportsList'
1036
1005 /users/me/video-quota-used: 1037 /users/me/video-quota-used:
1006 get: 1038 get:
1007 summary: Get my user used quota 1039 summary: Get my user used quota
@@ -1026,6 +1058,7 @@ paths:
1026 type: number 1058 type: number
1027 description: The user video quota used today in bytes 1059 description: The user video quota used today in bytes
1028 example: 1681014151 1060 example: 1681014151
1061
1029 '/users/me/videos/{videoId}/rating': 1062 '/users/me/videos/{videoId}/rating':
1030 get: 1063 get:
1031 summary: Get rate of my user for a video 1064 summary: Get rate of my user for a video
@@ -1048,6 +1081,7 @@ paths:
1048 application/json: 1081 application/json:
1049 schema: 1082 schema:
1050 $ref: '#/components/schemas/GetMeVideoRating' 1083 $ref: '#/components/schemas/GetMeVideoRating'
1084
1051 /users/me/videos: 1085 /users/me/videos:
1052 get: 1086 get:
1053 summary: Get videos of my user 1087 summary: Get videos of my user
@@ -1068,6 +1102,7 @@ paths:
1068 application/json: 1102 application/json:
1069 schema: 1103 schema:
1070 $ref: '#/components/schemas/VideoListResponse' 1104 $ref: '#/components/schemas/VideoListResponse'
1105
1071 /users/me/subscriptions: 1106 /users/me/subscriptions:
1072 get: 1107 get:
1073 summary: Get my user subscriptions 1108 summary: Get my user subscriptions
@@ -1113,6 +1148,7 @@ paths:
1113 responses: 1148 responses:
1114 '200': 1149 '200':
1115 description: successful operation 1150 description: successful operation
1151
1116 /users/me/subscriptions/exist: 1152 /users/me/subscriptions/exist:
1117 get: 1153 get:
1118 summary: Get if subscriptions exist for my user 1154 summary: Get if subscriptions exist for my user
@@ -1130,6 +1166,7 @@ paths:
1130 application/json: 1166 application/json:
1131 schema: 1167 schema:
1132 type: object 1168 type: object
1169
1133 /users/me/subscriptions/videos: 1170 /users/me/subscriptions/videos:
1134 get: 1171 get:
1135 summary: List videos of subscriptions of my user 1172 summary: List videos of subscriptions of my user
@@ -1159,6 +1196,7 @@ paths:
1159 application/json: 1196 application/json:
1160 schema: 1197 schema:
1161 $ref: '#/components/schemas/VideoListResponse' 1198 $ref: '#/components/schemas/VideoListResponse'
1199
1162 '/users/me/subscriptions/{subscriptionHandle}': 1200 '/users/me/subscriptions/{subscriptionHandle}':
1163 get: 1201 get:
1164 summary: Get subscription of my user 1202 summary: Get subscription of my user
@@ -1188,6 +1226,7 @@ paths:
1188 responses: 1226 responses:
1189 '200': 1227 '200':
1190 description: successful operation 1228 description: successful operation
1229
1191 /users/me/notifications: 1230 /users/me/notifications:
1192 get: 1231 get:
1193 summary: List my notifications 1232 summary: List my notifications
@@ -1211,6 +1250,7 @@ paths:
1211 application/json: 1250 application/json:
1212 schema: 1251 schema:
1213 $ref: '#/components/schemas/NotificationListResponse' 1252 $ref: '#/components/schemas/NotificationListResponse'
1253
1214 /users/me/notifications/read: 1254 /users/me/notifications/read:
1215 post: 1255 post:
1216 summary: Mark notifications as read by their id 1256 summary: Mark notifications as read by their id
@@ -1234,6 +1274,7 @@ paths:
1234 responses: 1274 responses:
1235 '204': 1275 '204':
1236 description: successful operation 1276 description: successful operation
1277
1237 /users/me/notifications/read-all: 1278 /users/me/notifications/read-all:
1238 post: 1279 post:
1239 summary: Mark all my notification as read 1280 summary: Mark all my notification as read
@@ -1244,6 +1285,7 @@ paths:
1244 responses: 1285 responses:
1245 '204': 1286 '204':
1246 description: successful operation 1287 description: successful operation
1288
1247 /users/me/notification-settings: 1289 /users/me/notification-settings:
1248 put: 1290 put:
1249 summary: Update my notification settings 1291 summary: Update my notification settings
@@ -1284,6 +1326,7 @@ paths:
1284 responses: 1326 responses:
1285 '204': 1327 '204':
1286 description: successful operation 1328 description: successful operation
1329
1287 /users/me/history/videos: 1330 /users/me/history/videos:
1288 get: 1331 get:
1289 summary: List watched videos history 1332 summary: List watched videos history
@@ -1302,6 +1345,7 @@ paths:
1302 application/json: 1345 application/json:
1303 schema: 1346 schema:
1304 $ref: '#/components/schemas/VideoListResponse' 1347 $ref: '#/components/schemas/VideoListResponse'
1348
1305 /users/me/history/videos/remove: 1349 /users/me/history/videos/remove:
1306 post: 1350 post:
1307 summary: Clear video history 1351 summary: Clear video history
@@ -1322,6 +1366,7 @@ paths:
1322 responses: 1366 responses:
1323 '204': 1367 '204':
1324 description: successful operation 1368 description: successful operation
1369
1325 /users/me/avatar/pick: 1370 /users/me/avatar/pick:
1326 post: 1371 post:
1327 summary: Update my user avatar 1372 summary: Update my user avatar
@@ -1360,6 +1405,7 @@ paths:
1360 encoding: 1405 encoding:
1361 avatarfile: 1406 avatarfile:
1362 contentType: image/png, image/jpeg 1407 contentType: image/png, image/jpeg
1408
1363 /users/me/avatar: 1409 /users/me/avatar:
1364 delete: 1410 delete:
1365 summary: Delete my avatar 1411 summary: Delete my avatar
@@ -1381,6 +1427,7 @@ paths:
1381 responses: 1427 responses:
1382 '200': 1428 '200':
1383 description: successful operation 1429 description: successful operation
1430
1384 '/videos/ownership/{id}/accept': 1431 '/videos/ownership/{id}/accept':
1385 post: 1432 post:
1386 summary: Accept ownership change request 1433 summary: Accept ownership change request
@@ -1397,6 +1444,7 @@ paths:
1397 description: cannot terminate an ownership change of another user 1444 description: cannot terminate an ownership change of another user
1398 '404': 1445 '404':
1399 description: video owneship change not found 1446 description: video owneship change not found
1447
1400 '/videos/ownership/{id}/refuse': 1448 '/videos/ownership/{id}/refuse':
1401 post: 1449 post:
1402 summary: Refuse ownership change request 1450 summary: Refuse ownership change request
@@ -1413,6 +1461,7 @@ paths:
1413 description: cannot terminate an ownership change of another user 1461 description: cannot terminate an ownership change of another user
1414 '404': 1462 '404':
1415 description: video owneship change not found 1463 description: video owneship change not found
1464
1416 '/videos/{id}/give-ownership': 1465 '/videos/{id}/give-ownership':
1417 post: 1466 post:
1418 summary: Request ownership change 1467 summary: Request ownership change
@@ -1440,6 +1489,7 @@ paths:
1440 description: changing video ownership to a remote account is not supported yet 1489 description: changing video ownership to a remote account is not supported yet
1441 '404': 1490 '404':
1442 description: video not found 1491 description: video not found
1492
1443 /videos: 1493 /videos:
1444 get: 1494 get:
1445 summary: List videos 1495 summary: List videos
@@ -1465,6 +1515,7 @@ paths:
1465 application/json: 1515 application/json:
1466 schema: 1516 schema:
1467 $ref: '#/components/schemas/VideoListResponse' 1517 $ref: '#/components/schemas/VideoListResponse'
1518
1468 /videos/categories: 1519 /videos/categories:
1469 get: 1520 get:
1470 summary: List available video categories 1521 summary: List available video categories
@@ -1483,6 +1534,7 @@ paths:
1483 examples: 1534 examples:
1484 nightly: 1535 nightly:
1485 externalValue: https://peertube2.cpy.re/api/v1/videos/categories 1536 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
1537
1486 /videos/licences: 1538 /videos/licences:
1487 get: 1539 get:
1488 summary: List available video licences 1540 summary: List available video licences
@@ -1501,6 +1553,7 @@ paths:
1501 examples: 1553 examples:
1502 nightly: 1554 nightly:
1503 externalValue: https://peertube2.cpy.re/api/v1/videos/licences 1555 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
1556
1504 /videos/languages: 1557 /videos/languages:
1505 get: 1558 get:
1506 summary: List available video languages 1559 summary: List available video languages
@@ -1519,6 +1572,7 @@ paths:
1519 examples: 1572 examples:
1520 nightly: 1573 nightly:
1521 externalValue: https://peertube2.cpy.re/api/v1/videos/languages 1574 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
1575
1522 /videos/privacies: 1576 /videos/privacies:
1523 get: 1577 get:
1524 summary: List available video privacy policies 1578 summary: List available video privacy policies
@@ -1537,9 +1591,11 @@ paths:
1537 examples: 1591 examples:
1538 nightly: 1592 nightly:
1539 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies 1593 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
1594
1540 '/videos/{id}': 1595 '/videos/{id}':
1541 put: 1596 put:
1542 summary: Update a video 1597 summary: Update a video
1598 operationId: putVideo
1543 security: 1599 security:
1544 - OAuth2: [] 1600 - OAuth2: []
1545 tags: 1601 tags:
@@ -1614,6 +1670,7 @@ paths:
1614 contentType: image/jpeg 1670 contentType: image/jpeg
1615 get: 1671 get:
1616 summary: Get a video 1672 summary: Get a video
1673 operationId: getVideo
1617 tags: 1674 tags:
1618 - Video 1675 - Video
1619 parameters: 1676 parameters:
@@ -1627,6 +1684,7 @@ paths:
1627 $ref: '#/components/schemas/VideoDetails' 1684 $ref: '#/components/schemas/VideoDetails'
1628 delete: 1685 delete:
1629 summary: Delete a video 1686 summary: Delete a video
1687 operationId: delVideo
1630 security: 1688 security:
1631 - OAuth2: [] 1689 - OAuth2: []
1632 tags: 1690 tags:
@@ -1636,9 +1694,11 @@ paths:
1636 responses: 1694 responses:
1637 '204': 1695 '204':
1638 description: successful operation 1696 description: successful operation
1697
1639 '/videos/{id}/description': 1698 '/videos/{id}/description':
1640 get: 1699 get:
1641 summary: Get complete video description 1700 summary: Get complete video description
1701 operationId: getVideoDesc
1642 tags: 1702 tags:
1643 - Video 1703 - Video
1644 parameters: 1704 parameters:
@@ -1655,6 +1715,7 @@ paths:
1655 maxLength: 10000 1715 maxLength: 10000
1656 example: | 1716 example: |
1657 **[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)** 1717 **[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)**
1718
1658 '/videos/{id}/views': 1719 '/videos/{id}/views':
1659 post: 1720 post:
1660 summary: Add a view to a video 1721 summary: Add a view to a video
@@ -1665,6 +1726,7 @@ paths:
1665 responses: 1726 responses:
1666 '204': 1727 '204':
1667 description: successful operation 1728 description: successful operation
1729
1668 '/videos/{id}/watching': 1730 '/videos/{id}/watching':
1669 put: 1731 put:
1670 summary: Set watching progress of a video 1732 summary: Set watching progress of a video
@@ -1683,6 +1745,7 @@ paths:
1683 responses: 1745 responses:
1684 '204': 1746 '204':
1685 description: successful operation 1747 description: successful operation
1748
1686 /videos/upload: 1749 /videos/upload:
1687 post: 1750 post:
1688 summary: Upload a video 1751 summary: Upload a video
@@ -1759,6 +1822,7 @@ paths:
1759 --form videofile=@"$FILE_PATH" \ 1822 --form videofile=@"$FILE_PATH" \
1760 --form channelId=$CHANNEL_ID \ 1823 --form channelId=$CHANNEL_ID \
1761 --form name="$NAME" 1824 --form name="$NAME"
1825
1762 /videos/upload-resumable: 1826 /videos/upload-resumable:
1763 post: 1827 post:
1764 summary: Initialize the resumable upload of a video 1828 summary: Initialize the resumable upload of a video
@@ -1920,6 +1984,7 @@ paths:
1920 schema: 1984 schema:
1921 type: number 1985 type: number
1922 example: 0 1986 example: 0
1987
1923 /videos/imports: 1988 /videos/imports:
1924 post: 1989 post:
1925 summary: Import a video 1990 summary: Import a video
@@ -2207,7 +2272,6 @@ paths:
2207 type: array 2272 type: array
2208 items: 2273 items:
2209 $ref: '#/components/schemas/Abuse' 2274 $ref: '#/components/schemas/Abuse'
2210
2211 post: 2275 post:
2212 summary: Report an abuse 2276 summary: Report an abuse
2213 security: 2277 security:
@@ -2275,6 +2339,7 @@ paths:
2275 $ref: '#/components/schemas/id' 2339 $ref: '#/components/schemas/id'
2276 '400': 2340 '400':
2277 description: incorrect request parameters 2341 description: incorrect request parameters
2342
2278 '/abuses/{abuseId}': 2343 '/abuses/{abuseId}':
2279 put: 2344 put:
2280 summary: Update an abuse 2345 summary: Update an abuse
@@ -2319,6 +2384,7 @@ paths:
2319 description: successful operation 2384 description: successful operation
2320 '404': 2385 '404':
2321 description: block not found 2386 description: block not found
2387
2322 '/abuses/{abuseId}/messages': 2388 '/abuses/{abuseId}/messages':
2323 get: 2389 get:
2324 summary: List messages of an abuse 2390 summary: List messages of an abuse
@@ -2343,7 +2409,6 @@ paths:
2343 type: array 2409 type: array
2344 items: 2410 items:
2345 $ref: '#/components/schemas/AbuseMessage' 2411 $ref: '#/components/schemas/AbuseMessage'
2346
2347 post: 2412 post:
2348 summary: Add message to an abuse 2413 summary: Add message to an abuse
2349 security: 2414 security:
@@ -2371,6 +2436,7 @@ paths:
2371 description: successful operation 2436 description: successful operation
2372 '400': 2437 '400':
2373 description: incorrect request parameters 2438 description: incorrect request parameters
2439
2374 '/abuses/{abuseId}/messages/{abuseMessageId}': 2440 '/abuses/{abuseId}/messages/{abuseMessageId}':
2375 delete: 2441 delete:
2376 summary: Delete an abuse message 2442 summary: Delete an abuse message
@@ -2388,6 +2454,7 @@ paths:
2388 '/videos/{id}/blacklist': 2454 '/videos/{id}/blacklist':
2389 post: 2455 post:
2390 summary: Block a video 2456 summary: Block a video
2457 operationId: addVideoBlock
2391 security: 2458 security:
2392 - OAuth2: 2459 - OAuth2:
2393 - admin 2460 - admin
@@ -2401,6 +2468,7 @@ paths:
2401 description: successful operation 2468 description: successful operation
2402 delete: 2469 delete:
2403 summary: Unblock a video by its id 2470 summary: Unblock a video by its id
2471 operationId: delVideoBlock
2404 security: 2472 security:
2405 - OAuth2: 2473 - OAuth2:
2406 - admin 2474 - admin
@@ -2414,11 +2482,13 @@ paths:
2414 description: successful operation 2482 description: successful operation
2415 '404': 2483 '404':
2416 description: block not found 2484 description: block not found
2485
2417 /videos/blacklist: 2486 /videos/blacklist:
2418 get: 2487 get:
2419 tags: 2488 tags:
2420 - Video Blocks 2489 - Video Blocks
2421 summary: List video blocks 2490 summary: List video blocks
2491 operationId: getVideoBlocks
2422 security: 2492 security:
2423 - OAuth2: 2493 - OAuth2:
2424 - admin 2494 - admin
@@ -2460,9 +2530,11 @@ paths:
2460 type: array 2530 type: array
2461 items: 2531 items:
2462 $ref: '#/components/schemas/VideoBlacklist' 2532 $ref: '#/components/schemas/VideoBlacklist'
2533
2463 /videos/{id}/captions: 2534 /videos/{id}/captions:
2464 get: 2535 get:
2465 summary: List captions of a video 2536 summary: List captions of a video
2537 operationId: getVideoCaptions
2466 tags: 2538 tags:
2467 - Video Captions 2539 - Video Captions
2468 parameters: 2540 parameters:
@@ -2482,9 +2554,11 @@ paths:
2482 type: array 2554 type: array
2483 items: 2555 items:
2484 $ref: '#/components/schemas/VideoCaption' 2556 $ref: '#/components/schemas/VideoCaption'
2557
2485 /videos/{id}/captions/{captionLanguage}: 2558 /videos/{id}/captions/{captionLanguage}:
2486 put: 2559 put:
2487 summary: Add or replace a video caption 2560 summary: Add or replace a video caption
2561 operationId: addVideoCaption
2488 security: 2562 security:
2489 - OAuth2: 2563 - OAuth2:
2490 - user 2564 - user
@@ -2513,6 +2587,7 @@ paths:
2513 description: video or language not found 2587 description: video or language not found
2514 delete: 2588 delete:
2515 summary: Delete a video caption 2589 summary: Delete a video caption
2590 operationId: delVideoCaption
2516 security: 2591 security:
2517 - OAuth2: 2592 - OAuth2:
2518 - user 2593 - user
@@ -2526,6 +2601,7 @@ paths:
2526 description: successful operation 2601 description: successful operation
2527 '404': 2602 '404':
2528 description: video or language or caption for that language not found 2603 description: video or language or caption for that language not found
2604
2529 /video-channels: 2605 /video-channels:
2530 get: 2606 get:
2531 summary: List video channels 2607 summary: List video channels
@@ -2545,7 +2621,7 @@ paths:
2545 $ref: '#/components/schemas/VideoChannelList' 2621 $ref: '#/components/schemas/VideoChannelList'
2546 post: 2622 post:
2547 summary: Create a video channel 2623 summary: Create a video channel
2548 operationId: createVideoChannel 2624 operationId: addVideoChannel
2549 security: 2625 security:
2550 - OAuth2: [] 2626 - OAuth2: []
2551 tags: 2627 tags:
@@ -2568,6 +2644,7 @@ paths:
2568 application/json: 2644 application/json:
2569 schema: 2645 schema:
2570 $ref: '#/components/schemas/VideoChannelCreate' 2646 $ref: '#/components/schemas/VideoChannelCreate'
2647
2571 '/video-channels/{channelHandle}': 2648 '/video-channels/{channelHandle}':
2572 get: 2649 get:
2573 summary: Get a video channel 2650 summary: Get a video channel
@@ -2585,6 +2662,7 @@ paths:
2585 $ref: '#/components/schemas/VideoChannel' 2662 $ref: '#/components/schemas/VideoChannel'
2586 put: 2663 put:
2587 summary: Update a video channel 2664 summary: Update a video channel
2665 operationId: putVideoChannel
2588 security: 2666 security:
2589 - OAuth2: [] 2667 - OAuth2: []
2590 tags: 2668 tags:
@@ -2601,6 +2679,7 @@ paths:
2601 $ref: '#/components/schemas/VideoChannelUpdate' 2679 $ref: '#/components/schemas/VideoChannelUpdate'
2602 delete: 2680 delete:
2603 summary: Delete a video channel 2681 summary: Delete a video channel
2682 operationId: delVideoChannel
2604 security: 2683 security:
2605 - OAuth2: [] 2684 - OAuth2: []
2606 tags: 2685 tags:
@@ -2610,9 +2689,11 @@ paths:
2610 responses: 2689 responses:
2611 '204': 2690 '204':
2612 description: successful operation 2691 description: successful operation
2692
2613 '/video-channels/{channelHandle}/videos': 2693 '/video-channels/{channelHandle}/videos':
2614 get: 2694 get:
2615 summary: List videos of a video channel 2695 summary: List videos of a video channel
2696 operationId: getVideoChannelVideos
2616 tags: 2697 tags:
2617 - Video 2698 - Video
2618 - Video Channels 2699 - Video Channels
@@ -2637,6 +2718,7 @@ paths:
2637 application/json: 2718 application/json:
2638 schema: 2719 schema:
2639 $ref: '#/components/schemas/VideoListResponse' 2720 $ref: '#/components/schemas/VideoListResponse'
2721
2640 '/video-channels/{channelHandle}/avatar/pick': 2722 '/video-channels/{channelHandle}/avatar/pick':
2641 post: 2723 post:
2642 summary: Update channel avatar 2724 summary: Update channel avatar
@@ -2677,6 +2759,7 @@ paths:
2677 encoding: 2759 encoding:
2678 avatarfile: 2760 avatarfile:
2679 contentType: image/png, image/jpeg 2761 contentType: image/png, image/jpeg
2762
2680 '/video-channels/{channelHandle}/avatar': 2763 '/video-channels/{channelHandle}/avatar':
2681 delete: 2764 delete:
2682 summary: Delete channel avatar 2765 summary: Delete channel avatar
@@ -2690,7 +2773,6 @@ paths:
2690 '204': 2773 '204':
2691 description: successful operation 2774 description: successful operation
2692 2775
2693
2694 '/video-channels/{channelHandle}/banner/pick': 2776 '/video-channels/{channelHandle}/banner/pick':
2695 post: 2777 post:
2696 summary: Update channel banner 2778 summary: Update channel banner
@@ -2731,6 +2813,7 @@ paths:
2731 encoding: 2813 encoding:
2732 bannerfile: 2814 bannerfile:
2733 contentType: image/png, image/jpeg 2815 contentType: image/png, image/jpeg
2816
2734 '/video-channels/{channelHandle}/banner': 2817 '/video-channels/{channelHandle}/banner':
2735 delete: 2818 delete:
2736 summary: Delete channel banner 2819 summary: Delete channel banner
@@ -3105,6 +3188,7 @@ paths:
3105 application/json: 3188 application/json:
3106 schema: 3189 schema:
3107 $ref: '#/components/schemas/VideoChannelList' 3190 $ref: '#/components/schemas/VideoChannelList'
3191
3108 '/accounts/{name}/ratings': 3192 '/accounts/{name}/ratings':
3109 get: 3193 get:
3110 summary: List ratings of an account 3194 summary: List ratings of an account
@@ -3135,6 +3219,7 @@ paths:
3135 type: array 3219 type: array
3136 items: 3220 items:
3137 $ref: '#/components/schemas/VideoRating' 3221 $ref: '#/components/schemas/VideoRating'
3222
3138 '/videos/{id}/comment-threads': 3223 '/videos/{id}/comment-threads':
3139 get: 3224 get:
3140 summary: List threads of a video 3225 summary: List threads of a video
@@ -3198,6 +3283,7 @@ paths:
3198 application/json: 3283 application/json:
3199 schema: 3284 schema:
3200 $ref: '#/components/schemas/VideoCommentThreadTree' 3285 $ref: '#/components/schemas/VideoCommentThreadTree'
3286
3201 '/videos/{id}/comments/{commentId}': 3287 '/videos/{id}/comments/{commentId}':
3202 post: 3288 post:
3203 summary: Reply to a thread of a video 3289 summary: Reply to a thread of a video
@@ -3230,7 +3316,6 @@ paths:
3230 maxLength: 10000 3316 maxLength: 10000
3231 required: 3317 required:
3232 - text 3318 - text
3233
3234 delete: 3319 delete:
3235 summary: Delete a comment or a reply 3320 summary: Delete a comment or a reply
3236 security: 3321 security:
@@ -3249,6 +3334,7 @@ paths:
3249 description: comment or video does not exist 3334 description: comment or video does not exist
3250 '409': 3335 '409':
3251 description: comment is already deleted 3336 description: comment is already deleted
3337
3252 '/videos/{id}/rate': 3338 '/videos/{id}/rate':
3253 put: 3339 put:
3254 summary: Like/dislike a video 3340 summary: Like/dislike a video
@@ -3276,6 +3362,7 @@ paths:
3276 description: successful operation 3362 description: successful operation
3277 '404': 3363 '404':
3278 description: video does not exist 3364 description: video does not exist
3365
3279 /search/videos: 3366 /search/videos:
3280 get: 3367 get:
3281 tags: 3368 tags:
@@ -3351,6 +3438,7 @@ paths:
3351 $ref: '#/components/schemas/VideoListResponse' 3438 $ref: '#/components/schemas/VideoListResponse'
3352 '500': 3439 '500':
3353 description: search index unavailable 3440 description: search index unavailable
3441
3354 /search/video-channels: 3442 /search/video-channels:
3355 get: 3443 get:
3356 tags: 3444 tags:
@@ -3422,6 +3510,7 @@ paths:
3422 description: successful operation 3510 description: successful operation
3423 '409': 3511 '409':
3424 description: self-blocking forbidden 3512 description: self-blocking forbidden
3513
3425 '/server/blocklist/accounts/{accountName}': 3514 '/server/blocklist/accounts/{accountName}':
3426 delete: 3515 delete:
3427 tags: 3516 tags:
@@ -3482,6 +3571,7 @@ paths:
3482 description: successful operation 3571 description: successful operation
3483 '409': 3572 '409':
3484 description: self-blocking forbidden 3573 description: self-blocking forbidden
3574
3485 '/server/blocklist/servers/{host}': 3575 '/server/blocklist/servers/{host}':
3486 delete: 3576 delete:
3487 tags: 3577 tags:
@@ -3536,6 +3626,7 @@ paths:
3536 description: successful operation 3626 description: successful operation
3537 '404': 3627 '404':
3538 description: server is not already known 3628 description: server is not already known
3629
3539 /server/redundancy/videos: 3630 /server/redundancy/videos:
3540 get: 3631 get:
3541 tags: 3632 tags:
@@ -3592,6 +3683,7 @@ paths:
3592 description: video does not exist 3683 description: video does not exist
3593 '409': 3684 '409':
3594 description: video is already mirrored 3685 description: video is already mirrored
3686
3595 /server/redundancy/videos/{redundancyId}: 3687 /server/redundancy/videos/{redundancyId}:
3596 delete: 3688 delete:
3597 tags: 3689 tags:
@@ -3706,6 +3798,7 @@ paths:
3706 description: video, video channel or account not found 3798 description: video, video channel or account not found
3707 '406': 3799 '406':
3708 description: accept header unsupported 3800 description: accept header unsupported
3801
3709 '/feeds/videos.{format}': 3802 '/feeds/videos.{format}':
3710 get: 3803 get:
3711 tags: 3804 tags:
@@ -3792,6 +3885,7 @@ paths:
3792 description: video channel or account not found 3885 description: video channel or account not found
3793 '406': 3886 '406':
3794 description: accept header unsupported 3887 description: accept header unsupported
3888
3795 '/feeds/subscriptions.{format}': 3889 '/feeds/subscriptions.{format}':
3796 get: 3890 get:
3797 tags: 3891 tags:
@@ -3854,6 +3948,7 @@ paths:
3854 type: object 3948 type: object
3855 '406': 3949 '406':
3856 description: accept header unsupported 3950 description: accept header unsupported
3951
3857 /plugins: 3952 /plugins:
3858 get: 3953 get:
3859 tags: 3954 tags:
@@ -3881,6 +3976,7 @@ paths:
3881 application/json: 3976 application/json:
3882 schema: 3977 schema:
3883 $ref: '#/components/schemas/PluginResponse' 3978 $ref: '#/components/schemas/PluginResponse'
3979
3884 /plugins/available: 3980 /plugins/available:
3885 get: 3981 get:
3886 tags: 3982 tags:
@@ -3914,6 +4010,7 @@ paths:
3914 $ref: '#/components/schemas/PluginResponse' 4010 $ref: '#/components/schemas/PluginResponse'
3915 '503': 4011 '503':
3916 description: plugin index unavailable 4012 description: plugin index unavailable
4013
3917 /plugins/install: 4014 /plugins/install:
3918 post: 4015 post:
3919 tags: 4016 tags:
@@ -3947,6 +4044,7 @@ paths:
3947 description: successful operation 4044 description: successful operation
3948 '400': 4045 '400':
3949 description: should have either `npmName` or `path` set 4046 description: should have either `npmName` or `path` set
4047
3950 /plugins/update: 4048 /plugins/update:
3951 post: 4049 post:
3952 tags: 4050 tags:
@@ -3982,6 +4080,7 @@ paths:
3982 description: should have either `npmName` or `path` set 4080 description: should have either `npmName` or `path` set
3983 '404': 4081 '404':
3984 description: existing plugin not found 4082 description: existing plugin not found
4083
3985 /plugins/uninstall: 4084 /plugins/uninstall:
3986 post: 4085 post:
3987 tags: 4086 tags:
@@ -4007,6 +4106,7 @@ paths:
4007 description: successful operation 4106 description: successful operation
4008 '404': 4107 '404':
4009 description: existing plugin not found 4108 description: existing plugin not found
4109
4010 /plugins/{npmName}: 4110 /plugins/{npmName}:
4011 get: 4111 get:
4012 tags: 4112 tags:
@@ -4026,6 +4126,7 @@ paths:
4026 $ref: '#/components/schemas/Plugin' 4126 $ref: '#/components/schemas/Plugin'
4027 '404': 4127 '404':
4028 description: plugin not found 4128 description: plugin not found
4129
4029 /plugins/{npmName}/settings: 4130 /plugins/{npmName}/settings:
4030 put: 4131 put:
4031 tags: 4132 tags:
@@ -4050,6 +4151,7 @@ paths:
4050 description: successful operation 4151 description: successful operation
4051 '404': 4152 '404':
4052 description: plugin not found 4153 description: plugin not found
4154
4053 /plugins/{npmName}/public-settings: 4155 /plugins/{npmName}/public-settings:
4054 get: 4156 get:
4055 tags: 4157 tags:
@@ -4067,6 +4169,7 @@ paths:
4067 additionalProperties: true 4169 additionalProperties: true
4068 '404': 4170 '404':
4069 description: plugin not found 4171 description: plugin not found
4172
4070 /plugins/{npmName}/registered-settings: 4173 /plugins/{npmName}/registered-settings:
4071 get: 4174 get:
4072 tags: 4175 tags:
@@ -4087,6 +4190,7 @@ paths:
4087 additionalProperties: true 4190 additionalProperties: true
4088 '404': 4191 '404':
4089 description: plugin not found 4192 description: plugin not found
4193
4090servers: 4194servers:
4091 - url: 'https://peertube2.cpy.re/api/v1' 4195 - url: 'https://peertube2.cpy.re/api/v1'
4092 description: Live Test Server (live data - latest nightly version) 4196 description: Live Test Server (live data - latest nightly version)