diff options
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r-- | support/doc/api/openapi.yaml | 779 |
1 files changed, 620 insertions, 159 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 9434af904..1dc7a4321 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -15,10 +15,13 @@ info: | |||
15 | # Introduction | 15 | # Introduction |
16 | 16 | ||
17 | The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite | 17 | The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite |
18 | HTTP/REST library for your programming language to use PeerTube. No official | 18 | HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with |
19 | SDK is currently provided, but the spec API is fully compatible with | ||
20 | [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) | 19 | [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) |
21 | which generates a client SDK in the language of your choice. | 20 | which generates a client SDK in the language of your choice - we generate some client SDKs automatically: |
21 | |||
22 | - [Python](https://framagit.org/framasoft/peertube/clients/python) | ||
23 | - [Go](https://framagit.org/framasoft/peertube/clients/go) | ||
24 | - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) | ||
22 | 25 | ||
23 | See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API. | 26 | See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API. |
24 | 27 | ||
@@ -90,13 +93,16 @@ tags: | |||
90 | description: > | 93 | description: > |
91 | Operations dealing with creation, modification and video listing of a | 94 | Operations dealing with creation, modification and video listing of a |
92 | user's channels. | 95 | user's channels. |
93 | - name: Video Blacklist | 96 | - name: Video Blocks |
94 | description: > | 97 | description: > |
95 | Operations dealing with blacklisting videos (removing them from view and | 98 | Operations dealing with blacklisting videos (removing them from view and |
96 | preventing interactions). | 99 | preventing interactions). |
97 | - name: Video Rates | 100 | - name: Video Rates |
98 | description: > | 101 | description: > |
99 | Like/dislike a video. | 102 | Like/dislike a video. |
103 | - name: Feeds | ||
104 | description: > | ||
105 | Server syndication feeds | ||
100 | x-tagGroups: | 106 | x-tagGroups: |
101 | - name: Accounts | 107 | - name: Accounts |
102 | tags: | 108 | tags: |
@@ -114,6 +120,7 @@ x-tagGroups: | |||
114 | - Video Rates | 120 | - Video Rates |
115 | - Video Playlists | 121 | - Video Playlists |
116 | - Video Ownership Change | 122 | - Video Ownership Change |
123 | - Feeds | ||
117 | - name: Search | 124 | - name: Search |
118 | tags: | 125 | tags: |
119 | - Search | 126 | - Search |
@@ -121,6 +128,8 @@ x-tagGroups: | |||
121 | tags: | 128 | tags: |
122 | - Video Abuses | 129 | - Video Abuses |
123 | - Video Blocks | 130 | - Video Blocks |
131 | - Account Blocks | ||
132 | - Server Blocks | ||
124 | - name: Instance Configuration | 133 | - name: Instance Configuration |
125 | tags: | 134 | tags: |
126 | - Config | 135 | - Config |
@@ -143,6 +152,8 @@ paths: | |||
143 | application/json: | 152 | application/json: |
144 | schema: | 153 | schema: |
145 | $ref: '#/components/schemas/Account' | 154 | $ref: '#/components/schemas/Account' |
155 | '404': | ||
156 | description: account not found | ||
146 | '/accounts/{name}/videos': | 157 | '/accounts/{name}/videos': |
147 | get: | 158 | get: |
148 | tags: | 159 | tags: |
@@ -317,7 +328,7 @@ paths: | |||
317 | delete: | 328 | delete: |
318 | security: | 329 | security: |
319 | - OAuth2: | 330 | - OAuth2: |
320 | - admin | 331 | - admin |
321 | tags: | 332 | tags: |
322 | - Instance Follows | 333 | - Instance Follows |
323 | summary: Unfollow a server | 334 | summary: Unfollow a server |
@@ -740,6 +751,10 @@ paths: | |||
740 | responses: | 751 | responses: |
741 | '204': | 752 | '204': |
742 | description: successful operation | 753 | description: successful operation |
754 | '403': | ||
755 | description: cannot terminate an ownership change of another user | ||
756 | '404': | ||
757 | description: video owneship change not found | ||
743 | '/videos/ownership/{id}/refuse': | 758 | '/videos/ownership/{id}/refuse': |
744 | post: | 759 | post: |
745 | summary: Refuse ownership change request | 760 | summary: Refuse ownership change request |
@@ -752,6 +767,10 @@ paths: | |||
752 | responses: | 767 | responses: |
753 | '204': | 768 | '204': |
754 | description: successful operation | 769 | description: successful operation |
770 | '403': | ||
771 | description: cannot terminate an ownership change of another user | ||
772 | '404': | ||
773 | description: video owneship change not found | ||
755 | '/videos/{id}/give-ownership': | 774 | '/videos/{id}/give-ownership': |
756 | post: | 775 | post: |
757 | summary: Request ownership change | 776 | summary: Request ownership change |
@@ -776,7 +795,9 @@ paths: | |||
776 | '204': | 795 | '204': |
777 | description: successful operation | 796 | description: successful operation |
778 | '400': | 797 | '400': |
779 | description: 'Changing video ownership to a remote account is not supported yet' | 798 | description: changing video ownership to a remote account is not supported yet |
799 | '404': | ||
800 | description: video not found | ||
780 | /videos: | 801 | /videos: |
781 | get: | 802 | get: |
782 | summary: List videos | 803 | summary: List videos |
@@ -1030,7 +1051,7 @@ paths: | |||
1030 | format: binary | 1051 | format: binary |
1031 | channelId: | 1052 | channelId: |
1032 | description: Channel id that will contain this video | 1053 | description: Channel id that will contain this video |
1033 | type: number | 1054 | type: integer |
1034 | thumbnailfile: | 1055 | thumbnailfile: |
1035 | description: Video thumbnail file | 1056 | description: Video thumbnail file |
1036 | type: string | 1057 | type: string |
@@ -1070,6 +1091,7 @@ paths: | |||
1070 | type: array | 1091 | type: array |
1071 | minItems: 1 | 1092 | minItems: 1 |
1072 | maxItems: 5 | 1093 | maxItems: 5 |
1094 | uniqueItems: true | ||
1073 | items: | 1095 | items: |
1074 | type: string | 1096 | type: string |
1075 | minLength: 2 | 1097 | minLength: 2 |
@@ -1128,13 +1150,6 @@ paths: | |||
1128 | - OAuth2: [] | 1150 | - OAuth2: [] |
1129 | tags: | 1151 | tags: |
1130 | - Video | 1152 | - Video |
1131 | responses: | ||
1132 | '200': | ||
1133 | description: successful operation | ||
1134 | content: | ||
1135 | application/json: | ||
1136 | schema: | ||
1137 | $ref: '#/components/schemas/VideoUploadResponse' | ||
1138 | requestBody: | 1153 | requestBody: |
1139 | content: | 1154 | content: |
1140 | multipart/form-data: | 1155 | multipart/form-data: |
@@ -1153,7 +1168,7 @@ paths: | |||
1153 | type: string | 1168 | type: string |
1154 | channelId: | 1169 | channelId: |
1155 | description: Channel id that will contain this video | 1170 | description: Channel id that will contain this video |
1156 | type: number | 1171 | type: integer |
1157 | thumbnailfile: | 1172 | thumbnailfile: |
1158 | description: Video thumbnail file | 1173 | description: Video thumbnail file |
1159 | type: string | 1174 | type: string |
@@ -1212,13 +1227,24 @@ paths: | |||
1212 | contentType: image/jpeg | 1227 | contentType: image/jpeg |
1213 | previewfile: | 1228 | previewfile: |
1214 | contentType: image/jpeg | 1229 | contentType: image/jpeg |
1230 | responses: | ||
1231 | '200': | ||
1232 | description: successful operation | ||
1233 | content: | ||
1234 | application/json: | ||
1235 | schema: | ||
1236 | $ref: '#/components/schemas/VideoUploadResponse' | ||
1237 | '409': | ||
1238 | description: HTTP or Torrent/magnetURI import not enabled | ||
1239 | '400': | ||
1240 | description: '`magnetUri` or `targetUrl` or a torrent file missing' | ||
1215 | /videos/abuse: | 1241 | /videos/abuse: |
1216 | get: | 1242 | get: |
1217 | summary: List video abuses | 1243 | summary: List video abuses |
1218 | security: | 1244 | security: |
1219 | - OAuth2: | 1245 | - OAuth2: |
1220 | - admin | 1246 | - admin |
1221 | - moderator | 1247 | - moderator |
1222 | tags: | 1248 | tags: |
1223 | - Video Abuses | 1249 | - Video Abuses |
1224 | parameters: | 1250 | parameters: |
@@ -1269,10 +1295,10 @@ paths: | |||
1269 | - thumbnails | 1295 | - thumbnails |
1270 | - captions | 1296 | - captions |
1271 | startAt: | 1297 | startAt: |
1272 | type: number | 1298 | type: integer |
1273 | description: Timestamp in the video that marks the beginning of the report | 1299 | description: Timestamp in the video that marks the beginning of the report |
1274 | endAt: | 1300 | endAt: |
1275 | type: number | 1301 | type: integer |
1276 | description: Timestamp in the video that marks the ending of the report | 1302 | description: Timestamp in the video that marks the ending of the report |
1277 | required: | 1303 | required: |
1278 | - reason | 1304 | - reason |
@@ -1291,6 +1317,8 @@ paths: | |||
1291 | responses: | 1317 | responses: |
1292 | '204': | 1318 | '204': |
1293 | description: successful operation | 1319 | description: successful operation |
1320 | '404': | ||
1321 | description: video abuse not found | ||
1294 | parameters: | 1322 | parameters: |
1295 | - $ref: '#/components/parameters/idOrUUID' | 1323 | - $ref: '#/components/parameters/idOrUUID' |
1296 | - $ref: '#/components/parameters/abuseId' | 1324 | - $ref: '#/components/parameters/abuseId' |
@@ -1316,46 +1344,50 @@ paths: | |||
1316 | responses: | 1344 | responses: |
1317 | '204': | 1345 | '204': |
1318 | description: successful operation | 1346 | description: successful operation |
1347 | '404': | ||
1348 | description: block not found | ||
1319 | parameters: | 1349 | parameters: |
1320 | - $ref: '#/components/parameters/idOrUUID' | 1350 | - $ref: '#/components/parameters/idOrUUID' |
1321 | - $ref: '#/components/parameters/abuseId' | 1351 | - $ref: '#/components/parameters/abuseId' |
1322 | 1352 | ||
1323 | '/videos/{id}/blacklist': | 1353 | '/videos/{id}/blacklist': |
1324 | post: | 1354 | post: |
1325 | summary: Blacklist a video | 1355 | summary: Block a video |
1326 | security: | 1356 | security: |
1327 | - OAuth2: | 1357 | - OAuth2: |
1328 | - admin | 1358 | - admin |
1329 | - moderator | 1359 | - moderator |
1330 | tags: | 1360 | tags: |
1331 | - Video Blacklist | 1361 | - Video Blocks |
1332 | parameters: | 1362 | parameters: |
1333 | - $ref: '#/components/parameters/idOrUUID' | 1363 | - $ref: '#/components/parameters/idOrUUID' |
1334 | responses: | 1364 | responses: |
1335 | '204': | 1365 | '204': |
1336 | description: successful operation | 1366 | description: successful operation |
1337 | delete: | 1367 | delete: |
1338 | summary: Delete an entry of the blacklist of a video by its id | 1368 | summary: Unblock a video by its id |
1339 | security: | 1369 | security: |
1340 | - OAuth2: | 1370 | - OAuth2: |
1341 | - admin | 1371 | - admin |
1342 | - moderator | 1372 | - moderator |
1343 | tags: | 1373 | tags: |
1344 | - Video Blacklist | 1374 | - Video Blocks |
1345 | parameters: | 1375 | parameters: |
1346 | - $ref: '#/components/parameters/idOrUUID' | 1376 | - $ref: '#/components/parameters/idOrUUID' |
1347 | responses: | 1377 | responses: |
1348 | '204': | 1378 | '204': |
1349 | description: successful operation | 1379 | description: successful operation |
1380 | '404': | ||
1381 | description: block not found | ||
1350 | /videos/blacklist: | 1382 | /videos/blacklist: |
1351 | get: | 1383 | get: |
1352 | summary: List blacklisted videos | 1384 | tags: |
1385 | - Video Blocks | ||
1386 | summary: List blocked videos | ||
1353 | security: | 1387 | security: |
1354 | - OAuth2: | 1388 | - OAuth2: |
1355 | - admin | 1389 | - admin |
1356 | - moderator | 1390 | - moderator |
1357 | tags: | ||
1358 | - Video Blacklist | ||
1359 | parameters: | 1391 | parameters: |
1360 | - $ref: '#/components/parameters/start' | 1392 | - $ref: '#/components/parameters/start' |
1361 | - $ref: '#/components/parameters/count' | 1393 | - $ref: '#/components/parameters/count' |
@@ -1414,6 +1446,8 @@ paths: | |||
1414 | responses: | 1446 | responses: |
1415 | '204': | 1447 | '204': |
1416 | description: successful operation | 1448 | description: successful operation |
1449 | '404': | ||
1450 | description: video or language not found | ||
1417 | delete: | 1451 | delete: |
1418 | summary: Delete a video caption | 1452 | summary: Delete a video caption |
1419 | tags: | 1453 | tags: |
@@ -1424,6 +1458,8 @@ paths: | |||
1424 | responses: | 1458 | responses: |
1425 | '204': | 1459 | '204': |
1426 | description: successful operation | 1460 | description: successful operation |
1461 | '404': | ||
1462 | description: video or language or caption for that language not found | ||
1427 | /video-channels: | 1463 | /video-channels: |
1428 | get: | 1464 | get: |
1429 | summary: List video channels | 1465 | summary: List video channels |
@@ -1576,7 +1612,7 @@ paths: | |||
1576 | type: object | 1612 | type: object |
1577 | properties: | 1613 | properties: |
1578 | id: | 1614 | id: |
1579 | type: number | 1615 | type: integer |
1580 | uuid: | 1616 | uuid: |
1581 | type: string | 1617 | type: string |
1582 | requestBody: | 1618 | requestBody: |
@@ -1599,7 +1635,7 @@ paths: | |||
1599 | type: string | 1635 | type: string |
1600 | videoChannelId: | 1636 | videoChannelId: |
1601 | description: Video channel in which the playlist will be published | 1637 | description: Video channel in which the playlist will be published |
1602 | type: number | 1638 | type: integer |
1603 | required: | 1639 | required: |
1604 | - displayName | 1640 | - displayName |
1605 | 1641 | ||
@@ -1649,7 +1685,7 @@ paths: | |||
1649 | type: string | 1685 | type: string |
1650 | videoChannelId: | 1686 | videoChannelId: |
1651 | description: Video channel in which the playlist will be published | 1687 | description: Video channel in which the playlist will be published |
1652 | type: number | 1688 | type: integer |
1653 | delete: | 1689 | delete: |
1654 | summary: Delete a video playlist | 1690 | summary: Delete a video playlist |
1655 | security: | 1691 | security: |
@@ -1698,7 +1734,7 @@ paths: | |||
1698 | type: object | 1734 | type: object |
1699 | properties: | 1735 | properties: |
1700 | id: | 1736 | id: |
1701 | type: number | 1737 | type: integer |
1702 | requestBody: | 1738 | requestBody: |
1703 | content: | 1739 | content: |
1704 | application/json: | 1740 | application/json: |
@@ -1706,13 +1742,13 @@ paths: | |||
1706 | type: object | 1742 | type: object |
1707 | properties: | 1743 | properties: |
1708 | videoId: | 1744 | videoId: |
1709 | type: number | 1745 | type: integer |
1710 | description: 'Video to add in the playlist' | 1746 | description: 'Video to add in the playlist' |
1711 | startTimestamp: | 1747 | startTimestamp: |
1712 | type: number | 1748 | type: integer |
1713 | description: 'Start the video at this specific timestamp (in seconds)' | 1749 | description: 'Start the video at this specific timestamp (in seconds)' |
1714 | stopTimestamp: | 1750 | stopTimestamp: |
1715 | type: number | 1751 | type: integer |
1716 | description: 'Stop the video at this specific timestamp (in seconds)' | 1752 | description: 'Stop the video at this specific timestamp (in seconds)' |
1717 | required: | 1753 | required: |
1718 | - videoId | 1754 | - videoId |
@@ -1736,14 +1772,17 @@ paths: | |||
1736 | type: object | 1772 | type: object |
1737 | properties: | 1773 | properties: |
1738 | startPosition: | 1774 | startPosition: |
1739 | type: number | 1775 | type: integer |
1740 | description: 'Start position of the element to reorder (starts from 1)' | 1776 | description: 'Start position of the element to reorder' |
1777 | minimum: 1 | ||
1741 | insertAfterPosition: | 1778 | insertAfterPosition: |
1742 | type: number | 1779 | type: integer |
1743 | description: 'New position for the block to reorder (starts from 0, to add the block before the first element)' | 1780 | description: 'New position for the block to reorder, to add the block before the first element' |
1781 | minimum: 0 | ||
1744 | reorderLength: | 1782 | reorderLength: |
1745 | type: number | 1783 | type: integer |
1746 | description: 'How many element from startPosition to reorder (minimum length is 1)' | 1784 | description: 'How many element from `startPosition` to reorder' |
1785 | minimum: 1 | ||
1747 | required: | 1786 | required: |
1748 | - startPosition | 1787 | - startPosition |
1749 | - insertAfterPosition | 1788 | - insertAfterPosition |
@@ -1768,10 +1807,10 @@ paths: | |||
1768 | type: object | 1807 | type: object |
1769 | properties: | 1808 | properties: |
1770 | startTimestamp: | 1809 | startTimestamp: |
1771 | type: number | 1810 | type: integer |
1772 | description: 'Start the video at this specific timestamp (in seconds)' | 1811 | description: 'Start the video at this specific timestamp (in seconds)' |
1773 | stopTimestamp: | 1812 | stopTimestamp: |
1774 | type: number | 1813 | type: integer |
1775 | description: 'Stop the video at this specific timestamp (in seconds)' | 1814 | description: 'Stop the video at this specific timestamp (in seconds)' |
1776 | delete: | 1815 | delete: |
1777 | summary: 'Delete an element from a playlist' | 1816 | summary: 'Delete an element from a playlist' |
@@ -1801,7 +1840,7 @@ paths: | |||
1801 | schema: | 1840 | schema: |
1802 | type: array | 1841 | type: array |
1803 | items: | 1842 | items: |
1804 | type: number | 1843 | type: integer |
1805 | responses: | 1844 | responses: |
1806 | '200': | 1845 | '200': |
1807 | description: successful operation | 1846 | description: successful operation |
@@ -1816,13 +1855,13 @@ paths: | |||
1816 | type: object | 1855 | type: object |
1817 | properties: | 1856 | properties: |
1818 | playlistElementId: | 1857 | playlistElementId: |
1819 | type: number | 1858 | type: integer |
1820 | playlistId: | 1859 | playlistId: |
1821 | type: number | 1860 | type: integer |
1822 | startTimestamp: | 1861 | startTimestamp: |
1823 | type: number | 1862 | type: integer |
1824 | stopTimestamp: | 1863 | stopTimestamp: |
1825 | type: number | 1864 | type: integer |
1826 | 1865 | ||
1827 | '/accounts/{name}/video-channels': | 1866 | '/accounts/{name}/video-channels': |
1828 | get: | 1867 | get: |
@@ -2043,13 +2082,13 @@ paths: | |||
2043 | required: true | 2082 | required: true |
2044 | description: Get videos that have this minimum duration | 2083 | description: Get videos that have this minimum duration |
2045 | schema: | 2084 | schema: |
2046 | type: number | 2085 | type: integer |
2047 | - name: durationMax | 2086 | - name: durationMax |
2048 | in: query | 2087 | in: query |
2049 | required: true | 2088 | required: true |
2050 | description: Get videos that have this maximum duration | 2089 | description: Get videos that have this maximum duration |
2051 | schema: | 2090 | schema: |
2052 | type: number | 2091 | type: integer |
2053 | responses: | 2092 | responses: |
2054 | '200': | 2093 | '200': |
2055 | description: successful operation | 2094 | description: successful operation |
@@ -2085,6 +2124,239 @@ paths: | |||
2085 | type: array | 2124 | type: array |
2086 | items: | 2125 | items: |
2087 | $ref: '#/components/schemas/VideoChannel' | 2126 | $ref: '#/components/schemas/VideoChannel' |
2127 | /blocklist/accounts: | ||
2128 | get: | ||
2129 | tags: | ||
2130 | - Account Blocks | ||
2131 | summary: List account blocks | ||
2132 | security: | ||
2133 | - OAuth2: | ||
2134 | - admin | ||
2135 | parameters: | ||
2136 | - $ref: '#/components/parameters/start' | ||
2137 | - $ref: '#/components/parameters/count' | ||
2138 | - $ref: '#/components/parameters/sort' | ||
2139 | responses: | ||
2140 | '200': | ||
2141 | description: successful operation | ||
2142 | post: | ||
2143 | tags: | ||
2144 | - Account Blocks | ||
2145 | summary: Block an account | ||
2146 | security: | ||
2147 | - OAuth2: | ||
2148 | - admin | ||
2149 | requestBody: | ||
2150 | content: | ||
2151 | application/json: | ||
2152 | schema: | ||
2153 | type: object | ||
2154 | properties: | ||
2155 | accountName: | ||
2156 | type: string | ||
2157 | description: account to block, in the form `username@domain` | ||
2158 | required: | ||
2159 | - accountName | ||
2160 | responses: | ||
2161 | '200': | ||
2162 | description: successful operation | ||
2163 | '409': | ||
2164 | description: self-blocking forbidden | ||
2165 | '/blocklist/accounts/{accountName}': | ||
2166 | delete: | ||
2167 | tags: | ||
2168 | - Account Blocks | ||
2169 | summary: Unblock an account by its handle | ||
2170 | security: | ||
2171 | - OAuth2: | ||
2172 | - admin | ||
2173 | parameters: | ||
2174 | - name: accountName | ||
2175 | in: path | ||
2176 | required: true | ||
2177 | description: account to unblock, in the form `username@domain` | ||
2178 | schema: | ||
2179 | type: string | ||
2180 | responses: | ||
2181 | '201': | ||
2182 | description: successful operation | ||
2183 | '404': | ||
2184 | description: account or account block does not exist | ||
2185 | /blocklist/servers: | ||
2186 | get: | ||
2187 | tags: | ||
2188 | - Server Blocks | ||
2189 | summary: List server blocks | ||
2190 | security: | ||
2191 | - OAuth2: | ||
2192 | - admin | ||
2193 | parameters: | ||
2194 | - $ref: '#/components/parameters/start' | ||
2195 | - $ref: '#/components/parameters/count' | ||
2196 | - $ref: '#/components/parameters/sort' | ||
2197 | responses: | ||
2198 | '200': | ||
2199 | description: successful operation | ||
2200 | post: | ||
2201 | tags: | ||
2202 | - Server Blocks | ||
2203 | summary: Block a server | ||
2204 | security: | ||
2205 | - OAuth2: | ||
2206 | - admin | ||
2207 | requestBody: | ||
2208 | content: | ||
2209 | application/json: | ||
2210 | schema: | ||
2211 | type: object | ||
2212 | properties: | ||
2213 | accountName: | ||
2214 | type: string | ||
2215 | description: server domain to block | ||
2216 | required: | ||
2217 | - accountName | ||
2218 | responses: | ||
2219 | '200': | ||
2220 | description: successful operation | ||
2221 | '409': | ||
2222 | description: self-blocking forbidden | ||
2223 | '/blocklist/servers/{host}': | ||
2224 | delete: | ||
2225 | tags: | ||
2226 | - Server Blocks | ||
2227 | summary: Unblock a server by its domain | ||
2228 | security: | ||
2229 | - OAuth2: | ||
2230 | - admin | ||
2231 | parameters: | ||
2232 | - name: host | ||
2233 | in: path | ||
2234 | required: true | ||
2235 | description: server domain to unblock | ||
2236 | schema: | ||
2237 | type: string | ||
2238 | responses: | ||
2239 | '201': | ||
2240 | description: successful operation | ||
2241 | '404': | ||
2242 | description: account block does not exist | ||
2243 | '/feeds/video-comments.{format}': | ||
2244 | get: | ||
2245 | tags: | ||
2246 | - Feeds | ||
2247 | summary: List comments on videos | ||
2248 | parameters: | ||
2249 | - name: format | ||
2250 | in: path | ||
2251 | required: true | ||
2252 | description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)' | ||
2253 | schema: | ||
2254 | type: string | ||
2255 | enum: | ||
2256 | - xml | ||
2257 | - rss | ||
2258 | - rss2 | ||
2259 | - atom | ||
2260 | - atom1 | ||
2261 | - json | ||
2262 | - json1 | ||
2263 | - name: videoId | ||
2264 | in: path | ||
2265 | description: 'limit listing to a specific video' | ||
2266 | schema: | ||
2267 | type: string | ||
2268 | responses: | ||
2269 | '204': | ||
2270 | description: successful operation | ||
2271 | headers: | ||
2272 | Cache-Control: | ||
2273 | schema: | ||
2274 | type: string | ||
2275 | default: 'max-age=900' # 15 min cache | ||
2276 | content: | ||
2277 | application/xml: | ||
2278 | schema: | ||
2279 | $ref: '#/components/schemas/VideoCommentsForXML' | ||
2280 | application/rss+xml: | ||
2281 | schema: | ||
2282 | $ref: '#/components/schemas/VideoCommentsForXML' | ||
2283 | text/xml: | ||
2284 | schema: | ||
2285 | $ref: '#/components/schemas/VideoCommentsForXML' | ||
2286 | application/atom+xml: | ||
2287 | schema: | ||
2288 | $ref: '#/components/schemas/VideoCommentsForXML' | ||
2289 | application/json: | ||
2290 | schema: | ||
2291 | type: object | ||
2292 | '406': | ||
2293 | description: accept header unsupported | ||
2294 | '/feeds/videos.{format}': | ||
2295 | get: | ||
2296 | tags: | ||
2297 | - Feeds | ||
2298 | summary: List videos | ||
2299 | parameters: | ||
2300 | - name: format | ||
2301 | in: path | ||
2302 | required: true | ||
2303 | description: 'format expected (we focus on making `rss` the most featureful ; it serves Media RSS)' | ||
2304 | schema: | ||
2305 | type: string | ||
2306 | enum: | ||
2307 | - xml | ||
2308 | - rss | ||
2309 | - rss2 | ||
2310 | - atom | ||
2311 | - atom1 | ||
2312 | - json | ||
2313 | - json1 | ||
2314 | - name: accountId | ||
2315 | in: path | ||
2316 | description: 'limit listing to a specific account' | ||
2317 | schema: | ||
2318 | type: string | ||
2319 | - name: accountName | ||
2320 | in: path | ||
2321 | description: 'limit listing to a specific account' | ||
2322 | schema: | ||
2323 | type: string | ||
2324 | - name: videoChannelId | ||
2325 | in: path | ||
2326 | description: 'limit listing to a specific video channel' | ||
2327 | schema: | ||
2328 | type: string | ||
2329 | - name: videoChannelName | ||
2330 | in: path | ||
2331 | description: 'limit listing to a specific video channel' | ||
2332 | schema: | ||
2333 | type: string | ||
2334 | responses: | ||
2335 | '204': | ||
2336 | description: successful operation | ||
2337 | headers: | ||
2338 | Cache-Control: | ||
2339 | schema: | ||
2340 | type: string | ||
2341 | default: 'max-age=900' # 15 min cache | ||
2342 | content: | ||
2343 | application/xml: | ||
2344 | schema: | ||
2345 | $ref: '#/components/schemas/VideosForXML' | ||
2346 | application/rss+xml: | ||
2347 | schema: | ||
2348 | $ref: '#/components/schemas/VideosForXML' | ||
2349 | text/xml: | ||
2350 | schema: | ||
2351 | $ref: '#/components/schemas/VideosForXML' | ||
2352 | application/atom+xml: | ||
2353 | schema: | ||
2354 | $ref: '#/components/schemas/VideosForXML' | ||
2355 | application/json: | ||
2356 | schema: | ||
2357 | type: object | ||
2358 | '406': | ||
2359 | description: accept header unsupported | ||
2088 | servers: | 2360 | servers: |
2089 | - url: 'https://peertube.cpy.re/api/v1' | 2361 | - url: 'https://peertube.cpy.re/api/v1' |
2090 | description: Live Test Server (live data - stable version) | 2362 | description: Live Test Server (live data - stable version) |
@@ -2098,21 +2370,23 @@ components: | |||
2098 | name: start | 2370 | name: start |
2099 | in: query | 2371 | in: query |
2100 | required: false | 2372 | required: false |
2101 | description: Offset | 2373 | description: Offset used to paginate results |
2102 | schema: | 2374 | schema: |
2103 | type: number | 2375 | type: integer |
2104 | count: | 2376 | count: |
2105 | name: count | 2377 | name: count |
2106 | in: query | 2378 | in: query |
2107 | required: false | 2379 | required: false |
2108 | description: "Number of items (max: 100)" | 2380 | description: "Number of items to return" |
2109 | schema: | 2381 | schema: |
2110 | type: number | 2382 | type: integer |
2383 | maximum: 100 | ||
2384 | minimum: 1 | ||
2111 | sort: | 2385 | sort: |
2112 | name: sort | 2386 | name: sort |
2113 | in: query | 2387 | in: query |
2114 | required: false | 2388 | required: false |
2115 | description: Sort column (-createdAt for example) | 2389 | description: Sort column (`-createdAt` for example) |
2116 | schema: | 2390 | schema: |
2117 | type: string | 2391 | type: string |
2118 | searchTarget: | 2392 | searchTarget: |
@@ -2218,7 +2492,7 @@ components: | |||
2218 | in: path | 2492 | in: path |
2219 | required: true | 2493 | required: true |
2220 | description: >- | 2494 | description: >- |
2221 | The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for | 2495 | The name of the account (`chocobozzz` or `chocobozzz@example.org` for |
2222 | example) | 2496 | example) |
2223 | schema: | 2497 | schema: |
2224 | type: string | 2498 | type: string |
@@ -2228,7 +2502,7 @@ components: | |||
2228 | required: true | 2502 | required: true |
2229 | description: The user id | 2503 | description: The user id |
2230 | schema: | 2504 | schema: |
2231 | type: number | 2505 | type: integer |
2232 | idOrUUID: | 2506 | idOrUUID: |
2233 | name: id | 2507 | name: id |
2234 | in: path | 2508 | in: path |
@@ -2242,14 +2516,14 @@ components: | |||
2242 | required: true | 2516 | required: true |
2243 | description: Playlist element id | 2517 | description: Playlist element id |
2244 | schema: | 2518 | schema: |
2245 | type: number | 2519 | type: integer |
2246 | abuseId: | 2520 | abuseId: |
2247 | name: abuseId | 2521 | name: abuseId |
2248 | in: path | 2522 | in: path |
2249 | required: true | 2523 | required: true |
2250 | description: Video abuse id | 2524 | description: Video abuse id |
2251 | schema: | 2525 | schema: |
2252 | type: number | 2526 | type: integer |
2253 | captionLanguage: | 2527 | captionLanguage: |
2254 | name: captionLanguage | 2528 | name: captionLanguage |
2255 | in: path | 2529 | in: path |
@@ -2277,14 +2551,14 @@ components: | |||
2277 | required: true | 2551 | required: true |
2278 | description: The thread id (root comment id) | 2552 | description: The thread id (root comment id) |
2279 | schema: | 2553 | schema: |
2280 | type: number | 2554 | type: integer |
2281 | commentId: | 2555 | commentId: |
2282 | name: commentId | 2556 | name: commentId |
2283 | in: path | 2557 | in: path |
2284 | required: true | 2558 | required: true |
2285 | description: The comment id | 2559 | description: The comment id |
2286 | schema: | 2560 | schema: |
2287 | type: number | 2561 | type: integer |
2288 | categoryOneOf: | 2562 | categoryOneOf: |
2289 | name: categoryOneOf | 2563 | name: categoryOneOf |
2290 | in: query | 2564 | in: query |
@@ -2292,10 +2566,10 @@ components: | |||
2292 | description: category id of the video (see /videos/categories) | 2566 | description: category id of the video (see /videos/categories) |
2293 | schema: | 2567 | schema: |
2294 | oneOf: | 2568 | oneOf: |
2295 | - type: number | 2569 | - type: integer |
2296 | - type: array | 2570 | - type: array |
2297 | items: | 2571 | items: |
2298 | type: number | 2572 | type: integer |
2299 | style: form | 2573 | style: form |
2300 | explode: false | 2574 | explode: false |
2301 | tagsOneOf: | 2575 | tagsOneOf: |
@@ -2328,7 +2602,7 @@ components: | |||
2328 | name: languageOneOf | 2602 | name: languageOneOf |
2329 | in: query | 2603 | in: query |
2330 | required: false | 2604 | required: false |
2331 | description: language id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language | 2605 | description: language id of the video (see /videos/languages). Use `_unknown` to filter on videos that don't have a video language |
2332 | schema: | 2606 | schema: |
2333 | oneOf: | 2607 | oneOf: |
2334 | - type: string | 2608 | - type: string |
@@ -2344,10 +2618,10 @@ components: | |||
2344 | description: licence id of the video (see /videos/licences) | 2618 | description: licence id of the video (see /videos/licences) |
2345 | schema: | 2619 | schema: |
2346 | oneOf: | 2620 | oneOf: |
2347 | - type: number | 2621 | - type: integer |
2348 | - type: array | 2622 | - type: array |
2349 | items: | 2623 | items: |
2350 | type: number | 2624 | type: integer |
2351 | style: form | 2625 | style: form |
2352 | explode: false | 2626 | explode: false |
2353 | skipCount: | 2627 | skipCount: |
@@ -2360,6 +2634,7 @@ components: | |||
2360 | enum: | 2634 | enum: |
2361 | - 'true' | 2635 | - 'true' |
2362 | - 'false' | 2636 | - 'false' |
2637 | default: 'false' | ||
2363 | nsfw: | 2638 | nsfw: |
2364 | name: nsfw | 2639 | name: nsfw |
2365 | in: query | 2640 | in: query |
@@ -2419,7 +2694,7 @@ components: | |||
2419 | VideoConstantNumber: | 2694 | VideoConstantNumber: |
2420 | properties: | 2695 | properties: |
2421 | id: | 2696 | id: |
2422 | type: number | 2697 | type: integer |
2423 | label: | 2698 | label: |
2424 | type: string | 2699 | type: string |
2425 | VideoConstantString: | 2700 | VideoConstantString: |
@@ -2435,7 +2710,7 @@ components: | |||
2435 | - 1 | 2710 | - 1 |
2436 | - 2 | 2711 | - 2 |
2437 | - 3 | 2712 | - 3 |
2438 | description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)' | 2713 | description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)' |
2439 | VideoPlaylistPrivacyConstant: | 2714 | VideoPlaylistPrivacyConstant: |
2440 | properties: | 2715 | properties: |
2441 | id: | 2716 | id: |
@@ -2448,7 +2723,7 @@ components: | |||
2448 | enum: | 2723 | enum: |
2449 | - 1 | 2724 | - 1 |
2450 | - 2 | 2725 | - 2 |
2451 | description: 'The video playlist type (Regular = 1, Watch Later = 2)' | 2726 | description: 'The video playlist type (Regular = `1`, Watch Later = `2`)' |
2452 | VideoPlaylistTypeConstant: | 2727 | VideoPlaylistTypeConstant: |
2453 | properties: | 2728 | properties: |
2454 | id: | 2729 | id: |
@@ -2463,7 +2738,7 @@ components: | |||
2463 | - 2 | 2738 | - 2 |
2464 | - 3 | 2739 | - 3 |
2465 | - 4 | 2740 | - 4 |
2466 | description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)' | 2741 | description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)' |
2467 | VideoPrivacyConstant: | 2742 | VideoPrivacyConstant: |
2468 | properties: | 2743 | properties: |
2469 | id: | 2744 | id: |
@@ -2479,12 +2754,12 @@ components: | |||
2479 | - do_not_list | 2754 | - do_not_list |
2480 | 2755 | ||
2481 | UserRole: | 2756 | UserRole: |
2482 | type: number | 2757 | type: integer |
2483 | enum: | 2758 | enum: |
2484 | - 0 | 2759 | - 0 |
2485 | - 1 | 2760 | - 1 |
2486 | - 2 | 2761 | - 2 |
2487 | description: 'The user role (Admin = 0, Moderator = 1, User = 2)' | 2762 | description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)' |
2488 | 2763 | ||
2489 | VideoStateConstant: | 2764 | VideoStateConstant: |
2490 | properties: | 2765 | properties: |
@@ -2494,7 +2769,7 @@ components: | |||
2494 | - 1 | 2769 | - 1 |
2495 | - 2 | 2770 | - 2 |
2496 | - 3 | 2771 | - 3 |
2497 | description: 'The video state (Published = 1, to transcode = 2, to import = 3)' | 2772 | description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)' |
2498 | label: | 2773 | label: |
2499 | type: string | 2774 | type: string |
2500 | 2775 | ||
@@ -2504,7 +2779,7 @@ components: | |||
2504 | - 1 | 2779 | - 1 |
2505 | - 2 | 2780 | - 2 |
2506 | - 3 | 2781 | - 3 |
2507 | description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)' | 2782 | description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)' |
2508 | VideoAbuseStateConstant: | 2783 | VideoAbuseStateConstant: |
2509 | properties: | 2784 | properties: |
2510 | id: | 2785 | id: |
@@ -2545,7 +2820,7 @@ components: | |||
2545 | AccountSummary: | 2820 | AccountSummary: |
2546 | properties: | 2821 | properties: |
2547 | id: | 2822 | id: |
2548 | type: number | 2823 | type: integer |
2549 | name: | 2824 | name: |
2550 | type: string | 2825 | type: string |
2551 | displayName: | 2826 | displayName: |
@@ -2561,7 +2836,7 @@ components: | |||
2561 | VideoChannelSummary: | 2836 | VideoChannelSummary: |
2562 | properties: | 2837 | properties: |
2563 | id: | 2838 | id: |
2564 | type: number | 2839 | type: integer |
2565 | name: | 2840 | name: |
2566 | type: string | 2841 | type: string |
2567 | displayName: | 2842 | displayName: |
@@ -2577,11 +2852,11 @@ components: | |||
2577 | PlaylistElement: | 2852 | PlaylistElement: |
2578 | properties: | 2853 | properties: |
2579 | position: | 2854 | position: |
2580 | type: number | 2855 | type: integer |
2581 | startTimestamp: | 2856 | startTimestamp: |
2582 | type: number | 2857 | type: integer |
2583 | stopTimestamp: | 2858 | stopTimestamp: |
2584 | type: number | 2859 | type: integer |
2585 | video: | 2860 | video: |
2586 | nullable: true | 2861 | nullable: true |
2587 | allOf: | 2862 | allOf: |
@@ -2593,7 +2868,7 @@ components: | |||
2593 | resolution: | 2868 | resolution: |
2594 | $ref: '#/components/schemas/VideoResolutionConstant' | 2869 | $ref: '#/components/schemas/VideoResolutionConstant' |
2595 | size: | 2870 | size: |
2596 | type: number | 2871 | type: integer |
2597 | description: 'Video file size in bytes' | 2872 | description: 'Video file size in bytes' |
2598 | torrentUrl: | 2873 | torrentUrl: |
2599 | type: string | 2874 | type: string |
@@ -2610,12 +2885,12 @@ components: | |||
2610 | VideoStreamingPlaylists: | 2885 | VideoStreamingPlaylists: |
2611 | properties: | 2886 | properties: |
2612 | id: | 2887 | id: |
2613 | type: number | 2888 | type: integer |
2614 | type: | 2889 | type: |
2615 | type: number | 2890 | type: integer |
2616 | enum: | 2891 | enum: |
2617 | - 1 | 2892 | - 1 |
2618 | description: 'Playlist type (HLS = 1)' | 2893 | description: 'Playlist type (HLS = `1`)' |
2619 | playlistUrl: | 2894 | playlistUrl: |
2620 | type: string | 2895 | type: string |
2621 | segmentsSha256Url: | 2896 | segmentsSha256Url: |
@@ -2634,7 +2909,7 @@ components: | |||
2634 | Video: | 2909 | Video: |
2635 | properties: | 2910 | properties: |
2636 | id: | 2911 | id: |
2637 | type: number | 2912 | type: integer |
2638 | uuid: | 2913 | uuid: |
2639 | type: string | 2914 | type: string |
2640 | createdAt: | 2915 | createdAt: |
@@ -2656,7 +2931,7 @@ components: | |||
2656 | description: | 2931 | description: |
2657 | type: string | 2932 | type: string |
2658 | duration: | 2933 | duration: |
2659 | type: number | 2934 | type: integer |
2660 | isLocal: | 2935 | isLocal: |
2661 | type: boolean | 2936 | type: boolean |
2662 | name: | 2937 | name: |
@@ -2668,11 +2943,11 @@ components: | |||
2668 | embedPath: | 2943 | embedPath: |
2669 | type: string | 2944 | type: string |
2670 | views: | 2945 | views: |
2671 | type: number | 2946 | type: integer |
2672 | likes: | 2947 | likes: |
2673 | type: number | 2948 | type: integer |
2674 | dislikes: | 2949 | dislikes: |
2675 | type: number | 2950 | type: integer |
2676 | nsfw: | 2951 | nsfw: |
2677 | type: boolean | 2952 | type: boolean |
2678 | waitTranscoding: | 2953 | waitTranscoding: |
@@ -2699,7 +2974,7 @@ components: | |||
2699 | type: object | 2974 | type: object |
2700 | properties: | 2975 | properties: |
2701 | currentTime: | 2976 | currentTime: |
2702 | type: number | 2977 | type: integer |
2703 | VideoDetails: | 2978 | VideoDetails: |
2704 | allOf: | 2979 | allOf: |
2705 | - $ref: '#/components/schemas/Video' | 2980 | - $ref: '#/components/schemas/Video' |
@@ -2741,13 +3016,13 @@ components: | |||
2741 | - 1 | 3016 | - 1 |
2742 | - 2 | 3017 | - 2 |
2743 | - 3 | 3018 | - 3 |
2744 | description: 'The video import state (Pending = 1, Success = 2, Failed = 3)' | 3019 | description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' |
2745 | label: | 3020 | label: |
2746 | type: string | 3021 | type: string |
2747 | VideoImport: | 3022 | VideoImport: |
2748 | properties: | 3023 | properties: |
2749 | id: | 3024 | id: |
2750 | type: number | 3025 | type: integer |
2751 | targetUrl: | 3026 | targetUrl: |
2752 | type: string | 3027 | type: string |
2753 | magnetUri: | 3028 | magnetUri: |
@@ -2772,7 +3047,7 @@ components: | |||
2772 | VideoAbuse: | 3047 | VideoAbuse: |
2773 | properties: | 3048 | properties: |
2774 | id: | 3049 | id: |
2775 | type: number | 3050 | type: integer |
2776 | reason: | 3051 | reason: |
2777 | type: string | 3052 | type: string |
2778 | predefinedReasons: | 3053 | predefinedReasons: |
@@ -2787,7 +3062,7 @@ components: | |||
2787 | type: object | 3062 | type: object |
2788 | properties: | 3063 | properties: |
2789 | id: | 3064 | id: |
2790 | type: number | 3065 | type: integer |
2791 | name: | 3066 | name: |
2792 | type: string | 3067 | type: string |
2793 | uuid: | 3068 | uuid: |
@@ -2797,9 +3072,9 @@ components: | |||
2797 | VideoBlacklist: | 3072 | VideoBlacklist: |
2798 | properties: | 3073 | properties: |
2799 | id: | 3074 | id: |
2800 | type: number | 3075 | type: integer |
2801 | videoId: | 3076 | videoId: |
2802 | type: number | 3077 | type: integer |
2803 | createdAt: | 3078 | createdAt: |
2804 | type: string | 3079 | type: string |
2805 | updatedAt: | 3080 | updatedAt: |
@@ -2811,13 +3086,13 @@ components: | |||
2811 | description: | 3086 | description: |
2812 | type: string | 3087 | type: string |
2813 | duration: | 3088 | duration: |
2814 | type: number | 3089 | type: integer |
2815 | views: | 3090 | views: |
2816 | type: number | 3091 | type: integer |
2817 | likes: | 3092 | likes: |
2818 | type: number | 3093 | type: integer |
2819 | dislikes: | 3094 | dislikes: |
2820 | type: number | 3095 | type: integer |
2821 | nsfw: | 3096 | nsfw: |
2822 | type: boolean | 3097 | type: boolean |
2823 | VideoChannel: | 3098 | VideoChannel: |
@@ -2832,13 +3107,13 @@ components: | |||
2832 | type: object | 3107 | type: object |
2833 | properties: | 3108 | properties: |
2834 | id: | 3109 | id: |
2835 | type: number | 3110 | type: integer |
2836 | uuid: | 3111 | uuid: |
2837 | type: string | 3112 | type: string |
2838 | VideoPlaylist: | 3113 | VideoPlaylist: |
2839 | properties: | 3114 | properties: |
2840 | id: | 3115 | id: |
2841 | type: number | 3116 | type: integer |
2842 | createdAt: | 3117 | createdAt: |
2843 | type: string | 3118 | type: string |
2844 | updatedAt: | 3119 | updatedAt: |
@@ -2852,7 +3127,7 @@ components: | |||
2852 | isLocal: | 3127 | isLocal: |
2853 | type: boolean | 3128 | type: boolean |
2854 | videoLength: | 3129 | videoLength: |
2855 | type: number | 3130 | type: integer |
2856 | thumbnailPath: | 3131 | thumbnailPath: |
2857 | type: string | 3132 | type: string |
2858 | privacy: | 3133 | privacy: |
@@ -2866,25 +3141,25 @@ components: | |||
2866 | VideoComment: | 3141 | VideoComment: |
2867 | properties: | 3142 | properties: |
2868 | id: | 3143 | id: |
2869 | type: number | 3144 | type: integer |
2870 | url: | 3145 | url: |
2871 | type: string | 3146 | type: string |
2872 | text: | 3147 | text: |
2873 | type: string | 3148 | type: string |
2874 | threadId: | 3149 | threadId: |
2875 | type: number | 3150 | type: integer |
2876 | inReplyToCommentId: | 3151 | inReplyToCommentId: |
2877 | type: number | 3152 | type: integer |
2878 | videoId: | 3153 | videoId: |
2879 | type: number | 3154 | type: integer |
2880 | createdAt: | 3155 | createdAt: |
2881 | type: string | 3156 | type: string |
2882 | updatedAt: | 3157 | updatedAt: |
2883 | type: string | 3158 | type: string |
2884 | totalRepliesFromVideoAuthor: | 3159 | totalRepliesFromVideoAuthor: |
2885 | type: number | 3160 | type: integer |
2886 | totalReplies: | 3161 | totalReplies: |
2887 | type: number | 3162 | type: integer |
2888 | account: | 3163 | account: |
2889 | $ref: '#/components/schemas/Account' | 3164 | $ref: '#/components/schemas/Account' |
2890 | VideoCommentThreadTree: | 3165 | VideoCommentThreadTree: |
@@ -2912,7 +3187,7 @@ components: | |||
2912 | Actor: | 3187 | Actor: |
2913 | properties: | 3188 | properties: |
2914 | id: | 3189 | id: |
2915 | type: number | 3190 | type: integer |
2916 | url: | 3191 | url: |
2917 | type: string | 3192 | type: string |
2918 | name: | 3193 | name: |
@@ -2920,9 +3195,9 @@ components: | |||
2920 | host: | 3195 | host: |
2921 | type: string | 3196 | type: string |
2922 | followingCount: | 3197 | followingCount: |
2923 | type: number | 3198 | type: integer |
2924 | followersCount: | 3199 | followersCount: |
2925 | type: number | 3200 | type: integer |
2926 | createdAt: | 3201 | createdAt: |
2927 | type: string | 3202 | type: string |
2928 | updatedAt: | 3203 | updatedAt: |
@@ -2942,7 +3217,7 @@ components: | |||
2942 | User: | 3217 | User: |
2943 | properties: | 3218 | properties: |
2944 | id: | 3219 | id: |
2945 | type: number | 3220 | type: integer |
2946 | username: | 3221 | username: |
2947 | type: string | 3222 | type: string |
2948 | email: | 3223 | email: |
@@ -2952,13 +3227,14 @@ components: | |||
2952 | description: 'Theme enabled by this user' | 3227 | description: 'Theme enabled by this user' |
2953 | emailVerified: | 3228 | emailVerified: |
2954 | type: boolean | 3229 | type: boolean |
2955 | description: 'Is email verified?' | 3230 | description: 'Has the user confirmed their email address?' |
2956 | nsfwPolicy: | 3231 | nsfwPolicy: |
2957 | $ref: '#/components/schemas/NSFWPolicy' | 3232 | $ref: '#/components/schemas/NSFWPolicy' |
2958 | webtorrentEnabled: | 3233 | webtorrentEnabled: |
2959 | type: boolean | 3234 | type: boolean |
2960 | autoPlayVideo: | 3235 | autoPlayVideo: |
2961 | type: boolean | 3236 | type: boolean |
3237 | description: 'Automatically start playing the video on the watch page' | ||
2962 | role: | 3238 | role: |
2963 | $ref: '#/components/schemas/UserRole' | 3239 | $ref: '#/components/schemas/UserRole' |
2964 | roleLabel: | 3240 | roleLabel: |
@@ -2968,19 +3244,19 @@ components: | |||
2968 | - Moderator | 3244 | - Moderator |
2969 | - Administrator | 3245 | - Administrator |
2970 | videoQuota: | 3246 | videoQuota: |
2971 | type: number | 3247 | type: integer |
2972 | videoQuotaDaily: | 3248 | videoQuotaDaily: |
2973 | type: number | 3249 | type: integer |
2974 | videosCount: | 3250 | videosCount: |
2975 | type: number | 3251 | type: integer |
2976 | videoAbusesCount: | 3252 | videoAbusesCount: |
2977 | type: number | 3253 | type: integer |
2978 | videoAbusesAcceptedCount: | 3254 | videoAbusesAcceptedCount: |
2979 | type: number | 3255 | type: integer |
2980 | videoAbusesCreatedCount: | 3256 | videoAbusesCreatedCount: |
2981 | type: number | 3257 | type: integer |
2982 | videoCommentsCount: | 3258 | videoCommentsCount: |
2983 | type: number | 3259 | type: integer |
2984 | noInstanceConfigWarningModal: | 3260 | noInstanceConfigWarningModal: |
2985 | type: boolean | 3261 | type: boolean |
2986 | noWelcomeModal: | 3262 | noWelcomeModal: |
@@ -3000,7 +3276,7 @@ components: | |||
3000 | UserWatchingVideo: | 3276 | UserWatchingVideo: |
3001 | properties: | 3277 | properties: |
3002 | currentTime: | 3278 | currentTime: |
3003 | type: number | 3279 | type: integer |
3004 | ServerConfig: | 3280 | ServerConfig: |
3005 | properties: | 3281 | properties: |
3006 | instance: | 3282 | instance: |
@@ -3086,7 +3362,7 @@ components: | |||
3086 | enabledResolutions: | 3362 | enabledResolutions: |
3087 | type: array | 3363 | type: array |
3088 | items: | 3364 | items: |
3089 | type: number | 3365 | type: integer |
3090 | import: | 3366 | import: |
3091 | type: object | 3367 | type: object |
3092 | properties: | 3368 | properties: |
@@ -3124,7 +3400,7 @@ components: | |||
3124 | type: object | 3400 | type: object |
3125 | properties: | 3401 | properties: |
3126 | max: | 3402 | max: |
3127 | type: number | 3403 | type: integer |
3128 | extensions: | 3404 | extensions: |
3129 | type: array | 3405 | type: array |
3130 | items: | 3406 | items: |
@@ -3143,7 +3419,7 @@ components: | |||
3143 | type: object | 3419 | type: object |
3144 | properties: | 3420 | properties: |
3145 | max: | 3421 | max: |
3146 | type: number | 3422 | type: integer |
3147 | file: | 3423 | file: |
3148 | type: object | 3424 | type: object |
3149 | properties: | 3425 | properties: |
@@ -3161,7 +3437,7 @@ components: | |||
3161 | type: object | 3437 | type: object |
3162 | properties: | 3438 | properties: |
3163 | max: | 3439 | max: |
3164 | type: number | 3440 | type: integer |
3165 | extensions: | 3441 | extensions: |
3166 | type: array | 3442 | type: array |
3167 | items: | 3443 | items: |
@@ -3170,9 +3446,9 @@ components: | |||
3170 | type: object | 3446 | type: object |
3171 | properties: | 3447 | properties: |
3172 | videoQuota: | 3448 | videoQuota: |
3173 | type: number | 3449 | type: integer |
3174 | videoQuotaDaily: | 3450 | videoQuotaDaily: |
3175 | type: number | 3451 | type: integer |
3176 | trending: | 3452 | trending: |
3177 | type: object | 3453 | type: object |
3178 | properties: | 3454 | properties: |
@@ -3180,7 +3456,7 @@ components: | |||
3180 | type: object | 3456 | type: object |
3181 | properties: | 3457 | properties: |
3182 | intervalDays: | 3458 | intervalDays: |
3183 | type: number | 3459 | type: integer |
3184 | tracker: | 3460 | tracker: |
3185 | type: object | 3461 | type: object |
3186 | properties: | 3462 | properties: |
@@ -3258,19 +3534,19 @@ components: | |||
3258 | type: object | 3534 | type: object |
3259 | properties: | 3535 | properties: |
3260 | size: | 3536 | size: |
3261 | type: number | 3537 | type: integer |
3262 | captions: | 3538 | captions: |
3263 | type: object | 3539 | type: object |
3264 | properties: | 3540 | properties: |
3265 | size: | 3541 | size: |
3266 | type: number | 3542 | type: integer |
3267 | signup: | 3543 | signup: |
3268 | type: object | 3544 | type: object |
3269 | properties: | 3545 | properties: |
3270 | enabled: | 3546 | enabled: |
3271 | type: boolean | 3547 | type: boolean |
3272 | limit: | 3548 | limit: |
3273 | type: number | 3549 | type: integer |
3274 | requiresEmailVerification: | 3550 | requiresEmailVerification: |
3275 | type: boolean | 3551 | type: boolean |
3276 | admin: | 3552 | admin: |
@@ -3287,9 +3563,9 @@ components: | |||
3287 | type: object | 3563 | type: object |
3288 | properties: | 3564 | properties: |
3289 | videoQuota: | 3565 | videoQuota: |
3290 | type: number | 3566 | type: integer |
3291 | videoQuotaDaily: | 3567 | videoQuotaDaily: |
3292 | type: number | 3568 | type: integer |
3293 | transcoding: | 3569 | transcoding: |
3294 | type: object | 3570 | type: object |
3295 | properties: | 3571 | properties: |
@@ -3300,7 +3576,7 @@ components: | |||
3300 | allowAudioFiles: | 3576 | allowAudioFiles: |
3301 | type: boolean | 3577 | type: boolean |
3302 | threads: | 3578 | threads: |
3303 | type: number | 3579 | type: integer |
3304 | resolutions: | 3580 | resolutions: |
3305 | type: object | 3581 | type: object |
3306 | properties: | 3582 | properties: |
@@ -3361,7 +3637,7 @@ components: | |||
3361 | Follow: | 3637 | Follow: |
3362 | properties: | 3638 | properties: |
3363 | id: | 3639 | id: |
3364 | type: number | 3640 | type: integer |
3365 | follower: | 3641 | follower: |
3366 | $ref: '#/components/schemas/Actor' | 3642 | $ref: '#/components/schemas/Actor' |
3367 | following: | 3643 | following: |
@@ -3380,7 +3656,7 @@ components: | |||
3380 | Job: | 3656 | Job: |
3381 | properties: | 3657 | properties: |
3382 | id: | 3658 | id: |
3383 | type: number | 3659 | type: integer |
3384 | state: | 3660 | state: |
3385 | type: string | 3661 | type: string |
3386 | enum: | 3662 | enum: |
@@ -3404,7 +3680,7 @@ components: | |||
3404 | AddUserResponse: | 3680 | AddUserResponse: |
3405 | properties: | 3681 | properties: |
3406 | id: | 3682 | id: |
3407 | type: number | 3683 | type: integer |
3408 | uuid: | 3684 | uuid: |
3409 | type: string | 3685 | type: string |
3410 | VideoUploadResponse: | 3686 | VideoUploadResponse: |
@@ -3413,13 +3689,13 @@ components: | |||
3413 | type: object | 3689 | type: object |
3414 | properties: | 3690 | properties: |
3415 | id: | 3691 | id: |
3416 | type: number | 3692 | type: integer |
3417 | uuid: | 3693 | uuid: |
3418 | type: string | 3694 | type: string |
3419 | CommentThreadResponse: | 3695 | CommentThreadResponse: |
3420 | properties: | 3696 | properties: |
3421 | total: | 3697 | total: |
3422 | type: number | 3698 | type: integer |
3423 | data: | 3699 | data: |
3424 | type: array | 3700 | type: array |
3425 | items: | 3701 | items: |
@@ -3431,7 +3707,7 @@ components: | |||
3431 | VideoListResponse: | 3707 | VideoListResponse: |
3432 | properties: | 3708 | properties: |
3433 | total: | 3709 | total: |
3434 | type: number | 3710 | type: integer |
3435 | data: | 3711 | data: |
3436 | type: array | 3712 | type: array |
3437 | items: | 3713 | items: |
@@ -3440,19 +3716,23 @@ components: | |||
3440 | properties: | 3716 | properties: |
3441 | username: | 3717 | username: |
3442 | type: string | 3718 | type: string |
3443 | description: 'The user username ' | 3719 | description: 'The user username' |
3720 | minLength: 1 | ||
3721 | maxLength: 50 | ||
3444 | password: | 3722 | password: |
3445 | type: string | 3723 | type: string |
3446 | description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent ' | 3724 | description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent' |
3725 | minLength: 6 | ||
3726 | maxLength: 255 | ||
3447 | email: | 3727 | email: |
3448 | type: string | 3728 | type: string |
3449 | description: 'The user email ' | 3729 | description: 'The user email. MUST be in the format of an email address.' |
3450 | videoQuota: | 3730 | videoQuota: |
3451 | type: string | 3731 | type: string |
3452 | description: 'The user videoQuota ' | 3732 | description: 'The user video quota' |
3453 | videoQuotaDaily: | 3733 | videoQuotaDaily: |
3454 | type: string | 3734 | type: string |
3455 | description: 'The user daily video quota ' | 3735 | description: 'The user daily video quota' |
3456 | role: | 3736 | role: |
3457 | $ref: '#/components/schemas/UserRole' | 3737 | $ref: '#/components/schemas/UserRole' |
3458 | required: | 3738 | required: |
@@ -3466,16 +3746,16 @@ components: | |||
3466 | properties: | 3746 | properties: |
3467 | id: | 3747 | id: |
3468 | type: string | 3748 | type: string |
3469 | description: 'The user id ' | 3749 | description: 'The user id' |
3470 | email: | 3750 | email: |
3471 | type: string | 3751 | type: string |
3472 | description: 'The updated email of the user ' | 3752 | description: 'The updated email of the user' |
3473 | videoQuota: | 3753 | videoQuota: |
3474 | type: string | 3754 | type: string |
3475 | description: 'The updated videoQuota of the user ' | 3755 | description: 'The updated video quota of the user' |
3476 | videoQuotaDaily: | 3756 | videoQuotaDaily: |
3477 | type: string | 3757 | type: string |
3478 | description: 'The updated daily video quota of the user ' | 3758 | description: 'The updated daily video quota of the user' |
3479 | role: | 3759 | role: |
3480 | $ref: '#/components/schemas/UserRole' | 3760 | $ref: '#/components/schemas/UserRole' |
3481 | required: | 3761 | required: |
@@ -3488,16 +3768,16 @@ components: | |||
3488 | properties: | 3768 | properties: |
3489 | password: | 3769 | password: |
3490 | type: string | 3770 | type: string |
3491 | description: 'Your new password ' | 3771 | description: 'Your new password' |
3492 | email: | 3772 | email: |
3493 | type: string | 3773 | type: string |
3494 | description: 'Your new email ' | 3774 | description: 'Your new email' |
3495 | displayNSFW: | 3775 | displayNSFW: |
3496 | type: string | 3776 | type: string |
3497 | description: 'Your new displayNSFW ' | 3777 | description: 'Your new displayNSFW' |
3498 | autoPlayVideo: | 3778 | autoPlayVideo: |
3499 | type: string | 3779 | type: string |
3500 | description: 'Your new autoPlayVideo ' | 3780 | description: 'Your new autoPlayVideo' |
3501 | required: | 3781 | required: |
3502 | - password | 3782 | - password |
3503 | 3783 | ||
@@ -3507,10 +3787,10 @@ components: | |||
3507 | properties: | 3787 | properties: |
3508 | id: | 3788 | id: |
3509 | type: string | 3789 | type: string |
3510 | description: 'Id of the video ' | 3790 | description: 'Id of the video' |
3511 | rating: | 3791 | rating: |
3512 | type: number | 3792 | type: number |
3513 | description: 'Rating of the video ' | 3793 | description: 'Rating of the video' |
3514 | required: | 3794 | required: |
3515 | - id | 3795 | - id |
3516 | - rating | 3796 | - rating |
@@ -3528,13 +3808,13 @@ components: | |||
3528 | properties: | 3808 | properties: |
3529 | username: | 3809 | username: |
3530 | type: string | 3810 | type: string |
3531 | description: 'The username of the user ' | 3811 | description: 'The username of the user' |
3532 | password: | 3812 | password: |
3533 | type: string | 3813 | type: string |
3534 | description: 'The password of the user ' | 3814 | description: 'The password of the user' |
3535 | email: | 3815 | email: |
3536 | type: string | 3816 | type: string |
3537 | description: 'The email of the user ' | 3817 | description: 'The email of the user' |
3538 | displayName: | 3818 | displayName: |
3539 | type: string | 3819 | type: string |
3540 | description: 'The user display name' | 3820 | description: 'The user display name' |
@@ -3543,10 +3823,10 @@ components: | |||
3543 | properties: | 3823 | properties: |
3544 | name: | 3824 | name: |
3545 | type: string | 3825 | type: string |
3546 | description: 'The default channel name' | 3826 | description: 'The name for the default channel' |
3547 | displayName: | 3827 | displayName: |
3548 | type: string | 3828 | type: string |
3549 | description: 'The default channel display name' | 3829 | description: 'The display name for the default channel' |
3550 | 3830 | ||
3551 | required: | 3831 | required: |
3552 | - username | 3832 | - username |
@@ -3562,6 +3842,7 @@ components: | |||
3562 | type: string | 3842 | type: string |
3563 | support: | 3843 | support: |
3564 | type: string | 3844 | type: string |
3845 | description: 'A text shown by default on all videos of this channel, to tell the audience how to support it' | ||
3565 | required: | 3846 | required: |
3566 | - name | 3847 | - name |
3567 | - displayName | 3848 | - displayName |
@@ -3573,7 +3854,187 @@ components: | |||
3573 | type: string | 3854 | type: string |
3574 | support: | 3855 | support: |
3575 | type: string | 3856 | type: string |
3857 | description: 'A text shown by default on all videos of this channel, to tell the audience how to support it' | ||
3576 | bulkVideosSupportUpdate: | 3858 | bulkVideosSupportUpdate: |
3577 | type: boolean | 3859 | type: boolean |
3578 | description: 'Update all videos support field of this channel' | 3860 | description: 'Update the support field for all videos of this channel' |
3579 | 3861 | ||
3862 | MRSSPeerLink: | ||
3863 | type: object | ||
3864 | xml: | ||
3865 | name: 'media:peerLink' | ||
3866 | properties: | ||
3867 | href: | ||
3868 | type: string | ||
3869 | xml: | ||
3870 | attribute: true | ||
3871 | type: | ||
3872 | type: string | ||
3873 | enum: | ||
3874 | - application/x-bittorrent | ||
3875 | xml: | ||
3876 | attribute: true | ||
3877 | MRSSGroupContent: | ||
3878 | type: object | ||
3879 | xml: | ||
3880 | name: 'media:content' | ||
3881 | properties: | ||
3882 | url: | ||
3883 | type: string | ||
3884 | xml: | ||
3885 | attribute: true | ||
3886 | fileSize: | ||
3887 | type: integer | ||
3888 | xml: | ||
3889 | attribute: true | ||
3890 | type: | ||
3891 | type: string | ||
3892 | xml: | ||
3893 | attribute: true | ||
3894 | framerate: | ||
3895 | type: integer | ||
3896 | xml: | ||
3897 | attribute: true | ||
3898 | duration: | ||
3899 | type: integer | ||
3900 | xml: | ||
3901 | attribute: true | ||
3902 | height: | ||
3903 | type: integer | ||
3904 | xml: | ||
3905 | attribute: true | ||
3906 | lang: | ||
3907 | type: string | ||
3908 | xml: | ||
3909 | attribute: true | ||
3910 | VideoCommentsForXML: | ||
3911 | type: array | ||
3912 | xml: | ||
3913 | wrapped: true | ||
3914 | name: 'channel' | ||
3915 | items: | ||
3916 | type: object | ||
3917 | xml: | ||
3918 | name: 'item' | ||
3919 | properties: | ||
3920 | link: | ||
3921 | type: string | ||
3922 | guid: | ||
3923 | type: string | ||
3924 | pubDate: | ||
3925 | type: string | ||
3926 | format: date-time | ||
3927 | 'content:encoded': | ||
3928 | type: string | ||
3929 | 'dc:creator': | ||
3930 | type: string | ||
3931 | VideosForXML: | ||
3932 | type: array | ||
3933 | xml: | ||
3934 | wrapped: true | ||
3935 | name: 'channel' | ||
3936 | items: | ||
3937 | type: object | ||
3938 | xml: | ||
3939 | name: 'item' | ||
3940 | properties: | ||
3941 | link: | ||
3942 | type: string | ||
3943 | description: video watch page URL | ||
3944 | guid: | ||
3945 | type: string | ||
3946 | description: video canonical URL | ||
3947 | pubDate: | ||
3948 | type: string | ||
3949 | format: date-time | ||
3950 | description: video publication date | ||
3951 | description: | ||
3952 | type: string | ||
3953 | description: video description | ||
3954 | 'content:encoded': | ||
3955 | type: string | ||
3956 | description: video description | ||
3957 | 'dc:creator': | ||
3958 | type: string | ||
3959 | description: publisher user name | ||
3960 | 'media:category': | ||
3961 | type: integer | ||
3962 | description: video category (MRSS) | ||
3963 | 'media:community': | ||
3964 | type: object | ||
3965 | description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS) | ||
3966 | properties: | ||
3967 | 'media:statistics': | ||
3968 | type: object | ||
3969 | properties: | ||
3970 | views: | ||
3971 | type: integer | ||
3972 | xml: | ||
3973 | attribute: true | ||
3974 | 'media:embed': | ||
3975 | type: object | ||
3976 | properties: | ||
3977 | url: | ||
3978 | type: string | ||
3979 | description: video embed path, relative to the canonical URL domain (MRSS) | ||
3980 | xml: | ||
3981 | attribute: true | ||
3982 | 'media:player': | ||
3983 | type: object | ||
3984 | properties: | ||
3985 | url: | ||
3986 | type: string | ||
3987 | description: video watch path, relative to the canonical URL domain (MRSS) | ||
3988 | xml: | ||
3989 | attribute: true | ||
3990 | 'media:thumbnail': | ||
3991 | type: object | ||
3992 | properties: | ||
3993 | url: | ||
3994 | type: string | ||
3995 | xml: | ||
3996 | attribute: true | ||
3997 | height: | ||
3998 | type: integer | ||
3999 | xml: | ||
4000 | attribute: true | ||
4001 | width: | ||
4002 | type: integer | ||
4003 | xml: | ||
4004 | attribute: true | ||
4005 | 'media:title': | ||
4006 | type: string | ||
4007 | description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles. | ||
4008 | 'media:description': | ||
4009 | type: string | ||
4010 | 'media:rating': | ||
4011 | type: string | ||
4012 | enum: | ||
4013 | - nonadult | ||
4014 | - adult | ||
4015 | description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS) | ||
4016 | 'enclosure': | ||
4017 | type: object | ||
4018 | description: main streamable file for the video | ||
4019 | properties: | ||
4020 | url: | ||
4021 | type: string | ||
4022 | xml: | ||
4023 | attribute: true | ||
4024 | type: | ||
4025 | type: string | ||
4026 | enum: | ||
4027 | - application/x-bittorrent | ||
4028 | xml: | ||
4029 | attribute: true | ||
4030 | length: | ||
4031 | type: integer | ||
4032 | xml: | ||
4033 | attribute: true | ||
4034 | 'media:group': | ||
4035 | type: array | ||
4036 | description: list of streamable files for the video. see [media:peerLink](https://www.rssboard.org/media-rss#media-peerlink) and [media:content](https://www.rssboard.org/media-rss#media-content) or (MRSS) | ||
4037 | items: | ||
4038 | anyOf: | ||
4039 | - $ref: '#/components/schemas/MRSSPeerLink' | ||
4040 | - $ref: '#/components/schemas/MRSSGroupContent' \ No newline at end of file | ||