diff options
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r-- | support/doc/api/openapi.yaml | 760 |
1 files changed, 565 insertions, 195 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 82b8191b2..6c1ffee4f 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -31,6 +31,11 @@ info: | |||
31 | sessions, and authenticate using this session token. One session token can | 31 | sessions, and authenticate using this session token. One session token can |
32 | currently be used at a time. | 32 | currently be used at a time. |
33 | 33 | ||
34 | ## Roles | ||
35 | |||
36 | Accounts are given permissions based on their role. There are three roles on | ||
37 | PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/#/admin-managing-users?id=roles) for a detail of their permissions. | ||
38 | |||
34 | # Errors | 39 | # Errors |
35 | 40 | ||
36 | The API uses standard HTTP status codes to indicate the success or failure | 41 | The API uses standard HTTP status codes to indicate the success or failure |
@@ -48,9 +53,29 @@ externalDocs: | |||
48 | tags: | 53 | tags: |
49 | - name: Accounts | 54 | - name: Accounts |
50 | description: > | 55 | description: > |
51 | Using some features of PeerTube require authentication, for which Accounts | 56 | Accounts encompass remote accounts discovered across the federation, |
57 | and correspond to the main Actor, along with video channels a user can create, which | ||
58 | are also Actors. | ||
59 | |||
60 | When a comment is posted, it is done with your Account's Actor. | ||
61 | - name: Users | ||
62 | description: > | ||
63 | Using some features of PeerTube require authentication, for which User | ||
52 | provide different levels of permission as well as associated user | 64 | provide different levels of permission as well as associated user |
53 | information. Accounts also encompass remote accounts discovered across the federation. | 65 | information. Each user has a corresponding local Account for federation. |
66 | - name: My User | ||
67 | description: > | ||
68 | Operations related to your own User, when logged-in. | ||
69 | - name: My Subscriptions | ||
70 | description: > | ||
71 | Operations related to your subscriptions to video channels, their | ||
72 | new videos, and how to keep up to date with their latest publications! | ||
73 | - name: My Notifications | ||
74 | description: > | ||
75 | Notifications following new videos, follows or reports. They allow you | ||
76 | to keep track of the interactions and overall important information that | ||
77 | concerns you. You MAY set per-notification type delivery preference, to | ||
78 | receive the info either by mail, by in-browser notification or both. | ||
54 | - name: Config | 79 | - name: Config |
55 | description: > | 80 | description: > |
56 | Each server exposes public information regarding supported videos and | 81 | Each server exposes public information regarding supported videos and |
@@ -66,15 +91,21 @@ tags: | |||
66 | server then deals with inter-server ActivityPub operations and propagates | 91 | server then deals with inter-server ActivityPub operations and propagates |
67 | information across its social graph by posting activities to actors' inbox | 92 | information across its social graph by posting activities to actors' inbox |
68 | endpoints. | 93 | endpoints. |
94 | externalDocs: | ||
95 | url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-follows | ||
69 | - name: Instance Redundancy | 96 | - name: Instance Redundancy |
70 | description: > | 97 | description: > |
71 | Redundancy is part of the inter-server solidarity that PeerTube fosters. | 98 | Redundancy is part of the inter-server solidarity that PeerTube fosters. |
72 | Manage the list of instances you wish to help by seeding their videos according | 99 | Manage the list of instances you wish to help by seeding their videos according |
73 | to the policy of video selection of your choice. Note that you have a similar functionality | 100 | to the policy of video selection of your choice. Note that you have a similar functionality |
74 | to mirror individual videos, see `Video Mirroring`. | 101 | to mirror individual videos, see `Video Mirroring`. |
102 | externalDocs: | ||
103 | url: https://docs.joinpeertube.org/#/admin-following-instances?id=instances-redundancy | ||
75 | - name: Plugins | 104 | - name: Plugins |
76 | description: > | 105 | description: > |
77 | Managign plugins installed from a local path or from NPM. | 106 | Managing plugins installed from a local path or from NPM, or search for new ones. |
107 | externalDocs: | ||
108 | url: https://docs.joinpeertube.org/#/api-plugins | ||
78 | - name: Video Abuses | 109 | - name: Video Abuses |
79 | description: | | 110 | description: | |
80 | Video abuses deal with reports of local or remote videos alike. | 111 | Video abuses deal with reports of local or remote videos alike. |
@@ -292,6 +323,12 @@ paths: | |||
292 | responses: | 323 | responses: |
293 | '200': | 324 | '200': |
294 | description: successful operation | 325 | description: successful operation |
326 | '400': | ||
327 | x-summary: field inconsistencies | ||
328 | description: > | ||
329 | Arises when: | ||
330 | - the emailer is disabled and the instance is open to registrations | ||
331 | - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled | ||
295 | delete: | 332 | delete: |
296 | summary: Delete instance runtime configuration | 333 | summary: Delete instance runtime configuration |
297 | tags: | 334 | tags: |
@@ -332,9 +369,16 @@ paths: | |||
332 | content: | 369 | content: |
333 | application/json: | 370 | application/json: |
334 | schema: | 371 | schema: |
335 | type: array | 372 | type: object |
336 | items: | 373 | properties: |
337 | $ref: '#/components/schemas/Job' | 374 | total: |
375 | type: integer | ||
376 | example: 1 | ||
377 | data: | ||
378 | type: array | ||
379 | maxItems: 100 | ||
380 | items: | ||
381 | $ref: '#/components/schemas/Job' | ||
338 | '/server/following/{host}': | 382 | '/server/following/{host}': |
339 | delete: | 383 | delete: |
340 | security: | 384 | security: |
@@ -350,6 +394,7 @@ paths: | |||
350 | description: 'The host to unfollow ' | 394 | description: 'The host to unfollow ' |
351 | schema: | 395 | schema: |
352 | type: string | 396 | type: string |
397 | format: hostname | ||
353 | responses: | 398 | responses: |
354 | '201': | 399 | '201': |
355 | description: successful operation | 400 | description: successful operation |
@@ -428,6 +473,7 @@ paths: | |||
428 | type: array | 473 | type: array |
429 | items: | 474 | items: |
430 | type: string | 475 | type: string |
476 | format: hostname | ||
431 | uniqueItems: true | 477 | uniqueItems: true |
432 | /users: | 478 | /users: |
433 | post: | 479 | post: |
@@ -968,6 +1014,9 @@ paths: | |||
968 | type: array | 1014 | type: array |
969 | items: | 1015 | items: |
970 | type: string | 1016 | type: string |
1017 | examples: | ||
1018 | nightly: | ||
1019 | externalValue: https://peertube2.cpy.re/api/v1/videos/categories | ||
971 | /videos/licences: | 1020 | /videos/licences: |
972 | get: | 1021 | get: |
973 | summary: List available video licences | 1022 | summary: List available video licences |
@@ -982,6 +1031,9 @@ paths: | |||
982 | type: array | 1031 | type: array |
983 | items: | 1032 | items: |
984 | type: string | 1033 | type: string |
1034 | examples: | ||
1035 | nightly: | ||
1036 | externalValue: https://peertube2.cpy.re/api/v1/videos/licences | ||
985 | /videos/languages: | 1037 | /videos/languages: |
986 | get: | 1038 | get: |
987 | summary: List available video languages | 1039 | summary: List available video languages |
@@ -996,6 +1048,9 @@ paths: | |||
996 | type: array | 1048 | type: array |
997 | items: | 1049 | items: |
998 | type: string | 1050 | type: string |
1051 | examples: | ||
1052 | nightly: | ||
1053 | externalValue: https://peertube2.cpy.re/api/v1/videos/languages | ||
999 | /videos/privacies: | 1054 | /videos/privacies: |
1000 | get: | 1055 | get: |
1001 | summary: List available video privacies | 1056 | summary: List available video privacies |
@@ -1010,6 +1065,9 @@ paths: | |||
1010 | type: array | 1065 | type: array |
1011 | items: | 1066 | items: |
1012 | type: string | 1067 | type: string |
1068 | examples: | ||
1069 | nightly: | ||
1070 | externalValue: https://peertube2.cpy.re/api/v1/videos/privacies | ||
1013 | '/videos/{id}': | 1071 | '/videos/{id}': |
1014 | put: | 1072 | put: |
1015 | summary: Update a video | 1073 | summary: Update a video |
@@ -1038,10 +1096,12 @@ paths: | |||
1038 | format: binary | 1096 | format: binary |
1039 | category: | 1097 | category: |
1040 | description: Video category | 1098 | description: Video category |
1041 | type: string | 1099 | type: integer |
1100 | example: 4 | ||
1042 | licence: | 1101 | licence: |
1043 | description: Video licence | 1102 | description: Video licence |
1044 | type: string | 1103 | type: integer |
1104 | example: 2 | ||
1045 | language: | 1105 | language: |
1046 | description: Video language | 1106 | description: Video language |
1047 | type: string | 1107 | type: string |
@@ -1058,7 +1118,7 @@ paths: | |||
1058 | type: string | 1118 | type: string |
1059 | nsfw: | 1119 | nsfw: |
1060 | description: Whether or not this video contains sensitive content | 1120 | description: Whether or not this video contains sensitive content |
1061 | type: string | 1121 | type: boolean |
1062 | name: | 1122 | name: |
1063 | description: Video name | 1123 | description: Video name |
1064 | type: string | 1124 | type: string |
@@ -1073,7 +1133,7 @@ paths: | |||
1073 | maxLength: 30 | 1133 | maxLength: 30 |
1074 | commentsEnabled: | 1134 | commentsEnabled: |
1075 | description: Enable or disable comments for this video | 1135 | description: Enable or disable comments for this video |
1076 | type: string | 1136 | type: boolean |
1077 | originallyPublishedAt: | 1137 | originallyPublishedAt: |
1078 | description: Date when the content was originally published | 1138 | description: Date when the content was originally published |
1079 | type: string | 1139 | type: string |
@@ -1166,11 +1226,11 @@ paths: | |||
1166 | schema: | 1226 | schema: |
1167 | $ref: '#/components/schemas/VideoUploadResponse' | 1227 | $ref: '#/components/schemas/VideoUploadResponse' |
1168 | '403': | 1228 | '403': |
1169 | description: 'The user video quota is exceeded with this video.' | 1229 | description: user video quota is exceeded with this video |
1170 | '408': | 1230 | '408': |
1171 | description: 'Upload has timed out' | 1231 | description: upload has timed out |
1172 | '422': | 1232 | '422': |
1173 | description: 'Invalid input file.' | 1233 | description: invalid input file |
1174 | requestBody: | 1234 | requestBody: |
1175 | content: | 1235 | content: |
1176 | multipart/form-data: | 1236 | multipart/form-data: |
@@ -1196,13 +1256,15 @@ paths: | |||
1196 | $ref: '#/components/schemas/VideoPrivacySet' | 1256 | $ref: '#/components/schemas/VideoPrivacySet' |
1197 | category: | 1257 | category: |
1198 | description: Video category | 1258 | description: Video category |
1199 | type: string | 1259 | type: integer |
1260 | example: 4 | ||
1200 | licence: | 1261 | licence: |
1201 | description: Video licence | 1262 | description: Video licence |
1202 | type: string | 1263 | type: string |
1203 | language: | 1264 | language: |
1204 | description: Video language | 1265 | description: Video language |
1205 | type: string | 1266 | type: integer |
1267 | example: 2 | ||
1206 | description: | 1268 | description: |
1207 | description: Video description | 1269 | description: Video description |
1208 | type: string | 1270 | type: string |
@@ -1214,7 +1276,7 @@ paths: | |||
1214 | type: string | 1276 | type: string |
1215 | nsfw: | 1277 | nsfw: |
1216 | description: Whether or not this video contains sensitive content | 1278 | description: Whether or not this video contains sensitive content |
1217 | type: string | 1279 | type: boolean |
1218 | name: | 1280 | name: |
1219 | description: Video name | 1281 | description: Video name |
1220 | type: string | 1282 | type: string |
@@ -1230,7 +1292,7 @@ paths: | |||
1230 | maxLength: 30 | 1292 | maxLength: 30 |
1231 | commentsEnabled: | 1293 | commentsEnabled: |
1232 | description: Enable or disable comments for this video | 1294 | description: Enable or disable comments for this video |
1233 | type: string | 1295 | type: boolean |
1234 | originallyPublishedAt: | 1296 | originallyPublishedAt: |
1235 | description: Date when the content was originally published | 1297 | description: Date when the content was originally published |
1236 | type: string | 1298 | type: string |
@@ -1380,6 +1442,59 @@ paths: | |||
1380 | tags: | 1442 | tags: |
1381 | - Video Abuses | 1443 | - Video Abuses |
1382 | parameters: | 1444 | parameters: |
1445 | - name: id | ||
1446 | in: query | ||
1447 | description: only list the report with this id | ||
1448 | schema: | ||
1449 | type: integer | ||
1450 | - name: predefinedReason | ||
1451 | in: query | ||
1452 | description: predefined reason the listed reports should contain | ||
1453 | schema: | ||
1454 | type: string | ||
1455 | enum: | ||
1456 | - violentOrAbusive | ||
1457 | - hatefulOrAbusive | ||
1458 | - spamOrMisleading | ||
1459 | - privacy | ||
1460 | - rights | ||
1461 | - serverRules | ||
1462 | - thumbnails | ||
1463 | - captions | ||
1464 | - name: search | ||
1465 | in: query | ||
1466 | description: plain search that will match with video titles, reporter names and more | ||
1467 | schema: | ||
1468 | type: string | ||
1469 | - name: state | ||
1470 | in: query | ||
1471 | description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)' | ||
1472 | schema: | ||
1473 | type: integer | ||
1474 | enum: | ||
1475 | - 1 | ||
1476 | - 2 | ||
1477 | - 3 | ||
1478 | - name: searchReporter | ||
1479 | in: query | ||
1480 | description: only list reports of a specific reporter | ||
1481 | schema: | ||
1482 | type: string | ||
1483 | - name: searchReportee | ||
1484 | description: only list reports of a specific reportee | ||
1485 | in: query | ||
1486 | schema: | ||
1487 | type: string | ||
1488 | - name: searchVideo | ||
1489 | in: query | ||
1490 | description: only list reports of a specific video | ||
1491 | schema: | ||
1492 | type: string | ||
1493 | - name: searchVideoChannel | ||
1494 | in: query | ||
1495 | description: only list reports of a specific video channel | ||
1496 | schema: | ||
1497 | type: string | ||
1383 | - $ref: '#/components/parameters/start' | 1498 | - $ref: '#/components/parameters/start' |
1384 | - $ref: '#/components/parameters/count' | 1499 | - $ref: '#/components/parameters/count' |
1385 | - $ref: '#/components/parameters/abusesSort' | 1500 | - $ref: '#/components/parameters/abusesSort' |
@@ -1412,6 +1527,7 @@ paths: | |||
1412 | reason: | 1527 | reason: |
1413 | description: Reason why the user reports this video | 1528 | description: Reason why the user reports this video |
1414 | type: string | 1529 | type: string |
1530 | minLength: 4 | ||
1415 | predefinedReasons: | 1531 | predefinedReasons: |
1416 | description: Reason categories that help triage reports | 1532 | description: Reason categories that help triage reports |
1417 | type: array | 1533 | type: array |
@@ -1429,14 +1545,18 @@ paths: | |||
1429 | startAt: | 1545 | startAt: |
1430 | type: integer | 1546 | type: integer |
1431 | description: Timestamp in the video that marks the beginning of the report | 1547 | description: Timestamp in the video that marks the beginning of the report |
1548 | minimum: 0 | ||
1432 | endAt: | 1549 | endAt: |
1433 | type: integer | 1550 | type: integer |
1434 | description: Timestamp in the video that marks the ending of the report | 1551 | description: Timestamp in the video that marks the ending of the report |
1552 | minimum: 0 | ||
1435 | required: | 1553 | required: |
1436 | - reason | 1554 | - reason |
1437 | responses: | 1555 | responses: |
1438 | '204': | 1556 | '204': |
1439 | description: successful operation | 1557 | description: successful operation |
1558 | '400': | ||
1559 | description: incorrect request parameters | ||
1440 | '/videos/{id}/abuse/{abuseId}': | 1560 | '/videos/{id}/abuse/{abuseId}': |
1441 | put: | 1561 | put: |
1442 | summary: Update an abuse | 1562 | summary: Update an abuse |
@@ -1446,11 +1566,6 @@ paths: | |||
1446 | - moderator | 1566 | - moderator |
1447 | tags: | 1567 | tags: |
1448 | - Video Abuses | 1568 | - Video Abuses |
1449 | responses: | ||
1450 | '204': | ||
1451 | description: successful operation | ||
1452 | '404': | ||
1453 | description: video abuse not found | ||
1454 | parameters: | 1569 | parameters: |
1455 | - $ref: '#/components/parameters/idOrUUID' | 1570 | - $ref: '#/components/parameters/idOrUUID' |
1456 | - $ref: '#/components/parameters/abuseId' | 1571 | - $ref: '#/components/parameters/abuseId' |
@@ -1464,23 +1579,28 @@ paths: | |||
1464 | $ref: '#/components/schemas/VideoAbuseStateSet' | 1579 | $ref: '#/components/schemas/VideoAbuseStateSet' |
1465 | moderationComment: | 1580 | moderationComment: |
1466 | type: string | 1581 | type: string |
1467 | description: 'Update the comment of the video abuse for other admin/moderators' | 1582 | description: Update the report comment visible only to the moderation team |
1583 | responses: | ||
1584 | '204': | ||
1585 | description: successful operation | ||
1586 | '404': | ||
1587 | description: video abuse not found | ||
1468 | delete: | 1588 | delete: |
1589 | tags: | ||
1590 | - Video Abuses | ||
1469 | summary: Delete an abuse | 1591 | summary: Delete an abuse |
1470 | security: | 1592 | security: |
1471 | - OAuth2: | 1593 | - OAuth2: |
1472 | - admin | 1594 | - admin |
1473 | - moderator | 1595 | - moderator |
1474 | tags: | 1596 | parameters: |
1475 | - Video Abuses | 1597 | - $ref: '#/components/parameters/idOrUUID' |
1598 | - $ref: '#/components/parameters/abuseId' | ||
1476 | responses: | 1599 | responses: |
1477 | '204': | 1600 | '204': |
1478 | description: successful operation | 1601 | description: successful operation |
1479 | '404': | 1602 | '404': |
1480 | description: block not found | 1603 | description: block not found |
1481 | parameters: | ||
1482 | - $ref: '#/components/parameters/idOrUUID' | ||
1483 | - $ref: '#/components/parameters/abuseId' | ||
1484 | 1604 | ||
1485 | '/videos/{id}/blacklist': | 1605 | '/videos/{id}/blacklist': |
1486 | post: | 1606 | post: |
@@ -1521,6 +1641,24 @@ paths: | |||
1521 | - admin | 1641 | - admin |
1522 | - moderator | 1642 | - moderator |
1523 | parameters: | 1643 | parameters: |
1644 | - name: type | ||
1645 | in: query | ||
1646 | description: > | ||
1647 | list only blocks that match this type: | ||
1648 | |||
1649 | - `1`: manual block | ||
1650 | |||
1651 | - `2`: automatic block that needs review | ||
1652 | schema: | ||
1653 | type: integer | ||
1654 | enum: | ||
1655 | - 1 | ||
1656 | - 2 | ||
1657 | - name: search | ||
1658 | in: query | ||
1659 | description: plain search that will match with video titles, and more | ||
1660 | schema: | ||
1661 | type: string | ||
1524 | - $ref: '#/components/parameters/start' | 1662 | - $ref: '#/components/parameters/start' |
1525 | - $ref: '#/components/parameters/count' | 1663 | - $ref: '#/components/parameters/count' |
1526 | - $ref: '#/components/parameters/blacklistsSort' | 1664 | - $ref: '#/components/parameters/blacklistsSort' |
@@ -1530,9 +1668,15 @@ paths: | |||
1530 | content: | 1668 | content: |
1531 | application/json: | 1669 | application/json: |
1532 | schema: | 1670 | schema: |
1533 | type: array | 1671 | type: object |
1534 | items: | 1672 | properties: |
1535 | $ref: '#/components/schemas/VideoBlacklist' | 1673 | total: |
1674 | type: integer | ||
1675 | example: 1 | ||
1676 | data: | ||
1677 | type: array | ||
1678 | items: | ||
1679 | $ref: '#/components/schemas/VideoBlacklist' | ||
1536 | /videos/{id}/captions: | 1680 | /videos/{id}/captions: |
1537 | get: | 1681 | get: |
1538 | summary: List captions of a video | 1682 | summary: List captions of a video |
@@ -1550,6 +1694,7 @@ paths: | |||
1550 | properties: | 1694 | properties: |
1551 | total: | 1695 | total: |
1552 | type: integer | 1696 | type: integer |
1697 | example: 1 | ||
1553 | data: | 1698 | data: |
1554 | type: array | 1699 | type: array |
1555 | items: | 1700 | items: |
@@ -1607,9 +1752,15 @@ paths: | |||
1607 | content: | 1752 | content: |
1608 | application/json: | 1753 | application/json: |
1609 | schema: | 1754 | schema: |
1610 | type: array | 1755 | type: object |
1611 | items: | 1756 | properties: |
1612 | $ref: '#/components/schemas/VideoChannel' | 1757 | total: |
1758 | type: integer | ||
1759 | example: 1 | ||
1760 | data: | ||
1761 | type: array | ||
1762 | items: | ||
1763 | $ref: '#/components/schemas/VideoChannel' | ||
1613 | post: | 1764 | post: |
1614 | summary: Create a video channel | 1765 | summary: Create a video channel |
1615 | security: | 1766 | security: |
@@ -1706,6 +1857,9 @@ paths: | |||
1706 | type: array | 1857 | type: array |
1707 | items: | 1858 | items: |
1708 | type: string | 1859 | type: string |
1860 | examples: | ||
1861 | nightly: | ||
1862 | externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies | ||
1709 | 1863 | ||
1710 | /video-playlists: | 1864 | /video-playlists: |
1711 | get: | 1865 | get: |
@@ -1722,9 +1876,15 @@ paths: | |||
1722 | content: | 1876 | content: |
1723 | application/json: | 1877 | application/json: |
1724 | schema: | 1878 | schema: |
1725 | type: array | 1879 | type: object |
1726 | items: | 1880 | properties: |
1727 | $ref: '#/components/schemas/VideoPlaylist' | 1881 | total: |
1882 | type: integer | ||
1883 | example: 1 | ||
1884 | data: | ||
1885 | type: array | ||
1886 | items: | ||
1887 | $ref: '#/components/schemas/VideoPlaylist' | ||
1728 | post: | 1888 | post: |
1729 | summary: Create a video playlist | 1889 | summary: Create a video playlist |
1730 | description: 'If the video playlist is set as public, the videoChannelId is mandatory.' | 1890 | description: 'If the video playlist is set as public, the videoChannelId is mandatory.' |
@@ -2003,6 +2163,14 @@ paths: | |||
2003 | - Accounts | 2163 | - Accounts |
2004 | parameters: | 2164 | parameters: |
2005 | - $ref: '#/components/parameters/name' | 2165 | - $ref: '#/components/parameters/name' |
2166 | - name: withStats | ||
2167 | in: query | ||
2168 | description: include view statistics for the last 30 days (only if authentified as the account user) | ||
2169 | schema: | ||
2170 | type: boolean | ||
2171 | - $ref: '#/components/parameters/start' | ||
2172 | - $ref: '#/components/parameters/count' | ||
2173 | - $ref: '#/components/parameters/sort' | ||
2006 | responses: | 2174 | responses: |
2007 | '200': | 2175 | '200': |
2008 | description: successful operation | 2176 | description: successful operation |
@@ -2142,6 +2310,12 @@ paths: | |||
2142 | responses: | 2310 | responses: |
2143 | '204': | 2311 | '204': |
2144 | description: successful operation | 2312 | description: successful operation |
2313 | '403': | ||
2314 | description: cannot remove comment of another user | ||
2315 | '404': | ||
2316 | description: comment or video does not exist | ||
2317 | '409': | ||
2318 | description: comment is already deleted | ||
2145 | '/videos/{id}/rate': | 2319 | '/videos/{id}/rate': |
2146 | put: | 2320 | put: |
2147 | summary: Like/dislike a video | 2321 | summary: Like/dislike a video |
@@ -2160,6 +2334,16 @@ paths: | |||
2160 | - Search | 2334 | - Search |
2161 | summary: Search videos | 2335 | summary: Search videos |
2162 | parameters: | 2336 | parameters: |
2337 | - name: search | ||
2338 | in: query | ||
2339 | required: true | ||
2340 | allowEmptyValue: false | ||
2341 | description: > | ||
2342 | String to search. If the user can make a remote URI search, and the string is an URI then the | ||
2343 | PeerTube instance will fetch the remote object and add it to its database. Then, | ||
2344 | you can use the REST API to fetch the complete video information and interact with it. | ||
2345 | schema: | ||
2346 | type: string | ||
2163 | - $ref: '#/components/parameters/categoryOneOf' | 2347 | - $ref: '#/components/parameters/categoryOneOf' |
2164 | - $ref: '#/components/parameters/tagsOneOf' | 2348 | - $ref: '#/components/parameters/tagsOneOf' |
2165 | - $ref: '#/components/parameters/tagsAllOf' | 2349 | - $ref: '#/components/parameters/tagsAllOf' |
@@ -2172,52 +2356,37 @@ paths: | |||
2172 | - $ref: '#/components/parameters/count' | 2356 | - $ref: '#/components/parameters/count' |
2173 | - $ref: '#/components/parameters/searchTarget' | 2357 | - $ref: '#/components/parameters/searchTarget' |
2174 | - $ref: '#/components/parameters/videosSearchSort' | 2358 | - $ref: '#/components/parameters/videosSearchSort' |
2175 | - name: search | ||
2176 | in: query | ||
2177 | required: true | ||
2178 | description: > | ||
2179 | String to search. If the user can make a remote URI search, and the string is an URI then the | ||
2180 | PeerTube instance will fetch the remote object and add it to its database. Then, | ||
2181 | you can use the REST API to fetch the complete video information and interact with it. | ||
2182 | schema: | ||
2183 | type: string | ||
2184 | - name: startDate | 2359 | - name: startDate |
2185 | in: query | 2360 | in: query |
2186 | required: true | ||
2187 | description: Get videos that are published after this date | 2361 | description: Get videos that are published after this date |
2188 | schema: | 2362 | schema: |
2189 | type: string | 2363 | type: string |
2190 | format: date-time | 2364 | format: date-time |
2191 | - name: endDate | 2365 | - name: endDate |
2192 | in: query | 2366 | in: query |
2193 | required: true | ||
2194 | description: Get videos that are published before this date | 2367 | description: Get videos that are published before this date |
2195 | schema: | 2368 | schema: |
2196 | type: string | 2369 | type: string |
2197 | format: date-time | 2370 | format: date-time |
2198 | - name: originallyPublishedStartDate | 2371 | - name: originallyPublishedStartDate |
2199 | in: query | 2372 | in: query |
2200 | required: true | ||
2201 | description: Get videos that are originally published after this date | 2373 | description: Get videos that are originally published after this date |
2202 | schema: | 2374 | schema: |
2203 | type: string | 2375 | type: string |
2204 | format: date-time | 2376 | format: date-time |
2205 | - name: originallyPublishedEndDate | 2377 | - name: originallyPublishedEndDate |
2206 | in: query | 2378 | in: query |
2207 | required: true | ||
2208 | description: Get videos that are originally published before this date | 2379 | description: Get videos that are originally published before this date |
2209 | schema: | 2380 | schema: |
2210 | type: string | 2381 | type: string |
2211 | format: date-time | 2382 | format: date-time |
2212 | - name: durationMin | 2383 | - name: durationMin |
2213 | in: query | 2384 | in: query |
2214 | required: true | ||
2215 | description: Get videos that have this minimum duration | 2385 | description: Get videos that have this minimum duration |
2216 | schema: | 2386 | schema: |
2217 | type: integer | 2387 | type: integer |
2218 | - name: durationMax | 2388 | - name: durationMax |
2219 | in: query | 2389 | in: query |
2220 | required: true | ||
2221 | description: Get videos that have this maximum duration | 2390 | description: Get videos that have this maximum duration |
2222 | schema: | 2391 | schema: |
2223 | type: integer | 2392 | type: integer |
@@ -2234,10 +2403,6 @@ paths: | |||
2234 | - Search | 2403 | - Search |
2235 | summary: Search channels | 2404 | summary: Search channels |
2236 | parameters: | 2405 | parameters: |
2237 | - $ref: '#/components/parameters/start' | ||
2238 | - $ref: '#/components/parameters/count' | ||
2239 | - $ref: '#/components/parameters/searchTarget' | ||
2240 | - $ref: '#/components/parameters/sort' | ||
2241 | - name: search | 2406 | - name: search |
2242 | in: query | 2407 | in: query |
2243 | required: true | 2408 | required: true |
@@ -2247,6 +2412,10 @@ paths: | |||
2247 | you can use the REST API to fetch the complete channel information and interact with it. | 2412 | you can use the REST API to fetch the complete channel information and interact with it. |
2248 | schema: | 2413 | schema: |
2249 | type: string | 2414 | type: string |
2415 | - $ref: '#/components/parameters/start' | ||
2416 | - $ref: '#/components/parameters/count' | ||
2417 | - $ref: '#/components/parameters/searchTarget' | ||
2418 | - $ref: '#/components/parameters/sort' | ||
2250 | responses: | 2419 | responses: |
2251 | '200': | 2420 | '200': |
2252 | description: successful operation | 2421 | description: successful operation |
@@ -2286,6 +2455,7 @@ paths: | |||
2286 | properties: | 2455 | properties: |
2287 | accountName: | 2456 | accountName: |
2288 | type: string | 2457 | type: string |
2458 | example: chocobozzz@example.org | ||
2289 | description: account to block, in the form `username@domain` | 2459 | description: account to block, in the form `username@domain` |
2290 | required: | 2460 | required: |
2291 | - accountName | 2461 | - accountName |
@@ -2342,11 +2512,12 @@ paths: | |||
2342 | schema: | 2512 | schema: |
2343 | type: object | 2513 | type: object |
2344 | properties: | 2514 | properties: |
2345 | accountName: | 2515 | host: |
2346 | type: string | 2516 | type: string |
2517 | format: hostname | ||
2347 | description: server domain to block | 2518 | description: server domain to block |
2348 | required: | 2519 | required: |
2349 | - accountName | 2520 | - host |
2350 | responses: | 2521 | responses: |
2351 | '200': | 2522 | '200': |
2352 | description: successful operation | 2523 | description: successful operation |
@@ -2367,6 +2538,7 @@ paths: | |||
2367 | description: server domain to unblock | 2538 | description: server domain to unblock |
2368 | schema: | 2539 | schema: |
2369 | type: string | 2540 | type: string |
2541 | format: hostname | ||
2370 | responses: | 2542 | responses: |
2371 | '201': | 2543 | '201': |
2372 | description: successful operation | 2544 | description: successful operation |
@@ -2387,6 +2559,7 @@ paths: | |||
2387 | description: server domain to mirror | 2559 | description: server domain to mirror |
2388 | schema: | 2560 | schema: |
2389 | type: string | 2561 | type: string |
2562 | format: hostname | ||
2390 | requestBody: | 2563 | requestBody: |
2391 | content: | 2564 | content: |
2392 | application/json: | 2565 | application/json: |
@@ -2447,7 +2620,7 @@ paths: | |||
2447 | type: object | 2620 | type: object |
2448 | properties: | 2621 | properties: |
2449 | videoId: | 2622 | videoId: |
2450 | type: string | 2623 | type: integer |
2451 | required: | 2624 | required: |
2452 | - videoId | 2625 | - videoId |
2453 | responses: | 2626 | responses: |
@@ -2584,6 +2757,9 @@ paths: | |||
2584 | description: 'limit listing to a specific video channel' | 2757 | description: 'limit listing to a specific video channel' |
2585 | schema: | 2758 | schema: |
2586 | type: string | 2759 | type: string |
2760 | - $ref: '#/components/parameters/sort' | ||
2761 | - $ref: '#/components/parameters/nsfw' | ||
2762 | - $ref: '#/components/parameters/filter' | ||
2587 | responses: | 2763 | responses: |
2588 | '204': | 2764 | '204': |
2589 | description: successful operation | 2765 | description: successful operation |
@@ -2596,6 +2772,9 @@ paths: | |||
2596 | application/xml: | 2772 | application/xml: |
2597 | schema: | 2773 | schema: |
2598 | $ref: '#/components/schemas/VideosForXML' | 2774 | $ref: '#/components/schemas/VideosForXML' |
2775 | examples: | ||
2776 | nightly: | ||
2777 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | ||
2599 | application/rss+xml: | 2778 | application/rss+xml: |
2600 | schema: | 2779 | schema: |
2601 | $ref: '#/components/schemas/VideosForXML' | 2780 | $ref: '#/components/schemas/VideosForXML' |
@@ -2687,6 +2866,7 @@ paths: | |||
2687 | properties: | 2866 | properties: |
2688 | npmName: | 2867 | npmName: |
2689 | type: string | 2868 | type: string |
2869 | example: peertube-plugin-auth-ldap | ||
2690 | required: | 2870 | required: |
2691 | - npmName | 2871 | - npmName |
2692 | additionalProperties: false | 2872 | additionalProperties: false |
@@ -2719,6 +2899,7 @@ paths: | |||
2719 | properties: | 2899 | properties: |
2720 | npmName: | 2900 | npmName: |
2721 | type: string | 2901 | type: string |
2902 | example: peertube-plugin-auth-ldap | ||
2722 | required: | 2903 | required: |
2723 | - npmName | 2904 | - npmName |
2724 | additionalProperties: false | 2905 | additionalProperties: false |
@@ -2752,6 +2933,8 @@ paths: | |||
2752 | properties: | 2933 | properties: |
2753 | npmName: | 2934 | npmName: |
2754 | type: string | 2935 | type: string |
2936 | description: name of the plugin/theme in its package.json | ||
2937 | example: peertube-plugin-auth-ldap | ||
2755 | required: | 2938 | required: |
2756 | - npmName | 2939 | - npmName |
2757 | responses: | 2940 | responses: |
@@ -2768,11 +2951,7 @@ paths: | |||
2768 | - OAuth2: | 2951 | - OAuth2: |
2769 | - admin | 2952 | - admin |
2770 | parameters: | 2953 | parameters: |
2771 | - name: npmName | 2954 | - $ref: '#/components/parameters/npmName' |
2772 | in: path | ||
2773 | required: true | ||
2774 | schema: | ||
2775 | type: string | ||
2776 | responses: | 2955 | responses: |
2777 | '200': | 2956 | '200': |
2778 | description: successful operation | 2957 | description: successful operation |
@@ -2791,11 +2970,7 @@ paths: | |||
2791 | - OAuth2: | 2970 | - OAuth2: |
2792 | - admin | 2971 | - admin |
2793 | parameters: | 2972 | parameters: |
2794 | - name: npmName | 2973 | - $ref: '#/components/parameters/npmName' |
2795 | in: path | ||
2796 | required: true | ||
2797 | schema: | ||
2798 | type: string | ||
2799 | requestBody: | 2974 | requestBody: |
2800 | content: | 2975 | content: |
2801 | application/json: | 2976 | application/json: |
@@ -2816,11 +2991,7 @@ paths: | |||
2816 | - Plugins | 2991 | - Plugins |
2817 | summary: Get a plugin's public settings | 2992 | summary: Get a plugin's public settings |
2818 | parameters: | 2993 | parameters: |
2819 | - name: npmName | 2994 | - $ref: '#/components/parameters/npmName' |
2820 | in: path | ||
2821 | required: true | ||
2822 | schema: | ||
2823 | type: string | ||
2824 | responses: | 2995 | responses: |
2825 | '200': | 2996 | '200': |
2826 | description: successful operation | 2997 | description: successful operation |
@@ -2840,11 +3011,7 @@ paths: | |||
2840 | - OAuth2: | 3011 | - OAuth2: |
2841 | - admin | 3012 | - admin |
2842 | parameters: | 3013 | parameters: |
2843 | - name: npmName | 3014 | - $ref: '#/components/parameters/npmName' |
2844 | in: path | ||
2845 | required: true | ||
2846 | schema: | ||
2847 | type: string | ||
2848 | responses: | 3015 | responses: |
2849 | '200': | 3016 | '200': |
2850 | description: successful operation | 3017 | description: successful operation |
@@ -2871,6 +3038,7 @@ components: | |||
2871 | description: Offset used to paginate results | 3038 | description: Offset used to paginate results |
2872 | schema: | 3039 | schema: |
2873 | type: integer | 3040 | type: integer |
3041 | minimum: 0 | ||
2874 | count: | 3042 | count: |
2875 | name: count | 3043 | name: count |
2876 | in: query | 3044 | in: query |
@@ -2878,15 +3046,17 @@ components: | |||
2878 | description: "Number of items to return" | 3046 | description: "Number of items to return" |
2879 | schema: | 3047 | schema: |
2880 | type: integer | 3048 | type: integer |
3049 | default: 15 | ||
2881 | maximum: 100 | 3050 | maximum: 100 |
2882 | minimum: 1 | 3051 | minimum: 1 |
2883 | sort: | 3052 | sort: |
2884 | name: sort | 3053 | name: sort |
2885 | in: query | 3054 | in: query |
2886 | required: false | 3055 | required: false |
2887 | description: Sort column (`-createdAt` for example) | 3056 | description: Sort column |
2888 | schema: | 3057 | schema: |
2889 | type: string | 3058 | type: string |
3059 | example: -createdAt | ||
2890 | searchTarget: | 3060 | searchTarget: |
2891 | name: searchTarget | 3061 | name: searchTarget |
2892 | in: query | 3062 | in: query |
@@ -2896,11 +3066,11 @@ components: | |||
2896 | 3066 | ||
2897 | 3067 | ||
2898 | **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. | 3068 | **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. |
2899 | It means the instance may not know the objects you fetched. If you want to load video/channel information: | 3069 | It means the instance may not yet know the objects you fetched. If you want to load video/channel information: |
2900 | * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), | 3070 | * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), |
2901 | then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. | 3071 | then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. |
2902 | After that, you can use the classic REST API endpoints to fetch the complete object or interact with it | 3072 | After that, you can use the classic REST API endpoints to fetch the complete object or interact with it |
2903 | * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch | 3073 | * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch |
2904 | the data from the origin instance API | 3074 | the data from the origin instance API |
2905 | schema: | 3075 | schema: |
2906 | type: string | 3076 | type: string |
@@ -2998,11 +3168,10 @@ components: | |||
2998 | name: name | 3168 | name: name |
2999 | in: path | 3169 | in: path |
3000 | required: true | 3170 | required: true |
3001 | description: >- | 3171 | description: The name of the account |
3002 | The name of the account (`chocobozzz` or `chocobozzz@example.org` for | ||
3003 | example) | ||
3004 | schema: | 3172 | schema: |
3005 | type: string | 3173 | type: string |
3174 | example: chocobozzz | chocobozzz@example.org | ||
3006 | id: | 3175 | id: |
3007 | name: id | 3176 | name: id |
3008 | in: path | 3177 | in: path |
@@ -3010,13 +3179,21 @@ components: | |||
3010 | description: The user id | 3179 | description: The user id |
3011 | schema: | 3180 | schema: |
3012 | type: integer | 3181 | type: integer |
3182 | minimum: 0 | ||
3183 | example: 42 | ||
3013 | idOrUUID: | 3184 | idOrUUID: |
3014 | name: id | 3185 | name: id |
3015 | in: path | 3186 | in: path |
3016 | required: true | 3187 | required: true |
3017 | description: The object id or uuid | 3188 | description: The object id or uuid |
3018 | schema: | 3189 | schema: |
3019 | type: string | 3190 | oneOf: |
3191 | - type: integer | ||
3192 | minimum: 0 | ||
3193 | example: 42 | ||
3194 | - type: string | ||
3195 | format: uuid | ||
3196 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3020 | playlistElementId: | 3197 | playlistElementId: |
3021 | name: playlistElementId | 3198 | name: playlistElementId |
3022 | in: path | 3199 | in: path |
@@ -3042,16 +3219,18 @@ components: | |||
3042 | name: channelHandle | 3219 | name: channelHandle |
3043 | in: path | 3220 | in: path |
3044 | required: true | 3221 | required: true |
3045 | description: "The video channel handle (example: 'my_username@example.com' or 'my_username')" | 3222 | description: The video channel handle |
3046 | schema: | 3223 | schema: |
3047 | type: string | 3224 | type: string |
3225 | example: my_username | my_username@example.com | ||
3048 | subscriptionHandle: | 3226 | subscriptionHandle: |
3049 | name: subscriptionHandle | 3227 | name: subscriptionHandle |
3050 | in: path | 3228 | in: path |
3051 | required: true | 3229 | required: true |
3052 | description: "The subscription handle (example: 'my_username@example.com' or 'my_username')" | 3230 | description: The subscription handle |
3053 | schema: | 3231 | schema: |
3054 | type: string | 3232 | type: string |
3233 | example: my_username | my_username@example.com | ||
3055 | threadId: | 3234 | threadId: |
3056 | name: threadId | 3235 | name: threadId |
3057 | in: path | 3236 | in: path |
@@ -3070,7 +3249,7 @@ components: | |||
3070 | name: categoryOneOf | 3249 | name: categoryOneOf |
3071 | in: query | 3250 | in: query |
3072 | required: false | 3251 | required: false |
3073 | description: category id of the video (see /videos/categories) | 3252 | description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get)) |
3074 | schema: | 3253 | schema: |
3075 | oneOf: | 3254 | oneOf: |
3076 | - type: integer | 3255 | - type: integer |
@@ -3109,7 +3288,7 @@ components: | |||
3109 | name: languageOneOf | 3288 | name: languageOneOf |
3110 | in: query | 3289 | in: query |
3111 | required: false | 3290 | required: false |
3112 | description: language id of the video (see /videos/languages). Use `_unknown` to filter on videos that don't have a video language | 3291 | description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get)). Use `_unknown` to filter on videos that don't have a video language |
3113 | schema: | 3292 | schema: |
3114 | oneOf: | 3293 | oneOf: |
3115 | - type: string | 3294 | - type: string |
@@ -3122,7 +3301,7 @@ components: | |||
3122 | name: licenceOneOf | 3301 | name: licenceOneOf |
3123 | in: query | 3302 | in: query |
3124 | required: false | 3303 | required: false |
3125 | description: licence id of the video (see /videos/licences) | 3304 | description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get)) |
3126 | schema: | 3305 | schema: |
3127 | oneOf: | 3306 | oneOf: |
3128 | - type: integer | 3307 | - type: integer |
@@ -3174,6 +3353,15 @@ components: | |||
3174 | type: array | 3353 | type: array |
3175 | items: | 3354 | items: |
3176 | type: string | 3355 | type: string |
3356 | format: uri | ||
3357 | npmName: | ||
3358 | name: npmName | ||
3359 | in: path | ||
3360 | required: true | ||
3361 | description: name of the plugin/theme on npmjs.com or in its package.json | ||
3362 | schema: | ||
3363 | type: string | ||
3364 | example: peertube-plugin-auth-ldap | ||
3177 | securitySchemes: | 3365 | securitySchemes: |
3178 | OAuth2: | 3366 | OAuth2: |
3179 | description: > | 3367 | description: > |
@@ -3306,14 +3494,17 @@ components: | |||
3306 | - serverRules | 3494 | - serverRules |
3307 | - thumbnails | 3495 | - thumbnails |
3308 | - captions | 3496 | - captions |
3497 | example: [spamOrMisleading] | ||
3309 | 3498 | ||
3310 | VideoResolutionConstant: | 3499 | VideoResolutionConstant: |
3311 | properties: | 3500 | properties: |
3312 | id: | 3501 | id: |
3313 | type: integer | 3502 | type: integer |
3314 | description: 'Video resolution (240, 360, 720 ...)' | 3503 | description: 'Video resolution (240, 360, 720 ...)' |
3504 | example: 240 | ||
3315 | label: | 3505 | label: |
3316 | type: string | 3506 | type: string |
3507 | example: 240p | ||
3317 | VideoScheduledUpdate: | 3508 | VideoScheduledUpdate: |
3318 | properties: | 3509 | properties: |
3319 | privacy: | 3510 | privacy: |
@@ -3334,8 +3525,10 @@ components: | |||
3334 | type: string | 3525 | type: string |
3335 | url: | 3526 | url: |
3336 | type: string | 3527 | type: string |
3528 | format: url | ||
3337 | host: | 3529 | host: |
3338 | type: string | 3530 | type: string |
3531 | format: hostname | ||
3339 | avatar: | 3532 | avatar: |
3340 | nullable: true | 3533 | nullable: true |
3341 | allOf: | 3534 | allOf: |
@@ -3350,8 +3543,10 @@ components: | |||
3350 | type: string | 3543 | type: string |
3351 | url: | 3544 | url: |
3352 | type: string | 3545 | type: string |
3546 | format: url | ||
3353 | host: | 3547 | host: |
3354 | type: string | 3548 | type: string |
3549 | format: hostname | ||
3355 | avatar: | 3550 | avatar: |
3356 | nullable: true | 3551 | nullable: true |
3357 | allOf: | 3552 | allOf: |
@@ -3379,16 +3574,21 @@ components: | |||
3379 | description: 'Video file size in bytes' | 3574 | description: 'Video file size in bytes' |
3380 | torrentUrl: | 3575 | torrentUrl: |
3381 | type: string | 3576 | type: string |
3577 | format: url | ||
3382 | torrentDownloadUrl: | 3578 | torrentDownloadUrl: |
3383 | type: string | 3579 | type: string |
3580 | format: url | ||
3384 | fileUrl: | 3581 | fileUrl: |
3385 | type: string | 3582 | type: string |
3583 | format: url | ||
3386 | fileDownloadUrl: | 3584 | fileDownloadUrl: |
3387 | type: string | 3585 | type: string |
3586 | format: url | ||
3388 | fps: | 3587 | fps: |
3389 | type: number | 3588 | type: number |
3390 | metadataUrl: | 3589 | metadataUrl: |
3391 | type: string | 3590 | type: string |
3591 | format: url | ||
3392 | VideoStreamingPlaylists: | 3592 | VideoStreamingPlaylists: |
3393 | properties: | 3593 | properties: |
3394 | id: | 3594 | id: |
@@ -3400,8 +3600,10 @@ components: | |||
3400 | description: 'Playlist type (HLS = `1`)' | 3600 | description: 'Playlist type (HLS = `1`)' |
3401 | playlistUrl: | 3601 | playlistUrl: |
3402 | type: string | 3602 | type: string |
3603 | format: url | ||
3403 | segmentsSha256Url: | 3604 | segmentsSha256Url: |
3404 | type: string | 3605 | type: string |
3606 | format: url | ||
3405 | files: | 3607 | files: |
3406 | type: array | 3608 | type: array |
3407 | items: | 3609 | items: |
@@ -3413,28 +3615,38 @@ components: | |||
3413 | properties: | 3615 | properties: |
3414 | baseUrl: | 3616 | baseUrl: |
3415 | type: string | 3617 | type: string |
3618 | format: url | ||
3416 | VideoInfo: | 3619 | VideoInfo: |
3417 | properties: | 3620 | properties: |
3418 | id: | 3621 | id: |
3419 | type: integer | 3622 | type: integer |
3420 | uuid: | 3623 | uuid: |
3421 | type: string | 3624 | type: string |
3625 | format: uuid | ||
3626 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3422 | name: | 3627 | name: |
3423 | type: string | 3628 | type: string |
3424 | Video: | 3629 | Video: |
3425 | properties: | 3630 | properties: |
3426 | id: | 3631 | id: |
3427 | type: integer | 3632 | type: integer |
3633 | example: 8 | ||
3428 | uuid: | 3634 | uuid: |
3429 | type: string | 3635 | type: string |
3636 | format: uuid | ||
3637 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3430 | createdAt: | 3638 | createdAt: |
3431 | type: string | 3639 | type: string |
3640 | format: date-time | ||
3432 | publishedAt: | 3641 | publishedAt: |
3433 | type: string | 3642 | type: string |
3643 | format: date-time | ||
3434 | updatedAt: | 3644 | updatedAt: |
3435 | type: string | 3645 | type: string |
3646 | format: date-time | ||
3436 | originallyPublishedAt: | 3647 | originallyPublishedAt: |
3437 | type: string | 3648 | type: string |
3649 | format: date-time | ||
3438 | category: | 3650 | category: |
3439 | $ref: '#/components/schemas/VideoConstantNumber' | 3651 | $ref: '#/components/schemas/VideoConstantNumber' |
3440 | licence: | 3652 | licence: |
@@ -3447,22 +3659,30 @@ components: | |||
3447 | type: string | 3659 | type: string |
3448 | duration: | 3660 | duration: |
3449 | type: integer | 3661 | type: integer |
3662 | example: 1419 | ||
3450 | isLocal: | 3663 | isLocal: |
3451 | type: boolean | 3664 | type: boolean |
3452 | name: | 3665 | name: |
3453 | type: string | 3666 | type: string |
3667 | example: What is PeerTube? | ||
3454 | thumbnailPath: | 3668 | thumbnailPath: |
3455 | type: string | 3669 | type: string |
3670 | example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg | ||
3456 | previewPath: | 3671 | previewPath: |
3457 | type: string | 3672 | type: string |
3673 | example: /static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg | ||
3458 | embedPath: | 3674 | embedPath: |
3459 | type: string | 3675 | type: string |
3676 | example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee | ||
3460 | views: | 3677 | views: |
3461 | type: integer | 3678 | type: integer |
3679 | example: 1337 | ||
3462 | likes: | 3680 | likes: |
3463 | type: integer | 3681 | type: integer |
3682 | example: 42 | ||
3464 | dislikes: | 3683 | dislikes: |
3465 | type: integer | 3684 | type: integer |
3685 | example: 7 | ||
3466 | nsfw: | 3686 | nsfw: |
3467 | type: boolean | 3687 | type: boolean |
3468 | waitTranscoding: | 3688 | waitTranscoding: |
@@ -3499,6 +3719,7 @@ components: | |||
3499 | type: string | 3719 | type: string |
3500 | support: | 3720 | support: |
3501 | type: string | 3721 | type: string |
3722 | example: Please support my work on <insert crowdfunding plateform>! <3 | ||
3502 | channel: | 3723 | channel: |
3503 | $ref: '#/components/schemas/VideoChannel' | 3724 | $ref: '#/components/schemas/VideoChannel' |
3504 | account: | 3725 | account: |
@@ -3507,6 +3728,7 @@ components: | |||
3507 | type: array | 3728 | type: array |
3508 | items: | 3729 | items: |
3509 | type: string | 3730 | type: string |
3731 | example: [flowers, gardening] | ||
3510 | files: | 3732 | files: |
3511 | type: array | 3733 | type: array |
3512 | items: | 3734 | items: |
@@ -3519,6 +3741,7 @@ components: | |||
3519 | type: array | 3741 | type: array |
3520 | items: | 3742 | items: |
3521 | type: string | 3743 | type: string |
3744 | format: url | ||
3522 | streamingPlaylists: | 3745 | streamingPlaylists: |
3523 | type: array | 3746 | type: array |
3524 | items: | 3747 | items: |
@@ -3529,8 +3752,14 @@ components: | |||
3529 | type: integer | 3752 | type: integer |
3530 | fileUrl: | 3753 | fileUrl: |
3531 | type: string | 3754 | type: string |
3755 | format: url | ||
3532 | strategy: | 3756 | strategy: |
3533 | type: string | 3757 | type: string |
3758 | enum: | ||
3759 | - manual | ||
3760 | - most-views | ||
3761 | - trending | ||
3762 | - recently-added | ||
3534 | size: | 3763 | size: |
3535 | type: integer | 3764 | type: integer |
3536 | createdAt: | 3765 | createdAt: |
@@ -3550,8 +3779,11 @@ components: | |||
3550 | type: string | 3779 | type: string |
3551 | url: | 3780 | url: |
3552 | type: string | 3781 | type: string |
3782 | format: url | ||
3553 | uuid: | 3783 | uuid: |
3554 | type: string | 3784 | type: string |
3785 | format: uuid | ||
3786 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3555 | redundancies: | 3787 | redundancies: |
3556 | type: object | 3788 | type: object |
3557 | properties: | 3789 | properties: |
@@ -3574,37 +3806,42 @@ components: | |||
3574 | description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' | 3806 | description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' |
3575 | label: | 3807 | label: |
3576 | type: string | 3808 | type: string |
3809 | example: Pending | ||
3577 | VideoImport: | 3810 | VideoImport: |
3578 | properties: | 3811 | properties: |
3579 | id: | 3812 | id: |
3580 | type: integer | 3813 | type: integer |
3814 | example: 2 | ||
3581 | targetUrl: | 3815 | targetUrl: |
3582 | type: string | 3816 | type: string |
3817 | format: url | ||
3818 | example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3583 | magnetUri: | 3819 | magnetUri: |
3584 | type: string | 3820 | type: string |
3821 | format: uri | ||
3822 | example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4 | ||
3585 | torrentName: | 3823 | torrentName: |
3586 | type: string | 3824 | type: string |
3587 | state: | 3825 | state: |
3588 | type: object | 3826 | $ref: '#/components/schemas/VideoImportStateConstant' |
3589 | properties: | ||
3590 | id: | ||
3591 | $ref: '#/components/schemas/VideoImportStateConstant' | ||
3592 | label: | ||
3593 | type: string | ||
3594 | error: | 3827 | error: |
3595 | type: string | 3828 | type: string |
3596 | createdAt: | 3829 | createdAt: |
3597 | type: string | 3830 | type: string |
3831 | format: date-time | ||
3598 | updatedAt: | 3832 | updatedAt: |
3599 | type: string | 3833 | type: string |
3834 | format: date-time | ||
3600 | video: | 3835 | video: |
3601 | $ref: '#/components/schemas/Video' | 3836 | $ref: '#/components/schemas/Video' |
3602 | VideoAbuse: | 3837 | VideoAbuse: |
3603 | properties: | 3838 | properties: |
3604 | id: | 3839 | id: |
3605 | type: integer | 3840 | type: integer |
3841 | example: 7 | ||
3606 | reason: | 3842 | reason: |
3607 | type: string | 3843 | type: string |
3844 | example: The video is a spam | ||
3608 | predefinedReasons: | 3845 | predefinedReasons: |
3609 | $ref: '#/components/schemas/VideoAbusePredefinedReasons' | 3846 | $ref: '#/components/schemas/VideoAbusePredefinedReasons' |
3610 | reporterAccount: | 3847 | reporterAccount: |
@@ -3613,6 +3850,7 @@ components: | |||
3613 | $ref: '#/components/schemas/VideoAbuseStateConstant' | 3850 | $ref: '#/components/schemas/VideoAbuseStateConstant' |
3614 | moderationComment: | 3851 | moderationComment: |
3615 | type: string | 3852 | type: string |
3853 | example: Decided to ban the server since it spams us regularly | ||
3616 | video: | 3854 | video: |
3617 | type: object | 3855 | type: object |
3618 | properties: | 3856 | properties: |
@@ -3622,8 +3860,11 @@ components: | |||
3622 | type: string | 3860 | type: string |
3623 | uuid: | 3861 | uuid: |
3624 | type: string | 3862 | type: string |
3863 | format: uuid | ||
3864 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3625 | createdAt: | 3865 | createdAt: |
3626 | type: string | 3866 | type: string |
3867 | format: date-time | ||
3627 | VideoBlacklist: | 3868 | VideoBlacklist: |
3628 | properties: | 3869 | properties: |
3629 | id: | 3870 | id: |
@@ -3632,12 +3873,16 @@ components: | |||
3632 | type: integer | 3873 | type: integer |
3633 | createdAt: | 3874 | createdAt: |
3634 | type: string | 3875 | type: string |
3876 | format: date-time | ||
3635 | updatedAt: | 3877 | updatedAt: |
3636 | type: string | 3878 | type: string |
3879 | format: date-time | ||
3637 | name: | 3880 | name: |
3638 | type: string | 3881 | type: string |
3639 | uuid: | 3882 | uuid: |
3640 | type: string | 3883 | type: string |
3884 | format: uuid | ||
3885 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3641 | description: | 3886 | description: |
3642 | type: string | 3887 | type: string |
3643 | duration: | 3888 | duration: |
@@ -3665,18 +3910,24 @@ components: | |||
3665 | type: integer | 3910 | type: integer |
3666 | uuid: | 3911 | uuid: |
3667 | type: string | 3912 | type: string |
3913 | format: uuid | ||
3914 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3668 | VideoPlaylist: | 3915 | VideoPlaylist: |
3669 | properties: | 3916 | properties: |
3670 | id: | 3917 | id: |
3671 | type: integer | 3918 | type: integer |
3672 | createdAt: | 3919 | createdAt: |
3673 | type: string | 3920 | type: string |
3921 | format: date-time | ||
3674 | updatedAt: | 3922 | updatedAt: |
3675 | type: string | 3923 | type: string |
3924 | format: date-time | ||
3676 | description: | 3925 | description: |
3677 | type: string | 3926 | type: string |
3678 | uuid: | 3927 | uuid: |
3679 | type: string | 3928 | type: string |
3929 | format: uuid | ||
3930 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
3680 | displayName: | 3931 | displayName: |
3681 | type: string | 3932 | type: string |
3682 | isLocal: | 3933 | isLocal: |
@@ -3699,6 +3950,7 @@ components: | |||
3699 | type: integer | 3950 | type: integer |
3700 | url: | 3951 | url: |
3701 | type: string | 3952 | type: string |
3953 | format: url | ||
3702 | text: | 3954 | text: |
3703 | type: string | 3955 | type: string |
3704 | threadId: | 3956 | threadId: |
@@ -3709,8 +3961,10 @@ components: | |||
3709 | type: integer | 3961 | type: integer |
3710 | createdAt: | 3962 | createdAt: |
3711 | type: string | 3963 | type: string |
3964 | format: date-time | ||
3712 | updatedAt: | 3965 | updatedAt: |
3713 | type: string | 3966 | type: string |
3967 | format: date-time | ||
3714 | totalRepliesFromVideoAuthor: | 3968 | totalRepliesFromVideoAuthor: |
3715 | type: integer | 3969 | type: integer |
3716 | totalReplies: | 3970 | totalReplies: |
@@ -3737,18 +3991,22 @@ components: | |||
3737 | type: string | 3991 | type: string |
3738 | createdAt: | 3992 | createdAt: |
3739 | type: string | 3993 | type: string |
3994 | format: date-time | ||
3740 | updatedAt: | 3995 | updatedAt: |
3741 | type: string | 3996 | type: string |
3997 | format: date-time | ||
3742 | ActorInfo: | 3998 | ActorInfo: |
3743 | properties: | 3999 | properties: |
3744 | id: | 4000 | id: |
3745 | type: integer | 4001 | type: integer |
4002 | example: 11 | ||
3746 | name: | 4003 | name: |
3747 | type: string | 4004 | type: string |
3748 | displayName: | 4005 | displayName: |
3749 | type: string | 4006 | type: string |
3750 | host: | 4007 | host: |
3751 | type: string | 4008 | type: string |
4009 | format: hostname | ||
3752 | avatar: | 4010 | avatar: |
3753 | nullable: true | 4011 | nullable: true |
3754 | type: object | 4012 | type: object |
@@ -3759,20 +4017,25 @@ components: | |||
3759 | properties: | 4017 | properties: |
3760 | id: | 4018 | id: |
3761 | type: integer | 4019 | type: integer |
4020 | example: 11 | ||
3762 | url: | 4021 | url: |
3763 | type: string | 4022 | type: string |
4023 | format: url | ||
3764 | name: | 4024 | name: |
3765 | type: string | 4025 | type: string |
3766 | host: | 4026 | host: |
3767 | type: string | 4027 | type: string |
4028 | format: hostname | ||
3768 | followingCount: | 4029 | followingCount: |
3769 | type: integer | 4030 | type: integer |
3770 | followersCount: | 4031 | followersCount: |
3771 | type: integer | 4032 | type: integer |
3772 | createdAt: | 4033 | createdAt: |
3773 | type: string | 4034 | type: string |
4035 | format: date-time | ||
3774 | updatedAt: | 4036 | updatedAt: |
3775 | type: string | 4037 | type: string |
4038 | format: date-time | ||
3776 | avatar: | 4039 | avatar: |
3777 | $ref: '#/components/schemas/Avatar' | 4040 | $ref: '#/components/schemas/Avatar' |
3778 | Account: | 4041 | Account: |
@@ -3781,73 +4044,17 @@ components: | |||
3781 | - properties: | 4044 | - properties: |
3782 | userId: | 4045 | userId: |
3783 | type: string | 4046 | type: string |
4047 | example: 2 | ||
3784 | displayName: | 4048 | displayName: |
3785 | type: string | 4049 | type: string |
3786 | description: | 4050 | description: |
3787 | type: string | 4051 | type: string |
3788 | User: | ||
3789 | properties: | ||
3790 | id: | ||
3791 | type: integer | ||
3792 | username: | ||
3793 | type: string | ||
3794 | email: | ||
3795 | type: string | ||
3796 | theme: | ||
3797 | type: string | ||
3798 | description: 'Theme enabled by this user' | ||
3799 | emailVerified: | ||
3800 | type: boolean | ||
3801 | description: 'Has the user confirmed their email address?' | ||
3802 | nsfwPolicy: | ||
3803 | $ref: '#/components/schemas/NSFWPolicy' | ||
3804 | webtorrentEnabled: | ||
3805 | type: boolean | ||
3806 | autoPlayVideo: | ||
3807 | type: boolean | ||
3808 | description: 'Automatically start playing the video on the watch page' | ||
3809 | role: | ||
3810 | $ref: '#/components/schemas/UserRole' | ||
3811 | roleLabel: | ||
3812 | type: string | ||
3813 | enum: | ||
3814 | - User | ||
3815 | - Moderator | ||
3816 | - Administrator | ||
3817 | videoQuota: | ||
3818 | type: integer | ||
3819 | videoQuotaDaily: | ||
3820 | type: integer | ||
3821 | videosCount: | ||
3822 | type: integer | ||
3823 | videoAbusesCount: | ||
3824 | type: integer | ||
3825 | videoAbusesAcceptedCount: | ||
3826 | type: integer | ||
3827 | videoAbusesCreatedCount: | ||
3828 | type: integer | ||
3829 | videoCommentsCount: | ||
3830 | type: integer | ||
3831 | noInstanceConfigWarningModal: | ||
3832 | type: boolean | ||
3833 | noWelcomeModal: | ||
3834 | type: boolean | ||
3835 | blocked: | ||
3836 | type: boolean | ||
3837 | blockedReason: | ||
3838 | type: string | ||
3839 | createdAt: | ||
3840 | type: string | ||
3841 | account: | ||
3842 | $ref: '#/components/schemas/Account' | ||
3843 | videoChannels: | ||
3844 | type: array | ||
3845 | items: | ||
3846 | $ref: '#/components/schemas/VideoChannel' | ||
3847 | UserWatchingVideo: | 4052 | UserWatchingVideo: |
3848 | properties: | 4053 | properties: |
3849 | currentTime: | 4054 | currentTime: |
3850 | type: integer | 4055 | type: integer |
4056 | description: timestamp within the video, in seconds | ||
4057 | example: 5 | ||
3851 | ServerConfig: | 4058 | ServerConfig: |
3852 | properties: | 4059 | properties: |
3853 | instance: | 4060 | instance: |
@@ -4044,6 +4251,7 @@ components: | |||
4044 | properties: | 4251 | properties: |
4045 | indexUrl: | 4252 | indexUrl: |
4046 | type: string | 4253 | type: string |
4254 | format: url | ||
4047 | ServerConfigAbout: | 4255 | ServerConfigAbout: |
4048 | properties: | 4256 | properties: |
4049 | instance: | 4257 | instance: |
@@ -4125,6 +4333,7 @@ components: | |||
4125 | properties: | 4333 | properties: |
4126 | email: | 4334 | email: |
4127 | type: string | 4335 | type: string |
4336 | format: email | ||
4128 | contactForm: | 4337 | contactForm: |
4129 | type: object | 4338 | type: object |
4130 | properties: | 4339 | properties: |
@@ -4223,38 +4432,61 @@ components: | |||
4223 | - accepted | 4432 | - accepted |
4224 | createdAt: | 4433 | createdAt: |
4225 | type: string | 4434 | type: string |
4435 | format: date-time | ||
4226 | updatedAt: | 4436 | updatedAt: |
4227 | type: string | 4437 | type: string |
4438 | format: date-time | ||
4228 | Job: | 4439 | Job: |
4229 | properties: | 4440 | properties: |
4230 | id: | 4441 | id: |
4231 | type: integer | 4442 | type: integer |
4443 | minimum: 0 | ||
4444 | example: 42 | ||
4232 | state: | 4445 | state: |
4233 | type: string | 4446 | type: string |
4234 | enum: | 4447 | enum: |
4235 | - pending | 4448 | - active |
4236 | - processing | 4449 | - completed |
4237 | - error | 4450 | - failed |
4238 | - success | 4451 | - waiting |
4239 | category: | 4452 | - delayed |
4453 | type: | ||
4240 | type: string | 4454 | type: string |
4241 | enum: | 4455 | enum: |
4242 | - transcoding | 4456 | - activitypub-http-unicast |
4243 | - activitypub-http | 4457 | - activitypub-http-broadcast |
4244 | handlerName: | 4458 | - activitypub-http-fetcher |
4245 | type: string | 4459 | - activitypub-follow |
4246 | handlerInputData: | 4460 | - video-file-import |
4247 | type: string | 4461 | - video-transcoding |
4462 | |||
4463 | - video-import | ||
4464 | - videos-views | ||
4465 | - activitypub-refresher | ||
4466 | - video-redundancy | ||
4467 | data: | ||
4468 | type: object | ||
4469 | additionalProperties: true | ||
4470 | error: | ||
4471 | type: object | ||
4472 | additionalProperties: true | ||
4248 | createdAt: | 4473 | createdAt: |
4249 | type: string | 4474 | type: string |
4250 | updatedAt: | 4475 | format: date-time |
4476 | finishedOn: | ||
4251 | type: string | 4477 | type: string |
4478 | format: date-time | ||
4479 | processedOn: | ||
4480 | type: string | ||
4481 | format: date-time | ||
4252 | AddUserResponse: | 4482 | AddUserResponse: |
4253 | properties: | 4483 | properties: |
4254 | id: | 4484 | id: |
4255 | type: integer | 4485 | type: integer |
4256 | uuid: | 4486 | uuid: |
4257 | type: string | 4487 | type: string |
4488 | format: uuid | ||
4489 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
4258 | VideoUploadResponse: | 4490 | VideoUploadResponse: |
4259 | properties: | 4491 | properties: |
4260 | video: | 4492 | video: |
@@ -4262,14 +4494,19 @@ components: | |||
4262 | properties: | 4494 | properties: |
4263 | id: | 4495 | id: |
4264 | type: integer | 4496 | type: integer |
4497 | example: 8 | ||
4265 | uuid: | 4498 | uuid: |
4266 | type: string | 4499 | type: string |
4500 | format: uuid | ||
4501 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | ||
4267 | CommentThreadResponse: | 4502 | CommentThreadResponse: |
4268 | properties: | 4503 | properties: |
4269 | total: | 4504 | total: |
4270 | type: integer | 4505 | type: integer |
4506 | example: 1 | ||
4271 | data: | 4507 | data: |
4272 | type: array | 4508 | type: array |
4509 | maxItems: 100 | ||
4273 | items: | 4510 | items: |
4274 | $ref: '#/components/schemas/VideoComment' | 4511 | $ref: '#/components/schemas/VideoComment' |
4275 | CommentThreadPostResponse: | 4512 | CommentThreadPostResponse: |
@@ -4280,31 +4517,103 @@ components: | |||
4280 | properties: | 4517 | properties: |
4281 | total: | 4518 | total: |
4282 | type: integer | 4519 | type: integer |
4520 | example: 1 | ||
4283 | data: | 4521 | data: |
4284 | type: array | 4522 | type: array |
4523 | maxItems: 100 | ||
4285 | items: | 4524 | items: |
4286 | $ref: '#/components/schemas/Video' | 4525 | $ref: '#/components/schemas/Video' |
4526 | User: | ||
4527 | properties: | ||
4528 | id: | ||
4529 | type: integer | ||
4530 | readOnly: true | ||
4531 | username: | ||
4532 | type: string | ||
4533 | description: The user username | ||
4534 | minLength: 1 | ||
4535 | maxLength: 50 | ||
4536 | email: | ||
4537 | type: string | ||
4538 | format: email | ||
4539 | description: The user email | ||
4540 | theme: | ||
4541 | type: string | ||
4542 | description: Theme enabled by this user | ||
4543 | emailVerified: | ||
4544 | type: boolean | ||
4545 | description: Has the user confirmed their email address? | ||
4546 | nsfwPolicy: | ||
4547 | $ref: '#/components/schemas/NSFWPolicy' | ||
4548 | webtorrentEnabled: | ||
4549 | type: boolean | ||
4550 | description: Enable P2P in the player | ||
4551 | autoPlayVideo: | ||
4552 | type: boolean | ||
4553 | description: Automatically start playing the video on the watch page | ||
4554 | role: | ||
4555 | $ref: '#/components/schemas/UserRole' | ||
4556 | roleLabel: | ||
4557 | type: string | ||
4558 | enum: | ||
4559 | - User | ||
4560 | - Moderator | ||
4561 | - Administrator | ||
4562 | videoQuota: | ||
4563 | type: integer | ||
4564 | description: The user video quota | ||
4565 | videoQuotaDaily: | ||
4566 | type: integer | ||
4567 | description: The user daily video quota | ||
4568 | videosCount: | ||
4569 | type: integer | ||
4570 | videoAbusesCount: | ||
4571 | type: integer | ||
4572 | videoAbusesAcceptedCount: | ||
4573 | type: integer | ||
4574 | videoAbusesCreatedCount: | ||
4575 | type: integer | ||
4576 | videoCommentsCount: | ||
4577 | type: integer | ||
4578 | noInstanceConfigWarningModal: | ||
4579 | type: boolean | ||
4580 | noWelcomeModal: | ||
4581 | type: boolean | ||
4582 | blocked: | ||
4583 | type: boolean | ||
4584 | blockedReason: | ||
4585 | type: string | ||
4586 | createdAt: | ||
4587 | type: string | ||
4588 | account: | ||
4589 | $ref: '#/components/schemas/Account' | ||
4590 | videoChannels: | ||
4591 | type: array | ||
4592 | items: | ||
4593 | $ref: '#/components/schemas/VideoChannel' | ||
4287 | AddUser: | 4594 | AddUser: |
4288 | properties: | 4595 | properties: |
4289 | username: | 4596 | username: |
4290 | type: string | 4597 | type: string |
4291 | description: 'The user username' | 4598 | description: The user username |
4292 | minLength: 1 | 4599 | minLength: 1 |
4293 | maxLength: 50 | 4600 | maxLength: 50 |
4294 | password: | 4601 | password: |
4295 | type: string | 4602 | type: string |
4296 | description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent' | 4603 | format: password |
4604 | description: The user password. If the smtp server is configured, you can leave empty and an email will be sent | ||
4297 | minLength: 6 | 4605 | minLength: 6 |
4298 | maxLength: 255 | 4606 | maxLength: 255 |
4299 | email: | 4607 | email: |
4300 | type: string | 4608 | type: string |
4301 | description: 'The user email. MUST be in the format of an email address.' | 4609 | format: email |
4610 | description: The user email | ||
4302 | videoQuota: | 4611 | videoQuota: |
4303 | type: string | 4612 | type: integer |
4304 | description: 'The user video quota' | 4613 | description: The user video quota |
4305 | videoQuotaDaily: | 4614 | videoQuotaDaily: |
4306 | type: string | 4615 | type: integer |
4307 | description: 'The user daily video quota' | 4616 | description: The user daily video quota |
4308 | role: | 4617 | role: |
4309 | $ref: '#/components/schemas/UserRole' | 4618 | $ref: '#/components/schemas/UserRole' |
4310 | required: | 4619 | required: |
@@ -4318,16 +4627,17 @@ components: | |||
4318 | properties: | 4627 | properties: |
4319 | id: | 4628 | id: |
4320 | type: string | 4629 | type: string |
4321 | description: 'The user id' | 4630 | description: The user id |
4322 | email: | 4631 | email: |
4323 | type: string | 4632 | type: string |
4324 | description: 'The updated email of the user' | 4633 | format: email |
4634 | description: The updated email of the user | ||
4325 | videoQuota: | 4635 | videoQuota: |
4326 | type: string | 4636 | type: integer |
4327 | description: 'The updated video quota of the user' | 4637 | description: The updated video quota of the user |
4328 | videoQuotaDaily: | 4638 | videoQuotaDaily: |
4329 | type: string | 4639 | type: integer |
4330 | description: 'The updated daily video quota of the user' | 4640 | description: The updated daily video quota of the user |
4331 | role: | 4641 | role: |
4332 | $ref: '#/components/schemas/UserRole' | 4642 | $ref: '#/components/schemas/UserRole' |
4333 | required: | 4643 | required: |
@@ -4340,16 +4650,24 @@ components: | |||
4340 | properties: | 4650 | properties: |
4341 | password: | 4651 | password: |
4342 | type: string | 4652 | type: string |
4343 | description: 'Your new password' | 4653 | format: password |
4654 | description: Your new password | ||
4655 | minLength: 6 | ||
4656 | maxLength: 255 | ||
4344 | email: | 4657 | email: |
4345 | type: string | 4658 | type: string |
4346 | description: 'Your new email' | 4659 | format: email |
4660 | description: Your new email | ||
4347 | displayNSFW: | 4661 | displayNSFW: |
4348 | type: string | 4662 | type: string |
4349 | description: 'Your new displayNSFW' | 4663 | description: Your new displayNSFW |
4664 | enum: | ||
4665 | - 'true' | ||
4666 | - 'false' | ||
4667 | - both | ||
4350 | autoPlayVideo: | 4668 | autoPlayVideo: |
4351 | type: string | 4669 | type: boolean |
4352 | description: 'Your new autoPlayVideo' | 4670 | description: Your new autoPlayVideo |
4353 | required: | 4671 | required: |
4354 | - password | 4672 | - password |
4355 | 4673 | ||
@@ -4359,10 +4677,10 @@ components: | |||
4359 | properties: | 4677 | properties: |
4360 | id: | 4678 | id: |
4361 | type: string | 4679 | type: string |
4362 | description: 'Id of the video' | 4680 | description: Id of the video |
4363 | rating: | 4681 | rating: |
4364 | type: number | 4682 | type: number |
4365 | description: 'Rating of the video' | 4683 | description: Rating of the video |
4366 | required: | 4684 | required: |
4367 | - id | 4685 | - id |
4368 | - rating | 4686 | - rating |
@@ -4380,26 +4698,37 @@ components: | |||
4380 | properties: | 4698 | properties: |
4381 | username: | 4699 | username: |
4382 | type: string | 4700 | type: string |
4383 | description: 'The username of the user' | 4701 | description: The username of the user |
4702 | minLength: 1 | ||
4703 | maxLength: 50 | ||
4704 | pattern: '/^[a-z0-9._]{1,50}$/' | ||
4384 | password: | 4705 | password: |
4385 | type: string | 4706 | type: string |
4386 | description: 'The password of the user' | 4707 | format: password |
4708 | description: The password of the user | ||
4709 | minLength: 6 | ||
4710 | maxLength: 255 | ||
4387 | email: | 4711 | email: |
4388 | type: string | 4712 | type: string |
4389 | description: 'The email of the user' | 4713 | format: email |
4714 | description: The email of the user | ||
4390 | displayName: | 4715 | displayName: |
4391 | type: string | 4716 | type: string |
4392 | description: 'The user display name' | 4717 | description: The user display name |
4718 | minLength: 1 | ||
4719 | maxLength: 120 | ||
4393 | channel: | 4720 | channel: |
4394 | type: object | 4721 | type: object |
4395 | properties: | 4722 | properties: |
4396 | name: | 4723 | name: |
4397 | type: string | 4724 | type: string |
4398 | description: 'The name for the default channel' | 4725 | description: The name for the default channel |
4726 | pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/' | ||
4399 | displayName: | 4727 | displayName: |
4400 | type: string | 4728 | type: string |
4401 | description: 'The display name for the default channel' | 4729 | description: The display name for the default channel |
4402 | 4730 | minLength: 1 | |
4731 | maxLength: 120 | ||
4403 | required: | 4732 | required: |
4404 | - username | 4733 | - username |
4405 | - password | 4734 | - password |
@@ -4453,6 +4782,7 @@ components: | |||
4453 | properties: | 4782 | properties: |
4454 | url: | 4783 | url: |
4455 | type: string | 4784 | type: string |
4785 | format: url | ||
4456 | xml: | 4786 | xml: |
4457 | attribute: true | 4787 | attribute: true |
4458 | fileSize: | 4788 | fileSize: |
@@ -4491,6 +4821,7 @@ components: | |||
4491 | properties: | 4821 | properties: |
4492 | link: | 4822 | link: |
4493 | type: string | 4823 | type: string |
4824 | format: url | ||
4494 | guid: | 4825 | guid: |
4495 | type: string | 4826 | type: string |
4496 | pubDate: | 4827 | pubDate: |
@@ -4512,6 +4843,7 @@ components: | |||
4512 | properties: | 4843 | properties: |
4513 | link: | 4844 | link: |
4514 | type: string | 4845 | type: string |
4846 | format: url | ||
4515 | description: video watch page URL | 4847 | description: video watch page URL |
4516 | guid: | 4848 | guid: |
4517 | type: string | 4849 | type: string |
@@ -4548,6 +4880,7 @@ components: | |||
4548 | properties: | 4880 | properties: |
4549 | url: | 4881 | url: |
4550 | type: string | 4882 | type: string |
4883 | format: url | ||
4551 | description: video embed path, relative to the canonical URL domain (MRSS) | 4884 | description: video embed path, relative to the canonical URL domain (MRSS) |
4552 | xml: | 4885 | xml: |
4553 | attribute: true | 4886 | attribute: true |
@@ -4556,6 +4889,7 @@ components: | |||
4556 | properties: | 4889 | properties: |
4557 | url: | 4890 | url: |
4558 | type: string | 4891 | type: string |
4892 | format: url | ||
4559 | description: video watch path, relative to the canonical URL domain (MRSS) | 4893 | description: video watch path, relative to the canonical URL domain (MRSS) |
4560 | xml: | 4894 | xml: |
4561 | attribute: true | 4895 | attribute: true |
@@ -4564,6 +4898,7 @@ components: | |||
4564 | properties: | 4898 | properties: |
4565 | url: | 4899 | url: |
4566 | type: string | 4900 | type: string |
4901 | format: url | ||
4567 | xml: | 4902 | xml: |
4568 | attribute: true | 4903 | attribute: true |
4569 | height: | 4904 | height: |
@@ -4591,6 +4926,7 @@ components: | |||
4591 | properties: | 4926 | properties: |
4592 | url: | 4927 | url: |
4593 | type: string | 4928 | type: string |
4929 | format: url | ||
4594 | xml: | 4930 | xml: |
4595 | attribute: true | 4931 | attribute: true |
4596 | type: | 4932 | type: |
@@ -4614,8 +4950,11 @@ components: | |||
4614 | type: integer | 4950 | type: integer |
4615 | description: > | 4951 | description: > |
4616 | Notification type | 4952 | Notification type |
4953 | |||
4617 | - `0` NONE | 4954 | - `0` NONE |
4955 | |||
4618 | - `1` WEB | 4956 | - `1` WEB |
4957 | |||
4619 | - `2` EMAIL | 4958 | - `2` EMAIL |
4620 | enum: | 4959 | enum: |
4621 | - 0 | 4960 | - 0 |
@@ -4629,19 +4968,33 @@ components: | |||
4629 | type: integer | 4968 | type: integer |
4630 | description: > | 4969 | description: > |
4631 | Notification type, following the `UserNotificationType` enum: | 4970 | Notification type, following the `UserNotificationType` enum: |
4971 | |||
4632 | - `1` NEW_VIDEO_FROM_SUBSCRIPTION | 4972 | - `1` NEW_VIDEO_FROM_SUBSCRIPTION |
4973 | |||
4633 | - `2` NEW_COMMENT_ON_MY_VIDEO | 4974 | - `2` NEW_COMMENT_ON_MY_VIDEO |
4975 | |||
4634 | - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS | 4976 | - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS |
4977 | |||
4635 | - `4` BLACKLIST_ON_MY_VIDEO | 4978 | - `4` BLACKLIST_ON_MY_VIDEO |
4979 | |||
4636 | - `5` UNBLACKLIST_ON_MY_VIDEO | 4980 | - `5` UNBLACKLIST_ON_MY_VIDEO |
4981 | |||
4637 | - `6` MY_VIDEO_PUBLISHED | 4982 | - `6` MY_VIDEO_PUBLISHED |
4983 | |||
4638 | - `7` MY_VIDEO_IMPORT_SUCCESS | 4984 | - `7` MY_VIDEO_IMPORT_SUCCESS |
4985 | |||
4639 | - `8` MY_VIDEO_IMPORT_ERROR | 4986 | - `8` MY_VIDEO_IMPORT_ERROR |
4987 | |||
4640 | - `9` NEW_USER_REGISTRATION | 4988 | - `9` NEW_USER_REGISTRATION |
4989 | |||
4641 | - `10` NEW_FOLLOW | 4990 | - `10` NEW_FOLLOW |
4991 | |||
4642 | - `11` COMMENT_MENTION | 4992 | - `11` COMMENT_MENTION |
4993 | |||
4643 | - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS | 4994 | - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS |
4995 | |||
4644 | - `13` NEW_INSTANCE_FOLLOWER | 4996 | - `13` NEW_INSTANCE_FOLLOWER |
4997 | |||
4645 | - `14` AUTO_INSTANCE_FOLLOWING | 4998 | - `14` AUTO_INSTANCE_FOLLOWING |
4646 | read: | 4999 | read: |
4647 | type: boolean | 5000 | type: boolean |
@@ -4667,9 +5020,11 @@ components: | |||
4667 | nullable: true | 5020 | nullable: true |
4668 | magnetUri: | 5021 | magnetUri: |
4669 | type: string | 5022 | type: string |
5023 | format: uri | ||
4670 | nullable: true | 5024 | nullable: true |
4671 | targetUri: | 5025 | targetUri: |
4672 | type: string | 5026 | type: string |
5027 | format: uri | ||
4673 | nullable: true | 5028 | nullable: true |
4674 | comment: | 5029 | comment: |
4675 | nullable: true | 5030 | nullable: true |
@@ -4733,6 +5088,7 @@ components: | |||
4733 | type: string | 5088 | type: string |
4734 | host: | 5089 | host: |
4735 | type: string | 5090 | type: string |
5091 | format: hostname | ||
4736 | createdAt: | 5092 | createdAt: |
4737 | type: string | 5093 | type: string |
4738 | format: date-time | 5094 | format: date-time |
@@ -4743,33 +5099,45 @@ components: | |||
4743 | properties: | 5099 | properties: |
4744 | total: | 5100 | total: |
4745 | type: integer | 5101 | type: integer |
5102 | example: 1 | ||
4746 | data: | 5103 | data: |
4747 | type: array | 5104 | type: array |
5105 | maxItems: 100 | ||
4748 | items: | 5106 | items: |
4749 | $ref: '#/components/schemas/Notification' | 5107 | $ref: '#/components/schemas/Notification' |
4750 | Plugin: | 5108 | Plugin: |
4751 | properties: | 5109 | properties: |
4752 | name: | 5110 | name: |
4753 | type: string | 5111 | type: string |
5112 | example: peertube-plugin-auth-ldap | ||
4754 | type: | 5113 | type: |
4755 | type: integer | 5114 | type: integer |
5115 | description: > | ||
5116 | - `1`: PLUGIN | ||
5117 | |||
5118 | - `2`: THEME | ||
4756 | enum: | 5119 | enum: |
4757 | - 1 | 5120 | - 1 |
4758 | - 2 | 5121 | - 2 |
4759 | latestVersion: | 5122 | latestVersion: |
4760 | type: string | 5123 | type: string |
5124 | example: 0.0.3 | ||
4761 | version: | 5125 | version: |
4762 | type: string | 5126 | type: string |
5127 | example: 0.0.1 | ||
4763 | enabled: | 5128 | enabled: |
4764 | type: boolean | 5129 | type: boolean |
4765 | uninstalled: | 5130 | uninstalled: |
4766 | type: boolean | 5131 | type: boolean |
4767 | peertubeEngine: | 5132 | peertubeEngine: |
4768 | type: string | 5133 | type: string |
5134 | example: 2.2.0 | ||
4769 | description: | 5135 | description: |
4770 | type: string | 5136 | type: string |
4771 | homepage: | 5137 | homepage: |
4772 | type: string | 5138 | type: string |
5139 | format: url | ||
5140 | example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap | ||
4773 | settings: | 5141 | settings: |
4774 | type: object | 5142 | type: object |
4775 | additionalProperties: true | 5143 | additionalProperties: true |
@@ -4783,7 +5151,9 @@ components: | |||
4783 | properties: | 5151 | properties: |
4784 | total: | 5152 | total: |
4785 | type: integer | 5153 | type: integer |
5154 | example: 1 | ||
4786 | data: | 5155 | data: |
4787 | type: array | 5156 | type: array |
5157 | maxItems: 100 | ||
4788 | items: | 5158 | items: |
4789 | $ref: '#/components/schemas/Plugin' \ No newline at end of file | 5159 | $ref: '#/components/schemas/Plugin' \ No newline at end of file |