]>
Commit | Line | Data |
---|---|---|
3e9e6f2f | 1 | openapi: 3.0.0 |
1569a818 | 2 | info: |
5e1c08eb | 3 | title: PeerTube |
46221210 | 4 | version: 3.2.0-rc.1 |
2963c343 RK |
5 | contact: |
6 | name: PeerTube Community | |
7 | url: 'https://joinpeertube.org' | |
8 | license: | |
9 | name: AGPLv3.0 | |
10 | url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE' | |
11 | x-logo: | |
12 | url: 'https://joinpeertube.org/img/brand.png' | |
5776f78e | 13 | altText: PeerTube Project Homepage |
2963c343 | 14 | description: | |
b029d58a | 15 | The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite |
06746a8b | 16 | HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with |
5776f78e | 17 | [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) |
06746a8b RK |
18 | which generates a client SDK in the language of your choice - we generate some client SDKs automatically: |
19 | ||
20 | - [Python](https://framagit.org/framasoft/peertube/clients/python) | |
21 | - [Go](https://framagit.org/framasoft/peertube/clients/go) | |
22 | - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) | |
3e9e6f2f | 23 | |
3c5e02f3 RK |
24 | See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few |
25 | examples of using with the PeerTube API. | |
b029d58a | 26 | |
2963c343 | 27 | # Authentication |
002df381 | 28 | |
3c5e02f3 RK |
29 | When you sign up for an account on a PeerTube instance, you are given the possibility |
30 | to generate sessions on it, and authenticate there using a session token. Only __one | |
31 | session token can currently be used at a time__. | |
5776f78e | 32 | |
84f6e32c RK |
33 | ## Roles |
34 | ||
35 | Accounts are given permissions based on their role. There are three roles on | |
9817060f | 36 | PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin-managing-users?id=roles) for a detail of their permissions. |
84f6e32c | 37 | |
5776f78e | 38 | # Errors |
002df381 | 39 | |
5776f78e RK |
40 | The API uses standard HTTP status codes to indicate the success or failure |
41 | of the API call. The body of the response will be JSON in the following | |
de3876b8 | 42 | formats. |
5776f78e RK |
43 | |
44 | ``` | |
45 | { | |
de3876b8 RK |
46 | "error": "Account not found" // error debug message |
47 | } | |
48 | ``` | |
49 | ||
9a320a06 RK |
50 | Validation errors benefit from a more detailed error type and return the HTTP `400 Bad Request` status code. |
51 | ||
de3876b8 RK |
52 | ``` |
53 | { | |
54 | "errors": { | |
55 | "id": { // where 'id' is the name of the parameter concerned by the error. | |
56 | "value": "a117eb-c6a9-4756-bb09-2a956239f", // value that triggered the error. | |
57 | "msg": "Should have an valid id", // error debug message | |
58 | "param": "id", | |
59 | "location": "params" // 'params', 'body', 'header', 'query' or 'cookies' | |
60 | } | |
61 | } | |
5776f78e RK |
62 | } |
63 | ``` | |
3c5e02f3 RK |
64 | |
65 | # Rate limits | |
66 | ||
30b40713 | 67 | We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators: |
3c5e02f3 RK |
68 | |
69 | | Endpoint | Calls | Time frame | | |
70 | |-------------------------|------------------|---------------------------| | |
71 | | `/*` | 50 | 10 seconds | | |
72 | | `POST /users/token` | 15 | 5 minutes | | |
bf3c3fea | 73 | | `POST /users/register` | 2<sup>*</sup> | 5 minutes | |
3c5e02f3 RK |
74 | | `POST /users/ask-send-verify-email` | 3 | 5 minutes | |
75 | ||
bf3c3fea | 76 | Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service |
3c5e02f3 RK |
77 | limit is announced by a `429 Too Many Requests` status code. |
78 | ||
52fe9526 RK |
79 | You can get details about the current state of your rate limit by reading the |
80 | following headers: | |
3c5e02f3 RK |
81 | |
82 | | Header | Description | | |
83 | |-------------------------|------------------------------------------------------------| | |
9a320a06 RK |
84 | | `X-RateLimit-Limit` | Number of max requests allowed in the current time period | |
85 | | `X-RateLimit-Remaining` | Number of remaining requests in the current time period | | |
86 | | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp | | |
87 | | `Retry-After` | Seconds to delay after the first `429` is received | | |
6441981b | 88 | externalDocs: |
512a5759 | 89 | url: https://docs.joinpeertube.org/api-rest-reference.html |
2963c343 RK |
90 | tags: |
91 | - name: Accounts | |
3e9e6f2f | 92 | description: > |
1e904cde | 93 | Accounts encompass remote accounts discovered across the federation, |
84f6e32c RK |
94 | and correspond to the main Actor, along with video channels a user can create, which |
95 | are also Actors. | |
96 | ||
97 | When a comment is posted, it is done with your Account's Actor. | |
98 | - name: Users | |
99 | description: > | |
100 | Using some features of PeerTube require authentication, for which User | |
3e9e6f2f | 101 | provide different levels of permission as well as associated user |
84f6e32c RK |
102 | information. Each user has a corresponding local Account for federation. |
103 | - name: My User | |
104 | description: > | |
105 | Operations related to your own User, when logged-in. | |
106 | - name: My Subscriptions | |
107 | description: > | |
108 | Operations related to your subscriptions to video channels, their | |
109 | new videos, and how to keep up to date with their latest publications! | |
3520d385 A |
110 | - name: My History |
111 | description: > | |
bb4ba6d9 | 112 | Operations related to your watch history. |
84f6e32c RK |
113 | - name: My Notifications |
114 | description: > | |
115 | Notifications following new videos, follows or reports. They allow you | |
116 | to keep track of the interactions and overall important information that | |
117 | concerns you. You MAY set per-notification type delivery preference, to | |
118 | receive the info either by mail, by in-browser notification or both. | |
2963c343 | 119 | - name: Config |
3e9e6f2f RK |
120 | description: > |
121 | Each server exposes public information regarding supported videos and | |
122 | options. | |
2963c343 | 123 | - name: Job |
3e9e6f2f RK |
124 | description: > |
125 | Jobs are long-running tasks enqueued and processed by the instance | |
5776f78e | 126 | itself. No additional worker registration is currently available. |
b029d58a | 127 | - name: Instance Follows |
3e9e6f2f RK |
128 | description: > |
129 | Managing servers which the instance interacts with is crucial to the | |
5776f78e | 130 | concept of federation in PeerTube and external video indexation. The PeerTube |
1fd12c7c | 131 | server then deals with inter-server ActivityPub operations and propagates |
2963c343 RK |
132 | information across its social graph by posting activities to actors' inbox |
133 | endpoints. | |
84f6e32c | 134 | externalDocs: |
9817060f | 135 | url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows |
04b703f6 RK |
136 | - name: Instance Redundancy |
137 | description: > | |
138 | Redundancy is part of the inter-server solidarity that PeerTube fosters. | |
139 | Manage the list of instances you wish to help by seeding their videos according | |
140 | to the policy of video selection of your choice. Note that you have a similar functionality | |
f6d6e7f8 | 141 | to mirror individual videos, see [video mirroring](#tag/Video-Mirroring). |
84f6e32c | 142 | externalDocs: |
9817060f | 143 | url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy |
7461d440 RK |
144 | - name: Plugins |
145 | description: > | |
84f6e32c RK |
146 | Managing plugins installed from a local path or from NPM, or search for new ones. |
147 | externalDocs: | |
9817060f | 148 | url: https://docs.joinpeertube.org/api-plugins |
310b5219 | 149 | - name: Abuses |
2963c343 | 150 | description: | |
310b5219 | 151 | Abuses deal with reports of local or remote videos/comments/accounts alike. |
2963c343 RK |
152 | - name: Video |
153 | description: | | |
154 | Operations dealing with listing, uploading, fetching or modifying videos. | |
f6d6e7f8 | 155 | - name: Video Upload |
156 | description: | | |
157 | Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes. | |
158 | ||
159 | ### Upload | |
160 | ||
40cfb36b RK |
161 | - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request |
162 | - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks | |
f6d6e7f8 | 163 | |
164 | You can upload videos more reliably by using the resumable variant. Its protocol lets | |
165 | you resume an upload operation after a network interruption or other transmission failure, | |
166 | saving time and bandwidth in the event of network failures. | |
167 | ||
168 | Favor using resumable uploads in any of the following cases: | |
169 | - You are transferring large files | |
170 | - The likelihood of a network interruption is high | |
171 | - Uploads are originating from a device with a low-bandwidth or unstable Internet connection, | |
172 | such as a mobile device | |
173 | ||
174 | ### Import | |
175 | ||
176 | - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/) | |
177 | - _magnet_-based: where the URI resolves to a BitTorrent ressource containing a single supported video file | |
178 | - _torrent_-based: where the metainfo file resolves to a BitTorrent ressource containing a single supported video file | |
179 | ||
180 | The import function is practical when the desired video/audio is available online. It makes PeerTube | |
181 | download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have. | |
182 | - name: Video Captions | |
183 | description: Operations dealing with listing, adding and removing closed captions of a video. | |
184 | - name: Video Channels | |
185 | description: Operations dealing with the creation, modification and listing of videos within a channel. | |
186 | - name: Video Comments | |
187 | description: > | |
188 | Operations dealing with comments to a video. Comments are organized in threads: adding a | |
189 | comment in response to the video starts a thread, adding a reply to a comment adds it to | |
190 | its root comment thread. | |
191 | - name: Video Blocks | |
192 | description: Operations dealing with blocking videos (removing them from view and preventing interactions). | |
193 | - name: Video Rates | |
194 | description: Like/dislike a video. | |
195 | - name: Video Playlists | |
196 | description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels. | |
197 | - name: Feeds | |
198 | description: Server syndication feeds | |
2963c343 RK |
199 | - name: Search |
200 | description: | | |
ad031145 | 201 | The search helps to find _videos_ or _channels_ from within the instance and beyond. |
2963c343 RK |
202 | Videos from other instances federated by the instance (that is, instances |
203 | followed by the instance) can be found via keywords and other criteria of | |
204 | the advanced search. | |
ad031145 C |
205 | |
206 | Administrators can also enable the use of a remote search system, indexing | |
207 | videos and channels not could be not federated by the instance. | |
f6d6e7f8 | 208 | - name: Video Mirroring |
209 | description: | | |
210 | PeerTube instances can mirror videos from one another, and help distribute some videos. | |
211 | ||
b8375da9 | 212 | For importing videos as your own, refer to [video imports](#operation/importVideo). |
5776f78e RK |
213 | x-tagGroups: |
214 | - name: Accounts | |
215 | tags: | |
216 | - Accounts | |
b029d58a | 217 | - Users |
1f82e3e8 | 218 | - My User |
b029d58a | 219 | - My Subscriptions |
f4d59981 | 220 | - My Notifications |
3520d385 | 221 | - My History |
5776f78e RK |
222 | - name: Videos |
223 | tags: | |
224 | - Video | |
f6d6e7f8 | 225 | - Video Upload |
04b703f6 | 226 | - Video Captions |
b029d58a C |
227 | - Video Channels |
228 | - Video Comments | |
b029d58a C |
229 | - Video Rates |
230 | - Video Playlists | |
231 | - Video Ownership Change | |
04b703f6 | 232 | - Video Mirroring |
4e239e35 | 233 | - Live Videos |
06746a8b | 234 | - Feeds |
b029d58a C |
235 | - name: Search |
236 | tags: | |
237 | - Search | |
5776f78e RK |
238 | - name: Moderation |
239 | tags: | |
310b5219 | 240 | - Abuses |
1ebddadd | 241 | - Video Blocks |
06746a8b RK |
242 | - Account Blocks |
243 | - Server Blocks | |
65f02679 | 244 | - name: Instance Configuration |
5776f78e RK |
245 | tags: |
246 | - Config | |
b029d58a | 247 | - Instance Follows |
04b703f6 | 248 | - Instance Redundancy |
7461d440 | 249 | - Plugins |
5776f78e RK |
250 | - name: Jobs |
251 | tags: | |
252 | - Job | |
1569a818 | 253 | paths: |
ad9e39fb | 254 | '/accounts/{name}': |
1569a818 DG |
255 | get: |
256 | tags: | |
257 | - Accounts | |
b029d58a | 258 | summary: Get an account |
1569a818 | 259 | parameters: |
3e9e6f2f | 260 | - $ref: '#/components/parameters/name' |
1569a818 DG |
261 | responses: |
262 | '200': | |
263 | description: successful operation | |
3e9e6f2f RK |
264 | content: |
265 | application/json: | |
266 | schema: | |
267 | $ref: '#/components/schemas/Account' | |
06746a8b RK |
268 | '404': |
269 | description: account not found | |
ad9e39fb | 270 | '/accounts/{name}/videos': |
6b738c7a C |
271 | get: |
272 | tags: | |
273 | - Accounts | |
2963c343 | 274 | - Video |
b029d58a | 275 | summary: 'List videos of an account' |
6b738c7a | 276 | parameters: |
3e9e6f2f | 277 | - $ref: '#/components/parameters/name' |
59c794a5 | 278 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 279 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
280 | - $ref: '#/components/parameters/tagsOneOf' |
281 | - $ref: '#/components/parameters/tagsAllOf' | |
282 | - $ref: '#/components/parameters/licenceOneOf' | |
283 | - $ref: '#/components/parameters/languageOneOf' | |
284 | - $ref: '#/components/parameters/nsfw' | |
285 | - $ref: '#/components/parameters/filter' | |
286 | - $ref: '#/components/parameters/skipCount' | |
287 | - $ref: '#/components/parameters/start' | |
288 | - $ref: '#/components/parameters/count' | |
289 | - $ref: '#/components/parameters/videosSort' | |
6b738c7a C |
290 | responses: |
291 | '200': | |
292 | description: successful operation | |
3e9e6f2f RK |
293 | content: |
294 | application/json: | |
295 | schema: | |
048b6946 | 296 | $ref: '#/components/schemas/VideoListResponse' |
40cfb36b | 297 | x-codeSamples: |
2963c343 RK |
298 | - lang: JavaScript |
299 | source: | | |
8f9e8be1 | 300 | fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos') |
2963c343 RK |
301 | .then(function(response) { |
302 | return response.json() | |
303 | }).then(function(data) { | |
304 | console.log(data) | |
305 | }) | |
8f9e8be1 RK |
306 | - lang: Shell |
307 | source: | | |
0579dee3 JK |
308 | ## DEPENDENCIES: jq |
309 | curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq | |
5776f78e RK |
310 | - lang: Ruby |
311 | source: | | |
5776f78e | 312 | require 'net/http' |
f6d51cfe | 313 | require 'json' |
5776f78e | 314 | |
f6d51cfe | 315 | uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos") |
5776f78e | 316 | |
f6d51cfe | 317 | http = Net::HTTP.new(uri.host, uri.port) |
5776f78e | 318 | http.use_ssl = true |
5776f78e | 319 | |
f6d51cfe MDB |
320 | response = http.get(uri.request_uri) |
321 | ||
322 | puts JSON.parse(response.read_body) | |
5776f78e RK |
323 | - lang: Python |
324 | source: | | |
f6d51cfe | 325 | import requests |
5776f78e | 326 | |
f6d51cfe MDB |
327 | r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos") |
328 | json = r.json() | |
5776f78e | 329 | |
f6d51cfe | 330 | print(json) |
1569a818 DG |
331 | /accounts: |
332 | get: | |
333 | tags: | |
334 | - Accounts | |
b029d58a | 335 | summary: List accounts |
2a8ae759 FS |
336 | parameters: |
337 | - $ref: '#/components/parameters/start' | |
338 | - $ref: '#/components/parameters/count' | |
339 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
340 | responses: |
341 | '200': | |
342 | description: successful operation | |
3e9e6f2f | 343 | content: |
8f9e8be1 | 344 | 'application/json': |
3e9e6f2f RK |
345 | schema: |
346 | type: array | |
347 | items: | |
348 | $ref: '#/components/schemas/Account' | |
1569a818 DG |
349 | /config: |
350 | get: | |
351 | tags: | |
352 | - Config | |
b029d58a | 353 | summary: Get instance public configuration |
1569a818 DG |
354 | responses: |
355 | '200': | |
356 | description: successful operation | |
3e9e6f2f RK |
357 | content: |
358 | application/json: | |
359 | schema: | |
360 | $ref: '#/components/schemas/ServerConfig' | |
40cfb36b RK |
361 | examples: |
362 | nightly: | |
363 | externalValue: https://peertube2.cpy.re/api/v1/config | |
6441981b RK |
364 | /config/about: |
365 | get: | |
b029d58a | 366 | summary: Get instance "About" information |
6441981b RK |
367 | tags: |
368 | - Config | |
369 | responses: | |
370 | '200': | |
371 | description: successful operation | |
2a8ae759 FS |
372 | content: |
373 | application/json: | |
374 | schema: | |
375 | $ref: '#/components/schemas/ServerConfigAbout' | |
40cfb36b RK |
376 | examples: |
377 | nightly: | |
378 | externalValue: https://peertube2.cpy.re/api/v1/config/about | |
6441981b RK |
379 | /config/custom: |
380 | get: | |
b029d58a | 381 | summary: Get instance runtime configuration |
6441981b RK |
382 | tags: |
383 | - Config | |
384 | security: | |
385 | - OAuth2: | |
64b5c247 | 386 | - admin |
6441981b RK |
387 | responses: |
388 | '200': | |
389 | description: successful operation | |
2a8ae759 FS |
390 | content: |
391 | application/json: | |
392 | schema: | |
393 | $ref: '#/components/schemas/ServerConfigCustom' | |
6441981b | 394 | put: |
b029d58a | 395 | summary: Set instance runtime configuration |
6441981b RK |
396 | tags: |
397 | - Config | |
398 | security: | |
399 | - OAuth2: | |
64b5c247 | 400 | - admin |
6441981b RK |
401 | responses: |
402 | '200': | |
403 | description: successful operation | |
84f6e32c RK |
404 | '400': |
405 | x-summary: field inconsistencies | |
406 | description: > | |
407 | Arises when: | |
408 | - the emailer is disabled and the instance is open to registrations | |
409 | - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled | |
6441981b | 410 | delete: |
b029d58a | 411 | summary: Delete instance runtime configuration |
6441981b RK |
412 | tags: |
413 | - Config | |
414 | security: | |
415 | - OAuth2: | |
64b5c247 | 416 | - admin |
6441981b RK |
417 | responses: |
418 | '200': | |
419 | description: successful operation | |
d216b538 | 420 | /jobs/{state}: |
1569a818 | 421 | get: |
b029d58a | 422 | summary: List instance jobs |
94ff4c23 | 423 | security: |
3e9e6f2f | 424 | - OAuth2: |
64b5c247 | 425 | - admin |
1569a818 DG |
426 | tags: |
427 | - Job | |
44cb3b85 DG |
428 | parameters: |
429 | - name: state | |
430 | in: path | |
431 | required: true | |
040d6896 | 432 | description: The state of the job ('' for for no filter) |
3e9e6f2f RK |
433 | schema: |
434 | type: string | |
65f02679 | 435 | enum: |
040d6896 | 436 | - '' |
65f02679 RK |
437 | - active |
438 | - completed | |
439 | - failed | |
440 | - waiting | |
441 | - delayed | |
040d6896 | 442 | - $ref: '#/components/parameters/jobType' |
3e9e6f2f RK |
443 | - $ref: '#/components/parameters/start' |
444 | - $ref: '#/components/parameters/count' | |
445 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
446 | responses: |
447 | '200': | |
448 | description: successful operation | |
3e9e6f2f RK |
449 | content: |
450 | application/json: | |
451 | schema: | |
84f6e32c RK |
452 | type: object |
453 | properties: | |
454 | total: | |
455 | type: integer | |
456 | example: 1 | |
457 | data: | |
458 | type: array | |
459 | maxItems: 100 | |
460 | items: | |
461 | $ref: '#/components/schemas/Job' | |
1569a818 DG |
462 | '/server/following/{host}': |
463 | delete: | |
94ff4c23 | 464 | security: |
3e9e6f2f | 465 | - OAuth2: |
06746a8b | 466 | - admin |
1569a818 | 467 | tags: |
b029d58a C |
468 | - Instance Follows |
469 | summary: Unfollow a server | |
1569a818 DG |
470 | parameters: |
471 | - name: host | |
472 | in: path | |
473 | required: true | |
1569a818 | 474 | description: 'The host to unfollow ' |
3e9e6f2f RK |
475 | schema: |
476 | type: string | |
84f6e32c | 477 | format: hostname |
1569a818 DG |
478 | responses: |
479 | '201': | |
480 | description: successful operation | |
481 | /server/followers: | |
482 | get: | |
483 | tags: | |
b029d58a C |
484 | - Instance Follows |
485 | summary: List instance followers | |
44cb3b85 | 486 | parameters: |
3e9e6f2f RK |
487 | - $ref: '#/components/parameters/start' |
488 | - $ref: '#/components/parameters/count' | |
489 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
490 | responses: |
491 | '200': | |
492 | description: successful operation | |
3e9e6f2f RK |
493 | content: |
494 | application/json: | |
495 | schema: | |
496 | type: array | |
497 | items: | |
498 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
499 | /server/following: |
500 | get: | |
501 | tags: | |
b029d58a | 502 | - Instance Follows |
f4d59981 | 503 | summary: List instances followed by the server |
44cb3b85 | 504 | parameters: |
f4d59981 RK |
505 | - name: state |
506 | in: query | |
507 | schema: | |
508 | type: string | |
509 | enum: | |
510 | - pending | |
511 | - accepted | |
512 | - name: actorType | |
513 | in: query | |
514 | schema: | |
515 | type: string | |
516 | enum: | |
517 | - Person | |
518 | - Application | |
519 | - Group | |
520 | - Service | |
521 | - Organization | |
3e9e6f2f RK |
522 | - $ref: '#/components/parameters/start' |
523 | - $ref: '#/components/parameters/count' | |
524 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
525 | responses: |
526 | '200': | |
527 | description: successful operation | |
3e9e6f2f RK |
528 | content: |
529 | application/json: | |
530 | schema: | |
531 | type: array | |
532 | items: | |
533 | $ref: '#/components/schemas/Follow' | |
1569a818 | 534 | post: |
94ff4c23 | 535 | security: |
3e9e6f2f | 536 | - OAuth2: |
64b5c247 | 537 | - admin |
1569a818 | 538 | tags: |
b029d58a | 539 | - Instance Follows |
2963c343 | 540 | summary: Follow a server |
1569a818 DG |
541 | responses: |
542 | '204': | |
c1843150 | 543 | description: successful operation |
f4d59981 RK |
544 | '500': |
545 | description: cannot follow a non-HTTPS server | |
3e9e6f2f RK |
546 | requestBody: |
547 | content: | |
548 | application/json: | |
549 | schema: | |
f4d59981 RK |
550 | type: object |
551 | properties: | |
552 | hosts: | |
553 | type: array | |
554 | items: | |
555 | type: string | |
84f6e32c | 556 | format: hostname |
f4d59981 | 557 | uniqueItems: true |
1569a818 DG |
558 | /users: |
559 | post: | |
b029d58a | 560 | summary: Create a user |
94ff4c23 | 561 | security: |
3e9e6f2f | 562 | - OAuth2: |
64b5c247 | 563 | - admin |
1569a818 | 564 | tags: |
b029d58a | 565 | - Users |
1569a818 | 566 | responses: |
1e904cde | 567 | '200': |
2c318664 | 568 | description: user created |
3e9e6f2f RK |
569 | content: |
570 | application/json: | |
571 | schema: | |
572 | $ref: '#/components/schemas/AddUserResponse' | |
2c318664 RK |
573 | links: |
574 | # GET /users/{id} | |
575 | GetUserId: | |
576 | operationId: getUserId | |
577 | parameters: | |
578 | id: '$response.body#/user/id' | |
579 | # PUT /users/{id} | |
580 | PutUserId: | |
581 | operationId: putUserId | |
582 | parameters: | |
583 | id: '$response.body#/user/id' | |
584 | # DELETE /users/{id} | |
585 | DelUserId: | |
586 | operationId: delUserId | |
587 | parameters: | |
588 | id: '$response.body#/user/id' | |
589 | '403': | |
590 | description: insufficient authority to create an admin or moderator | |
3e9e6f2f RK |
591 | requestBody: |
592 | content: | |
593 | application/json: | |
594 | schema: | |
595 | $ref: '#/components/schemas/AddUser' | |
b8375da9 RK |
596 | description: | |
597 | If the smtp server is configured, you can leave the password empty and an email will be sent | |
598 | asking the user to set it first. | |
3e9e6f2f | 599 | required: true |
1569a818 | 600 | get: |
b029d58a | 601 | summary: List users |
94ff4c23 | 602 | security: |
8491293b RK |
603 | - OAuth2: |
604 | - admin | |
1569a818 | 605 | tags: |
b029d58a | 606 | - Users |
44cb3b85 | 607 | parameters: |
8491293b RK |
608 | - $ref: '#/components/parameters/usersSearch' |
609 | - $ref: '#/components/parameters/usersBlocked' | |
3e9e6f2f RK |
610 | - $ref: '#/components/parameters/start' |
611 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 612 | - $ref: '#/components/parameters/usersSort' |
1569a818 DG |
613 | responses: |
614 | '200': | |
615 | description: successful operation | |
3e9e6f2f RK |
616 | content: |
617 | application/json: | |
618 | schema: | |
619 | type: array | |
620 | items: | |
621 | $ref: '#/components/schemas/User' | |
1569a818 | 622 | '/users/{id}': |
2c318664 RK |
623 | parameters: |
624 | - $ref: '#/components/parameters/id' | |
1569a818 | 625 | delete: |
b029d58a | 626 | summary: Delete a user |
94ff4c23 | 627 | security: |
3e9e6f2f | 628 | - OAuth2: |
64b5c247 | 629 | - admin |
1569a818 | 630 | tags: |
b029d58a | 631 | - Users |
2c318664 | 632 | operationId: delUserId |
1569a818 DG |
633 | responses: |
634 | '204': | |
c1843150 | 635 | description: successful operation |
1569a818 | 636 | get: |
b029d58a | 637 | summary: Get a user |
94ff4c23 | 638 | security: |
3e9e6f2f | 639 | - OAuth2: [] |
1569a818 | 640 | tags: |
b029d58a | 641 | - Users |
2c318664 | 642 | operationId: getUserId |
fd5586b3 RK |
643 | parameters: |
644 | - name: withStats | |
645 | in: query | |
646 | description: include statistics about the user (only available as a moderator/admin) | |
647 | schema: | |
648 | type: boolean | |
1569a818 DG |
649 | responses: |
650 | '200': | |
fd5586b3 RK |
651 | x-summary: successful operation |
652 | description: | | |
653 | As an admin/moderator, you can request a response augmented with statistics about the user's | |
654 | moderation relations and videos usage, by using the `withStats` parameter. | |
3e9e6f2f RK |
655 | content: |
656 | application/json: | |
657 | schema: | |
fd5586b3 RK |
658 | oneOf: |
659 | - $ref: '#/components/schemas/User' | |
660 | - $ref: '#/components/schemas/UserWithStats' | |
1569a818 | 661 | put: |
b029d58a | 662 | summary: Update a user |
94ff4c23 | 663 | security: |
3e9e6f2f | 664 | - OAuth2: [] |
1569a818 | 665 | tags: |
b029d58a | 666 | - Users |
2c318664 | 667 | operationId: putUserId |
1569a818 DG |
668 | responses: |
669 | '204': | |
c1843150 | 670 | description: successful operation |
3e9e6f2f RK |
671 | requestBody: |
672 | content: | |
673 | application/json: | |
674 | schema: | |
675 | $ref: '#/components/schemas/UpdateUser' | |
676 | required: true | |
1f82e3e8 C |
677 | /users/register: |
678 | post: | |
679 | summary: Register a user | |
680 | tags: | |
b029d58a | 681 | - Users |
1f82e3e8 C |
682 | responses: |
683 | '204': | |
c1843150 | 684 | description: successful operation |
1f82e3e8 C |
685 | requestBody: |
686 | content: | |
687 | application/json: | |
688 | schema: | |
689 | $ref: '#/components/schemas/RegisterUser' | |
690 | required: true | |
1569a818 DG |
691 | /users/me: |
692 | get: | |
b029d58a | 693 | summary: Get my user information |
94ff4c23 | 694 | security: |
e76d5784 RK |
695 | - OAuth2: |
696 | - user | |
1569a818 | 697 | tags: |
1f82e3e8 | 698 | - My User |
1569a818 DG |
699 | responses: |
700 | '200': | |
701 | description: successful operation | |
3e9e6f2f RK |
702 | content: |
703 | application/json: | |
704 | schema: | |
705 | type: array | |
706 | items: | |
707 | $ref: '#/components/schemas/User' | |
1569a818 | 708 | put: |
b029d58a | 709 | summary: Update my user information |
94ff4c23 | 710 | security: |
e76d5784 RK |
711 | - OAuth2: |
712 | - user | |
1569a818 | 713 | tags: |
1f82e3e8 | 714 | - My User |
1569a818 DG |
715 | responses: |
716 | '204': | |
37db4176 | 717 | description: successful operation |
3e9e6f2f RK |
718 | requestBody: |
719 | content: | |
720 | application/json: | |
721 | schema: | |
722 | $ref: '#/components/schemas/UpdateMe' | |
723 | required: true | |
1f82e3e8 C |
724 | /users/me/videos/imports: |
725 | get: | |
b029d58a | 726 | summary: Get video imports of my user |
1f82e3e8 C |
727 | security: |
728 | - OAuth2: | |
64b5c247 | 729 | - user |
1f82e3e8 | 730 | tags: |
b029d58a | 731 | - Videos |
1f82e3e8 C |
732 | - My User |
733 | parameters: | |
734 | - $ref: '#/components/parameters/start' | |
735 | - $ref: '#/components/parameters/count' | |
736 | - $ref: '#/components/parameters/sort' | |
737 | responses: | |
738 | '200': | |
739 | description: successful operation | |
740 | content: | |
741 | application/json: | |
742 | schema: | |
5844dde3 | 743 | $ref: '#/components/schemas/VideoImportsList' |
1569a818 DG |
744 | /users/me/video-quota-used: |
745 | get: | |
b029d58a | 746 | summary: Get my user used quota |
94ff4c23 | 747 | security: |
e76d5784 RK |
748 | - OAuth2: |
749 | - user | |
1569a818 | 750 | tags: |
1f82e3e8 | 751 | - My User |
1569a818 DG |
752 | responses: |
753 | '200': | |
754 | description: successful operation | |
3e9e6f2f RK |
755 | content: |
756 | application/json: | |
757 | schema: | |
30b40713 RK |
758 | type: object |
759 | properties: | |
760 | videoQuotaUsed: | |
761 | type: number | |
b8375da9 | 762 | description: The user video quota used so far in bytes |
30b40713 RK |
763 | example: 16810141515 |
764 | videoQuotaUsedDaily: | |
765 | type: number | |
b8375da9 | 766 | description: The user video quota used today in bytes |
30b40713 | 767 | example: 1681014151 |
1569a818 DG |
768 | '/users/me/videos/{videoId}/rating': |
769 | get: | |
50e16ccf | 770 | summary: Get rate of my user for a video |
94ff4c23 | 771 | security: |
3e9e6f2f | 772 | - OAuth2: [] |
1569a818 | 773 | tags: |
1f82e3e8 | 774 | - My User |
b029d58a | 775 | - Video Rates |
1569a818 DG |
776 | parameters: |
777 | - name: videoId | |
778 | in: path | |
779 | required: true | |
b8375da9 | 780 | description: The video id |
3e9e6f2f | 781 | schema: |
b8375da9 | 782 | $ref: '#/components/schemas/Video/properties/id' |
1569a818 DG |
783 | responses: |
784 | '200': | |
785 | description: successful operation | |
3e9e6f2f RK |
786 | content: |
787 | application/json: | |
788 | schema: | |
789 | $ref: '#/components/schemas/GetMeVideoRating' | |
1569a818 DG |
790 | /users/me/videos: |
791 | get: | |
b029d58a | 792 | summary: Get videos of my user |
94ff4c23 | 793 | security: |
e76d5784 RK |
794 | - OAuth2: |
795 | - user | |
1569a818 | 796 | tags: |
1f82e3e8 | 797 | - My User |
b029d58a | 798 | - Videos |
44cb3b85 | 799 | parameters: |
3e9e6f2f RK |
800 | - $ref: '#/components/parameters/start' |
801 | - $ref: '#/components/parameters/count' | |
802 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
803 | responses: |
804 | '200': | |
805 | description: successful operation | |
3e9e6f2f RK |
806 | content: |
807 | application/json: | |
808 | schema: | |
048b6946 | 809 | $ref: '#/components/schemas/VideoListResponse' |
e76d5784 RK |
810 | /users/me/subscriptions: |
811 | get: | |
b029d58a | 812 | summary: Get my user subscriptions |
e76d5784 RK |
813 | security: |
814 | - OAuth2: | |
64b5c247 | 815 | - user |
e76d5784 | 816 | tags: |
b029d58a | 817 | - My Subscriptions |
e76d5784 RK |
818 | parameters: |
819 | - $ref: '#/components/parameters/start' | |
820 | - $ref: '#/components/parameters/count' | |
821 | - $ref: '#/components/parameters/sort' | |
822 | responses: | |
823 | '200': | |
824 | description: successful operation | |
045bcd0d RK |
825 | content: |
826 | application/json: | |
827 | schema: | |
828 | $ref: '#/components/schemas/VideoChannelList' | |
e76d5784 | 829 | post: |
2c318664 RK |
830 | tags: |
831 | - My Subscriptions | |
b029d58a | 832 | summary: Add subscription to my user |
e76d5784 RK |
833 | security: |
834 | - OAuth2: | |
64b5c247 | 835 | - user |
2c318664 RK |
836 | requestBody: |
837 | content: | |
838 | application/json: | |
839 | schema: | |
840 | type: object | |
841 | properties: | |
842 | uri: | |
843 | type: string | |
844 | format: uri | |
845 | description: uri of the video channels to subscribe to | |
846 | required: | |
847 | - uri | |
848 | examples: | |
849 | default: | |
850 | value: | |
851 | uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr | |
e76d5784 RK |
852 | responses: |
853 | '200': | |
854 | description: successful operation | |
855 | /users/me/subscriptions/exist: | |
856 | get: | |
b029d58a | 857 | summary: Get if subscriptions exist for my user |
e76d5784 RK |
858 | security: |
859 | - OAuth2: | |
64b5c247 | 860 | - user |
e76d5784 | 861 | tags: |
b029d58a | 862 | - My Subscriptions |
e76d5784 RK |
863 | parameters: |
864 | - $ref: '#/components/parameters/subscriptionsUris' | |
865 | responses: | |
866 | '200': | |
867 | description: successful operation | |
868 | content: | |
869 | application/json: | |
870 | schema: | |
871 | type: object | |
872 | /users/me/subscriptions/videos: | |
873 | get: | |
b029d58a | 874 | summary: List videos of subscriptions of my user |
e76d5784 RK |
875 | security: |
876 | - OAuth2: | |
877 | - user | |
878 | tags: | |
b029d58a C |
879 | - My Subscriptions |
880 | - Videos | |
e76d5784 | 881 | parameters: |
59c794a5 | 882 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 883 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
884 | - $ref: '#/components/parameters/tagsOneOf' |
885 | - $ref: '#/components/parameters/tagsAllOf' | |
886 | - $ref: '#/components/parameters/licenceOneOf' | |
887 | - $ref: '#/components/parameters/languageOneOf' | |
888 | - $ref: '#/components/parameters/nsfw' | |
889 | - $ref: '#/components/parameters/filter' | |
890 | - $ref: '#/components/parameters/skipCount' | |
e76d5784 RK |
891 | - $ref: '#/components/parameters/start' |
892 | - $ref: '#/components/parameters/count' | |
59c794a5 | 893 | - $ref: '#/components/parameters/videosSort' |
e76d5784 RK |
894 | responses: |
895 | '200': | |
896 | description: successful operation | |
897 | content: | |
898 | application/json: | |
899 | schema: | |
048b6946 | 900 | $ref: '#/components/schemas/VideoListResponse' |
cb9d028a | 901 | '/users/me/subscriptions/{subscriptionHandle}': |
e76d5784 | 902 | get: |
b029d58a | 903 | summary: Get subscription of my user |
e76d5784 RK |
904 | security: |
905 | - OAuth2: | |
64b5c247 | 906 | - user |
e76d5784 | 907 | tags: |
b029d58a | 908 | - My Subscriptions |
cb9d028a C |
909 | parameters: |
910 | - $ref: '#/components/parameters/subscriptionHandle' | |
e76d5784 RK |
911 | responses: |
912 | '200': | |
913 | description: successful operation | |
914 | content: | |
915 | application/json: | |
916 | schema: | |
917 | $ref: '#/components/schemas/VideoChannel' | |
918 | delete: | |
b029d58a | 919 | summary: Delete subscription of my user |
e76d5784 RK |
920 | security: |
921 | - OAuth2: | |
64b5c247 | 922 | - user |
e76d5784 | 923 | tags: |
b029d58a | 924 | - My Subscriptions |
cb9d028a C |
925 | parameters: |
926 | - $ref: '#/components/parameters/subscriptionHandle' | |
e76d5784 RK |
927 | responses: |
928 | '200': | |
929 | description: successful operation | |
f4d59981 RK |
930 | /users/me/notifications: |
931 | get: | |
932 | summary: List my notifications | |
933 | security: | |
934 | - OAuth2: [] | |
935 | tags: | |
936 | - My Notifications | |
937 | parameters: | |
938 | - name: unread | |
939 | in: query | |
940 | description: only list unread notifications | |
941 | schema: | |
942 | type: boolean | |
943 | - $ref: '#/components/parameters/start' | |
944 | - $ref: '#/components/parameters/count' | |
945 | - $ref: '#/components/parameters/sort' | |
946 | responses: | |
947 | '200': | |
948 | description: successful operation | |
949 | content: | |
950 | application/json: | |
951 | schema: | |
952 | $ref: '#/components/schemas/NotificationListResponse' | |
953 | /users/me/notifications/read: | |
954 | post: | |
955 | summary: Mark notifications as read by their id | |
956 | security: | |
957 | - OAuth2: [] | |
958 | tags: | |
959 | - My Notifications | |
960 | requestBody: | |
961 | content: | |
2c318664 | 962 | application/json: |
f4d59981 RK |
963 | schema: |
964 | type: object | |
965 | properties: | |
966 | ids: | |
967 | type: array | |
968 | description: ids of the notifications to mark as read | |
969 | items: | |
970 | type: integer | |
971 | required: | |
972 | - ids | |
973 | responses: | |
974 | '204': | |
975 | description: successful operation | |
976 | /users/me/notifications/read-all: | |
977 | post: | |
978 | summary: Mark all my notification as read | |
979 | security: | |
980 | - OAuth2: [] | |
981 | tags: | |
982 | - My Notifications | |
983 | responses: | |
984 | '204': | |
985 | description: successful operation | |
986 | /users/me/notification-settings: | |
987 | put: | |
988 | summary: Update my notification settings | |
989 | security: | |
990 | - OAuth2: [] | |
991 | tags: | |
992 | - My Notifications | |
993 | requestBody: | |
994 | content: | |
2c318664 | 995 | application/json: |
f4d59981 RK |
996 | schema: |
997 | type: object | |
998 | properties: | |
999 | newVideoFromSubscription: | |
1000 | $ref: '#/components/schemas/NotificationSettingValue' | |
1001 | newCommentOnMyVideo: | |
1002 | $ref: '#/components/schemas/NotificationSettingValue' | |
4f32032f | 1003 | abuseAsModerator: |
f4d59981 RK |
1004 | $ref: '#/components/schemas/NotificationSettingValue' |
1005 | videoAutoBlacklistAsModerator: | |
1006 | $ref: '#/components/schemas/NotificationSettingValue' | |
1007 | blacklistOnMyVideo: | |
1008 | $ref: '#/components/schemas/NotificationSettingValue' | |
1009 | myVideoPublished: | |
1010 | $ref: '#/components/schemas/NotificationSettingValue' | |
1011 | myVideoImportFinished: | |
1012 | $ref: '#/components/schemas/NotificationSettingValue' | |
1013 | newFollow: | |
1014 | $ref: '#/components/schemas/NotificationSettingValue' | |
1015 | newUserRegistration: | |
1016 | $ref: '#/components/schemas/NotificationSettingValue' | |
1017 | commentMention: | |
1018 | $ref: '#/components/schemas/NotificationSettingValue' | |
1019 | newInstanceFollower: | |
1020 | $ref: '#/components/schemas/NotificationSettingValue' | |
1021 | autoInstanceFollowing: | |
1022 | $ref: '#/components/schemas/NotificationSettingValue' | |
1023 | responses: | |
1024 | '204': | |
1025 | description: successful operation | |
3520d385 A |
1026 | /users/me/history/videos: |
1027 | get: | |
1028 | summary: List watched videos history | |
1029 | security: | |
1030 | - OAuth2: [] | |
1031 | tags: | |
1032 | - My History | |
1033 | parameters: | |
1034 | - $ref: '#/components/parameters/start' | |
1035 | - $ref: '#/components/parameters/count' | |
d8b34ee5 | 1036 | - $ref: '#/components/parameters/search' |
3520d385 A |
1037 | responses: |
1038 | '200': | |
1039 | description: successful operation | |
1040 | content: | |
1041 | application/json: | |
1042 | schema: | |
1043 | $ref: '#/components/schemas/VideoListResponse' | |
1044 | /users/me/history/videos/remove: | |
1045 | post: | |
1046 | summary: Clear video history | |
1047 | security: | |
1048 | - OAuth2: [] | |
1049 | tags: | |
1050 | - My History | |
1051 | requestBody: | |
1052 | content: | |
1053 | multipart/form-data: | |
1054 | schema: | |
1055 | type: object | |
1056 | properties: | |
1057 | beforeDate: | |
1058 | description: history before this date will be deleted | |
1059 | type: string | |
1060 | format: date-time | |
1061 | responses: | |
1062 | '204': | |
1063 | description: successful operation | |
1569a818 DG |
1064 | /users/me/avatar/pick: |
1065 | post: | |
b029d58a | 1066 | summary: Update my user avatar |
94ff4c23 | 1067 | security: |
3e9e6f2f | 1068 | - OAuth2: [] |
1569a818 | 1069 | tags: |
1f82e3e8 | 1070 | - My User |
1569a818 DG |
1071 | responses: |
1072 | '200': | |
1073 | description: successful operation | |
3e9e6f2f RK |
1074 | content: |
1075 | application/json: | |
1076 | schema: | |
75cba40d C |
1077 | type: object |
1078 | properties: | |
1079 | avatar: | |
1080 | $ref: '#/components/schemas/ActorImage' | |
d4132d3f RK |
1081 | '413': |
1082 | description: image file too large | |
1083 | headers: | |
1084 | X-File-Maximum-Size: | |
1085 | schema: | |
1086 | type: string | |
1087 | format: Nginx size | |
1088 | description: Maximum file size for the avatar | |
3e9e6f2f RK |
1089 | requestBody: |
1090 | content: | |
1091 | multipart/form-data: | |
1092 | schema: | |
1093 | type: object | |
1094 | properties: | |
1095 | avatarfile: | |
b8375da9 | 1096 | description: The file to upload |
3e9e6f2f RK |
1097 | type: string |
1098 | format: binary | |
1099 | encoding: | |
0ad45af7 | 1100 | avatarfile: |
3e9e6f2f | 1101 | contentType: image/png, image/jpeg |
75cba40d C |
1102 | /users/me/avatar: |
1103 | delete: | |
1104 | summary: Delete my avatar | |
1105 | security: | |
1106 | - OAuth2: [] | |
1107 | tags: | |
1108 | - My User | |
1109 | responses: | |
1110 | '204': | |
1111 | description: successful operation | |
1112 | ||
b029d58a C |
1113 | /videos/ownership: |
1114 | get: | |
1115 | summary: List video ownership changes | |
1116 | tags: | |
1117 | - Video Ownership Change | |
1118 | security: | |
1119 | - OAuth2: [] | |
1120 | responses: | |
1121 | '200': | |
1122 | description: successful operation | |
1123 | '/videos/ownership/{id}/accept': | |
1124 | post: | |
1125 | summary: Accept ownership change request | |
1126 | tags: | |
1127 | - Video Ownership Change | |
1128 | security: | |
1129 | - OAuth2: [] | |
1130 | parameters: | |
1131 | - $ref: '#/components/parameters/idOrUUID' | |
1132 | responses: | |
1133 | '204': | |
c1843150 | 1134 | description: successful operation |
06746a8b RK |
1135 | '403': |
1136 | description: cannot terminate an ownership change of another user | |
1137 | '404': | |
1138 | description: video owneship change not found | |
b029d58a C |
1139 | '/videos/ownership/{id}/refuse': |
1140 | post: | |
1141 | summary: Refuse ownership change request | |
1142 | tags: | |
1143 | - Video Ownership Change | |
1144 | security: | |
1145 | - OAuth2: [] | |
1146 | parameters: | |
1147 | - $ref: '#/components/parameters/idOrUUID' | |
1148 | responses: | |
1149 | '204': | |
c1843150 | 1150 | description: successful operation |
06746a8b RK |
1151 | '403': |
1152 | description: cannot terminate an ownership change of another user | |
1153 | '404': | |
1154 | description: video owneship change not found | |
b029d58a C |
1155 | '/videos/{id}/give-ownership': |
1156 | post: | |
1157 | summary: Request ownership change | |
1158 | tags: | |
1159 | - Video Ownership Change | |
1160 | security: | |
1161 | - OAuth2: [] | |
1162 | parameters: | |
1163 | - $ref: '#/components/parameters/idOrUUID' | |
1164 | requestBody: | |
1165 | required: true | |
1166 | content: | |
1167 | application/x-www-form-urlencoded: | |
1168 | schema: | |
1169 | type: object | |
1170 | properties: | |
1171 | username: | |
1172 | type: string | |
1173 | required: | |
1174 | - username | |
1175 | responses: | |
1176 | '204': | |
c1843150 | 1177 | description: successful operation |
b029d58a | 1178 | '400': |
06746a8b RK |
1179 | description: changing video ownership to a remote account is not supported yet |
1180 | '404': | |
1181 | description: video not found | |
c360c494 | 1182 | /videos: |
1569a818 | 1183 | get: |
b029d58a | 1184 | summary: List videos |
1569a818 DG |
1185 | tags: |
1186 | - Video | |
44cb3b85 | 1187 | parameters: |
fd5af7a2 | 1188 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 1189 | - $ref: '#/components/parameters/isLive' |
fd5af7a2 RK |
1190 | - $ref: '#/components/parameters/tagsOneOf' |
1191 | - $ref: '#/components/parameters/tagsAllOf' | |
1192 | - $ref: '#/components/parameters/licenceOneOf' | |
1193 | - $ref: '#/components/parameters/languageOneOf' | |
1194 | - $ref: '#/components/parameters/nsfw' | |
1195 | - $ref: '#/components/parameters/filter' | |
59c794a5 | 1196 | - $ref: '#/components/parameters/skipCount' |
3e9e6f2f RK |
1197 | - $ref: '#/components/parameters/start' |
1198 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1199 | - $ref: '#/components/parameters/videosSort' |
1569a818 DG |
1200 | responses: |
1201 | '200': | |
1202 | description: successful operation | |
3e9e6f2f RK |
1203 | content: |
1204 | application/json: | |
1205 | schema: | |
048b6946 | 1206 | $ref: '#/components/schemas/VideoListResponse' |
c360c494 | 1207 | /videos/categories: |
1569a818 | 1208 | get: |
b029d58a | 1209 | summary: List available video categories |
40cfb36b | 1210 | operationId: getCategories |
1569a818 DG |
1211 | tags: |
1212 | - Video | |
1569a818 DG |
1213 | responses: |
1214 | '200': | |
1215 | description: successful operation | |
3e9e6f2f RK |
1216 | content: |
1217 | application/json: | |
1218 | schema: | |
1219 | type: array | |
1220 | items: | |
1221 | type: string | |
84f6e32c RK |
1222 | examples: |
1223 | nightly: | |
1224 | externalValue: https://peertube2.cpy.re/api/v1/videos/categories | |
c360c494 | 1225 | /videos/licences: |
1569a818 | 1226 | get: |
b029d58a | 1227 | summary: List available video licences |
40cfb36b | 1228 | operationId: getLicences |
1569a818 DG |
1229 | tags: |
1230 | - Video | |
1569a818 DG |
1231 | responses: |
1232 | '200': | |
1233 | description: successful operation | |
3e9e6f2f RK |
1234 | content: |
1235 | application/json: | |
1236 | schema: | |
1237 | type: array | |
1238 | items: | |
1239 | type: string | |
84f6e32c RK |
1240 | examples: |
1241 | nightly: | |
1242 | externalValue: https://peertube2.cpy.re/api/v1/videos/licences | |
c360c494 | 1243 | /videos/languages: |
1569a818 | 1244 | get: |
b029d58a | 1245 | summary: List available video languages |
40cfb36b | 1246 | operationId: getLanguages |
1569a818 DG |
1247 | tags: |
1248 | - Video | |
1569a818 DG |
1249 | responses: |
1250 | '200': | |
1251 | description: successful operation | |
3e9e6f2f RK |
1252 | content: |
1253 | application/json: | |
1254 | schema: | |
1255 | type: array | |
1256 | items: | |
1257 | type: string | |
84f6e32c RK |
1258 | examples: |
1259 | nightly: | |
1260 | externalValue: https://peertube2.cpy.re/api/v1/videos/languages | |
c360c494 | 1261 | /videos/privacies: |
1569a818 | 1262 | get: |
40cfb36b RK |
1263 | summary: List available video privacy policies |
1264 | operationId: getPrivacyPolicies | |
1569a818 DG |
1265 | tags: |
1266 | - Video | |
1569a818 DG |
1267 | responses: |
1268 | '200': | |
1269 | description: successful operation | |
3e9e6f2f RK |
1270 | content: |
1271 | application/json: | |
1272 | schema: | |
1273 | type: array | |
1274 | items: | |
1275 | type: string | |
84f6e32c RK |
1276 | examples: |
1277 | nightly: | |
1278 | externalValue: https://peertube2.cpy.re/api/v1/videos/privacies | |
3e9e6f2f | 1279 | '/videos/{id}': |
1569a818 | 1280 | put: |
b029d58a | 1281 | summary: Update a video |
94ff4c23 | 1282 | security: |
3e9e6f2f | 1283 | - OAuth2: [] |
1569a818 DG |
1284 | tags: |
1285 | - Video | |
1569a818 | 1286 | parameters: |
cb9d028a | 1287 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 | 1288 | responses: |
37db4176 | 1289 | '204': |
1569a818 | 1290 | description: successful operation |
3e9e6f2f RK |
1291 | requestBody: |
1292 | content: | |
1293 | multipart/form-data: | |
1294 | schema: | |
1295 | type: object | |
1296 | properties: | |
1297 | thumbnailfile: | |
1298 | description: Video thumbnail file | |
1299 | type: string | |
0ad45af7 | 1300 | format: binary |
3e9e6f2f RK |
1301 | previewfile: |
1302 | description: Video preview file | |
1303 | type: string | |
0ad45af7 | 1304 | format: binary |
3e9e6f2f | 1305 | category: |
40cfb36b | 1306 | $ref: '#/components/schemas/VideoCategorySet' |
3e9e6f2f | 1307 | licence: |
40cfb36b | 1308 | $ref: '#/components/schemas/VideoLicenceSet' |
3e9e6f2f | 1309 | language: |
40cfb36b | 1310 | $ref: '#/components/schemas/VideoLanguageSet' |
c1843150 C |
1311 | privacy: |
1312 | $ref: '#/components/schemas/VideoPrivacySet' | |
3e9e6f2f RK |
1313 | description: |
1314 | description: Video description | |
1315 | type: string | |
1316 | waitTranscoding: | |
1317 | description: Whether or not we wait transcoding before publish the video | |
1318 | type: string | |
1319 | support: | |
00494d6e | 1320 | description: A text tell the audience how to support the video creator |
9a320a06 | 1321 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
3e9e6f2f RK |
1322 | type: string |
1323 | nsfw: | |
1324 | description: Whether or not this video contains sensitive content | |
84f6e32c | 1325 | type: boolean |
3e9e6f2f RK |
1326 | name: |
1327 | description: Video name | |
1328 | type: string | |
bdac0584 RK |
1329 | minLength: 3 |
1330 | maxLength: 120 | |
3e9e6f2f | 1331 | tags: |
12fed49e | 1332 | description: Video tags (maximum 5 tags each between 2 and 30 characters) |
1fd12c7c | 1333 | type: array |
07d02f6d FS |
1334 | minItems: 1 |
1335 | maxItems: 5 | |
1fd12c7c C |
1336 | items: |
1337 | type: string | |
07d02f6d FS |
1338 | minLength: 2 |
1339 | maxLength: 30 | |
3e9e6f2f RK |
1340 | commentsEnabled: |
1341 | description: Enable or disable comments for this video | |
84f6e32c | 1342 | type: boolean |
37db4176 FS |
1343 | originallyPublishedAt: |
1344 | description: Date when the content was originally published | |
1345 | type: string | |
1346 | format: date-time | |
5dce26d2 C |
1347 | scheduleUpdate: |
1348 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
0ad45af7 FS |
1349 | encoding: |
1350 | thumbnailfile: | |
1351 | contentType: image/jpeg | |
1352 | previewfile: | |
1353 | contentType: image/jpeg | |
1569a818 | 1354 | get: |
b029d58a | 1355 | summary: Get a video |
1569a818 DG |
1356 | tags: |
1357 | - Video | |
1569a818 | 1358 | parameters: |
cb9d028a | 1359 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1360 | responses: |
1361 | '200': | |
1362 | description: successful operation | |
3e9e6f2f RK |
1363 | content: |
1364 | application/json: | |
1365 | schema: | |
5dce26d2 | 1366 | $ref: '#/components/schemas/VideoDetails' |
1569a818 | 1367 | delete: |
b029d58a | 1368 | summary: Delete a video |
94ff4c23 | 1369 | security: |
3e9e6f2f | 1370 | - OAuth2: [] |
1569a818 DG |
1371 | tags: |
1372 | - Video | |
1569a818 | 1373 | parameters: |
cb9d028a | 1374 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1375 | responses: |
1376 | '204': | |
c1843150 | 1377 | description: successful operation |
3e9e6f2f | 1378 | '/videos/{id}/description': |
1569a818 | 1379 | get: |
b029d58a | 1380 | summary: Get complete video description |
1569a818 DG |
1381 | tags: |
1382 | - Video | |
1569a818 | 1383 | parameters: |
cb9d028a | 1384 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1385 | responses: |
1386 | '200': | |
1387 | description: successful operation | |
3e9e6f2f RK |
1388 | content: |
1389 | application/json: | |
1390 | schema: | |
b8375da9 | 1391 | nullable: true |
3e9e6f2f | 1392 | type: string |
b8375da9 RK |
1393 | minLength: 3 |
1394 | maxLength: 10000 | |
1395 | example: | | |
1396 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)** | |
3e9e6f2f | 1397 | '/videos/{id}/views': |
1569a818 | 1398 | post: |
b029d58a | 1399 | summary: Add a view to a video |
1569a818 DG |
1400 | tags: |
1401 | - Video | |
1569a818 | 1402 | parameters: |
cb9d028a | 1403 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1404 | responses: |
1405 | '204': | |
c1843150 | 1406 | description: successful operation |
6441981b RK |
1407 | '/videos/{id}/watching': |
1408 | put: | |
b029d58a | 1409 | summary: Set watching progress of a video |
6441981b RK |
1410 | tags: |
1411 | - Video | |
1412 | security: | |
1413 | - OAuth2: [] | |
1414 | parameters: | |
cb9d028a | 1415 | - $ref: '#/components/parameters/idOrUUID' |
6441981b RK |
1416 | requestBody: |
1417 | content: | |
1418 | application/json: | |
1419 | schema: | |
1420 | $ref: '#/components/schemas/UserWatchingVideo' | |
1421 | required: true | |
1422 | responses: | |
1423 | '204': | |
c1843150 | 1424 | description: successful operation |
c360c494 | 1425 | /videos/upload: |
1569a818 | 1426 | post: |
b029d58a | 1427 | summary: Upload a video |
f6d6e7f8 | 1428 | description: Uses a single request to upload a video. |
40cfb36b | 1429 | operationId: uploadLegacy |
94ff4c23 | 1430 | security: |
3e9e6f2f | 1431 | - OAuth2: [] |
1569a818 DG |
1432 | tags: |
1433 | - Video | |
f6d6e7f8 | 1434 | - Video Upload |
1569a818 DG |
1435 | responses: |
1436 | '200': | |
1437 | description: successful operation | |
3e9e6f2f RK |
1438 | content: |
1439 | application/json: | |
1440 | schema: | |
1441 | $ref: '#/components/schemas/VideoUploadResponse' | |
f2eb23cd RK |
1442 | '400': |
1443 | description: invalid file field, schedule date or parameter | |
06bcfbd9 | 1444 | '403': |
f2eb23cd | 1445 | description: video didn't pass upload filter |
06bcfbd9 | 1446 | '408': |
84f6e32c | 1447 | description: upload has timed out |
d4132d3f | 1448 | '413': |
f2eb23cd | 1449 | description: video file too large, due to quota or max body size limit set by the reverse-proxy |
d4132d3f RK |
1450 | headers: |
1451 | X-File-Maximum-Size: | |
1452 | schema: | |
1453 | type: string | |
1454 | format: Nginx size | |
1455 | description: Maximum file size for the video | |
f2eb23cd RK |
1456 | '415': |
1457 | description: video type unsupported | |
06bcfbd9 | 1458 | '422': |
f2eb23cd | 1459 | description: video unreadable |
3e9e6f2f RK |
1460 | requestBody: |
1461 | content: | |
1462 | multipart/form-data: | |
1463 | schema: | |
f6d6e7f8 | 1464 | $ref: '#/components/schemas/VideoUploadRequestLegacy' |
0ad45af7 FS |
1465 | encoding: |
1466 | videofile: | |
1467 | contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream | |
1468 | thumbnailfile: | |
1469 | contentType: image/jpeg | |
1470 | previewfile: | |
1471 | contentType: image/jpeg | |
40cfb36b | 1472 | x-codeSamples: |
8f9e8be1 RK |
1473 | - lang: Shell |
1474 | source: | | |
0579dee3 | 1475 | ## DEPENDENCIES: jq |
8f9e8be1 RK |
1476 | USERNAME="<your_username>" |
1477 | PASSWORD="<your_password>" | |
1478 | FILE_PATH="<your_file_path>" | |
1479 | CHANNEL_ID="<your_channel_id>" | |
8f9e8be1 RK |
1480 | NAME="<video_name>" |
1481 | ||
1482 | API_PATH="https://peertube2.cpy.re/api/v1" | |
1483 | ## AUTH | |
0579dee3 JK |
1484 | client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id") |
1485 | client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret") | |
1486 | token=$(curl -s "$API_PATH/users/token" \ | |
1487 | --data client_id="$client_id" \ | |
1488 | --data client_secret="$client_secret" \ | |
1489 | --data grant_type=password \ | |
1490 | --data response_type=code \ | |
1491 | --data username="$USERNAME" \ | |
1492 | --data password="$PASSWORD" \ | |
8f9e8be1 RK |
1493 | | jq -r ".access_token") |
1494 | ## VIDEO UPLOAD | |
0579dee3 JK |
1495 | curl -s "$API_PATH/videos/upload" \ |
1496 | -H "Authorization: Bearer $token" \ | |
1497 | --max-time 600 \ | |
1498 | --form videofile=@"$FILE_PATH" \ | |
1499 | --form channelId=$CHANNEL_ID \ | |
1500 | --form name="$NAME" | |
f6d6e7f8 | 1501 | /videos/upload-resumable: |
1502 | post: | |
1503 | summary: Initialize the resumable upload of a video | |
1504 | description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video | |
40cfb36b | 1505 | operationId: uploadResumableInit |
f6d6e7f8 | 1506 | security: |
1507 | - OAuth2: [] | |
1508 | tags: | |
1509 | - Video | |
1510 | - Video Upload | |
1511 | parameters: | |
1512 | - name: X-Upload-Content-Length | |
1513 | in: header | |
1514 | schema: | |
1515 | type: number | |
1516 | example: 2469036 | |
1517 | required: true | |
1518 | description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading. | |
1519 | - name: X-Upload-Content-Type | |
1520 | in: header | |
1521 | schema: | |
1522 | type: string | |
1523 | format: mimetype | |
1524 | example: video/mp4 | |
1525 | required: true | |
1526 | description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary. | |
1527 | requestBody: | |
1528 | content: | |
1529 | application/json: | |
1530 | schema: | |
1531 | $ref: '#/components/schemas/VideoUploadRequestResumable' | |
1532 | responses: | |
1533 | '200': | |
1534 | description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead | |
1535 | '201': | |
1536 | description: created | |
1537 | headers: | |
1538 | Location: | |
1539 | schema: | |
1540 | type: string | |
1541 | format: url | |
1542 | example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51 | |
1543 | Content-Length: | |
1544 | schema: | |
1545 | type: number | |
1546 | example: 0 | |
1547 | '400': | |
1548 | description: invalid file field, schedule date or parameter | |
1549 | '413': | |
1550 | description: video file too large, due to quota, absolute max file size or concurrent partial upload limit | |
1551 | '415': | |
1552 | description: video type unsupported | |
1553 | put: | |
1554 | summary: Send chunk for the resumable upload of a video | |
1555 | description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video | |
40cfb36b | 1556 | operationId: uploadResumable |
f6d6e7f8 | 1557 | security: |
1558 | - OAuth2: [] | |
1559 | tags: | |
1560 | - Video | |
1561 | - Video Upload | |
1562 | parameters: | |
1563 | - name: upload_id | |
1564 | in: path | |
1565 | required: true | |
1566 | description: | | |
1567 | Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is | |
1568 | not valid anymore and you need to initialize a new upload. | |
1569 | schema: | |
1570 | type: string | |
1571 | - name: Content-Range | |
1572 | in: header | |
1573 | schema: | |
1574 | type: string | |
1575 | example: bytes 0-262143/2469036 | |
1576 | required: true | |
1577 | description: | | |
1578 | Specifies the bytes in the file that the request is uploading. | |
1579 | ||
1580 | For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first | |
1581 | 262144 bytes (256 x 1024) in a 2,469,036 byte file. | |
1582 | - name: Content-Length | |
1583 | in: header | |
1584 | schema: | |
1585 | type: number | |
1586 | example: 262144 | |
1587 | required: true | |
1588 | description: | | |
1589 | Size of the chunk that the request is sending. | |
1590 | ||
1591 | The chunk size __must be a multiple of 256 KB__, and unlike [Google Resumable](https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol) | |
1592 | doesn't mandate for chunks to have the same size throughout the upload sequence. | |
1593 | ||
1594 | Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from | |
1595 | 1048576 bytes (~1MB) and increases or reduces size depending on connection health. | |
1596 | requestBody: | |
1597 | content: | |
1598 | application/octet-stream: | |
1599 | schema: | |
1600 | type: string | |
1601 | format: binary | |
1602 | responses: | |
1603 | '200': | |
1604 | description: last chunk received | |
1605 | headers: | |
1606 | Content-Length: | |
1607 | schema: | |
1608 | type: number | |
1609 | content: | |
1610 | application/json: | |
1611 | schema: | |
1612 | $ref: '#/components/schemas/VideoUploadResponse' | |
1613 | '308': | |
1614 | description: resume incomplete | |
1615 | headers: | |
1616 | Range: | |
1617 | schema: | |
1618 | type: string | |
1619 | example: bytes=0-262143 | |
1620 | Content-Length: | |
1621 | schema: | |
1622 | type: number | |
1623 | example: 0 | |
1624 | '403': | |
1625 | description: video didn't pass upload filter | |
1626 | '413': | |
1627 | description: video file too large, due to quota or max body size limit set by the reverse-proxy | |
1628 | '422': | |
1629 | description: video unreadable | |
1630 | delete: | |
1631 | summary: Cancel the resumable upload of a video, deleting any data uploaded so far | |
1632 | description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video | |
40cfb36b | 1633 | operationId: uploadResumableCancel |
f6d6e7f8 | 1634 | security: |
1635 | - OAuth2: [] | |
1636 | tags: | |
1637 | - Video | |
1638 | - Video Upload | |
1639 | parameters: | |
1640 | - name: upload_id | |
1641 | in: path | |
1642 | required: true | |
1643 | description: | | |
1644 | Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is | |
1645 | not valid anymore and the upload session has already been deleted with its data ;-) | |
1646 | schema: | |
1647 | type: string | |
1648 | - name: Content-Length | |
1649 | in: header | |
1650 | required: true | |
1651 | schema: | |
1652 | type: number | |
1653 | example: 0 | |
1654 | responses: | |
1655 | '204': | |
1656 | description: upload cancelled | |
1657 | headers: | |
1658 | Content-Length: | |
1659 | schema: | |
1660 | type: number | |
1661 | example: 0 | |
28c8e63e C |
1662 | /videos/imports: |
1663 | post: | |
b029d58a C |
1664 | summary: Import a video |
1665 | description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator) | |
40cfb36b | 1666 | operationId: importVideo |
28c8e63e C |
1667 | security: |
1668 | - OAuth2: [] | |
1669 | tags: | |
1670 | - Video | |
f6d6e7f8 | 1671 | - Video Upload |
28c8e63e C |
1672 | requestBody: |
1673 | content: | |
1674 | multipart/form-data: | |
1675 | schema: | |
ac2a5b54 | 1676 | $ref: '#/components/schemas/VideoCreateImport' |
0ad45af7 FS |
1677 | encoding: |
1678 | torrentfile: | |
1679 | contentType: application/x-bittorrent | |
1680 | thumbnailfile: | |
1681 | contentType: image/jpeg | |
1682 | previewfile: | |
1683 | contentType: image/jpeg | |
06746a8b RK |
1684 | responses: |
1685 | '200': | |
1686 | description: successful operation | |
1687 | content: | |
1688 | application/json: | |
1689 | schema: | |
1690 | $ref: '#/components/schemas/VideoUploadResponse' | |
06746a8b RK |
1691 | '400': |
1692 | description: '`magnetUri` or `targetUrl` or a torrent file missing' | |
f2eb23cd RK |
1693 | '403': |
1694 | description: video didn't pass pre-import filter | |
1695 | '409': | |
1696 | description: HTTP or Torrent/magnetURI import not enabled | |
668b7f09 | 1697 | |
4e239e35 C |
1698 | /videos/live: |
1699 | post: | |
1700 | summary: Create a live | |
40cfb36b | 1701 | operationId: createLive |
4e239e35 C |
1702 | security: |
1703 | - OAuth2: [] | |
1704 | tags: | |
1705 | - Live Videos | |
1706 | - Video | |
1707 | responses: | |
1708 | '200': | |
1709 | description: successful operation | |
1710 | content: | |
1711 | application/json: | |
1712 | schema: | |
1713 | $ref: '#/components/schemas/VideoUploadResponse' | |
1714 | '403': | |
b8375da9 | 1715 | description: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded |
4e239e35 C |
1716 | requestBody: |
1717 | content: | |
1718 | multipart/form-data: | |
1719 | schema: | |
1720 | type: object | |
1721 | properties: | |
1722 | channelId: | |
1723 | description: Channel id that will contain this live video | |
1724 | type: integer | |
1725 | saveReplay: | |
1726 | type: boolean | |
bb4ba6d9 C |
1727 | permanentLive: |
1728 | description: User can stream multiple times in a permanent live | |
1729 | type: boolean | |
4e239e35 C |
1730 | thumbnailfile: |
1731 | description: Live video/replay thumbnail file | |
1732 | type: string | |
1733 | format: binary | |
1734 | previewfile: | |
1735 | description: Live video/replay preview file | |
1736 | type: string | |
1737 | format: binary | |
1738 | privacy: | |
1739 | $ref: '#/components/schemas/VideoPrivacySet' | |
1740 | category: | |
40cfb36b | 1741 | $ref: '#/components/schemas/VideoCategorySet' |
4e239e35 | 1742 | licence: |
40cfb36b | 1743 | $ref: '#/components/schemas/VideoLicenceSet' |
4e239e35 | 1744 | language: |
40cfb36b | 1745 | $ref: '#/components/schemas/VideoLanguageSet' |
4e239e35 C |
1746 | description: |
1747 | description: Live video/replay description | |
1748 | type: string | |
1749 | support: | |
1750 | description: A text tell the audience how to support the creator | |
9a320a06 | 1751 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
4e239e35 C |
1752 | type: string |
1753 | nsfw: | |
1754 | description: Whether or not this live video/replay contains sensitive content | |
1755 | type: boolean | |
1756 | name: | |
1757 | description: Live video/replay name | |
1758 | type: string | |
bdac0584 RK |
1759 | minLength: 3 |
1760 | maxLength: 120 | |
4e239e35 C |
1761 | tags: |
1762 | description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters) | |
1763 | type: array | |
1764 | minItems: 1 | |
1765 | maxItems: 5 | |
1766 | items: | |
1767 | type: string | |
1768 | minLength: 2 | |
1769 | maxLength: 30 | |
1770 | commentsEnabled: | |
1771 | description: Enable or disable comments for this live video/replay | |
1772 | type: boolean | |
1773 | downloadEnabled: | |
1774 | description: Enable or disable downloading for the replay of this live | |
1775 | type: boolean | |
1776 | required: | |
1777 | - channelId | |
1778 | - name | |
1779 | encoding: | |
1780 | thumbnailfile: | |
1781 | contentType: image/jpeg | |
1782 | previewfile: | |
1783 | contentType: image/jpeg | |
1784 | ||
1785 | /videos/live/{id}: | |
1786 | get: | |
f6d6e7f8 | 1787 | summary: Get information about a live |
40cfb36b | 1788 | operationId: getLiveId |
4e239e35 C |
1789 | security: |
1790 | - OAuth2: [] | |
1791 | tags: | |
1792 | - Live Videos | |
1793 | - Video | |
1794 | parameters: | |
1795 | - $ref: '#/components/parameters/idOrUUID' | |
1796 | responses: | |
1797 | '200': | |
1798 | description: successful operation | |
1799 | content: | |
1800 | application/json: | |
1801 | schema: | |
1802 | $ref: '#/components/schemas/LiveVideoResponse' | |
1803 | put: | |
f6d6e7f8 | 1804 | summary: Update information about a live |
40cfb36b | 1805 | operationId: updateLiveId |
4e239e35 C |
1806 | security: |
1807 | - OAuth2: [] | |
1808 | tags: | |
1809 | - Live Videos | |
1810 | - Video | |
1811 | parameters: | |
1812 | - $ref: '#/components/parameters/idOrUUID' | |
1813 | requestBody: | |
1814 | content: | |
1815 | application/json: | |
1816 | schema: | |
1817 | $ref: '#/components/schemas/LiveVideoUpdate' | |
1818 | responses: | |
1819 | '204': | |
b8375da9 | 1820 | description: successful operation |
4e239e35 | 1821 | '400': |
b8375da9 | 1822 | description: bad parameters or trying to update a live that has already started |
4e239e35 | 1823 | '403': |
b8375da9 | 1824 | description: trying to save replay of the live but saving replay is not enabled on the instance |
4e239e35 | 1825 | |
668b7f09 C |
1826 | /users/me/abuses: |
1827 | get: | |
1828 | summary: List my abuses | |
985ece57 | 1829 | operationId: getMyAbuses |
668b7f09 C |
1830 | security: |
1831 | - OAuth2: [] | |
1832 | tags: | |
1833 | - Abuses | |
1834 | - My User | |
1835 | parameters: | |
1836 | - name: id | |
1837 | in: query | |
1838 | description: only list the report with this id | |
1839 | schema: | |
1840 | type: integer | |
1841 | - name: state | |
1842 | in: query | |
1843 | schema: | |
1844 | $ref: '#/components/schemas/AbuseStateSet' | |
985ece57 | 1845 | - $ref: '#/components/parameters/abusesSort' |
668b7f09 C |
1846 | - $ref: '#/components/parameters/start' |
1847 | - $ref: '#/components/parameters/count' | |
668b7f09 C |
1848 | responses: |
1849 | '200': | |
1850 | description: successful operation | |
1851 | content: | |
1852 | application/json: | |
1853 | schema: | |
985ece57 RK |
1854 | type: object |
1855 | properties: | |
1856 | total: | |
1857 | type: integer | |
1858 | example: 1 | |
1859 | data: | |
1860 | type: array | |
1861 | items: | |
1862 | $ref: '#/components/schemas/Abuse' | |
668b7f09 | 1863 | |
e3489df9 | 1864 | /abuses: |
1569a818 | 1865 | get: |
310b5219 | 1866 | summary: List abuses |
985ece57 | 1867 | operationId: getAbuses |
94ff4c23 | 1868 | security: |
b029d58a | 1869 | - OAuth2: |
06746a8b RK |
1870 | - admin |
1871 | - moderator | |
1569a818 | 1872 | tags: |
310b5219 | 1873 | - Abuses |
44cb3b85 | 1874 | parameters: |
84f6e32c RK |
1875 | - name: id |
1876 | in: query | |
1877 | description: only list the report with this id | |
1878 | schema: | |
1879 | type: integer | |
1880 | - name: predefinedReason | |
1881 | in: query | |
1882 | description: predefined reason the listed reports should contain | |
1883 | schema: | |
e3489df9 | 1884 | $ref: '#/components/schemas/PredefinedAbuseReasons' |
84f6e32c RK |
1885 | - name: search |
1886 | in: query | |
1887 | description: plain search that will match with video titles, reporter names and more | |
1888 | schema: | |
1889 | type: string | |
1890 | - name: state | |
1891 | in: query | |
84f6e32c | 1892 | schema: |
668b7f09 | 1893 | $ref: '#/components/schemas/AbuseStateSet' |
84f6e32c RK |
1894 | - name: searchReporter |
1895 | in: query | |
1896 | description: only list reports of a specific reporter | |
1897 | schema: | |
1898 | type: string | |
1899 | - name: searchReportee | |
1900 | description: only list reports of a specific reportee | |
1901 | in: query | |
1902 | schema: | |
1903 | type: string | |
1904 | - name: searchVideo | |
1905 | in: query | |
1906 | description: only list reports of a specific video | |
1907 | schema: | |
1908 | type: string | |
1909 | - name: searchVideoChannel | |
1910 | in: query | |
1911 | description: only list reports of a specific video channel | |
1912 | schema: | |
1913 | type: string | |
17b07dc5 C |
1914 | - name: videoIs |
1915 | in: query | |
1916 | description: only list blacklisted or deleted videos | |
1917 | schema: | |
1918 | type: string | |
1919 | enum: | |
1920 | - 'deleted' | |
1921 | - 'blacklisted' | |
1922 | - name: filter | |
1923 | in: query | |
1924 | description: only list account, comment or video reports | |
1925 | schema: | |
1926 | type: string | |
1927 | enum: | |
1928 | - 'video' | |
1929 | - 'comment' | |
1930 | - 'account' | |
3e9e6f2f RK |
1931 | - $ref: '#/components/parameters/start' |
1932 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1933 | - $ref: '#/components/parameters/abusesSort' |
1569a818 DG |
1934 | responses: |
1935 | '200': | |
1936 | description: successful operation | |
3e9e6f2f RK |
1937 | content: |
1938 | application/json: | |
1939 | schema: | |
985ece57 RK |
1940 | type: object |
1941 | properties: | |
1942 | total: | |
1943 | type: integer | |
1944 | example: 1 | |
1945 | data: | |
1946 | type: array | |
1947 | items: | |
1948 | $ref: '#/components/schemas/Abuse' | |
e3489df9 | 1949 | |
1569a818 | 1950 | post: |
b029d58a | 1951 | summary: Report an abuse |
94ff4c23 | 1952 | security: |
3e9e6f2f | 1953 | - OAuth2: [] |
1569a818 | 1954 | tags: |
310b5219 | 1955 | - Abuses |
50e16ccf | 1956 | requestBody: |
1ebddadd | 1957 | required: true |
50e16ccf C |
1958 | content: |
1959 | application/json: | |
1960 | schema: | |
1961 | type: object | |
1962 | properties: | |
1963 | reason: | |
1964 | description: Reason why the user reports this video | |
1965 | type: string | |
4302058c RK |
1966 | minLength: 2 |
1967 | maxLength: 3000 | |
1ebddadd | 1968 | predefinedReasons: |
e3489df9 | 1969 | $ref: '#/components/schemas/PredefinedAbuseReasons' |
e3489df9 C |
1970 | video: |
1971 | type: object | |
1972 | properties: | |
1973 | id: | |
1974 | description: Video id to report | |
b8375da9 RK |
1975 | allOf: |
1976 | - $ref: '#/components/schemas/Video/properties/id' | |
e3489df9 C |
1977 | startAt: |
1978 | type: integer | |
1979 | description: Timestamp in the video that marks the beginning of the report | |
1980 | minimum: 0 | |
1981 | endAt: | |
1982 | type: integer | |
1983 | description: Timestamp in the video that marks the ending of the report | |
1984 | minimum: 0 | |
1985 | comment: | |
1986 | type: object | |
1987 | properties: | |
1988 | id: | |
1989 | description: Comment id to report | |
b8375da9 RK |
1990 | allOf: |
1991 | - $ref: '#/components/schemas/VideoComment/properties/id' | |
e3489df9 C |
1992 | account: |
1993 | type: object | |
1994 | properties: | |
1995 | id: | |
1996 | description: Account id to report | |
b8375da9 | 1997 | type: integer |
1ebddadd RK |
1998 | required: |
1999 | - reason | |
50e16ccf C |
2000 | responses: |
2001 | '204': | |
2002 | description: successful operation | |
84f6e32c RK |
2003 | '400': |
2004 | description: incorrect request parameters | |
e3489df9 | 2005 | '/abuses/{abuseId}': |
50e16ccf C |
2006 | put: |
2007 | summary: Update an abuse | |
2008 | security: | |
2009 | - OAuth2: | |
2010 | - admin | |
2011 | - moderator | |
2012 | tags: | |
310b5219 | 2013 | - Abuses |
50e16ccf | 2014 | parameters: |
50e16ccf C |
2015 | - $ref: '#/components/parameters/abuseId' |
2016 | requestBody: | |
2017 | content: | |
2018 | application/json: | |
2019 | schema: | |
2020 | type: object | |
2021 | properties: | |
2022 | state: | |
4f32032f | 2023 | $ref: '#/components/schemas/AbuseStateSet' |
50e16ccf C |
2024 | moderationComment: |
2025 | type: string | |
84f6e32c | 2026 | description: Update the report comment visible only to the moderation team |
4302058c RK |
2027 | minLength: 2 |
2028 | maxLength: 3000 | |
84f6e32c RK |
2029 | responses: |
2030 | '204': | |
2031 | description: successful operation | |
2032 | '404': | |
310b5219 | 2033 | description: abuse not found |
50e16ccf | 2034 | delete: |
84f6e32c | 2035 | tags: |
310b5219 | 2036 | - Abuses |
50e16ccf C |
2037 | summary: Delete an abuse |
2038 | security: | |
2039 | - OAuth2: | |
64b5c247 RK |
2040 | - admin |
2041 | - moderator | |
84f6e32c | 2042 | parameters: |
84f6e32c | 2043 | - $ref: '#/components/parameters/abuseId' |
50e16ccf C |
2044 | responses: |
2045 | '204': | |
2046 | description: successful operation | |
06746a8b RK |
2047 | '404': |
2048 | description: block not found | |
668b7f09 C |
2049 | '/abuses/{abuseId}/messages': |
2050 | get: | |
2051 | summary: List messages of an abuse | |
2052 | security: | |
2053 | - OAuth2: [] | |
2054 | tags: | |
2055 | - Abuses | |
2056 | parameters: | |
2057 | - $ref: '#/components/parameters/abuseId' | |
2058 | responses: | |
2059 | '200': | |
2060 | description: successful operation | |
2061 | content: | |
2062 | application/json: | |
2063 | schema: | |
2064 | type: array | |
2065 | items: | |
2066 | $ref: '#/components/schemas/AbuseMessage' | |
2067 | ||
2068 | post: | |
2069 | summary: Add message to an abuse | |
2070 | security: | |
2071 | - OAuth2: [] | |
2072 | tags: | |
2073 | - Abuses | |
fcc4466e C |
2074 | parameters: |
2075 | - $ref: '#/components/parameters/abuseId' | |
668b7f09 C |
2076 | requestBody: |
2077 | required: true | |
2078 | content: | |
2079 | application/json: | |
2080 | schema: | |
2081 | type: object | |
2082 | properties: | |
2083 | message: | |
2084 | description: Message to send | |
2085 | type: string | |
4302058c RK |
2086 | minLength: 2 |
2087 | maxLength: 3000 | |
668b7f09 C |
2088 | required: |
2089 | - message | |
2090 | responses: | |
2091 | '200': | |
2092 | description: successful operation | |
2093 | '400': | |
2094 | description: incorrect request parameters | |
2095 | '/abuses/{abuseId}/messages/{abuseMessageId}': | |
2096 | delete: | |
2097 | summary: Delete an abuse message | |
2098 | security: | |
2099 | - OAuth2: [] | |
2100 | tags: | |
2101 | - Abuses | |
2102 | parameters: | |
2103 | - $ref: '#/components/parameters/abuseId' | |
2104 | - $ref: '#/components/parameters/abuseMessageId' | |
2105 | responses: | |
2106 | '204': | |
2107 | description: successful operation | |
50e16ccf | 2108 | |
3e9e6f2f | 2109 | '/videos/{id}/blacklist': |
1569a818 | 2110 | post: |
06746a8b | 2111 | summary: Block a video |
94ff4c23 | 2112 | security: |
3e9e6f2f | 2113 | - OAuth2: |
64b5c247 RK |
2114 | - admin |
2115 | - moderator | |
1569a818 | 2116 | tags: |
06746a8b | 2117 | - Video Blocks |
1569a818 | 2118 | parameters: |
cb9d028a | 2119 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2120 | responses: |
2121 | '204': | |
c1843150 | 2122 | description: successful operation |
1569a818 | 2123 | delete: |
06746a8b | 2124 | summary: Unblock a video by its id |
94ff4c23 | 2125 | security: |
3e9e6f2f | 2126 | - OAuth2: |
64b5c247 RK |
2127 | - admin |
2128 | - moderator | |
1569a818 | 2129 | tags: |
06746a8b | 2130 | - Video Blocks |
1569a818 | 2131 | parameters: |
cb9d028a | 2132 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2133 | responses: |
2134 | '204': | |
c1843150 | 2135 | description: successful operation |
06746a8b RK |
2136 | '404': |
2137 | description: block not found | |
c360c494 | 2138 | /videos/blacklist: |
1569a818 | 2139 | get: |
06746a8b RK |
2140 | tags: |
2141 | - Video Blocks | |
f4d59981 | 2142 | summary: List video blocks |
94ff4c23 | 2143 | security: |
3e9e6f2f | 2144 | - OAuth2: |
64b5c247 RK |
2145 | - admin |
2146 | - moderator | |
44cb3b85 | 2147 | parameters: |
84f6e32c RK |
2148 | - name: type |
2149 | in: query | |
2150 | description: > | |
2151 | list only blocks that match this type: | |
2152 | ||
2153 | - `1`: manual block | |
2154 | ||
2155 | - `2`: automatic block that needs review | |
2156 | schema: | |
2157 | type: integer | |
2158 | enum: | |
2159 | - 1 | |
2160 | - 2 | |
2161 | - name: search | |
2162 | in: query | |
2163 | description: plain search that will match with video titles, and more | |
2164 | schema: | |
2165 | type: string | |
3e9e6f2f RK |
2166 | - $ref: '#/components/parameters/start' |
2167 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 2168 | - $ref: '#/components/parameters/blacklistsSort' |
1569a818 DG |
2169 | responses: |
2170 | '200': | |
2171 | description: successful operation | |
3e9e6f2f RK |
2172 | content: |
2173 | application/json: | |
2174 | schema: | |
84f6e32c RK |
2175 | type: object |
2176 | properties: | |
2177 | total: | |
2178 | type: integer | |
2179 | example: 1 | |
2180 | data: | |
2181 | type: array | |
2182 | items: | |
2183 | $ref: '#/components/schemas/VideoBlacklist' | |
67ae04a5 C |
2184 | /videos/{id}/captions: |
2185 | get: | |
b029d58a | 2186 | summary: List captions of a video |
67ae04a5 | 2187 | tags: |
04b703f6 | 2188 | - Video Captions |
67ae04a5 | 2189 | parameters: |
cb9d028a | 2190 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
2191 | responses: |
2192 | '200': | |
2193 | description: successful operation | |
2194 | content: | |
2195 | application/json: | |
2196 | schema: | |
2197 | type: object | |
2198 | properties: | |
2199 | total: | |
2200 | type: integer | |
84f6e32c | 2201 | example: 1 |
67ae04a5 C |
2202 | data: |
2203 | type: array | |
2204 | items: | |
2205 | $ref: '#/components/schemas/VideoCaption' | |
2206 | /videos/{id}/captions/{captionLanguage}: | |
2207 | put: | |
2208 | summary: Add or replace a video caption | |
64b5c247 RK |
2209 | security: |
2210 | - OAuth2: | |
2211 | - user | |
67ae04a5 | 2212 | tags: |
04b703f6 | 2213 | - Video Captions |
67ae04a5 | 2214 | parameters: |
cb9d028a | 2215 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
2216 | - $ref: '#/components/parameters/captionLanguage' |
2217 | requestBody: | |
2218 | content: | |
2219 | multipart/form-data: | |
2220 | schema: | |
2221 | type: object | |
2222 | properties: | |
2223 | captionfile: | |
2224 | description: The file to upload. | |
2225 | type: string | |
2226 | format: binary | |
0ad45af7 FS |
2227 | encoding: |
2228 | captionfile: | |
205ed5b7 | 2229 | contentType: text/vtt, application/x-subrip, text/plain |
67ae04a5 C |
2230 | responses: |
2231 | '204': | |
c1843150 | 2232 | description: successful operation |
06746a8b RK |
2233 | '404': |
2234 | description: video or language not found | |
67ae04a5 C |
2235 | delete: |
2236 | summary: Delete a video caption | |
64b5c247 RK |
2237 | security: |
2238 | - OAuth2: | |
2239 | - user | |
67ae04a5 | 2240 | tags: |
04b703f6 | 2241 | - Video Captions |
67ae04a5 | 2242 | parameters: |
cb9d028a | 2243 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
2244 | - $ref: '#/components/parameters/captionLanguage' |
2245 | responses: | |
2246 | '204': | |
c1843150 | 2247 | description: successful operation |
06746a8b RK |
2248 | '404': |
2249 | description: video or language or caption for that language not found | |
48dce1c9 | 2250 | /video-channels: |
1569a818 | 2251 | get: |
b029d58a | 2252 | summary: List video channels |
9a320a06 | 2253 | operationId: getVideoChannels |
1569a818 | 2254 | tags: |
b029d58a | 2255 | - Video Channels |
44cb3b85 | 2256 | parameters: |
3e9e6f2f RK |
2257 | - $ref: '#/components/parameters/start' |
2258 | - $ref: '#/components/parameters/count' | |
2259 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
2260 | responses: |
2261 | '200': | |
2262 | description: successful operation | |
3e9e6f2f RK |
2263 | content: |
2264 | application/json: | |
2265 | schema: | |
045bcd0d | 2266 | $ref: '#/components/schemas/VideoChannelList' |
1569a818 | 2267 | post: |
b029d58a | 2268 | summary: Create a video channel |
9a320a06 | 2269 | operationId: createVideoChannel |
94ff4c23 | 2270 | security: |
3e9e6f2f | 2271 | - OAuth2: [] |
1569a818 | 2272 | tags: |
b029d58a | 2273 | - Video Channels |
1569a818 DG |
2274 | responses: |
2275 | '204': | |
c1843150 | 2276 | description: successful operation |
9a320a06 RK |
2277 | content: |
2278 | application/json: | |
2279 | schema: | |
2280 | type: object | |
2281 | properties: | |
2282 | videoChannel: | |
2283 | type: object | |
2284 | properties: | |
2285 | id: | |
2286 | $ref: '#/components/schemas/VideoChannel/properties/id' | |
3e9e6f2f | 2287 | requestBody: |
7d14d4d2 C |
2288 | content: |
2289 | application/json: | |
2290 | schema: | |
2291 | $ref: '#/components/schemas/VideoChannelCreate' | |
9ce3d302 | 2292 | '/video-channels/{channelHandle}': |
1569a818 | 2293 | get: |
b029d58a | 2294 | summary: Get a video channel |
9a320a06 | 2295 | operationId: getVideoChannel |
1569a818 | 2296 | tags: |
b029d58a | 2297 | - Video Channels |
1569a818 | 2298 | parameters: |
9ce3d302 | 2299 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
2300 | responses: |
2301 | '200': | |
2302 | description: successful operation | |
3e9e6f2f RK |
2303 | content: |
2304 | application/json: | |
2305 | schema: | |
2306 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 2307 | put: |
b029d58a | 2308 | summary: Update a video channel |
94ff4c23 | 2309 | security: |
3e9e6f2f | 2310 | - OAuth2: [] |
1569a818 | 2311 | tags: |
b029d58a | 2312 | - Video Channels |
1569a818 | 2313 | parameters: |
9ce3d302 | 2314 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
2315 | responses: |
2316 | '204': | |
c1843150 | 2317 | description: successful operation |
3e9e6f2f | 2318 | requestBody: |
7d14d4d2 C |
2319 | content: |
2320 | application/json: | |
2321 | schema: | |
2322 | $ref: '#/components/schemas/VideoChannelUpdate' | |
1569a818 | 2323 | delete: |
b029d58a | 2324 | summary: Delete a video channel |
94ff4c23 | 2325 | security: |
3e9e6f2f | 2326 | - OAuth2: [] |
1569a818 | 2327 | tags: |
b029d58a | 2328 | - Video Channels |
1569a818 | 2329 | parameters: |
9ce3d302 | 2330 | - $ref: '#/components/parameters/channelHandle' |
cc918ac3 C |
2331 | responses: |
2332 | '204': | |
c1843150 | 2333 | description: successful operation |
9ce3d302 | 2334 | '/video-channels/{channelHandle}/videos': |
cc918ac3 | 2335 | get: |
b029d58a | 2336 | summary: List videos of a video channel |
cc918ac3 | 2337 | tags: |
048b6946 | 2338 | - Video |
b029d58a | 2339 | - Video Channels |
cc918ac3 | 2340 | parameters: |
9ce3d302 | 2341 | - $ref: '#/components/parameters/channelHandle' |
59c794a5 | 2342 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 2343 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
2344 | - $ref: '#/components/parameters/tagsOneOf' |
2345 | - $ref: '#/components/parameters/tagsAllOf' | |
2346 | - $ref: '#/components/parameters/licenceOneOf' | |
2347 | - $ref: '#/components/parameters/languageOneOf' | |
2348 | - $ref: '#/components/parameters/nsfw' | |
2349 | - $ref: '#/components/parameters/filter' | |
2350 | - $ref: '#/components/parameters/skipCount' | |
2351 | - $ref: '#/components/parameters/start' | |
2352 | - $ref: '#/components/parameters/count' | |
2353 | - $ref: '#/components/parameters/videosSort' | |
1569a818 | 2354 | responses: |
cc918ac3 | 2355 | '200': |
1569a818 | 2356 | description: successful operation |
3e9e6f2f RK |
2357 | content: |
2358 | application/json: | |
2359 | schema: | |
048b6946 | 2360 | $ref: '#/components/schemas/VideoListResponse' |
75cba40d C |
2361 | '/video-channels/{channelHandle}/avatar/pick': |
2362 | post: | |
2363 | summary: Update channel avatar | |
2364 | security: | |
2365 | - OAuth2: [] | |
2366 | tags: | |
2367 | - Video Channels | |
2368 | parameters: | |
2369 | - $ref: '#/components/parameters/channelHandle' | |
2370 | responses: | |
2371 | '200': | |
2372 | description: successful operation | |
2373 | content: | |
2374 | application/json: | |
2375 | schema: | |
2376 | type: object | |
2377 | properties: | |
2378 | avatar: | |
2379 | $ref: '#/components/schemas/ActorImage' | |
2380 | '413': | |
2381 | description: image file too large | |
2382 | headers: | |
2383 | X-File-Maximum-Size: | |
2384 | schema: | |
2385 | type: string | |
2386 | format: Nginx size | |
2387 | description: Maximum file size for the avatar | |
2388 | requestBody: | |
2389 | content: | |
2390 | multipart/form-data: | |
2391 | schema: | |
2392 | type: object | |
2393 | properties: | |
2394 | avatarfile: | |
2395 | description: The file to upload. | |
2396 | type: string | |
2397 | format: binary | |
2398 | encoding: | |
2399 | avatarfile: | |
2400 | contentType: image/png, image/jpeg | |
2401 | '/video-channels/{channelHandle}/avatar': | |
2402 | delete: | |
2403 | summary: Delete channel avatar | |
2404 | security: | |
2405 | - OAuth2: [] | |
2406 | tags: | |
2407 | - Video Channels | |
2408 | parameters: | |
2409 | - $ref: '#/components/parameters/channelHandle' | |
2410 | responses: | |
2411 | '204': | |
2412 | description: successful operation | |
2413 | ||
2414 | ||
2415 | '/video-channels/{channelHandle}/banner/pick': | |
2416 | post: | |
2417 | summary: Update channel banner | |
2418 | security: | |
2419 | - OAuth2: [] | |
2420 | tags: | |
2421 | - Video Channels | |
2422 | parameters: | |
2423 | - $ref: '#/components/parameters/channelHandle' | |
2424 | responses: | |
2425 | '200': | |
2426 | description: successful operation | |
2427 | content: | |
2428 | application/json: | |
2429 | schema: | |
2430 | type: object | |
2431 | properties: | |
2432 | banner: | |
2433 | $ref: '#/components/schemas/ActorImage' | |
2434 | '413': | |
2435 | description: image file too large | |
2436 | headers: | |
2437 | X-File-Maximum-Size: | |
2438 | schema: | |
2439 | type: string | |
2440 | format: Nginx size | |
2441 | description: Maximum file size for the banner | |
2442 | requestBody: | |
2443 | content: | |
2444 | multipart/form-data: | |
2445 | schema: | |
2446 | type: object | |
2447 | properties: | |
2448 | bannerfile: | |
2449 | description: The file to upload. | |
2450 | type: string | |
2451 | format: binary | |
2452 | encoding: | |
2453 | bannerfile: | |
2454 | contentType: image/png, image/jpeg | |
2455 | '/video-channels/{channelHandle}/banner': | |
2456 | delete: | |
2457 | summary: Delete channel banner | |
2458 | security: | |
2459 | - OAuth2: [] | |
2460 | tags: | |
2461 | - Video Channels | |
2462 | parameters: | |
2463 | - $ref: '#/components/parameters/channelHandle' | |
2464 | responses: | |
2465 | '204': | |
2466 | description: successful operation | |
c1843150 C |
2467 | |
2468 | /video-playlists/privacies: | |
2469 | get: | |
40cfb36b RK |
2470 | summary: List available playlist privacy policies |
2471 | operationId: getPlaylistPrivacyPolicies | |
c1843150 C |
2472 | tags: |
2473 | - Video Playlists | |
2474 | responses: | |
2475 | '200': | |
2476 | description: successful operation | |
2477 | content: | |
2478 | application/json: | |
2479 | schema: | |
2480 | type: array | |
2481 | items: | |
2482 | type: string | |
84f6e32c RK |
2483 | examples: |
2484 | nightly: | |
2485 | externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies | |
c1843150 | 2486 | |
71810d0b RK |
2487 | /video-playlists: |
2488 | get: | |
b029d58a | 2489 | summary: List video playlists |
40cfb36b | 2490 | operationId: getPlaylists |
71810d0b | 2491 | tags: |
b029d58a | 2492 | - Video Playlists |
71810d0b RK |
2493 | parameters: |
2494 | - $ref: '#/components/parameters/start' | |
2495 | - $ref: '#/components/parameters/count' | |
2496 | - $ref: '#/components/parameters/sort' | |
2497 | responses: | |
2498 | '200': | |
2499 | description: successful operation | |
2500 | content: | |
2501 | application/json: | |
2502 | schema: | |
84f6e32c RK |
2503 | type: object |
2504 | properties: | |
2505 | total: | |
2506 | type: integer | |
2507 | example: 1 | |
2508 | data: | |
2509 | type: array | |
2510 | items: | |
2511 | $ref: '#/components/schemas/VideoPlaylist' | |
c1843150 C |
2512 | post: |
2513 | summary: Create a video playlist | |
b8375da9 | 2514 | description: If the video playlist is set as public, `videoChannelId` is mandatory. |
40cfb36b | 2515 | operationId: createPlaylist |
c1843150 C |
2516 | security: |
2517 | - OAuth2: [] | |
2518 | tags: | |
2519 | - Video Playlists | |
2520 | responses: | |
2521 | '200': | |
2522 | description: successful operation | |
2523 | content: | |
2524 | application/json: | |
2525 | schema: | |
2526 | type: object | |
2527 | properties: | |
2528 | videoPlaylist: | |
2529 | type: object | |
2530 | properties: | |
2531 | id: | |
b8375da9 | 2532 | $ref: '#/components/schemas/VideoPlaylist/properties/id' |
c1843150 | 2533 | uuid: |
b8375da9 | 2534 | $ref: '#/components/schemas/VideoPlaylist/properties/uuid' |
c1843150 C |
2535 | requestBody: |
2536 | content: | |
2537 | multipart/form-data: | |
2538 | schema: | |
2539 | type: object | |
2540 | properties: | |
2541 | displayName: | |
2542 | description: Video playlist display name | |
2543 | type: string | |
bdac0584 RK |
2544 | minLength: 1 |
2545 | maxLength: 120 | |
c1843150 C |
2546 | thumbnailfile: |
2547 | description: Video playlist thumbnail file | |
2548 | type: string | |
2549 | format: binary | |
2550 | privacy: | |
2551 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
2552 | description: | |
2553 | description: Video playlist description | |
2554 | type: string | |
b8375da9 RK |
2555 | minLength: 3 |
2556 | maxLength: 1000 | |
c1843150 | 2557 | videoChannelId: |
b8375da9 RK |
2558 | allOf: |
2559 | - $ref: '#/components/schemas/id' | |
c1843150 | 2560 | description: Video channel in which the playlist will be published |
c1843150 C |
2561 | required: |
2562 | - displayName | |
2c318664 RK |
2563 | encoding: |
2564 | thumbnailfile: | |
2565 | contentType: image/jpeg | |
c1843150 C |
2566 | |
2567 | /video-playlists/{id}: | |
2568 | get: | |
2569 | summary: Get a video playlist | |
2570 | tags: | |
2571 | - Video Playlists | |
2572 | parameters: | |
2573 | - $ref: '#/components/parameters/idOrUUID' | |
2574 | responses: | |
2575 | '200': | |
2576 | description: successful operation | |
2577 | content: | |
2578 | application/json: | |
2579 | schema: | |
2580 | $ref: '#/components/schemas/VideoPlaylist' | |
2581 | put: | |
2582 | summary: Update a video playlist | |
2583 | description: 'If the video playlist is set as public, the playlist must have a assigned channel.' | |
2584 | security: | |
2585 | - OAuth2: [] | |
2586 | tags: | |
2587 | - Video Playlists | |
2588 | responses: | |
2589 | '204': | |
2590 | description: successful operation | |
2591 | parameters: | |
2592 | - $ref: '#/components/parameters/idOrUUID' | |
2593 | requestBody: | |
2594 | content: | |
2595 | multipart/form-data: | |
2596 | schema: | |
2597 | type: object | |
2598 | properties: | |
2599 | displayName: | |
2600 | description: Video playlist display name | |
2601 | type: string | |
bdac0584 RK |
2602 | minLength: 1 |
2603 | maxLength: 120 | |
c1843150 C |
2604 | thumbnailfile: |
2605 | description: Video playlist thumbnail file | |
2606 | type: string | |
2607 | format: binary | |
2608 | privacy: | |
2609 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
2610 | description: | |
2611 | description: Video playlist description | |
2612 | type: string | |
2613 | videoChannelId: | |
b8375da9 RK |
2614 | allOf: |
2615 | - $ref: '#/components/schemas/id' | |
c1843150 | 2616 | description: Video channel in which the playlist will be published |
2c318664 RK |
2617 | encoding: |
2618 | thumbnailfile: | |
2619 | contentType: image/jpeg | |
c1843150 C |
2620 | delete: |
2621 | summary: Delete a video playlist | |
2622 | security: | |
2623 | - OAuth2: [] | |
2624 | tags: | |
2625 | - Video Playlists | |
2626 | parameters: | |
2627 | - $ref: '#/components/parameters/idOrUUID' | |
2628 | responses: | |
2629 | '204': | |
2630 | description: successful operation | |
2631 | ||
2632 | /video-playlists/{id}/videos: | |
2633 | get: | |
2634 | summary: 'List videos of a playlist' | |
2635 | tags: | |
2636 | - Videos | |
2637 | - Video Playlists | |
2638 | parameters: | |
2639 | - $ref: '#/components/parameters/idOrUUID' | |
2640 | responses: | |
2641 | '200': | |
2642 | description: successful operation | |
2643 | content: | |
2644 | application/json: | |
2645 | schema: | |
2646 | $ref: '#/components/schemas/VideoListResponse' | |
2647 | post: | |
2648 | summary: 'Add a video in a playlist' | |
2649 | security: | |
2650 | - OAuth2: [] | |
2651 | tags: | |
2652 | - Videos | |
2653 | - Video Playlists | |
2654 | parameters: | |
2655 | - $ref: '#/components/parameters/idOrUUID' | |
2656 | responses: | |
2657 | '200': | |
2658 | description: successful operation | |
2659 | content: | |
2660 | application/json: | |
2661 | schema: | |
2662 | type: object | |
2663 | properties: | |
2664 | videoPlaylistElement: | |
2665 | type: object | |
2666 | properties: | |
2667 | id: | |
06746a8b | 2668 | type: integer |
c1843150 C |
2669 | requestBody: |
2670 | content: | |
2671 | application/json: | |
2672 | schema: | |
2673 | type: object | |
2674 | properties: | |
2675 | videoId: | |
b8375da9 RK |
2676 | allOf: |
2677 | - $ref: '#/components/schemas/Video/properties/id' | |
2678 | description: Video to add in the playlist | |
c1843150 | 2679 | startTimestamp: |
06746a8b | 2680 | type: integer |
b8375da9 | 2681 | description: Start the video at this specific timestamp (in seconds) |
c1843150 | 2682 | stopTimestamp: |
06746a8b | 2683 | type: integer |
b8375da9 | 2684 | description: Stop the video at this specific timestamp (in seconds) |
c1843150 C |
2685 | required: |
2686 | - videoId | |
2687 | ||
2688 | /video-playlists/{id}/videos/reorder: | |
2689 | post: | |
2690 | summary: 'Reorder a playlist' | |
2691 | security: | |
2692 | - OAuth2: [] | |
2693 | tags: | |
2694 | - Video Playlists | |
2695 | parameters: | |
2696 | - $ref: '#/components/parameters/idOrUUID' | |
2697 | responses: | |
2698 | '204': | |
2699 | description: successful operation | |
2700 | requestBody: | |
2701 | content: | |
2702 | application/json: | |
2703 | schema: | |
2704 | type: object | |
2705 | properties: | |
2706 | startPosition: | |
06746a8b RK |
2707 | type: integer |
2708 | description: 'Start position of the element to reorder' | |
2709 | minimum: 1 | |
c1843150 | 2710 | insertAfterPosition: |
06746a8b RK |
2711 | type: integer |
2712 | description: 'New position for the block to reorder, to add the block before the first element' | |
2713 | minimum: 0 | |
c1843150 | 2714 | reorderLength: |
06746a8b RK |
2715 | type: integer |
2716 | description: 'How many element from `startPosition` to reorder' | |
2717 | minimum: 1 | |
c1843150 C |
2718 | required: |
2719 | - startPosition | |
2720 | - insertAfterPosition | |
2721 | ||
b9e924a8 | 2722 | /video-playlists/{id}/videos/{playlistElementId}: |
c1843150 C |
2723 | put: |
2724 | summary: 'Update a playlist element' | |
2725 | security: | |
2726 | - OAuth2: [] | |
2727 | tags: | |
2728 | - Video Playlists | |
2729 | parameters: | |
2730 | - $ref: '#/components/parameters/idOrUUID' | |
2731 | - $ref: '#/components/parameters/playlistElementId' | |
2732 | responses: | |
2733 | '204': | |
2734 | description: successful operation | |
2735 | requestBody: | |
2736 | content: | |
2737 | application/json: | |
2738 | schema: | |
2739 | type: object | |
2740 | properties: | |
2741 | startTimestamp: | |
06746a8b | 2742 | type: integer |
c1843150 C |
2743 | description: 'Start the video at this specific timestamp (in seconds)' |
2744 | stopTimestamp: | |
06746a8b | 2745 | type: integer |
c1843150 C |
2746 | description: 'Stop the video at this specific timestamp (in seconds)' |
2747 | delete: | |
2748 | summary: 'Delete an element from a playlist' | |
2749 | security: | |
2750 | - OAuth2: [] | |
2751 | tags: | |
2752 | - Video Playlists | |
2753 | parameters: | |
2754 | - $ref: '#/components/parameters/idOrUUID' | |
2755 | - $ref: '#/components/parameters/playlistElementId' | |
2756 | responses: | |
2757 | '204': | |
2758 | description: successful operation | |
2759 | ||
0590bb46 C |
2760 | '/users/me/video-playlists/videos-exist': |
2761 | get: | |
2762 | summary: 'Check video exists in my playlists' | |
2763 | security: | |
2764 | - OAuth2: [] | |
2765 | tags: | |
2766 | - Video Playlists | |
2767 | parameters: | |
2768 | - name: videoIds | |
2769 | in: query | |
2770 | required: true | |
2771 | description: The video ids to check | |
2772 | schema: | |
2773 | type: array | |
2774 | items: | |
b8375da9 | 2775 | $ref: '#/components/schemas/Video/properties/id' |
0590bb46 C |
2776 | responses: |
2777 | '200': | |
2778 | description: successful operation | |
2779 | content: | |
2780 | application/json: | |
2781 | schema: | |
2782 | type: object | |
2783 | properties: | |
2784 | videoId: | |
2785 | type: array | |
2786 | items: | |
2787 | type: object | |
2788 | properties: | |
2789 | playlistElementId: | |
06746a8b | 2790 | type: integer |
0590bb46 | 2791 | playlistId: |
06746a8b | 2792 | type: integer |
0590bb46 | 2793 | startTimestamp: |
06746a8b | 2794 | type: integer |
0590bb46 | 2795 | stopTimestamp: |
06746a8b | 2796 | type: integer |
0590bb46 | 2797 | |
3e9e6f2f | 2798 | '/accounts/{name}/video-channels': |
6b738c7a | 2799 | get: |
b029d58a | 2800 | summary: List video channels of an account |
6b738c7a | 2801 | tags: |
b029d58a C |
2802 | - Video Channels |
2803 | - Accounts | |
6b738c7a | 2804 | parameters: |
3e9e6f2f | 2805 | - $ref: '#/components/parameters/name' |
84f6e32c RK |
2806 | - name: withStats |
2807 | in: query | |
2808 | description: include view statistics for the last 30 days (only if authentified as the account user) | |
2809 | schema: | |
2810 | type: boolean | |
2811 | - $ref: '#/components/parameters/start' | |
2812 | - $ref: '#/components/parameters/count' | |
2813 | - $ref: '#/components/parameters/sort' | |
6b738c7a C |
2814 | responses: |
2815 | '200': | |
2816 | description: successful operation | |
3e9e6f2f RK |
2817 | content: |
2818 | application/json: | |
2819 | schema: | |
045bcd0d | 2820 | $ref: '#/components/schemas/VideoChannelList' |
c100a614 YB |
2821 | '/accounts/{name}/ratings': |
2822 | get: | |
b029d58a | 2823 | summary: List ratings of an account |
c100a614 YB |
2824 | security: |
2825 | - OAuth2: [] | |
2826 | tags: | |
b029d58a | 2827 | - Accounts |
c100a614 | 2828 | parameters: |
cb9d028a | 2829 | - $ref: '#/components/parameters/name' |
c100a614 YB |
2830 | - $ref: '#/components/parameters/start' |
2831 | - $ref: '#/components/parameters/count' | |
2832 | - $ref: '#/components/parameters/sort' | |
2833 | - name: rating | |
2834 | in: query | |
2835 | required: false | |
b3d1054e | 2836 | description: Optionally filter which ratings to retrieve |
c100a614 YB |
2837 | schema: |
2838 | type: string | |
2839 | enum: | |
2840 | - like | |
2841 | - dislike | |
2842 | responses: | |
2843 | '200': | |
2844 | description: successful operation | |
2845 | content: | |
2846 | application/json: | |
2847 | schema: | |
2848 | type: array | |
2849 | items: | |
2850 | $ref: '#/components/schemas/VideoRating' | |
3e9e6f2f | 2851 | '/videos/{id}/comment-threads': |
1569a818 | 2852 | get: |
b029d58a | 2853 | summary: List threads of a video |
1569a818 | 2854 | tags: |
b029d58a | 2855 | - Video Comments |
1569a818 | 2856 | parameters: |
cb9d028a | 2857 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f RK |
2858 | - $ref: '#/components/parameters/start' |
2859 | - $ref: '#/components/parameters/count' | |
71810d0b | 2860 | - $ref: '#/components/parameters/commentsSort' |
1569a818 DG |
2861 | responses: |
2862 | '200': | |
2863 | description: successful operation | |
3e9e6f2f RK |
2864 | content: |
2865 | application/json: | |
2866 | schema: | |
2867 | $ref: '#/components/schemas/CommentThreadResponse' | |
1569a818 | 2868 | post: |
b029d58a | 2869 | summary: Create a thread |
94ff4c23 | 2870 | security: |
3e9e6f2f | 2871 | - OAuth2: [] |
1569a818 | 2872 | tags: |
b029d58a | 2873 | - Video Comments |
1569a818 | 2874 | parameters: |
cb9d028a | 2875 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2876 | responses: |
2877 | '200': | |
2878 | description: successful operation | |
3e9e6f2f RK |
2879 | content: |
2880 | application/json: | |
2881 | schema: | |
2882 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
2c318664 RK |
2883 | '404': |
2884 | description: video does not exist | |
98639806 C |
2885 | requestBody: |
2886 | content: | |
2887 | application/json: | |
2888 | schema: | |
2889 | type: object | |
2890 | properties: | |
2891 | text: | |
bf3c3fea RK |
2892 | allOf: |
2893 | - $ref: '#/components/schemas/VideoComment/properties/text' | |
2894 | format: markdown | |
2895 | maxLength: 10000 | |
98639806 C |
2896 | required: |
2897 | - text | |
2898 | ||
3e9e6f2f | 2899 | '/videos/{id}/comment-threads/{threadId}': |
1569a818 | 2900 | get: |
b029d58a | 2901 | summary: Get a thread |
1569a818 | 2902 | tags: |
b029d58a | 2903 | - Video Comments |
1569a818 | 2904 | parameters: |
cb9d028a C |
2905 | - $ref: '#/components/parameters/idOrUUID' |
2906 | - $ref: '#/components/parameters/threadId' | |
1569a818 DG |
2907 | responses: |
2908 | '200': | |
2909 | description: successful operation | |
3e9e6f2f RK |
2910 | content: |
2911 | application/json: | |
2912 | schema: | |
2913 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
2914 | '/videos/{id}/comments/{commentId}': | |
1569a818 | 2915 | post: |
b029d58a | 2916 | summary: Reply to a thread of a video |
94ff4c23 | 2917 | security: |
3e9e6f2f | 2918 | - OAuth2: [] |
1569a818 | 2919 | tags: |
b029d58a | 2920 | - Video Comments |
1569a818 | 2921 | parameters: |
cb9d028a | 2922 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 2923 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
2924 | responses: |
2925 | '200': | |
2926 | description: successful operation | |
3e9e6f2f RK |
2927 | content: |
2928 | application/json: | |
2929 | schema: | |
2930 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
2c318664 RK |
2931 | '404': |
2932 | description: thread or video does not exist | |
98639806 C |
2933 | requestBody: |
2934 | content: | |
2935 | application/json: | |
2936 | schema: | |
2937 | type: object | |
2938 | properties: | |
2939 | text: | |
bf3c3fea RK |
2940 | allOf: |
2941 | - $ref: '#/components/schemas/VideoComment/properties/text' | |
2942 | format: markdown | |
2943 | maxLength: 10000 | |
98639806 C |
2944 | required: |
2945 | - text | |
2946 | ||
1569a818 | 2947 | delete: |
b029d58a | 2948 | summary: Delete a comment or a reply |
94ff4c23 | 2949 | security: |
3e9e6f2f | 2950 | - OAuth2: [] |
1569a818 | 2951 | tags: |
b029d58a | 2952 | - Video Comments |
1569a818 | 2953 | parameters: |
cb9d028a | 2954 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 2955 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
2956 | responses: |
2957 | '204': | |
c1843150 | 2958 | description: successful operation |
84f6e32c RK |
2959 | '403': |
2960 | description: cannot remove comment of another user | |
2961 | '404': | |
2962 | description: comment or video does not exist | |
2963 | '409': | |
2964 | description: comment is already deleted | |
3e9e6f2f | 2965 | '/videos/{id}/rate': |
1569a818 | 2966 | put: |
b029d58a | 2967 | summary: Like/dislike a video |
94ff4c23 | 2968 | security: |
3e9e6f2f | 2969 | - OAuth2: [] |
1569a818 | 2970 | tags: |
b029d58a | 2971 | - Video Rates |
1569a818 | 2972 | parameters: |
cb9d028a | 2973 | - $ref: '#/components/parameters/idOrUUID' |
4c440ced RK |
2974 | requestBody: |
2975 | content: | |
2976 | application/json: | |
2977 | schema: | |
2978 | type: object | |
2979 | properties: | |
2980 | rating: | |
2981 | type: string | |
2982 | enum: | |
2983 | - like | |
2984 | - dislike | |
9a320a06 RK |
2985 | required: |
2986 | - rating | |
1569a818 DG |
2987 | responses: |
2988 | '204': | |
c1843150 | 2989 | description: successful operation |
2c318664 RK |
2990 | '404': |
2991 | description: video does not exist | |
fb72c193 DL |
2992 | /search/videos: |
2993 | get: | |
2994 | tags: | |
2995 | - Search | |
b029d58a | 2996 | summary: Search videos |
fb72c193 | 2997 | parameters: |
84f6e32c RK |
2998 | - name: search |
2999 | in: query | |
3000 | required: true | |
3001 | allowEmptyValue: false | |
3002 | description: > | |
3003 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
3004 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
3005 | you can use the REST API to fetch the complete video information and interact with it. | |
3006 | schema: | |
3007 | type: string | |
59c794a5 | 3008 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 3009 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
3010 | - $ref: '#/components/parameters/tagsOneOf' |
3011 | - $ref: '#/components/parameters/tagsAllOf' | |
3012 | - $ref: '#/components/parameters/licenceOneOf' | |
3013 | - $ref: '#/components/parameters/languageOneOf' | |
3014 | - $ref: '#/components/parameters/nsfw' | |
3015 | - $ref: '#/components/parameters/filter' | |
3016 | - $ref: '#/components/parameters/skipCount' | |
3e9e6f2f RK |
3017 | - $ref: '#/components/parameters/start' |
3018 | - $ref: '#/components/parameters/count' | |
ad031145 | 3019 | - $ref: '#/components/parameters/searchTarget' |
fd5af7a2 | 3020 | - $ref: '#/components/parameters/videosSearchSort' |
ad031145 C |
3021 | - name: startDate |
3022 | in: query | |
ad031145 C |
3023 | description: Get videos that are published after this date |
3024 | schema: | |
3025 | type: string | |
3026 | format: date-time | |
3027 | - name: endDate | |
3028 | in: query | |
ad031145 C |
3029 | description: Get videos that are published before this date |
3030 | schema: | |
3031 | type: string | |
3032 | format: date-time | |
3033 | - name: originallyPublishedStartDate | |
3034 | in: query | |
ad031145 | 3035 | description: Get videos that are originally published after this date |
3e9e6f2f RK |
3036 | schema: |
3037 | type: string | |
ad031145 C |
3038 | format: date-time |
3039 | - name: originallyPublishedEndDate | |
3040 | in: query | |
ad031145 C |
3041 | description: Get videos that are originally published before this date |
3042 | schema: | |
3043 | type: string | |
3044 | format: date-time | |
3045 | - name: durationMin | |
3046 | in: query | |
ad031145 C |
3047 | description: Get videos that have this minimum duration |
3048 | schema: | |
06746a8b | 3049 | type: integer |
ad031145 C |
3050 | - name: durationMax |
3051 | in: query | |
ad031145 C |
3052 | description: Get videos that have this maximum duration |
3053 | schema: | |
06746a8b | 3054 | type: integer |
2c318664 RK |
3055 | callbacks: |
3056 | 'searchTarget === search-index': | |
3057 | $ref: '#/components/callbacks/searchIndex' | |
fb72c193 DL |
3058 | responses: |
3059 | '200': | |
3060 | description: successful operation | |
3e9e6f2f RK |
3061 | content: |
3062 | application/json: | |
3063 | schema: | |
048b6946 | 3064 | $ref: '#/components/schemas/VideoListResponse' |
2c318664 RK |
3065 | '500': |
3066 | description: search index unavailable | |
ad031145 C |
3067 | /search/video-channels: |
3068 | get: | |
3069 | tags: | |
3070 | - Search | |
3071 | summary: Search channels | |
3072 | parameters: | |
ad031145 C |
3073 | - name: search |
3074 | in: query | |
3075 | required: true | |
3076 | description: > | |
3077 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
3078 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
3079 | you can use the REST API to fetch the complete channel information and interact with it. | |
3080 | schema: | |
3081 | type: string | |
84f6e32c RK |
3082 | - $ref: '#/components/parameters/start' |
3083 | - $ref: '#/components/parameters/count' | |
3084 | - $ref: '#/components/parameters/searchTarget' | |
3085 | - $ref: '#/components/parameters/sort' | |
2c318664 RK |
3086 | callbacks: |
3087 | 'searchTarget === search-index': | |
3088 | $ref: '#/components/callbacks/searchIndex' | |
ad031145 C |
3089 | responses: |
3090 | '200': | |
3091 | description: successful operation | |
3092 | content: | |
3093 | application/json: | |
3094 | schema: | |
045bcd0d | 3095 | $ref: '#/components/schemas/VideoChannelList' |
2c318664 RK |
3096 | '500': |
3097 | description: search index unavailable | |
06746a8b RK |
3098 | /blocklist/accounts: |
3099 | get: | |
3100 | tags: | |
3101 | - Account Blocks | |
3102 | summary: List account blocks | |
3103 | security: | |
3104 | - OAuth2: | |
3105 | - admin | |
3106 | parameters: | |
3107 | - $ref: '#/components/parameters/start' | |
3108 | - $ref: '#/components/parameters/count' | |
3109 | - $ref: '#/components/parameters/sort' | |
3110 | responses: | |
3111 | '200': | |
3112 | description: successful operation | |
3113 | post: | |
3114 | tags: | |
3115 | - Account Blocks | |
3116 | summary: Block an account | |
3117 | security: | |
3118 | - OAuth2: | |
3119 | - admin | |
3120 | requestBody: | |
3121 | content: | |
3122 | application/json: | |
3123 | schema: | |
3124 | type: object | |
3125 | properties: | |
3126 | accountName: | |
3127 | type: string | |
84f6e32c | 3128 | example: chocobozzz@example.org |
06746a8b RK |
3129 | description: account to block, in the form `username@domain` |
3130 | required: | |
3131 | - accountName | |
3132 | responses: | |
3133 | '200': | |
3134 | description: successful operation | |
3135 | '409': | |
3136 | description: self-blocking forbidden | |
3137 | '/blocklist/accounts/{accountName}': | |
3138 | delete: | |
3139 | tags: | |
3140 | - Account Blocks | |
3141 | summary: Unblock an account by its handle | |
3142 | security: | |
3143 | - OAuth2: | |
3144 | - admin | |
3145 | parameters: | |
3146 | - name: accountName | |
3147 | in: path | |
3148 | required: true | |
3149 | description: account to unblock, in the form `username@domain` | |
3150 | schema: | |
3151 | type: string | |
3152 | responses: | |
3153 | '201': | |
3154 | description: successful operation | |
3155 | '404': | |
3156 | description: account or account block does not exist | |
3157 | /blocklist/servers: | |
3158 | get: | |
3159 | tags: | |
3160 | - Server Blocks | |
3161 | summary: List server blocks | |
3162 | security: | |
3163 | - OAuth2: | |
3164 | - admin | |
3165 | parameters: | |
3166 | - $ref: '#/components/parameters/start' | |
3167 | - $ref: '#/components/parameters/count' | |
3168 | - $ref: '#/components/parameters/sort' | |
3169 | responses: | |
3170 | '200': | |
3171 | description: successful operation | |
3172 | post: | |
3173 | tags: | |
3174 | - Server Blocks | |
3175 | summary: Block a server | |
3176 | security: | |
3177 | - OAuth2: | |
3178 | - admin | |
3179 | requestBody: | |
3180 | content: | |
3181 | application/json: | |
3182 | schema: | |
3183 | type: object | |
3184 | properties: | |
84f6e32c | 3185 | host: |
06746a8b | 3186 | type: string |
84f6e32c | 3187 | format: hostname |
06746a8b RK |
3188 | description: server domain to block |
3189 | required: | |
84f6e32c | 3190 | - host |
06746a8b RK |
3191 | responses: |
3192 | '200': | |
3193 | description: successful operation | |
3194 | '409': | |
3195 | description: self-blocking forbidden | |
3196 | '/blocklist/servers/{host}': | |
3197 | delete: | |
3198 | tags: | |
3199 | - Server Blocks | |
3200 | summary: Unblock a server by its domain | |
3201 | security: | |
3202 | - OAuth2: | |
3203 | - admin | |
3204 | parameters: | |
3205 | - name: host | |
3206 | in: path | |
3207 | required: true | |
3208 | description: server domain to unblock | |
3209 | schema: | |
3210 | type: string | |
84f6e32c | 3211 | format: hostname |
06746a8b RK |
3212 | responses: |
3213 | '201': | |
3214 | description: successful operation | |
3215 | '404': | |
3216 | description: account block does not exist | |
04b703f6 RK |
3217 | /redundancy/{host}: |
3218 | put: | |
3219 | tags: | |
3220 | - Instance Redundancy | |
3221 | summary: Update a server redundancy policy | |
3222 | security: | |
3223 | - OAuth2: | |
3224 | - admin | |
3225 | parameters: | |
3226 | - name: host | |
3227 | in: path | |
3228 | required: true | |
3229 | description: server domain to mirror | |
3230 | schema: | |
3231 | type: string | |
84f6e32c | 3232 | format: hostname |
04b703f6 RK |
3233 | requestBody: |
3234 | content: | |
3235 | application/json: | |
3236 | schema: | |
3237 | type: object | |
3238 | properties: | |
3239 | redundancyAllowed: | |
3240 | type: boolean | |
3241 | description: allow mirroring of the host's local videos | |
3242 | required: | |
3243 | - redundancyAllowed | |
3244 | responses: | |
3245 | '204': | |
3246 | description: successful operation | |
3247 | '404': | |
3248 | description: server is not already known | |
3249 | /redundancy/videos: | |
3250 | get: | |
3251 | tags: | |
3252 | - Video Mirroring | |
3253 | summary: List videos being mirrored | |
3254 | security: | |
3255 | - OAuth2: | |
3256 | - admin | |
3257 | parameters: | |
3258 | - name: target | |
3259 | in: query | |
3260 | required: true | |
3261 | description: direction of the mirror | |
3262 | schema: | |
3263 | type: string | |
3264 | enum: | |
3265 | - my-videos | |
3266 | - remote-videos | |
3267 | - $ref: '#/components/parameters/start' | |
3268 | - $ref: '#/components/parameters/count' | |
3269 | - $ref: '#/components/parameters/videoRedundanciesSort' | |
3270 | responses: | |
3271 | '200': | |
3272 | description: successful operation | |
3273 | content: | |
3274 | application/json: | |
3275 | schema: | |
3276 | type: array | |
3277 | items: | |
3278 | $ref: '#/components/schemas/VideoRedundancy' | |
3279 | post: | |
3280 | tags: | |
3281 | - Video Mirroring | |
3282 | summary: Mirror a video | |
3283 | security: | |
3284 | - OAuth2: | |
3285 | - admin | |
3286 | requestBody: | |
3287 | content: | |
3288 | application/json: | |
3289 | schema: | |
3290 | type: object | |
3291 | properties: | |
3292 | videoId: | |
b8375da9 | 3293 | $ref: '#/components/schemas/Video/properties/id' |
04b703f6 RK |
3294 | required: |
3295 | - videoId | |
3296 | responses: | |
3297 | '204': | |
3298 | description: successful operation | |
3299 | '400': | |
3300 | description: cannot mirror a local video | |
3301 | '404': | |
3302 | description: video does not exist | |
3303 | '409': | |
3304 | description: video is already mirrored | |
3305 | /redundancy/videos/{redundancyId}: | |
3306 | delete: | |
3307 | tags: | |
3308 | - Video Mirroring | |
3309 | summary: Delete a mirror done on a video | |
3310 | security: | |
3311 | - OAuth2: | |
3312 | - admin | |
3313 | parameters: | |
3314 | - name: redundancyId | |
3315 | in: path | |
3316 | required: true | |
3317 | description: id of an existing redundancy on a video | |
3318 | schema: | |
3319 | type: string | |
3320 | responses: | |
3321 | '204': | |
3322 | description: successful operation | |
3323 | '404': | |
3324 | description: video redundancy not found | |
06746a8b RK |
3325 | '/feeds/video-comments.{format}': |
3326 | get: | |
3327 | tags: | |
3328 | - Feeds | |
3329 | summary: List comments on videos | |
3330 | parameters: | |
3331 | - name: format | |
3332 | in: path | |
3333 | required: true | |
00494d6e | 3334 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' |
06746a8b RK |
3335 | schema: |
3336 | type: string | |
3337 | enum: | |
3338 | - xml | |
3339 | - rss | |
3340 | - rss2 | |
3341 | - atom | |
3342 | - atom1 | |
3343 | - json | |
3344 | - json1 | |
3345 | - name: videoId | |
d73810be | 3346 | in: query |
06746a8b RK |
3347 | description: 'limit listing to a specific video' |
3348 | schema: | |
3349 | type: string | |
00494d6e RK |
3350 | - name: accountId |
3351 | in: query | |
3352 | description: 'limit listing to a specific account' | |
3353 | schema: | |
3354 | type: string | |
3355 | - name: accountName | |
3356 | in: query | |
3357 | description: 'limit listing to a specific account' | |
3358 | schema: | |
3359 | type: string | |
3360 | - name: videoChannelId | |
3361 | in: query | |
3362 | description: 'limit listing to a specific video channel' | |
3363 | schema: | |
3364 | type: string | |
3365 | - name: videoChannelName | |
3366 | in: query | |
3367 | description: 'limit listing to a specific video channel' | |
3368 | schema: | |
3369 | type: string | |
06746a8b RK |
3370 | responses: |
3371 | '204': | |
3372 | description: successful operation | |
3373 | headers: | |
3374 | Cache-Control: | |
3375 | schema: | |
3376 | type: string | |
3377 | default: 'max-age=900' # 15 min cache | |
3378 | content: | |
3379 | application/xml: | |
3380 | schema: | |
3381 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3382 | examples: |
3383 | nightly: | |
3384 | externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local | |
06746a8b RK |
3385 | application/rss+xml: |
3386 | schema: | |
3387 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3388 | examples: |
3389 | nightly: | |
3390 | externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local | |
06746a8b RK |
3391 | text/xml: |
3392 | schema: | |
3393 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3394 | examples: |
3395 | nightly: | |
3396 | externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local | |
06746a8b RK |
3397 | application/atom+xml: |
3398 | schema: | |
3399 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3400 | examples: |
3401 | nightly: | |
3402 | externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local | |
06746a8b RK |
3403 | application/json: |
3404 | schema: | |
3405 | type: object | |
64df4b65 RK |
3406 | examples: |
3407 | nightly: | |
3408 | externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local | |
00494d6e RK |
3409 | '400': |
3410 | x-summary: field inconsistencies | |
3411 | description: > | |
3412 | Arises when: | |
3413 | - videoId filter is mixed with a channel filter | |
3414 | '404': | |
3415 | description: video, video channel or account not found | |
06746a8b RK |
3416 | '406': |
3417 | description: accept header unsupported | |
3418 | '/feeds/videos.{format}': | |
3419 | get: | |
3420 | tags: | |
3421 | - Feeds | |
3422 | summary: List videos | |
3423 | parameters: | |
3424 | - name: format | |
3425 | in: path | |
3426 | required: true | |
00494d6e | 3427 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' |
06746a8b RK |
3428 | schema: |
3429 | type: string | |
3430 | enum: | |
3431 | - xml | |
3432 | - rss | |
3433 | - rss2 | |
3434 | - atom | |
3435 | - atom1 | |
3436 | - json | |
3437 | - json1 | |
3438 | - name: accountId | |
d73810be | 3439 | in: query |
06746a8b RK |
3440 | description: 'limit listing to a specific account' |
3441 | schema: | |
3442 | type: string | |
3443 | - name: accountName | |
d73810be | 3444 | in: query |
06746a8b RK |
3445 | description: 'limit listing to a specific account' |
3446 | schema: | |
3447 | type: string | |
3448 | - name: videoChannelId | |
d73810be | 3449 | in: query |
06746a8b RK |
3450 | description: 'limit listing to a specific video channel' |
3451 | schema: | |
3452 | type: string | |
3453 | - name: videoChannelName | |
d73810be | 3454 | in: query |
06746a8b RK |
3455 | description: 'limit listing to a specific video channel' |
3456 | schema: | |
3457 | type: string | |
84f6e32c RK |
3458 | - $ref: '#/components/parameters/sort' |
3459 | - $ref: '#/components/parameters/nsfw' | |
3460 | - $ref: '#/components/parameters/filter' | |
06746a8b RK |
3461 | responses: |
3462 | '204': | |
3463 | description: successful operation | |
3464 | headers: | |
3465 | Cache-Control: | |
3466 | schema: | |
3467 | type: string | |
3468 | default: 'max-age=900' # 15 min cache | |
3469 | content: | |
3470 | application/xml: | |
3471 | schema: | |
3472 | $ref: '#/components/schemas/VideosForXML' | |
84f6e32c RK |
3473 | examples: |
3474 | nightly: | |
3475 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | |
06746a8b RK |
3476 | application/rss+xml: |
3477 | schema: | |
3478 | $ref: '#/components/schemas/VideosForXML' | |
64df4b65 RK |
3479 | examples: |
3480 | nightly: | |
3481 | externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local | |
06746a8b RK |
3482 | text/xml: |
3483 | schema: | |
3484 | $ref: '#/components/schemas/VideosForXML' | |
64df4b65 RK |
3485 | examples: |
3486 | nightly: | |
3487 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | |
06746a8b RK |
3488 | application/atom+xml: |
3489 | schema: | |
3490 | $ref: '#/components/schemas/VideosForXML' | |
64df4b65 RK |
3491 | examples: |
3492 | nightly: | |
3493 | externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local | |
06746a8b RK |
3494 | application/json: |
3495 | schema: | |
3496 | type: object | |
64df4b65 RK |
3497 | examples: |
3498 | nightly: | |
3499 | externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local | |
00494d6e RK |
3500 | '404': |
3501 | description: video channel or account not found | |
06746a8b RK |
3502 | '406': |
3503 | description: accept header unsupported | |
64df4b65 RK |
3504 | '/feeds/subscriptions.{format}': |
3505 | get: | |
3506 | tags: | |
3507 | - Feeds | |
3508 | - Account | |
3509 | summary: List videos of subscriptions tied to a token | |
3510 | parameters: | |
3511 | - name: format | |
3512 | in: path | |
3513 | required: true | |
3514 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' | |
3515 | schema: | |
3516 | type: string | |
3517 | enum: | |
3518 | - xml | |
3519 | - rss | |
3520 | - rss2 | |
3521 | - atom | |
3522 | - atom1 | |
3523 | - json | |
3524 | - json1 | |
3525 | - name: accountId | |
3526 | in: query | |
3527 | description: limit listing to a specific account | |
3528 | schema: | |
3529 | type: string | |
3530 | required: true | |
3531 | - name: token | |
3532 | in: query | |
3533 | description: private token allowing access | |
3534 | schema: | |
3535 | type: string | |
3536 | required: true | |
3537 | - $ref: '#/components/parameters/sort' | |
3538 | - $ref: '#/components/parameters/nsfw' | |
3539 | - $ref: '#/components/parameters/filter' | |
3540 | responses: | |
3541 | '204': | |
3542 | description: successful operation | |
3543 | headers: | |
3544 | Cache-Control: | |
3545 | schema: | |
3546 | type: string | |
3547 | default: 'max-age=900' # 15 min cache | |
3548 | content: | |
3549 | application/xml: | |
3550 | schema: | |
3551 | $ref: '#/components/schemas/VideosForXML' | |
3552 | application/rss+xml: | |
3553 | schema: | |
3554 | $ref: '#/components/schemas/VideosForXML' | |
3555 | text/xml: | |
3556 | schema: | |
3557 | $ref: '#/components/schemas/VideosForXML' | |
3558 | application/atom+xml: | |
3559 | schema: | |
3560 | $ref: '#/components/schemas/VideosForXML' | |
3561 | application/json: | |
3562 | schema: | |
3563 | type: object | |
3564 | '406': | |
3565 | description: accept header unsupported | |
7461d440 RK |
3566 | /plugins: |
3567 | get: | |
3568 | tags: | |
3569 | - Plugins | |
3570 | summary: List plugins | |
3571 | security: | |
3572 | - OAuth2: | |
3573 | - admin | |
3574 | parameters: | |
3575 | - name: pluginType | |
3576 | in: query | |
3577 | schema: | |
3578 | type: integer | |
3579 | - name: uninstalled | |
3580 | in: query | |
3581 | schema: | |
3582 | type: boolean | |
3583 | - $ref: '#/components/parameters/start' | |
3584 | - $ref: '#/components/parameters/count' | |
3585 | - $ref: '#/components/parameters/sort' | |
3586 | responses: | |
3587 | '200': | |
3588 | description: successful operation | |
3589 | content: | |
3590 | application/json: | |
3591 | schema: | |
3592 | $ref: '#/components/schemas/PluginResponse' | |
3593 | /plugins/available: | |
3594 | get: | |
3595 | tags: | |
3596 | - Plugins | |
3597 | summary: List available plugins | |
3598 | security: | |
3599 | - OAuth2: | |
3600 | - admin | |
3601 | parameters: | |
3602 | - name: search | |
3603 | in: query | |
3604 | schema: | |
3605 | type: string | |
3606 | - name: pluginType | |
3607 | in: query | |
3608 | schema: | |
3609 | type: integer | |
3610 | - name: currentPeerTubeEngine | |
3611 | in: query | |
3612 | schema: | |
3613 | type: string | |
3614 | - $ref: '#/components/parameters/start' | |
3615 | - $ref: '#/components/parameters/count' | |
3616 | - $ref: '#/components/parameters/sort' | |
3617 | responses: | |
3618 | '200': | |
3619 | description: successful operation | |
3620 | content: | |
3621 | application/json: | |
3622 | schema: | |
3623 | $ref: '#/components/schemas/PluginResponse' | |
3624 | '503': | |
3625 | description: plugin index unavailable | |
3626 | /plugins/install: | |
3627 | post: | |
3628 | tags: | |
3629 | - Plugins | |
3630 | summary: Install a plugin | |
3631 | security: | |
3632 | - OAuth2: | |
3633 | - admin | |
3634 | requestBody: | |
3635 | content: | |
3636 | application/json: | |
3637 | schema: | |
3638 | oneOf: | |
3639 | - type: object | |
3640 | properties: | |
3641 | npmName: | |
3642 | type: string | |
84f6e32c | 3643 | example: peertube-plugin-auth-ldap |
7461d440 RK |
3644 | required: |
3645 | - npmName | |
3646 | additionalProperties: false | |
3647 | - type: object | |
3648 | properties: | |
3649 | path: | |
3650 | type: string | |
3651 | required: | |
3652 | - path | |
3653 | additionalProperties: false | |
3654 | responses: | |
3655 | '204': | |
3656 | description: successful operation | |
3657 | '400': | |
3658 | description: should have either `npmName` or `path` set | |
3659 | /plugins/update: | |
3660 | post: | |
3661 | tags: | |
3662 | - Plugins | |
3663 | summary: Update a plugin | |
3664 | security: | |
3665 | - OAuth2: | |
3666 | - admin | |
3667 | requestBody: | |
3668 | content: | |
3669 | application/json: | |
3670 | schema: | |
3671 | oneOf: | |
3672 | - type: object | |
3673 | properties: | |
3674 | npmName: | |
3675 | type: string | |
84f6e32c | 3676 | example: peertube-plugin-auth-ldap |
7461d440 RK |
3677 | required: |
3678 | - npmName | |
3679 | additionalProperties: false | |
3680 | - type: object | |
3681 | properties: | |
3682 | path: | |
3683 | type: string | |
3684 | required: | |
3685 | - path | |
3686 | additionalProperties: false | |
3687 | responses: | |
3688 | '204': | |
3689 | description: successful operation | |
3690 | '400': | |
3691 | description: should have either `npmName` or `path` set | |
3692 | '404': | |
3693 | description: existing plugin not found | |
3694 | /plugins/uninstall: | |
3695 | post: | |
3696 | tags: | |
3697 | - Plugins | |
3698 | summary: Uninstall a plugin | |
3699 | security: | |
3700 | - OAuth2: | |
3701 | - admin | |
3702 | requestBody: | |
3703 | content: | |
3704 | application/json: | |
3705 | schema: | |
3706 | type: object | |
3707 | properties: | |
3708 | npmName: | |
3709 | type: string | |
84f6e32c RK |
3710 | description: name of the plugin/theme in its package.json |
3711 | example: peertube-plugin-auth-ldap | |
7461d440 RK |
3712 | required: |
3713 | - npmName | |
3714 | responses: | |
3715 | '204': | |
3716 | description: successful operation | |
3717 | '404': | |
3718 | description: existing plugin not found | |
3719 | /plugins/{npmName}: | |
3720 | get: | |
3721 | tags: | |
3722 | - Plugins | |
3723 | summary: Get a plugin | |
3724 | security: | |
3725 | - OAuth2: | |
3726 | - admin | |
3727 | parameters: | |
84f6e32c | 3728 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3729 | responses: |
3730 | '200': | |
3731 | description: successful operation | |
3732 | content: | |
3733 | application/json: | |
3734 | schema: | |
3735 | $ref: '#/components/schemas/Plugin' | |
3736 | '404': | |
3737 | description: plugin not found | |
3738 | /plugins/{npmName}/settings: | |
3739 | put: | |
3740 | tags: | |
3741 | - Plugins | |
3742 | summary: Set a plugin's settings | |
3743 | security: | |
3744 | - OAuth2: | |
3745 | - admin | |
3746 | parameters: | |
84f6e32c | 3747 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3748 | requestBody: |
3749 | content: | |
3750 | application/json: | |
3751 | schema: | |
3752 | type: object | |
3753 | properties: | |
3754 | settings: | |
3755 | type: object | |
3756 | additionalProperties: true | |
3757 | responses: | |
3758 | '204': | |
3759 | description: successful operation | |
3760 | '404': | |
3761 | description: plugin not found | |
3762 | /plugins/{npmName}/public-settings: | |
3763 | get: | |
3764 | tags: | |
3765 | - Plugins | |
3766 | summary: Get a plugin's public settings | |
7461d440 | 3767 | parameters: |
84f6e32c | 3768 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3769 | responses: |
3770 | '200': | |
3771 | description: successful operation | |
3772 | content: | |
3773 | application/json: | |
3774 | schema: | |
3775 | type: object | |
3776 | additionalProperties: true | |
3777 | '404': | |
3778 | description: plugin not found | |
3779 | /plugins/{npmName}/registered-settings: | |
3780 | get: | |
3781 | tags: | |
3782 | - Plugins | |
3783 | summary: Get a plugin's registered settings | |
3784 | security: | |
3785 | - OAuth2: | |
3786 | - admin | |
3787 | parameters: | |
84f6e32c | 3788 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3789 | responses: |
3790 | '200': | |
3791 | description: successful operation | |
3792 | content: | |
3793 | application/json: | |
3794 | schema: | |
3795 | type: object | |
3796 | additionalProperties: true | |
3797 | '404': | |
3798 | description: plugin not found | |
3e9e6f2f | 3799 | servers: |
8f9e8be1 | 3800 | - url: 'https://peertube2.cpy.re/api/v1' |
f4d59981 | 3801 | description: Live Test Server (live data - latest nightly version) |
6441981b | 3802 | - url: 'https://peertube3.cpy.re/api/v1' |
b029d58a | 3803 | description: Live Test Server (live data - latest RC version) |
f4d59981 RK |
3804 | - url: 'https://peertube.cpy.re/api/v1' |
3805 | description: Live Test Server (live data - stable version) | |
3e9e6f2f RK |
3806 | components: |
3807 | parameters: | |
3808 | start: | |
3809 | name: start | |
3810 | in: query | |
3811 | required: false | |
06746a8b | 3812 | description: Offset used to paginate results |
3e9e6f2f | 3813 | schema: |
06746a8b | 3814 | type: integer |
84f6e32c | 3815 | minimum: 0 |
3e9e6f2f RK |
3816 | count: |
3817 | name: count | |
3818 | in: query | |
3819 | required: false | |
06746a8b | 3820 | description: "Number of items to return" |
3e9e6f2f | 3821 | schema: |
06746a8b | 3822 | type: integer |
84f6e32c | 3823 | default: 15 |
06746a8b RK |
3824 | maximum: 100 |
3825 | minimum: 1 | |
3e9e6f2f RK |
3826 | sort: |
3827 | name: sort | |
3828 | in: query | |
3829 | required: false | |
84f6e32c | 3830 | description: Sort column |
3e9e6f2f RK |
3831 | schema: |
3832 | type: string | |
84f6e32c | 3833 | example: -createdAt |
8491293b RK |
3834 | search: |
3835 | name: search | |
3836 | in: query | |
3837 | required: false | |
3838 | description: Plain text search, applied to various parts of the model depending on endpoint | |
3839 | schema: | |
3840 | type: string | |
ad031145 C |
3841 | searchTarget: |
3842 | name: searchTarget | |
3843 | in: query | |
3844 | required: false | |
3845 | description: > | |
3846 | If the administrator enabled search index support, you can override the default search target. | |
3847 | ||
3848 | ||
3849 | **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. | |
84f6e32c | 3850 | It means the instance may not yet know the objects you fetched. If you want to load video/channel information: |
ad031145 C |
3851 | * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), |
3852 | then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. | |
3853 | After that, you can use the classic REST API endpoints to fetch the complete object or interact with it | |
84f6e32c | 3854 | * 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 |
ad031145 C |
3855 | the data from the origin instance API |
3856 | schema: | |
3857 | type: string | |
3858 | enum: | |
3859 | - 'local' | |
3860 | - 'search-index' | |
fd5af7a2 RK |
3861 | videosSort: |
3862 | name: sort | |
3863 | in: query | |
3864 | required: false | |
3865 | description: Sort videos by criteria | |
3866 | schema: | |
3867 | type: string | |
3868 | enum: | |
04b703f6 | 3869 | - name |
fd5af7a2 RK |
3870 | - -duration |
3871 | - -createdAt | |
3872 | - -publishedAt | |
3873 | - -views | |
3874 | - -likes | |
3875 | - -trending | |
923d3d5a | 3876 | - -hot |
fd5af7a2 RK |
3877 | videosSearchSort: |
3878 | name: sort | |
3879 | in: query | |
3880 | required: false | |
3881 | description: Sort videos by criteria | |
3882 | schema: | |
3883 | type: string | |
3884 | enum: | |
04b703f6 | 3885 | - name |
fd5af7a2 RK |
3886 | - -duration |
3887 | - -createdAt | |
3888 | - -publishedAt | |
3889 | - -views | |
3890 | - -likes | |
3891 | - -match | |
71810d0b RK |
3892 | commentsSort: |
3893 | name: sort | |
3894 | in: query | |
3895 | required: false | |
3896 | description: Sort comments by criteria | |
3897 | schema: | |
3898 | type: string | |
3899 | enum: | |
3900 | - -createdAt | |
3901 | - -totalReplies | |
fd5af7a2 RK |
3902 | blacklistsSort: |
3903 | name: sort | |
3904 | in: query | |
3905 | required: false | |
3906 | description: Sort blacklists by criteria | |
3907 | schema: | |
3908 | type: string | |
3909 | enum: | |
3910 | - -id | |
04b703f6 | 3911 | - name |
fd5af7a2 RK |
3912 | - -duration |
3913 | - -views | |
3914 | - -likes | |
3915 | - -dislikes | |
3916 | - -uuid | |
3917 | - -createdAt | |
8491293b RK |
3918 | usersSearch: |
3919 | name: search | |
3920 | in: query | |
3921 | required: false | |
3922 | description: Plain text search that will match with user usernames or emails | |
3923 | schema: | |
3924 | type: string | |
3925 | usersBlocked: | |
3926 | name: blocked | |
3927 | in: query | |
3928 | required: false | |
3929 | description: Filter results down to (un)banned users | |
3930 | schema: | |
3931 | type: boolean | |
fd5af7a2 RK |
3932 | usersSort: |
3933 | name: sort | |
3934 | in: query | |
3935 | required: false | |
3936 | description: Sort users by criteria | |
3937 | schema: | |
3938 | type: string | |
3939 | enum: | |
3940 | - -id | |
3941 | - -username | |
3942 | - -createdAt | |
3943 | abusesSort: | |
3944 | name: sort | |
3945 | in: query | |
3946 | required: false | |
3947 | description: Sort abuses by criteria | |
3948 | schema: | |
3949 | type: string | |
3950 | enum: | |
3951 | - -id | |
3952 | - -createdAt | |
3953 | - -state | |
04b703f6 RK |
3954 | videoRedundanciesSort: |
3955 | name: sort | |
3956 | in: query | |
3957 | required: false | |
3958 | description: Sort abuses by criteria | |
3959 | schema: | |
3960 | type: string | |
3961 | enum: | |
3962 | - name | |
3e9e6f2f RK |
3963 | name: |
3964 | name: name | |
3965 | in: path | |
3966 | required: true | |
f2eb23cd | 3967 | description: The username or handle of the account |
3e9e6f2f RK |
3968 | schema: |
3969 | type: string | |
84f6e32c | 3970 | example: chocobozzz | chocobozzz@example.org |
3e9e6f2f RK |
3971 | id: |
3972 | name: id | |
3973 | in: path | |
3974 | required: true | |
3975 | description: The user id | |
3976 | schema: | |
b8375da9 | 3977 | $ref: '#/components/schemas/id' |
cb9d028a | 3978 | idOrUUID: |
3e9e6f2f RK |
3979 | name: id |
3980 | in: path | |
3981 | required: true | |
c1843150 | 3982 | description: The object id or uuid |
3e9e6f2f | 3983 | schema: |
84f6e32c | 3984 | oneOf: |
b8375da9 | 3985 | - $ref: '#/components/schemas/id' |
f880a5e7 | 3986 | - $ref: '#/components/schemas/UUIDv4' |
c1843150 C |
3987 | playlistElementId: |
3988 | name: playlistElementId | |
3989 | in: path | |
3990 | required: true | |
3991 | description: Playlist element id | |
3992 | schema: | |
b8375da9 | 3993 | $ref: '#/components/schemas/id' |
50e16ccf C |
3994 | abuseId: |
3995 | name: abuseId | |
3996 | in: path | |
3997 | required: true | |
310b5219 | 3998 | description: Abuse id |
50e16ccf | 3999 | schema: |
b8375da9 | 4000 | $ref: '#/components/schemas/Abuse/properties/id' |
668b7f09 C |
4001 | abuseMessageId: |
4002 | name: abuseMessageId | |
4003 | in: path | |
4004 | required: true | |
4005 | description: Abuse message id | |
4006 | schema: | |
b8375da9 | 4007 | $ref: '#/components/schemas/AbuseMessage/properties/id' |
67ae04a5 C |
4008 | captionLanguage: |
4009 | name: captionLanguage | |
4010 | in: path | |
4011 | required: true | |
4012 | description: The caption language | |
4013 | schema: | |
b8375da9 | 4014 | $ref: '#/components/schemas/VideoLanguageSet' |
9ce3d302 C |
4015 | channelHandle: |
4016 | name: channelHandle | |
3e9e6f2f RK |
4017 | in: path |
4018 | required: true | |
84f6e32c | 4019 | description: The video channel handle |
3e9e6f2f RK |
4020 | schema: |
4021 | type: string | |
84f6e32c | 4022 | example: my_username | my_username@example.com |
cb9d028a C |
4023 | subscriptionHandle: |
4024 | name: subscriptionHandle | |
4025 | in: path | |
4026 | required: true | |
84f6e32c | 4027 | description: The subscription handle |
cb9d028a C |
4028 | schema: |
4029 | type: string | |
84f6e32c | 4030 | example: my_username | my_username@example.com |
cb9d028a | 4031 | threadId: |
3e9e6f2f RK |
4032 | name: threadId |
4033 | in: path | |
4034 | required: true | |
cb9d028a C |
4035 | description: The thread id (root comment id) |
4036 | schema: | |
b8375da9 | 4037 | $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id' |
cb9d028a C |
4038 | commentId: |
4039 | name: commentId | |
4040 | in: path | |
4041 | required: true | |
3e9e6f2f RK |
4042 | description: The comment id |
4043 | schema: | |
b8375da9 | 4044 | $ref: '#/components/schemas/VideoComment/properties/id' |
1fd61899 C |
4045 | isLive: |
4046 | name: isLive | |
4047 | in: query | |
4048 | required: false | |
4049 | description: whether or not the video is a live | |
4050 | schema: | |
4051 | type: boolean | |
fd5af7a2 RK |
4052 | categoryOneOf: |
4053 | name: categoryOneOf | |
4054 | in: query | |
4055 | required: false | |
40cfb36b | 4056 | description: category id of the video (see [/videos/categories](#operation/getCategories)) |
fd5af7a2 RK |
4057 | schema: |
4058 | oneOf: | |
b8375da9 | 4059 | - $ref: '#/components/schemas/VideoCategorySet' |
fd5af7a2 RK |
4060 | - type: array |
4061 | items: | |
b8375da9 | 4062 | $ref: '#/components/schemas/VideoCategorySet' |
2beb9895 RK |
4063 | style: form |
4064 | explode: false | |
fd5af7a2 RK |
4065 | tagsOneOf: |
4066 | name: tagsOneOf | |
4067 | in: query | |
4068 | required: false | |
4069 | description: tag(s) of the video | |
4070 | schema: | |
4071 | oneOf: | |
4072 | - type: string | |
4073 | - type: array | |
f6d6e7f8 | 4074 | maxItems: 5 |
fd5af7a2 RK |
4075 | items: |
4076 | type: string | |
2beb9895 RK |
4077 | style: form |
4078 | explode: false | |
fd5af7a2 RK |
4079 | tagsAllOf: |
4080 | name: tagsAllOf | |
4081 | in: query | |
4082 | required: false | |
4083 | description: tag(s) of the video, where all should be present in the video | |
4084 | schema: | |
4085 | oneOf: | |
4086 | - type: string | |
4087 | - type: array | |
4088 | items: | |
4089 | type: string | |
2beb9895 RK |
4090 | style: form |
4091 | explode: false | |
fd5af7a2 RK |
4092 | languageOneOf: |
4093 | name: languageOneOf | |
4094 | in: query | |
4095 | required: false | |
40cfb36b | 4096 | description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language |
fd5af7a2 RK |
4097 | schema: |
4098 | oneOf: | |
b8375da9 | 4099 | - $ref: '#/components/schemas/VideoLanguageSet' |
fd5af7a2 RK |
4100 | - type: array |
4101 | items: | |
b8375da9 | 4102 | $ref: '#/components/schemas/VideoLanguageSet' |
2beb9895 RK |
4103 | style: form |
4104 | explode: false | |
fd5af7a2 RK |
4105 | licenceOneOf: |
4106 | name: licenceOneOf | |
4107 | in: query | |
4108 | required: false | |
40cfb36b | 4109 | description: licence id of the video (see [/videos/licences](#operation/getLicences)) |
fd5af7a2 RK |
4110 | schema: |
4111 | oneOf: | |
b8375da9 | 4112 | - $ref: '#/components/schemas/VideoLicenceSet' |
fd5af7a2 RK |
4113 | - type: array |
4114 | items: | |
b8375da9 | 4115 | $ref: '#/components/schemas/VideoLicenceSet' |
2beb9895 RK |
4116 | style: form |
4117 | explode: false | |
59c794a5 C |
4118 | skipCount: |
4119 | name: skipCount | |
4120 | in: query | |
4121 | required: false | |
4122 | description: if you don't need the `total` in the response | |
4123 | schema: | |
4124 | type: string | |
4125 | enum: | |
4126 | - 'true' | |
4127 | - 'false' | |
06746a8b | 4128 | default: 'false' |
fd5af7a2 RK |
4129 | nsfw: |
4130 | name: nsfw | |
4131 | in: query | |
4132 | required: false | |
4133 | description: whether to include nsfw videos, if any | |
4134 | schema: | |
4135 | type: string | |
4136 | enum: | |
4137 | - 'true' | |
4138 | - 'false' | |
4139 | filter: | |
4140 | name: filter | |
4141 | in: query | |
4142 | required: false | |
4143 | description: > | |
0aa52e17 | 4144 | Special filters which might require special rights: |
fd5af7a2 RK |
4145 | * `local` - only videos local to the instance |
4146 | * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges) | |
0aa52e17 | 4147 | * `all` - all videos, showing private and unlisted videos (requires Admin privileges) |
fd5af7a2 RK |
4148 | schema: |
4149 | type: string | |
4150 | enum: | |
4151 | - local | |
4152 | - all-local | |
e76d5784 RK |
4153 | subscriptionsUris: |
4154 | name: uris | |
4155 | in: query | |
4156 | required: true | |
4157 | description: list of uris to check if each is part of the user subscriptions | |
4158 | schema: | |
4159 | type: array | |
4160 | items: | |
4161 | type: string | |
84f6e32c RK |
4162 | format: uri |
4163 | npmName: | |
4164 | name: npmName | |
4165 | in: path | |
4166 | required: true | |
4167 | description: name of the plugin/theme on npmjs.com or in its package.json | |
4168 | schema: | |
4169 | type: string | |
4170 | example: peertube-plugin-auth-ldap | |
040d6896 RK |
4171 | jobType: |
4172 | name: jobType | |
4173 | in: query | |
4174 | required: false | |
4175 | description: job type | |
4176 | schema: | |
4177 | type: string | |
4178 | enum: | |
4179 | - activitypub-follow | |
4180 | - activitypub-http-broadcast | |
4181 | - activitypub-http-fetcher | |
4182 | - activitypub-http-unicast | |
4183 | ||
4184 | - video-transcoding | |
4185 | - video-file-import | |
4186 | - video-import | |
4187 | - videos-views | |
4188 | - activitypub-refresher | |
4189 | - video-redundancy | |
4190 | - video-live-ending | |
3e9e6f2f RK |
4191 | securitySchemes: |
4192 | OAuth2: | |
3c5e02f3 | 4193 | description: | |
3e9e6f2f | 4194 | Authenticating via OAuth requires the following steps: |
3c5e02f3 | 4195 | - Have an activated account |
9817060f | 4196 | - [Generate](https://docs.joinpeertube.org/api-rest-getting-started) a |
3c5e02f3 RK |
4197 | Bearer Token for that account at `/api/v1/users/token` |
4198 | - Make authenticated requests, putting *Authorization: Bearer <token\>* | |
4199 | - Profit, depending on the role assigned to the account | |
3e9e6f2f | 4200 | |
3c5e02f3 RK |
4201 | Note that the __access token is valid for 1 day__ and, and is given |
4202 | along with a __refresh token valid for 2 weeks__. | |
3e9e6f2f RK |
4203 | type: oauth2 |
4204 | flows: | |
4205 | password: | |
4206 | tokenUrl: 'https://peertube.example.com/api/v1/users/token' | |
4207 | scopes: | |
4208 | admin: Admin scope | |
4209 | moderator: Moderator scope | |
4210 | user: User scope | |
4211 | schemas: | |
b8375da9 RK |
4212 | # Resuable core properties |
4213 | id: | |
4214 | type: integer | |
4215 | minimum: 1 | |
4216 | example: 42 | |
f880a5e7 RK |
4217 | UUIDv4: |
4218 | type: string | |
4219 | format: uuid | |
4220 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | |
4221 | pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' | |
f880a5e7 RK |
4222 | minLength: 36 |
4223 | maxLength: 36 | |
b8375da9 RK |
4224 | username: |
4225 | type: string | |
77b0c6b5 | 4226 | description: immutable name of the user, used to find or mention its actor |
b8375da9 RK |
4227 | example: chocobozzz |
4228 | pattern: '/^[a-z0-9._]{1,50}$/' | |
4229 | minLength: 1 | |
4230 | maxLength: 50 | |
4231 | usernameChannel: | |
4232 | type: string | |
77b0c6b5 | 4233 | description: immutable name of the channel, used to interact with its actor |
9a320a06 | 4234 | example: framasoft_videos |
b8375da9 RK |
4235 | pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/' |
4236 | password: | |
4237 | type: string | |
4238 | format: password | |
b8375da9 RK |
4239 | minLength: 6 |
4240 | maxLength: 255 | |
f880a5e7 | 4241 | |
40cfb36b RK |
4242 | VideoCategorySet: |
4243 | type: integer | |
4244 | description: category id of the video (see [/videos/categories](#operation/getCategories)) | |
b8375da9 | 4245 | example: 15 |
dfcb6f50 | 4246 | VideoConstantNumber-Category: |
3e9e6f2f RK |
4247 | properties: |
4248 | id: | |
40cfb36b | 4249 | $ref: '#/components/schemas/VideoCategorySet' |
3e9e6f2f RK |
4250 | label: |
4251 | type: string | |
b8375da9 | 4252 | example: Science & Technology |
40cfb36b RK |
4253 | |
4254 | VideoLicenceSet: | |
4255 | type: integer | |
4256 | description: licence id of the video (see [/videos/licences](#operation/getLicences)) | |
b8375da9 | 4257 | example: 2 |
dfcb6f50 RK |
4258 | VideoConstantNumber-Licence: |
4259 | properties: | |
4260 | id: | |
40cfb36b | 4261 | $ref: '#/components/schemas/VideoLicenceSet' |
dfcb6f50 RK |
4262 | label: |
4263 | type: string | |
b8375da9 RK |
4264 | example: Attribution - Share Alike |
4265 | ||
40cfb36b RK |
4266 | VideoLanguageSet: |
4267 | type: string | |
4268 | description: language id of the video (see [/videos/languages](#operation/getLanguages)) | |
b8375da9 | 4269 | example: en |
dfcb6f50 | 4270 | VideoConstantString-Language: |
3e9e6f2f RK |
4271 | properties: |
4272 | id: | |
40cfb36b | 4273 | $ref: '#/components/schemas/VideoLanguageSet' |
3e9e6f2f RK |
4274 | label: |
4275 | type: string | |
b8375da9 | 4276 | example: English |
c1843150 C |
4277 | |
4278 | VideoPlaylistPrivacySet: | |
4279 | type: integer | |
4280 | enum: | |
4281 | - 1 | |
4282 | - 2 | |
4283 | - 3 | |
40cfb36b | 4284 | description: Video playlist privacy policy (see [/video-playlists/privacies]) |
c1843150 C |
4285 | VideoPlaylistPrivacyConstant: |
4286 | properties: | |
4287 | id: | |
4288 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
4289 | label: | |
4290 | type: string | |
4291 | ||
4292 | VideoPlaylistTypeSet: | |
4293 | type: integer | |
4294 | enum: | |
4295 | - 1 | |
4296 | - 2 | |
40cfb36b | 4297 | description: The video playlist type (Regular = `1`, Watch Later = `2`) |
c1843150 C |
4298 | VideoPlaylistTypeConstant: |
4299 | properties: | |
4300 | id: | |
4301 | $ref: '#/components/schemas/VideoPlaylistTypeSet' | |
4302 | label: | |
4303 | type: string | |
4304 | ||
ee89e8fd C |
4305 | VideoPrivacySet: |
4306 | type: integer | |
3e9e6f2f | 4307 | enum: |
ee89e8fd C |
4308 | - 1 |
4309 | - 2 | |
4310 | - 3 | |
c1843150 | 4311 | - 4 |
40cfb36b | 4312 | description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies)) |
ee89e8fd C |
4313 | VideoPrivacyConstant: |
4314 | properties: | |
4315 | id: | |
c1843150 | 4316 | $ref: '#/components/schemas/VideoPrivacySet' |
ee89e8fd C |
4317 | label: |
4318 | type: string | |
50e16ccf | 4319 | |
0590bb46 C |
4320 | NSFWPolicy: |
4321 | type: string | |
4322 | enum: | |
4323 | - display | |
4324 | - blur | |
4325 | - do_not_list | |
4326 | ||
4327 | UserRole: | |
06746a8b | 4328 | type: integer |
0590bb46 C |
4329 | enum: |
4330 | - 0 | |
4331 | - 1 | |
4332 | - 2 | |
06746a8b | 4333 | description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)' |
2c318664 | 4334 | example: 2 |
6d989edc C |
4335 | UserAdminFlags: |
4336 | type: integer | |
4337 | enum: | |
4338 | - 0 | |
4339 | - 1 | |
4340 | description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)' | |
4341 | example: 1 | |
0590bb46 | 4342 | |
5dce26d2 C |
4343 | VideoStateConstant: |
4344 | properties: | |
4345 | id: | |
4346 | type: integer | |
4347 | enum: | |
4348 | - 1 | |
4349 | - 2 | |
4350 | - 3 | |
06746a8b | 4351 | description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)' |
5dce26d2 C |
4352 | label: |
4353 | type: string | |
50e16ccf | 4354 | |
4f32032f | 4355 | AbuseStateSet: |
50e16ccf C |
4356 | type: integer |
4357 | enum: | |
4358 | - 1 | |
4359 | - 2 | |
4360 | - 3 | |
668b7f09 | 4361 | description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)' |
4f32032f | 4362 | AbuseStateConstant: |
50e16ccf C |
4363 | properties: |
4364 | id: | |
4f32032f | 4365 | $ref: '#/components/schemas/AbuseStateSet' |
50e16ccf C |
4366 | label: |
4367 | type: string | |
4f32032f | 4368 | AbusePredefinedReasons: |
1ebddadd RK |
4369 | type: array |
4370 | items: | |
4371 | type: string | |
4372 | enum: | |
4373 | - violentOrAbusive | |
4374 | - hatefulOrAbusive | |
4375 | - spamOrMisleading | |
4376 | - privacy | |
4377 | - rights | |
4378 | - serverRules | |
4379 | - thumbnails | |
4380 | - captions | |
84f6e32c | 4381 | example: [spamOrMisleading] |
50e16ccf | 4382 | |
40cfb36b RK |
4383 | VideoResolutionSet: |
4384 | type: integer | |
4385 | description: | | |
4386 | Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`) | |
4387 | ||
4388 | `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos. | |
4389 | example: 240 | |
5dce26d2 | 4390 | VideoResolutionConstant: |
2c4876f2 | 4391 | description: resolutions and their labels for the video |
5dce26d2 C |
4392 | properties: |
4393 | id: | |
40cfb36b | 4394 | $ref: '#/components/schemas/VideoResolutionSet' |
5dce26d2 C |
4395 | label: |
4396 | type: string | |
84f6e32c | 4397 | example: 240p |
5dce26d2 C |
4398 | VideoScheduledUpdate: |
4399 | properties: | |
4400 | privacy: | |
4401 | $ref: '#/components/schemas/VideoPrivacySet' | |
5dce26d2 C |
4402 | updateAt: |
4403 | type: string | |
4404 | format: date | |
4405 | description: When to update the video | |
4406 | required: | |
4407 | - updateAt | |
c1843150 | 4408 | AccountSummary: |
5dce26d2 C |
4409 | properties: |
4410 | id: | |
06746a8b | 4411 | type: integer |
5dce26d2 C |
4412 | name: |
4413 | type: string | |
4414 | displayName: | |
4415 | type: string | |
4416 | url: | |
4417 | type: string | |
84f6e32c | 4418 | format: url |
5dce26d2 C |
4419 | host: |
4420 | type: string | |
84f6e32c | 4421 | format: hostname |
5dce26d2 C |
4422 | avatar: |
4423 | nullable: true | |
c1843150 | 4424 | allOf: |
75cba40d | 4425 | - $ref: '#/components/schemas/ActorImage' |
5dce26d2 C |
4426 | VideoChannelSummary: |
4427 | properties: | |
4428 | id: | |
b8375da9 | 4429 | $ref: '#/components/schemas/id' |
5dce26d2 C |
4430 | name: |
4431 | type: string | |
4432 | displayName: | |
4433 | type: string | |
4434 | url: | |
4435 | type: string | |
84f6e32c | 4436 | format: url |
5dce26d2 C |
4437 | host: |
4438 | type: string | |
84f6e32c | 4439 | format: hostname |
5dce26d2 C |
4440 | avatar: |
4441 | nullable: true | |
c1843150 | 4442 | allOf: |
75cba40d | 4443 | - $ref: '#/components/schemas/ActorImage' |
5dce26d2 C |
4444 | PlaylistElement: |
4445 | properties: | |
4446 | position: | |
06746a8b | 4447 | type: integer |
5dce26d2 | 4448 | startTimestamp: |
06746a8b | 4449 | type: integer |
5dce26d2 | 4450 | stopTimestamp: |
06746a8b | 4451 | type: integer |
bfbd9128 C |
4452 | video: |
4453 | nullable: true | |
c1843150 C |
4454 | allOf: |
4455 | - $ref: '#/components/schemas/Video' | |
5dce26d2 | 4456 | VideoFile: |
2c4876f2 | 4457 | readOnly: true |
5dce26d2 C |
4458 | properties: |
4459 | magnetUri: | |
4460 | type: string | |
2c4876f2 RK |
4461 | format: uri |
4462 | description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file | |
4463 | 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 | |
4464 | pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i | |
5dce26d2 C |
4465 | resolution: |
4466 | $ref: '#/components/schemas/VideoResolutionConstant' | |
4467 | size: | |
06746a8b | 4468 | type: integer |
2c4876f2 | 4469 | description: Video file size in bytes |
5dce26d2 C |
4470 | torrentUrl: |
4471 | type: string | |
e81af300 | 4472 | description: Direct URL of the torrent file |
84f6e32c | 4473 | format: url |
0ad45af7 | 4474 | torrentDownloadUrl: |
5dce26d2 | 4475 | type: string |
e81af300 | 4476 | description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog) |
84f6e32c | 4477 | format: url |
5dce26d2 C |
4478 | fileUrl: |
4479 | type: string | |
e81af300 | 4480 | description: Direct URL of the video |
84f6e32c | 4481 | format: url |
5dce26d2 C |
4482 | fileDownloadUrl: |
4483 | type: string | |
e81af300 | 4484 | description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog) |
84f6e32c | 4485 | format: url |
5dce26d2 C |
4486 | fps: |
4487 | type: number | |
2c4876f2 | 4488 | description: Frames per second of the video file |
63748ad0 C |
4489 | metadataUrl: |
4490 | type: string | |
84f6e32c | 4491 | format: url |
2c4876f2 | 4492 | description: URL dereferencing the output of ffprobe on the file |
5dce26d2 | 4493 | VideoStreamingPlaylists: |
4ca669e3 RK |
4494 | allOf: |
4495 | - type: object | |
4496 | properties: | |
4497 | id: | |
b8375da9 | 4498 | $ref: '#/components/schemas/id' |
4ca669e3 RK |
4499 | type: |
4500 | type: integer | |
4501 | enum: | |
4502 | - 1 | |
4503 | description: | | |
4504 | Playlist type: | |
4505 | - `1`: HLS | |
4506 | - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS' | |
4507 | VideoStreamingPlaylists-HLS: | |
5dce26d2 | 4508 | properties: |
5dce26d2 C |
4509 | playlistUrl: |
4510 | type: string | |
84f6e32c | 4511 | format: url |
5dce26d2 C |
4512 | segmentsSha256Url: |
4513 | type: string | |
84f6e32c | 4514 | format: url |
63748ad0 C |
4515 | files: |
4516 | type: array | |
c540d865 RK |
4517 | description: | |
4518 | Video files associated to this playlist. | |
4519 | ||
4520 | The difference with the root `files` property is that these files are fragmented, so they can be used in this streaming playlist (HLS, etc.) | |
63748ad0 C |
4521 | items: |
4522 | $ref: '#/components/schemas/VideoFile' | |
5dce26d2 C |
4523 | redundancies: |
4524 | type: array | |
4525 | items: | |
4526 | type: object | |
4527 | properties: | |
4528 | baseUrl: | |
4529 | type: string | |
84f6e32c | 4530 | format: url |
f4d59981 RK |
4531 | VideoInfo: |
4532 | properties: | |
4533 | id: | |
b8375da9 | 4534 | $ref: '#/components/schemas/Video/properties/id' |
f4d59981 | 4535 | uuid: |
b8375da9 | 4536 | $ref: '#/components/schemas/Video/properties/uuid' |
f4d59981 | 4537 | name: |
b8375da9 | 4538 | $ref: '#/components/schemas/Video/properties/name' |
3e9e6f2f RK |
4539 | Video: |
4540 | properties: | |
4541 | id: | |
b8375da9 RK |
4542 | description: object id for the video |
4543 | allOf: | |
4544 | - $ref: '#/components/schemas/id' | |
3e9e6f2f | 4545 | uuid: |
b8375da9 RK |
4546 | description: universal identifier for the video, that can be used across instances |
4547 | allOf: | |
4548 | - $ref: '#/components/schemas/UUIDv4' | |
4e239e35 C |
4549 | isLive: |
4550 | type: boolean | |
3e9e6f2f RK |
4551 | createdAt: |
4552 | type: string | |
84f6e32c | 4553 | format: date-time |
0c114568 RK |
4554 | example: 2017-10-01T10:52:46.396Z |
4555 | description: time at which the video object was first drafted | |
3e9e6f2f RK |
4556 | publishedAt: |
4557 | type: string | |
84f6e32c | 4558 | format: date-time |
0c114568 RK |
4559 | example: 2018-10-01T10:52:46.396Z |
4560 | description: time at which the video was marked as ready for playback (with restrictions depending on `privacy`). Usually set after a `state` evolution. | |
3e9e6f2f RK |
4561 | updatedAt: |
4562 | type: string | |
84f6e32c | 4563 | format: date-time |
0c114568 RK |
4564 | example: 2021-05-04T08:01:01.502Z |
4565 | description: last time the video's metadata was modified | |
5dce26d2 C |
4566 | originallyPublishedAt: |
4567 | type: string | |
84f6e32c | 4568 | format: date-time |
0c114568 RK |
4569 | example: 2010-10-01T10:52:46.396Z |
4570 | description: used to represent a date of first publication, prior to the practical publication date of `publishedAt` | |
3e9e6f2f | 4571 | category: |
b8375da9 RK |
4572 | allOf: |
4573 | - $ref: '#/components/schemas/VideoConstantNumber-Category' | |
4574 | description: category in which the video is classified | |
3e9e6f2f | 4575 | licence: |
b8375da9 RK |
4576 | allOf: |
4577 | - $ref: '#/components/schemas/VideoConstantNumber-Licence' | |
4578 | description: licence under which the video is distributed | |
3e9e6f2f | 4579 | language: |
b8375da9 RK |
4580 | allOf: |
4581 | - $ref: '#/components/schemas/VideoConstantString-Language' | |
4582 | description: main language used in the video | |
3e9e6f2f | 4583 | privacy: |
b8375da9 RK |
4584 | allOf: |
4585 | - $ref: '#/components/schemas/VideoPrivacyConstant' | |
4586 | description: privacy policy used to distribute the video | |
3e9e6f2f RK |
4587 | description: |
4588 | type: string | |
0c114568 RK |
4589 | example: | |
4590 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n | |
4591 | **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr... | |
4592 | minLength: 3 | |
4593 | maxLength: 250 | |
4594 | description: | | |
4595 | truncated description of the video, written in Markdown. | |
4596 | Resolve `descriptionPath` to get the full description of maximum `10000` characters. | |
3e9e6f2f | 4597 | duration: |
06746a8b | 4598 | type: integer |
84f6e32c | 4599 | example: 1419 |
0c114568 | 4600 | description: duration of the video in seconds |
3e9e6f2f RK |
4601 | isLocal: |
4602 | type: boolean | |
4603 | name: | |
4604 | type: string | |
b8375da9 | 4605 | description: title of the video |
84f6e32c | 4606 | example: What is PeerTube? |
bdac0584 RK |
4607 | minLength: 3 |
4608 | maxLength: 120 | |
3e9e6f2f RK |
4609 | thumbnailPath: |
4610 | type: string | |
84f6e32c | 4611 | example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
3e9e6f2f RK |
4612 | previewPath: |
4613 | type: string | |
20dcfd74 | 4614 | example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
3e9e6f2f RK |
4615 | embedPath: |
4616 | type: string | |
84f6e32c | 4617 | example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee |
3e9e6f2f | 4618 | views: |
06746a8b | 4619 | type: integer |
84f6e32c | 4620 | example: 1337 |
3e9e6f2f | 4621 | likes: |
06746a8b | 4622 | type: integer |
84f6e32c | 4623 | example: 42 |
3e9e6f2f | 4624 | dislikes: |
06746a8b | 4625 | type: integer |
84f6e32c | 4626 | example: 7 |
3e9e6f2f RK |
4627 | nsfw: |
4628 | type: boolean | |
5dce26d2 C |
4629 | waitTranscoding: |
4630 | type: boolean | |
4631 | nullable: true | |
4632 | state: | |
b8375da9 RK |
4633 | allOf: |
4634 | - $ref: '#/components/schemas/VideoStateConstant' | |
4635 | description: represents the internal state of the video processing within the PeerTube instance | |
5dce26d2 C |
4636 | scheduledUpdate: |
4637 | nullable: true | |
c1843150 C |
4638 | allOf: |
4639 | - $ref: '#/components/schemas/VideoScheduledUpdate' | |
5dce26d2 C |
4640 | blacklisted: |
4641 | nullable: true | |
4642 | type: boolean | |
4643 | blacklistedReason: | |
4644 | nullable: true | |
4645 | type: string | |
3e9e6f2f | 4646 | account: |
c1843150 | 4647 | $ref: '#/components/schemas/AccountSummary' |
5dce26d2 C |
4648 | channel: |
4649 | $ref: '#/components/schemas/VideoChannelSummary' | |
4650 | userHistory: | |
4651 | nullable: true | |
3e9e6f2f RK |
4652 | type: object |
4653 | properties: | |
5dce26d2 | 4654 | currentTime: |
06746a8b | 4655 | type: integer |
5dce26d2 C |
4656 | VideoDetails: |
4657 | allOf: | |
4658 | - $ref: '#/components/schemas/Video' | |
4659 | - type: object | |
4660 | properties: | |
4661 | descriptionPath: | |
3e9e6f2f | 4662 | type: string |
0c114568 RK |
4663 | example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description |
4664 | description: path at which to get the full description of maximum `10000` characters | |
5dce26d2 | 4665 | support: |
3e9e6f2f | 4666 | type: string |
00494d6e | 4667 | description: A text tell the audience how to support the video creator |
9a320a06 | 4668 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
c540d865 RK |
4669 | minLength: 3 |
4670 | maxLength: 1000 | |
5dce26d2 C |
4671 | channel: |
4672 | $ref: '#/components/schemas/VideoChannel' | |
4673 | account: | |
4674 | $ref: '#/components/schemas/Account' | |
4675 | tags: | |
bdac0584 | 4676 | example: [flowers, gardening] |
5dce26d2 | 4677 | type: array |
bdac0584 RK |
4678 | minItems: 1 |
4679 | maxItems: 5 | |
5dce26d2 C |
4680 | items: |
4681 | type: string | |
bdac0584 RK |
4682 | minLength: 2 |
4683 | maxLength: 30 | |
5dce26d2 C |
4684 | commentsEnabled: |
4685 | type: boolean | |
4686 | downloadEnabled: | |
4687 | type: boolean | |
4688 | trackerUrls: | |
4689 | type: array | |
4690 | items: | |
4691 | type: string | |
84f6e32c | 4692 | format: url |
2c4876f2 RK |
4693 | example: |
4694 | - https://peertube2.cpy.re/tracker/announce | |
4695 | - wss://peertube2.cpy.re/tracker/socket | |
c540d865 RK |
4696 | files: |
4697 | type: array | |
4698 | items: | |
4699 | $ref: '#/components/schemas/VideoFile' | |
4700 | description: | | |
4701 | WebTorrent/raw video files. If WebTorrent is disabled on the server: | |
4702 | ||
4703 | - field will be empty | |
4704 | - video files will be found in `streamingPlaylists[].files` field | |
5dce26d2 C |
4705 | streamingPlaylists: |
4706 | type: array | |
4707 | items: | |
4708 | $ref: '#/components/schemas/VideoStreamingPlaylists' | |
c540d865 RK |
4709 | description: | |
4710 | HLS playlists/manifest files. If HLS is disabled on the server: | |
4711 | ||
4712 | - field will be empty | |
4713 | - video files will be found in `files` field | |
04b703f6 RK |
4714 | FileRedundancyInformation: |
4715 | properties: | |
4716 | id: | |
b8375da9 | 4717 | $ref: '#/components/schemas/id' |
04b703f6 RK |
4718 | fileUrl: |
4719 | type: string | |
84f6e32c | 4720 | format: url |
04b703f6 RK |
4721 | strategy: |
4722 | type: string | |
84f6e32c RK |
4723 | enum: |
4724 | - manual | |
4725 | - most-views | |
4726 | - trending | |
4727 | - recently-added | |
04b703f6 RK |
4728 | size: |
4729 | type: integer | |
4730 | createdAt: | |
4731 | type: string | |
4732 | format: date-time | |
4733 | updatedAt: | |
4734 | type: string | |
4735 | format: date-time | |
4736 | expiresOn: | |
4737 | type: string | |
4738 | format: date-time | |
4739 | VideoRedundancy: | |
4740 | properties: | |
4741 | id: | |
b8375da9 | 4742 | $ref: '#/components/schemas/id' |
04b703f6 RK |
4743 | name: |
4744 | type: string | |
4745 | url: | |
4746 | type: string | |
84f6e32c | 4747 | format: url |
04b703f6 | 4748 | uuid: |
f880a5e7 | 4749 | $ref: '#/components/schemas/UUIDv4' |
04b703f6 RK |
4750 | redundancies: |
4751 | type: object | |
4752 | properties: | |
4753 | files: | |
4754 | type: array | |
4755 | items: | |
1e904cde | 4756 | $ref: '#/components/schemas/FileRedundancyInformation' |
04b703f6 RK |
4757 | streamingPlaylists: |
4758 | type: array | |
4759 | items: | |
1e904cde | 4760 | $ref: '#/components/schemas/FileRedundancyInformation' |
1f82e3e8 C |
4761 | VideoImportStateConstant: |
4762 | properties: | |
4763 | id: | |
4764 | type: integer | |
4765 | enum: | |
4766 | - 1 | |
4767 | - 2 | |
4768 | - 3 | |
06746a8b | 4769 | description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' |
1f82e3e8 C |
4770 | label: |
4771 | type: string | |
84f6e32c | 4772 | example: Pending |
ac2a5b54 RK |
4773 | VideoCreateImport: |
4774 | allOf: | |
4775 | - type: object | |
4776 | additionalProperties: false | |
4777 | oneOf: | |
4778 | - properties: | |
4779 | targetUrl: | |
4780 | $ref: '#/components/schemas/VideoImport/properties/targetUrl' | |
4781 | required: [targetUrl] | |
4782 | - properties: | |
4783 | magnetUri: | |
4784 | $ref: '#/components/schemas/VideoImport/properties/magnetUri' | |
4785 | required: [magnetUri] | |
4786 | - properties: | |
4787 | torrentfile: | |
4788 | $ref: '#/components/schemas/VideoImport/properties/torrentfile' | |
4789 | required: [torrentfile] | |
4790 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
4791 | required: | |
4792 | - channelId | |
4793 | - name | |
1f82e3e8 C |
4794 | VideoImport: |
4795 | properties: | |
4796 | id: | |
ac2a5b54 RK |
4797 | readOnly: true |
4798 | allOf: | |
4799 | - $ref: '#/components/schemas/id' | |
1f82e3e8 C |
4800 | targetUrl: |
4801 | type: string | |
84f6e32c | 4802 | format: url |
2c4876f2 | 4803 | description: remote URL where to find the import's source video |
84f6e32c | 4804 | example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d |
1f82e3e8 C |
4805 | magnetUri: |
4806 | type: string | |
84f6e32c | 4807 | format: uri |
2c4876f2 | 4808 | description: magnet URI allowing to resolve the import's source video |
84f6e32c | 4809 | 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 |
2c4876f2 | 4810 | pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i |
ac2a5b54 RK |
4811 | torrentfile: |
4812 | writeOnly: true | |
4813 | type: string | |
4814 | format: binary | |
4815 | description: Torrent file containing only the video file | |
1f82e3e8 | 4816 | torrentName: |
ac2a5b54 | 4817 | readOnly: true |
1f82e3e8 C |
4818 | type: string |
4819 | state: | |
ac2a5b54 RK |
4820 | readOnly: true |
4821 | allOf: | |
4822 | - $ref: '#/components/schemas/VideoImportStateConstant' | |
1f82e3e8 | 4823 | error: |
ac2a5b54 | 4824 | readOnly: true |
1f82e3e8 C |
4825 | type: string |
4826 | createdAt: | |
ac2a5b54 | 4827 | readOnly: true |
1f82e3e8 | 4828 | type: string |
84f6e32c | 4829 | format: date-time |
1f82e3e8 | 4830 | updatedAt: |
ac2a5b54 | 4831 | readOnly: true |
1f82e3e8 | 4832 | type: string |
84f6e32c | 4833 | format: date-time |
1f82e3e8 | 4834 | video: |
ac2a5b54 | 4835 | readOnly: true |
2c4876f2 RK |
4836 | nullable: true |
4837 | allOf: | |
4838 | - $ref: '#/components/schemas/Video' | |
5844dde3 RK |
4839 | VideoImportsList: |
4840 | properties: | |
4841 | total: | |
4842 | type: integer | |
4843 | example: 1 | |
4844 | data: | |
4845 | type: array | |
4846 | maxItems: 100 | |
4847 | items: | |
4848 | $ref: '#/components/schemas/VideoImport' | |
668b7f09 | 4849 | Abuse: |
3e9e6f2f RK |
4850 | properties: |
4851 | id: | |
b8375da9 | 4852 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
4853 | reason: |
4854 | type: string | |
84f6e32c | 4855 | example: The video is a spam |
4302058c RK |
4856 | minLength: 2 |
4857 | maxLength: 3000 | |
1ebddadd | 4858 | predefinedReasons: |
4f32032f | 4859 | $ref: '#/components/schemas/AbusePredefinedReasons' |
3e9e6f2f RK |
4860 | reporterAccount: |
4861 | $ref: '#/components/schemas/Account' | |
50e16ccf | 4862 | state: |
4f32032f | 4863 | $ref: '#/components/schemas/AbuseStateConstant' |
50e16ccf C |
4864 | moderationComment: |
4865 | type: string | |
84f6e32c | 4866 | example: Decided to ban the server since it spams us regularly |
4302058c RK |
4867 | minLength: 2 |
4868 | maxLength: 3000 | |
3e9e6f2f | 4869 | video: |
bdac0584 | 4870 | $ref: '#/components/schemas/VideoInfo' |
3e9e6f2f RK |
4871 | createdAt: |
4872 | type: string | |
84f6e32c | 4873 | format: date-time |
668b7f09 C |
4874 | AbuseMessage: |
4875 | properties: | |
4876 | id: | |
b8375da9 | 4877 | $ref: '#/components/schemas/id' |
668b7f09 C |
4878 | message: |
4879 | type: string | |
4302058c | 4880 | minLength: 2 |
f6d6e7f8 | 4881 | maxLength: 3000 |
668b7f09 C |
4882 | byModerator: |
4883 | type: boolean | |
4884 | createdAt: | |
4885 | type: string | |
4886 | format: date-time | |
4887 | account: | |
4888 | $ref: '#/components/schemas/AccountSummary' | |
3e9e6f2f RK |
4889 | VideoBlacklist: |
4890 | properties: | |
4891 | id: | |
b8375da9 | 4892 | $ref: '#/components/schemas/id' |
3e9e6f2f | 4893 | videoId: |
b8375da9 | 4894 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f RK |
4895 | createdAt: |
4896 | type: string | |
84f6e32c | 4897 | format: date-time |
3e9e6f2f RK |
4898 | updatedAt: |
4899 | type: string | |
84f6e32c | 4900 | format: date-time |
3e9e6f2f RK |
4901 | name: |
4902 | type: string | |
4302058c RK |
4903 | minLength: 3 |
4904 | maxLength: 120 | |
3e9e6f2f | 4905 | uuid: |
f880a5e7 | 4906 | $ref: '#/components/schemas/UUIDv4' |
3e9e6f2f RK |
4907 | description: |
4908 | type: string | |
4302058c RK |
4909 | minLength: 3 |
4910 | maxLength: 10000 | |
3e9e6f2f | 4911 | duration: |
06746a8b | 4912 | type: integer |
3e9e6f2f | 4913 | views: |
06746a8b | 4914 | type: integer |
3e9e6f2f | 4915 | likes: |
06746a8b | 4916 | type: integer |
3e9e6f2f | 4917 | dislikes: |
06746a8b | 4918 | type: integer |
3e9e6f2f RK |
4919 | nsfw: |
4920 | type: boolean | |
71810d0b RK |
4921 | VideoPlaylist: |
4922 | properties: | |
4923 | id: | |
b8375da9 RK |
4924 | $ref: '#/components/schemas/id' |
4925 | uuid: | |
4926 | $ref: '#/components/schemas/UUIDv4' | |
71810d0b RK |
4927 | createdAt: |
4928 | type: string | |
84f6e32c | 4929 | format: date-time |
71810d0b RK |
4930 | updatedAt: |
4931 | type: string | |
84f6e32c | 4932 | format: date-time |
71810d0b RK |
4933 | description: |
4934 | type: string | |
4302058c RK |
4935 | minLength: 3 |
4936 | maxLength: 1000 | |
71810d0b RK |
4937 | displayName: |
4938 | type: string | |
4302058c RK |
4939 | minLength: 1 |
4940 | maxLength: 120 | |
71810d0b RK |
4941 | isLocal: |
4942 | type: boolean | |
4943 | videoLength: | |
06746a8b | 4944 | type: integer |
b8375da9 | 4945 | minimum: 0 |
71810d0b RK |
4946 | thumbnailPath: |
4947 | type: string | |
4948 | privacy: | |
c1843150 | 4949 | $ref: '#/components/schemas/VideoPlaylistPrivacyConstant' |
71810d0b | 4950 | type: |
c1843150 | 4951 | $ref: '#/components/schemas/VideoPlaylistTypeConstant' |
71810d0b | 4952 | ownerAccount: |
c1843150 C |
4953 | $ref: '#/components/schemas/AccountSummary' |
4954 | videoChannel: | |
4955 | $ref: '#/components/schemas/VideoChannelSummary' | |
3e9e6f2f RK |
4956 | VideoComment: |
4957 | properties: | |
4958 | id: | |
b8375da9 | 4959 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
4960 | url: |
4961 | type: string | |
84f6e32c | 4962 | format: url |
3e9e6f2f RK |
4963 | text: |
4964 | type: string | |
bf3c3fea RK |
4965 | format: html |
4966 | description: Text of the comment | |
4302058c | 4967 | minLength: 1 |
bf3c3fea | 4968 | example: This video is wonderful! |
3e9e6f2f | 4969 | threadId: |
b8375da9 | 4970 | $ref: '#/components/schemas/id' |
bf3c3fea RK |
4971 | inReplyToCommentId: |
4972 | nullable: true | |
4973 | allOf: | |
4974 | - $ref: '#/components/schemas/id' | |
3e9e6f2f | 4975 | videoId: |
b8375da9 | 4976 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f RK |
4977 | createdAt: |
4978 | type: string | |
84f6e32c | 4979 | format: date-time |
3e9e6f2f RK |
4980 | updatedAt: |
4981 | type: string | |
84f6e32c | 4982 | format: date-time |
bf3c3fea RK |
4983 | deletedAt: |
4984 | nullable: true | |
4985 | type: string | |
4986 | format: date-time | |
4987 | default: null | |
4988 | isDeleted: | |
4989 | type: boolean | |
4990 | default: false | |
5b0413dd | 4991 | totalRepliesFromVideoAuthor: |
06746a8b | 4992 | type: integer |
b8375da9 | 4993 | minimum: 0 |
3e9e6f2f | 4994 | totalReplies: |
06746a8b | 4995 | type: integer |
b8375da9 | 4996 | minimum: 0 |
3e9e6f2f RK |
4997 | account: |
4998 | $ref: '#/components/schemas/Account' | |
4999 | VideoCommentThreadTree: | |
5000 | properties: | |
5001 | comment: | |
5002 | $ref: '#/components/schemas/VideoComment' | |
5003 | children: | |
5004 | type: array | |
5005 | items: | |
5006 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
67ae04a5 C |
5007 | VideoCaption: |
5008 | properties: | |
5009 | language: | |
dfcb6f50 | 5010 | $ref: '#/components/schemas/VideoConstantString-Language' |
67ae04a5 C |
5011 | captionPath: |
5012 | type: string | |
75cba40d | 5013 | ActorImage: |
3e9e6f2f RK |
5014 | properties: |
5015 | path: | |
5016 | type: string | |
5017 | createdAt: | |
5018 | type: string | |
84f6e32c | 5019 | format: date-time |
3e9e6f2f RK |
5020 | updatedAt: |
5021 | type: string | |
84f6e32c | 5022 | format: date-time |
f4d59981 RK |
5023 | ActorInfo: |
5024 | properties: | |
5025 | id: | |
b8375da9 | 5026 | $ref: '#/components/schemas/id' |
f4d59981 RK |
5027 | name: |
5028 | type: string | |
5029 | displayName: | |
5030 | type: string | |
5031 | host: | |
5032 | type: string | |
84f6e32c | 5033 | format: hostname |
f4d59981 RK |
5034 | avatar: |
5035 | nullable: true | |
5036 | type: object | |
5037 | properties: | |
5038 | path: | |
5039 | type: string | |
3e9e6f2f RK |
5040 | Actor: |
5041 | properties: | |
5042 | id: | |
b8375da9 | 5043 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
5044 | url: |
5045 | type: string | |
84f6e32c | 5046 | format: url |
3e9e6f2f | 5047 | name: |
77b0c6b5 | 5048 | description: immutable name of the actor, used to find or mention it |
2c4876f2 RK |
5049 | allOf: |
5050 | - $ref: '#/components/schemas/username' | |
3e9e6f2f RK |
5051 | host: |
5052 | type: string | |
84f6e32c | 5053 | format: hostname |
2c4876f2 | 5054 | description: server on which the actor is resident |
045bcd0d RK |
5055 | hostRedundancyAllowed: |
5056 | type: boolean | |
2c4876f2 | 5057 | description: whether this actor's host allows redundancy of its videos |
3e9e6f2f | 5058 | followingCount: |
06746a8b | 5059 | type: integer |
2c4876f2 RK |
5060 | minimum: 0 |
5061 | description: number of actors subscribed to by this actor, as seen by this instance | |
3e9e6f2f | 5062 | followersCount: |
06746a8b | 5063 | type: integer |
2c4876f2 RK |
5064 | minimum: 0 |
5065 | description: number of followers of this actor, as seen by this instance | |
3e9e6f2f RK |
5066 | createdAt: |
5067 | type: string | |
84f6e32c | 5068 | format: date-time |
3e9e6f2f RK |
5069 | updatedAt: |
5070 | type: string | |
84f6e32c | 5071 | format: date-time |
3e9e6f2f | 5072 | avatar: |
75cba40d | 5073 | $ref: '#/components/schemas/ActorImage' |
3e9e6f2f RK |
5074 | Account: |
5075 | allOf: | |
5076 | - $ref: '#/components/schemas/Actor' | |
5077 | - properties: | |
2a8ae759 | 5078 | userId: |
2c4876f2 RK |
5079 | description: object id for the user tied to this account |
5080 | allOf: | |
5081 | - $ref: '#/components/schemas/User/properties/id' | |
3e9e6f2f RK |
5082 | displayName: |
5083 | type: string | |
77b0c6b5 RK |
5084 | description: editable name of the account, displayed in its representations |
5085 | minLength: 3 | |
5086 | maxLength: 120 | |
2a8ae759 FS |
5087 | description: |
5088 | type: string | |
2c4876f2 | 5089 | description: text or bio displayed on the account's profile |
6441981b RK |
5090 | UserWatchingVideo: |
5091 | properties: | |
5092 | currentTime: | |
06746a8b | 5093 | type: integer |
84f6e32c RK |
5094 | description: timestamp within the video, in seconds |
5095 | example: 5 | |
3e9e6f2f RK |
5096 | ServerConfig: |
5097 | properties: | |
2a8ae759 FS |
5098 | instance: |
5099 | type: object | |
5100 | properties: | |
5101 | name: | |
5102 | type: string | |
5103 | shortDescription: | |
5104 | type: string | |
5105 | defaultClientRoute: | |
5106 | type: string | |
5107 | isNSFW: | |
5108 | type: boolean | |
5109 | defaultNSFWPolicy: | |
5110 | type: string | |
5111 | customizations: | |
5112 | type: object | |
5113 | properties: | |
5114 | javascript: | |
5115 | type: string | |
5116 | css: | |
5117 | type: string | |
f30736c8 RK |
5118 | search: |
5119 | type: object | |
5120 | properties: | |
5121 | remoteUri: | |
5122 | type: object | |
5123 | properties: | |
5124 | users: | |
5125 | type: boolean | |
5126 | anonymous: | |
5127 | type: boolean | |
2a8ae759 FS |
5128 | plugin: |
5129 | type: object | |
5130 | properties: | |
5131 | registered: | |
5132 | type: array | |
5133 | items: | |
5134 | type: string | |
5135 | theme: | |
5136 | type: object | |
5137 | properties: | |
5138 | registered: | |
5139 | type: array | |
5140 | items: | |
5141 | type: string | |
5142 | email: | |
5143 | type: object | |
5144 | properties: | |
5145 | enabled: | |
5146 | type: boolean | |
5147 | contactForm: | |
5148 | type: object | |
5149 | properties: | |
5150 | enabled: | |
5151 | type: boolean | |
5152 | serverVersion: | |
5153 | type: string | |
5154 | serverCommit: | |
5155 | type: string | |
3e9e6f2f RK |
5156 | signup: |
5157 | type: object | |
5158 | properties: | |
5159 | allowed: | |
5160 | type: boolean | |
2a8ae759 FS |
5161 | allowedForCurrentIP: |
5162 | type: boolean | |
5163 | requiresEmailVerification: | |
5164 | type: boolean | |
3e9e6f2f RK |
5165 | transcoding: |
5166 | type: object | |
5167 | properties: | |
2a8ae759 FS |
5168 | hls: |
5169 | type: object | |
5170 | properties: | |
5171 | enabled: | |
5172 | type: boolean | |
f30736c8 RK |
5173 | webtorrent: |
5174 | type: object | |
5175 | properties: | |
5176 | enabled: | |
5177 | type: boolean | |
3e9e6f2f RK |
5178 | enabledResolutions: |
5179 | type: array | |
5180 | items: | |
40cfb36b | 5181 | $ref: '#/components/schemas/VideoResolutionSet' |
2a8ae759 FS |
5182 | import: |
5183 | type: object | |
5184 | properties: | |
5185 | videos: | |
5186 | type: object | |
5187 | properties: | |
5188 | http: | |
5189 | type: object | |
5190 | properties: | |
5191 | enabled: | |
5192 | type: boolean | |
5193 | torrent: | |
5194 | type: object | |
5195 | properties: | |
5196 | enabled: | |
5197 | type: boolean | |
5198 | autoBlacklist: | |
5199 | type: object | |
5200 | properties: | |
5201 | videos: | |
5202 | type: object | |
5203 | properties: | |
5204 | ofUsers: | |
5205 | type: object | |
5206 | properties: | |
5207 | enabled: | |
5208 | type: boolean | |
3e9e6f2f RK |
5209 | avatar: |
5210 | type: object | |
5211 | properties: | |
5212 | file: | |
5213 | type: object | |
5214 | properties: | |
5215 | size: | |
5216 | type: object | |
5217 | properties: | |
5218 | max: | |
06746a8b | 5219 | type: integer |
3e9e6f2f RK |
5220 | extensions: |
5221 | type: array | |
5222 | items: | |
5223 | type: string | |
5224 | video: | |
5225 | type: object | |
5226 | properties: | |
2a8ae759 FS |
5227 | image: |
5228 | type: object | |
5229 | properties: | |
5230 | extensions: | |
5231 | type: array | |
5232 | items: | |
5233 | type: string | |
5234 | size: | |
5235 | type: object | |
5236 | properties: | |
5237 | max: | |
06746a8b | 5238 | type: integer |
3e9e6f2f RK |
5239 | file: |
5240 | type: object | |
5241 | properties: | |
5242 | extensions: | |
5243 | type: array | |
5244 | items: | |
5245 | type: string | |
2a8ae759 FS |
5246 | videoCaption: |
5247 | type: object | |
5248 | properties: | |
5249 | file: | |
5250 | type: object | |
5251 | properties: | |
5252 | size: | |
5253 | type: object | |
5254 | properties: | |
5255 | max: | |
06746a8b | 5256 | type: integer |
2a8ae759 FS |
5257 | extensions: |
5258 | type: array | |
5259 | items: | |
5260 | type: string | |
5261 | user: | |
5262 | type: object | |
5263 | properties: | |
5264 | videoQuota: | |
06746a8b | 5265 | type: integer |
b8375da9 | 5266 | example: 16810141515 |
2a8ae759 | 5267 | videoQuotaDaily: |
06746a8b | 5268 | type: integer |
b8375da9 | 5269 | example: 1681014151 |
2a8ae759 FS |
5270 | trending: |
5271 | type: object | |
5272 | properties: | |
5273 | videos: | |
5274 | type: object | |
5275 | properties: | |
5276 | intervalDays: | |
06746a8b | 5277 | type: integer |
2a8ae759 | 5278 | tracker: |
747b17c7 | 5279 | type: object |
2a8ae759 FS |
5280 | properties: |
5281 | enabled: | |
5282 | type: boolean | |
f30736c8 RK |
5283 | followings: |
5284 | type: object | |
5285 | properties: | |
5286 | instance: | |
5287 | type: object | |
5288 | properties: | |
5289 | autoFollowIndex: | |
5290 | type: object | |
5291 | properties: | |
5292 | indexUrl: | |
5293 | type: string | |
84f6e32c | 5294 | format: url |
2a8ae759 FS |
5295 | ServerConfigAbout: |
5296 | properties: | |
5297 | instance: | |
5298 | type: object | |
5299 | properties: | |
5300 | name: | |
5301 | type: string | |
5302 | shortDescription: | |
5303 | type: string | |
5304 | description: | |
5305 | type: string | |
5306 | terms: | |
5307 | type: string | |
5308 | ServerConfigCustom: | |
5309 | properties: | |
5310 | instance: | |
5311 | type: object | |
5312 | properties: | |
5313 | name: | |
5314 | type: string | |
5315 | shortDescription: | |
5316 | type: string | |
5317 | description: | |
5318 | type: string | |
5319 | terms: | |
5320 | type: string | |
5321 | defaultClientRoute: | |
5322 | type: string | |
5323 | isNSFW: | |
5324 | type: boolean | |
5325 | defaultNSFWPolicy: | |
5326 | type: string | |
5327 | customizations: | |
5328 | type: object | |
5329 | properties: | |
5330 | javascript: | |
5331 | type: string | |
5332 | css: | |
5333 | type: string | |
5334 | theme: | |
5335 | type: object | |
5336 | properties: | |
5337 | default: | |
5338 | type: string | |
5339 | services: | |
5340 | type: object | |
5341 | properties: | |
5342 | twitter: | |
5343 | type: object | |
5344 | properties: | |
5345 | username: | |
5346 | type: string | |
5347 | whitelisted: | |
5348 | type: boolean | |
5349 | cache: | |
5350 | type: object | |
5351 | properties: | |
5352 | previews: | |
5353 | type: object | |
5354 | properties: | |
5355 | size: | |
06746a8b | 5356 | type: integer |
2a8ae759 FS |
5357 | captions: |
5358 | type: object | |
5359 | properties: | |
5360 | size: | |
06746a8b | 5361 | type: integer |
2a8ae759 FS |
5362 | signup: |
5363 | type: object | |
5364 | properties: | |
5365 | enabled: | |
5366 | type: boolean | |
5367 | limit: | |
06746a8b | 5368 | type: integer |
2a8ae759 FS |
5369 | requiresEmailVerification: |
5370 | type: boolean | |
5371 | admin: | |
5372 | type: object | |
5373 | properties: | |
5374 | email: | |
5375 | type: string | |
84f6e32c | 5376 | format: email |
2a8ae759 FS |
5377 | contactForm: |
5378 | type: object | |
5379 | properties: | |
5380 | enabled: | |
5381 | type: boolean | |
5382 | user: | |
5383 | type: object | |
40cfb36b | 5384 | description: Settings that apply to new users, if registration is enabled |
2a8ae759 FS |
5385 | properties: |
5386 | videoQuota: | |
06746a8b | 5387 | type: integer |
b8375da9 | 5388 | example: 16810141515 |
2a8ae759 | 5389 | videoQuotaDaily: |
06746a8b | 5390 | type: integer |
b8375da9 | 5391 | example: 1681014151 |
2a8ae759 FS |
5392 | transcoding: |
5393 | type: object | |
40cfb36b | 5394 | description: Settings pertaining to transcoding jobs |
2a8ae759 FS |
5395 | properties: |
5396 | enabled: | |
5397 | type: boolean | |
5398 | allowAdditionalExtensions: | |
5399 | type: boolean | |
40cfb36b | 5400 | description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos |
2a8ae759 FS |
5401 | allowAudioFiles: |
5402 | type: boolean | |
40cfb36b | 5403 | description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file |
2a8ae759 | 5404 | threads: |
06746a8b | 5405 | type: integer |
40cfb36b RK |
5406 | description: Amount of threads used by ffmpeg for 1 transcoding job |
5407 | concurrency: | |
5408 | type: number | |
5409 | description: Amount of transcoding jobs to execute in parallel | |
5410 | profile: | |
5411 | type: string | |
5412 | enum: | |
5413 | - default | |
5414 | description: | | |
5415 | New profiles can be added by plugins ; available in core PeerTube: 'default'. | |
2a8ae759 FS |
5416 | resolutions: |
5417 | type: object | |
40cfb36b | 5418 | description: Resolutions to transcode _new videos_ to |
2a8ae759 | 5419 | properties: |
40cfb36b RK |
5420 | 0p: |
5421 | type: boolean | |
2a8ae759 FS |
5422 | 240p: |
5423 | type: boolean | |
5424 | 360p: | |
5425 | type: boolean | |
5426 | 480p: | |
5427 | type: boolean | |
5428 | 720p: | |
5429 | type: boolean | |
5430 | 1080p: | |
5431 | type: boolean | |
b7085c71 RK |
5432 | 1440p: |
5433 | type: boolean | |
2a8ae759 FS |
5434 | 2160p: |
5435 | type: boolean | |
40cfb36b RK |
5436 | webtorrent: |
5437 | type: object | |
5438 | description: WebTorrent-specific settings | |
5439 | properties: | |
5440 | enabled: | |
5441 | type: boolean | |
2a8ae759 FS |
5442 | hls: |
5443 | type: object | |
40cfb36b | 5444 | description: HLS-specific settings |
2a8ae759 FS |
5445 | properties: |
5446 | enabled: | |
5447 | type: boolean | |
5448 | import: | |
5449 | type: object | |
5450 | properties: | |
5451 | videos: | |
5452 | type: object | |
5453 | properties: | |
5454 | http: | |
5455 | type: object | |
5456 | properties: | |
5457 | enabled: | |
5458 | type: boolean | |
5459 | torrent: | |
5460 | type: object | |
5461 | properties: | |
5462 | enabled: | |
5463 | type: boolean | |
5464 | autoBlacklist: | |
5465 | type: object | |
5466 | properties: | |
5467 | videos: | |
5468 | type: object | |
5469 | properties: | |
5470 | ofUsers: | |
5471 | type: object | |
5472 | properties: | |
5473 | enabled: | |
5474 | type: boolean | |
5475 | followers: | |
5476 | type: object | |
5477 | properties: | |
5478 | instance: | |
5479 | type: object | |
5480 | properties: | |
5481 | enabled: | |
5482 | type: boolean | |
5483 | manualApproval: | |
5484 | type: boolean | |
3e9e6f2f RK |
5485 | Follow: |
5486 | properties: | |
5487 | id: | |
b8375da9 | 5488 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
5489 | follower: |
5490 | $ref: '#/components/schemas/Actor' | |
5491 | following: | |
5492 | $ref: '#/components/schemas/Actor' | |
5493 | score: | |
5494 | type: number | |
04b703f6 | 5495 | description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`. |
3e9e6f2f RK |
5496 | state: |
5497 | type: string | |
5498 | enum: | |
5499 | - pending | |
5500 | - accepted | |
5501 | createdAt: | |
5502 | type: string | |
84f6e32c | 5503 | format: date-time |
3e9e6f2f RK |
5504 | updatedAt: |
5505 | type: string | |
84f6e32c | 5506 | format: date-time |
e3489df9 C |
5507 | |
5508 | PredefinedAbuseReasons: | |
5509 | description: Reason categories that help triage reports | |
5510 | type: array | |
f6d6e7f8 | 5511 | maxItems: 8 |
e3489df9 C |
5512 | items: |
5513 | type: string | |
5514 | enum: | |
5515 | - violentOrAbusive | |
5516 | - hatefulOrAbusive | |
5517 | - spamOrMisleading | |
5518 | - privacy | |
5519 | - rights | |
5520 | - serverRules | |
5521 | - thumbnails | |
5522 | - captions | |
5523 | ||
3e9e6f2f RK |
5524 | Job: |
5525 | properties: | |
5526 | id: | |
b8375da9 | 5527 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
5528 | state: |
5529 | type: string | |
5530 | enum: | |
84f6e32c RK |
5531 | - active |
5532 | - completed | |
5533 | - failed | |
5534 | - waiting | |
5535 | - delayed | |
5536 | type: | |
3e9e6f2f RK |
5537 | type: string |
5538 | enum: | |
84f6e32c RK |
5539 | - activitypub-http-unicast |
5540 | - activitypub-http-broadcast | |
5541 | - activitypub-http-fetcher | |
5542 | - activitypub-follow | |
5543 | - video-file-import | |
5544 | - video-transcoding | |
5545 | ||
5546 | - video-import | |
5547 | - videos-views | |
5548 | - activitypub-refresher | |
5549 | - video-redundancy | |
5550 | data: | |
5551 | type: object | |
5552 | additionalProperties: true | |
5553 | error: | |
5554 | type: object | |
5555 | additionalProperties: true | |
3e9e6f2f RK |
5556 | createdAt: |
5557 | type: string | |
84f6e32c RK |
5558 | format: date-time |
5559 | finishedOn: | |
3e9e6f2f | 5560 | type: string |
84f6e32c RK |
5561 | format: date-time |
5562 | processedOn: | |
5563 | type: string | |
5564 | format: date-time | |
3e9e6f2f RK |
5565 | AddUserResponse: |
5566 | properties: | |
2c318664 RK |
5567 | user: |
5568 | type: object | |
5569 | properties: | |
5570 | id: | |
b8375da9 | 5571 | $ref: '#/components/schemas/id' |
2c318664 RK |
5572 | account: |
5573 | type: object | |
5574 | properties: | |
5575 | id: | |
b8375da9 | 5576 | $ref: '#/components/schemas/id' |
f6d6e7f8 | 5577 | VideoUploadRequestCommon: |
5578 | properties: | |
5579 | name: | |
5580 | description: Video name | |
5581 | type: string | |
b8375da9 RK |
5582 | example: What is PeerTube? |
5583 | minLength: 3 | |
5584 | maxLength: 120 | |
f6d6e7f8 | 5585 | channelId: |
5586 | description: Channel id that will contain this video | |
5587 | type: integer | |
b8375da9 RK |
5588 | example: 3 |
5589 | minimum: 1 | |
f6d6e7f8 | 5590 | privacy: |
5591 | $ref: '#/components/schemas/VideoPrivacySet' | |
5592 | category: | |
40cfb36b | 5593 | $ref: '#/components/schemas/VideoCategorySet' |
f6d6e7f8 | 5594 | licence: |
40cfb36b | 5595 | $ref: '#/components/schemas/VideoLicenceSet' |
f6d6e7f8 | 5596 | language: |
40cfb36b | 5597 | $ref: '#/components/schemas/VideoLanguageSet' |
f6d6e7f8 | 5598 | description: |
5599 | description: Video description | |
5600 | type: string | |
b8375da9 RK |
5601 | example: | |
5602 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)** | |
f6d6e7f8 | 5603 | waitTranscoding: |
5604 | description: Whether or not we wait transcoding before publish the video | |
5605 | type: boolean | |
5606 | support: | |
5607 | description: A text tell the audience how to support the video creator | |
9a320a06 | 5608 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
f6d6e7f8 | 5609 | type: string |
5610 | nsfw: | |
5611 | description: Whether or not this video contains sensitive content | |
5612 | type: boolean | |
5613 | tags: | |
5614 | description: Video tags (maximum 5 tags each between 2 and 30 characters) | |
5615 | type: array | |
5616 | minItems: 1 | |
5617 | maxItems: 5 | |
5618 | uniqueItems: true | |
b8375da9 RK |
5619 | example: |
5620 | - framasoft | |
5621 | - peertube | |
f6d6e7f8 | 5622 | items: |
5623 | type: string | |
5624 | minLength: 2 | |
5625 | maxLength: 30 | |
5626 | commentsEnabled: | |
5627 | description: Enable or disable comments for this video | |
5628 | type: boolean | |
5629 | downloadEnabled: | |
5630 | description: Enable or disable downloading for this video | |
5631 | type: boolean | |
5632 | originallyPublishedAt: | |
5633 | description: Date when the content was originally published | |
5634 | type: string | |
5635 | format: date-time | |
5636 | scheduleUpdate: | |
5637 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
5638 | thumbnailfile: | |
5639 | description: Video thumbnail file | |
5640 | type: string | |
5641 | format: binary | |
5642 | previewfile: | |
5643 | description: Video preview file | |
5644 | type: string | |
5645 | format: binary | |
5646 | required: | |
5647 | - channelId | |
5648 | - name | |
5649 | VideoUploadRequestLegacy: | |
5650 | allOf: | |
5651 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
5652 | - type: object | |
5653 | required: | |
5654 | - videofile | |
5655 | properties: | |
5656 | videofile: | |
5657 | description: Video file | |
5658 | type: string | |
5659 | format: binary | |
5660 | VideoUploadRequestResumable: | |
5661 | allOf: | |
5662 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
5663 | - type: object | |
5664 | required: | |
5665 | - filename | |
5666 | properties: | |
5667 | filename: | |
5668 | description: Video filename including extension | |
5669 | type: string | |
5670 | format: filename | |
b8375da9 | 5671 | example: what_is_peertube.mp4 |
f6d6e7f8 | 5672 | thumbnailfile: |
5673 | description: Video thumbnail file | |
5674 | type: string | |
5675 | format: binary | |
5676 | previewfile: | |
5677 | description: Video preview file | |
5678 | type: string | |
5679 | format: binary | |
3e9e6f2f RK |
5680 | VideoUploadResponse: |
5681 | properties: | |
5682 | video: | |
5683 | type: object | |
5684 | properties: | |
5685 | id: | |
b8375da9 | 5686 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f | 5687 | uuid: |
b8375da9 | 5688 | $ref: '#/components/schemas/Video/properties/uuid' |
3e9e6f2f RK |
5689 | CommentThreadResponse: |
5690 | properties: | |
5691 | total: | |
06746a8b | 5692 | type: integer |
84f6e32c | 5693 | example: 1 |
3e9e6f2f RK |
5694 | data: |
5695 | type: array | |
84f6e32c | 5696 | maxItems: 100 |
3e9e6f2f RK |
5697 | items: |
5698 | $ref: '#/components/schemas/VideoComment' | |
5699 | CommentThreadPostResponse: | |
5700 | properties: | |
5701 | comment: | |
5702 | $ref: '#/components/schemas/VideoComment' | |
048b6946 C |
5703 | VideoListResponse: |
5704 | properties: | |
5705 | total: | |
06746a8b | 5706 | type: integer |
84f6e32c | 5707 | example: 1 |
048b6946 C |
5708 | data: |
5709 | type: array | |
84f6e32c | 5710 | maxItems: 100 |
048b6946 C |
5711 | items: |
5712 | $ref: '#/components/schemas/Video' | |
84f6e32c RK |
5713 | User: |
5714 | properties: | |
fd5586b3 RK |
5715 | account: |
5716 | $ref: '#/components/schemas/Account' | |
5717 | autoPlayNextVideo: | |
5718 | type: boolean | |
5719 | description: Automatically start playing the upcoming video after the currently playing video | |
5720 | autoPlayNextVideoPlaylist: | |
5721 | type: boolean | |
5722 | description: Automatically start playing the video on the playlist after the currently playing video | |
5723 | autoPlayVideo: | |
5724 | type: boolean | |
5725 | description: Automatically start playing the video on the watch page | |
5726 | blocked: | |
5727 | type: boolean | |
5728 | blockedReason: | |
5729 | type: string | |
5730 | createdAt: | |
84f6e32c | 5731 | type: string |
84f6e32c RK |
5732 | email: |
5733 | type: string | |
5734 | format: email | |
5735 | description: The user email | |
fd5586b3 RK |
5736 | emailVerified: |
5737 | type: boolean | |
5738 | description: Has the user confirmed their email address? | |
5739 | id: | |
2c4876f2 RK |
5740 | allOf: |
5741 | - $ref: '#/components/schemas/id' | |
fd5586b3 | 5742 | readOnly: true |
6d989edc C |
5743 | pluginAuth: |
5744 | type: string | |
5745 | description: Auth plugin to use to authenticate the user | |
fd5586b3 | 5746 | lastLoginDate: |
84f6e32c | 5747 | type: string |
fd5586b3 RK |
5748 | format: date-time |
5749 | noInstanceConfigWarningModal: | |
5750 | type: boolean | |
5751 | noWelcomeModal: | |
84f6e32c | 5752 | type: boolean |
84f6e32c RK |
5753 | nsfwPolicy: |
5754 | $ref: '#/components/schemas/NSFWPolicy' | |
84f6e32c RK |
5755 | role: |
5756 | $ref: '#/components/schemas/UserRole' | |
5757 | roleLabel: | |
5758 | type: string | |
5759 | enum: | |
5760 | - User | |
5761 | - Moderator | |
5762 | - Administrator | |
fd5586b3 | 5763 | theme: |
84f6e32c | 5764 | type: string |
fd5586b3 RK |
5765 | description: Theme enabled by this user |
5766 | username: | |
b8375da9 | 5767 | $ref: '#/components/schemas/username' |
84f6e32c RK |
5768 | videoChannels: |
5769 | type: array | |
5770 | items: | |
5771 | $ref: '#/components/schemas/VideoChannel' | |
fd5586b3 RK |
5772 | videoQuota: |
5773 | type: integer | |
5774 | description: The user video quota in bytes | |
5775 | example: -1 | |
5776 | videoQuotaDaily: | |
5777 | type: integer | |
5778 | description: The user daily video quota in bytes | |
5779 | example: -1 | |
5780 | webtorrentEnabled: | |
5781 | type: boolean | |
5782 | description: Enable P2P in the player | |
5783 | UserWithStats: | |
5784 | allOf: | |
5785 | - $ref: '#/components/schemas/User' | |
5786 | - properties: | |
5787 | # optionally present fields: they require WITH_STATS scope | |
5788 | videosCount: | |
5789 | type: integer | |
5790 | description: Count of videos published | |
5791 | abusesCount: | |
5792 | type: integer | |
5793 | description: Count of reports/abuses of which the user is a target | |
5794 | abusesAcceptedCount: | |
5795 | type: integer | |
5796 | description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team | |
5797 | abusesCreatedCount: | |
5798 | type: integer | |
5799 | description: Count of reports/abuses created by the user | |
5800 | videoCommentsCount: | |
5801 | type: integer | |
5802 | description: Count of comments published | |
3e9e6f2f RK |
5803 | AddUser: |
5804 | properties: | |
5805 | username: | |
b8375da9 | 5806 | $ref: '#/components/schemas/username' |
3e9e6f2f | 5807 | password: |
b8375da9 | 5808 | $ref: '#/components/schemas/password' |
3e9e6f2f RK |
5809 | email: |
5810 | type: string | |
84f6e32c RK |
5811 | format: email |
5812 | description: The user email | |
3e9e6f2f | 5813 | videoQuota: |
84f6e32c | 5814 | type: integer |
b8375da9 RK |
5815 | description: The user video quota in bytes |
5816 | example: -1 | |
fbe1bc2a | 5817 | videoQuotaDaily: |
84f6e32c | 5818 | type: integer |
b8375da9 RK |
5819 | description: The user daily video quota in bytes |
5820 | example: -1 | |
6d989edc | 5821 | channelName: |
b8375da9 | 5822 | $ref: '#/components/schemas/usernameChannel' |
3e9e6f2f | 5823 | role: |
0590bb46 | 5824 | $ref: '#/components/schemas/UserRole' |
6d989edc C |
5825 | adminFlags: |
5826 | $ref: '#/components/schemas/UserAdminFlags' | |
3e9e6f2f RK |
5827 | required: |
5828 | - username | |
5829 | - password | |
5830 | ||
5831 | - videoQuota | |
fbe1bc2a | 5832 | - videoQuotaDaily |
3e9e6f2f RK |
5833 | - role |
5834 | UpdateUser: | |
5835 | properties: | |
3e9e6f2f | 5836 | email: |
84f6e32c | 5837 | description: The updated email of the user |
77b0c6b5 RK |
5838 | allOf: |
5839 | - $ref: '#/components/schemas/User/properties/email' | |
6d989edc C |
5840 | emailVerified: |
5841 | type: boolean | |
5842 | description: Set the email as verified | |
3e9e6f2f | 5843 | videoQuota: |
84f6e32c | 5844 | type: integer |
b8375da9 | 5845 | description: The updated video quota of the user in bytes |
fbe1bc2a | 5846 | videoQuotaDaily: |
84f6e32c | 5847 | type: integer |
b8375da9 | 5848 | description: The updated daily video quota of the user in bytes |
6d989edc C |
5849 | pluginAuth: |
5850 | type: string | |
5851 | nullable: true | |
5852 | description: The auth plugin to use to authenticate the user | |
5853 | example: 'peertube-plugin-auth-saml2' | |
3e9e6f2f | 5854 | role: |
0590bb46 | 5855 | $ref: '#/components/schemas/UserRole' |
6d989edc C |
5856 | adminFlags: |
5857 | $ref: '#/components/schemas/UserAdminFlags' | |
3e9e6f2f | 5858 | UpdateMe: |
77b0c6b5 | 5859 | # see shared/models/users/user-update-me.model.ts: |
3e9e6f2f RK |
5860 | properties: |
5861 | password: | |
b8375da9 | 5862 | $ref: '#/components/schemas/password' |
77b0c6b5 RK |
5863 | currentPassword: |
5864 | $ref: '#/components/schemas/password' | |
3e9e6f2f | 5865 | email: |
77b0c6b5 RK |
5866 | description: new email used for login and service communications |
5867 | allOf: | |
5868 | - $ref: '#/components/schemas/User/properties/email' | |
5869 | displayName: | |
3e9e6f2f | 5870 | type: string |
77b0c6b5 RK |
5871 | description: new name of the user in its representations |
5872 | minLength: 3 | |
5873 | maxLength: 120 | |
3e9e6f2f RK |
5874 | displayNSFW: |
5875 | type: string | |
77b0c6b5 | 5876 | description: new NSFW display policy |
84f6e32c RK |
5877 | enum: |
5878 | - 'true' | |
5879 | - 'false' | |
5880 | - both | |
77b0c6b5 RK |
5881 | webTorrentEnabled: |
5882 | type: boolean | |
5883 | description: whether to enable P2P in the player or not | |
3e9e6f2f | 5884 | autoPlayVideo: |
84f6e32c | 5885 | type: boolean |
77b0c6b5 RK |
5886 | description: new preference regarding playing videos automatically |
5887 | autoPlayNextVideo: | |
5888 | type: boolean | |
5889 | description: new preference regarding playing following videos automatically | |
5890 | autoPlayNextVideoPlaylist: | |
5891 | type: boolean | |
5892 | description: new preference regarding playing following playlist videos automatically | |
5893 | videosHistoryEnabled: | |
5894 | type: boolean | |
5895 | description: whether to keep track of watched history or not | |
5896 | videoLanguages: | |
5897 | type: array | |
5898 | items: | |
5899 | type: string | |
5900 | description: list of languages to filter videos down to | |
5901 | theme: | |
5902 | type: string | |
5903 | noInstanceConfigWarningModal: | |
5904 | type: boolean | |
5905 | noWelcomeModal: | |
5906 | type: boolean | |
3e9e6f2f RK |
5907 | GetMeVideoRating: |
5908 | properties: | |
5909 | id: | |
b8375da9 | 5910 | $ref: '#/components/schemas/id' |
3e9e6f2f | 5911 | rating: |
30b40713 RK |
5912 | type: string |
5913 | enum: | |
5914 | - like | |
5915 | - dislike | |
5916 | - none | |
84f6e32c | 5917 | description: Rating of the video |
3e9e6f2f RK |
5918 | required: |
5919 | - id | |
5920 | - rating | |
c100a614 YB |
5921 | VideoRating: |
5922 | properties: | |
5923 | video: | |
5924 | $ref: '#/components/schemas/Video' | |
5925 | rating: | |
30b40713 RK |
5926 | type: string |
5927 | enum: | |
5928 | - like | |
5929 | - dislike | |
5930 | - none | |
5931 | description: Rating of the video | |
c100a614 YB |
5932 | required: |
5933 | - video | |
5934 | - rating | |
3e9e6f2f RK |
5935 | RegisterUser: |
5936 | properties: | |
5937 | username: | |
77b0c6b5 RK |
5938 | description: immutable name of the user, used to find or mention its actor |
5939 | allOf: | |
5940 | - $ref: '#/components/schemas/username' | |
3e9e6f2f | 5941 | password: |
b8375da9 | 5942 | $ref: '#/components/schemas/password' |
3e9e6f2f RK |
5943 | email: |
5944 | type: string | |
84f6e32c | 5945 | format: email |
77b0c6b5 | 5946 | description: email of the user, used for login or service communications |
1f20622f C |
5947 | displayName: |
5948 | type: string | |
77b0c6b5 | 5949 | description: editable name of the user, displayed in its representations |
84f6e32c RK |
5950 | minLength: 1 |
5951 | maxLength: 120 | |
1f20622f C |
5952 | channel: |
5953 | type: object | |
77b0c6b5 | 5954 | description: channel base information used to create the first channel of the user |
1f20622f C |
5955 | properties: |
5956 | name: | |
b8375da9 | 5957 | $ref: '#/components/schemas/usernameChannel' |
1f20622f | 5958 | displayName: |
77b0c6b5 | 5959 | $ref: '#/components/schemas/VideoChannel/properties/displayName' |
3e9e6f2f RK |
5960 | required: |
5961 | - username | |
5962 | - password | |
5963 | ||
4302058c | 5964 | |
b8375da9 | 5965 | VideoChannel: |
3e9e6f2f | 5966 | properties: |
b8375da9 | 5967 | # GET/POST/PUT properties |
7d14d4d2 C |
5968 | displayName: |
5969 | type: string | |
77b0c6b5 | 5970 | description: editable name of the channel, displayed in its representations |
b8375da9 | 5971 | example: Videos of Framasoft |
4302058c RK |
5972 | minLength: 1 |
5973 | maxLength: 120 | |
3e9e6f2f RK |
5974 | description: |
5975 | type: string | |
b8375da9 | 5976 | example: Videos made with <3 by Framasoft |
4302058c RK |
5977 | minLength: 3 |
5978 | maxLength: 1000 | |
7d14d4d2 C |
5979 | support: |
5980 | type: string | |
b8375da9 | 5981 | description: text shown by default on all videos of this channel, to tell the audience how to support it |
9a320a06 | 5982 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
4302058c RK |
5983 | minLength: 3 |
5984 | maxLength: 1000 | |
b8375da9 RK |
5985 | # GET-only properties |
5986 | id: | |
5987 | readOnly: true | |
5988 | allOf: | |
5989 | - $ref: '#/components/schemas/id' | |
5990 | isLocal: | |
5991 | readOnly: true | |
5992 | type: boolean | |
5993 | updatedAt: | |
5994 | readOnly: true | |
5995 | type: string | |
5996 | format: date-time | |
5997 | ownerAccount: | |
5998 | readOnly: true | |
5999 | nullable: true | |
6000 | type: object | |
6001 | properties: | |
6002 | id: | |
6003 | type: integer | |
6004 | uuid: | |
6005 | $ref: '#/components/schemas/UUIDv4' | |
4302058c RK |
6006 | VideoChannelCreate: |
6007 | allOf: | |
b8375da9 | 6008 | - $ref: '#/components/schemas/VideoChannel' |
4302058c RK |
6009 | - properties: |
6010 | name: | |
b8375da9 RK |
6011 | description: username of the channel to create |
6012 | allOf: | |
6013 | - $ref: '#/components/schemas/usernameChannel' | |
7d14d4d2 C |
6014 | required: |
6015 | - name | |
6016 | - displayName | |
6017 | VideoChannelUpdate: | |
4302058c | 6018 | allOf: |
b8375da9 | 6019 | - $ref: '#/components/schemas/VideoChannel' |
4302058c RK |
6020 | - properties: |
6021 | bulkVideosSupportUpdate: | |
6022 | type: boolean | |
b8375da9 | 6023 | description: Update the support field for all videos of this channel |
045bcd0d RK |
6024 | VideoChannelList: |
6025 | properties: | |
6026 | total: | |
6027 | type: integer | |
6028 | example: 1 | |
6029 | data: | |
6030 | type: array | |
6031 | items: | |
6032 | allOf: | |
6033 | - $ref: '#/components/schemas/VideoChannel' | |
6034 | - $ref: '#/components/schemas/Actor' | |
1569a818 | 6035 | |
06746a8b RK |
6036 | MRSSPeerLink: |
6037 | type: object | |
6038 | xml: | |
6039 | name: 'media:peerLink' | |
6040 | properties: | |
6041 | href: | |
6042 | type: string | |
6043 | xml: | |
6044 | attribute: true | |
6045 | type: | |
6046 | type: string | |
6047 | enum: | |
6048 | - application/x-bittorrent | |
6049 | xml: | |
6050 | attribute: true | |
6051 | MRSSGroupContent: | |
6052 | type: object | |
6053 | xml: | |
6054 | name: 'media:content' | |
6055 | properties: | |
6056 | url: | |
6057 | type: string | |
84f6e32c | 6058 | format: url |
06746a8b RK |
6059 | xml: |
6060 | attribute: true | |
6061 | fileSize: | |
6062 | type: integer | |
6063 | xml: | |
6064 | attribute: true | |
6065 | type: | |
6066 | type: string | |
6067 | xml: | |
6068 | attribute: true | |
6069 | framerate: | |
6070 | type: integer | |
6071 | xml: | |
6072 | attribute: true | |
6073 | duration: | |
6074 | type: integer | |
6075 | xml: | |
6076 | attribute: true | |
6077 | height: | |
6078 | type: integer | |
6079 | xml: | |
6080 | attribute: true | |
6081 | lang: | |
6082 | type: string | |
6083 | xml: | |
6084 | attribute: true | |
6085 | VideoCommentsForXML: | |
6086 | type: array | |
6087 | xml: | |
6088 | wrapped: true | |
6089 | name: 'channel' | |
6090 | items: | |
6091 | type: object | |
6092 | xml: | |
6093 | name: 'item' | |
6094 | properties: | |
6095 | link: | |
6096 | type: string | |
84f6e32c | 6097 | format: url |
06746a8b RK |
6098 | guid: |
6099 | type: string | |
6100 | pubDate: | |
6101 | type: string | |
6102 | format: date-time | |
6103 | 'content:encoded': | |
6104 | type: string | |
6105 | 'dc:creator': | |
6106 | type: string | |
6107 | VideosForXML: | |
6108 | type: array | |
6109 | xml: | |
6110 | wrapped: true | |
6111 | name: 'channel' | |
6112 | items: | |
6113 | type: object | |
6114 | xml: | |
6115 | name: 'item' | |
6116 | properties: | |
6117 | link: | |
6118 | type: string | |
84f6e32c | 6119 | format: url |
06746a8b RK |
6120 | description: video watch page URL |
6121 | guid: | |
6122 | type: string | |
6123 | description: video canonical URL | |
6124 | pubDate: | |
6125 | type: string | |
6126 | format: date-time | |
6127 | description: video publication date | |
6128 | description: | |
6129 | type: string | |
6130 | description: video description | |
6131 | 'content:encoded': | |
6132 | type: string | |
6133 | description: video description | |
6134 | 'dc:creator': | |
6135 | type: string | |
6136 | description: publisher user name | |
6137 | 'media:category': | |
6138 | type: integer | |
6139 | description: video category (MRSS) | |
6140 | 'media:community': | |
6141 | type: object | |
6142 | description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS) | |
6143 | properties: | |
6144 | 'media:statistics': | |
6145 | type: object | |
6146 | properties: | |
6147 | views: | |
6148 | type: integer | |
6149 | xml: | |
6150 | attribute: true | |
6151 | 'media:embed': | |
6152 | type: object | |
6153 | properties: | |
6154 | url: | |
6155 | type: string | |
84f6e32c | 6156 | format: url |
06746a8b RK |
6157 | description: video embed path, relative to the canonical URL domain (MRSS) |
6158 | xml: | |
6159 | attribute: true | |
6160 | 'media:player': | |
6161 | type: object | |
6162 | properties: | |
6163 | url: | |
6164 | type: string | |
84f6e32c | 6165 | format: url |
06746a8b RK |
6166 | description: video watch path, relative to the canonical URL domain (MRSS) |
6167 | xml: | |
6168 | attribute: true | |
6169 | 'media:thumbnail': | |
6170 | type: object | |
6171 | properties: | |
6172 | url: | |
6173 | type: string | |
84f6e32c | 6174 | format: url |
06746a8b RK |
6175 | xml: |
6176 | attribute: true | |
6177 | height: | |
6178 | type: integer | |
6179 | xml: | |
6180 | attribute: true | |
6181 | width: | |
6182 | type: integer | |
6183 | xml: | |
6184 | attribute: true | |
6185 | 'media:title': | |
6186 | type: string | |
6187 | description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles. | |
6188 | 'media:description': | |
6189 | type: string | |
6190 | 'media:rating': | |
6191 | type: string | |
6192 | enum: | |
6193 | - nonadult | |
6194 | - adult | |
6195 | description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS) | |
6196 | 'enclosure': | |
6197 | type: object | |
6198 | description: main streamable file for the video | |
6199 | properties: | |
6200 | url: | |
6201 | type: string | |
84f6e32c | 6202 | format: url |
06746a8b RK |
6203 | xml: |
6204 | attribute: true | |
6205 | type: | |
6206 | type: string | |
6207 | enum: | |
6208 | - application/x-bittorrent | |
6209 | xml: | |
6210 | attribute: true | |
6211 | length: | |
6212 | type: integer | |
6213 | xml: | |
6214 | attribute: true | |
6215 | 'media:group': | |
6216 | type: array | |
6217 | 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) | |
6218 | items: | |
6219 | anyOf: | |
6220 | - $ref: '#/components/schemas/MRSSPeerLink' | |
f4d59981 RK |
6221 | - $ref: '#/components/schemas/MRSSGroupContent' |
6222 | NotificationSettingValue: | |
6223 | type: integer | |
6224 | description: > | |
6225 | Notification type | |
84f6e32c | 6226 | |
f4d59981 | 6227 | - `0` NONE |
84f6e32c | 6228 | |
f4d59981 | 6229 | - `1` WEB |
84f6e32c | 6230 | |
f4d59981 RK |
6231 | - `2` EMAIL |
6232 | enum: | |
6233 | - 0 | |
6234 | - 1 | |
6235 | - 3 | |
6236 | Notification: | |
6237 | properties: | |
6238 | id: | |
b8375da9 | 6239 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6240 | type: |
6241 | type: integer | |
6242 | description: > | |
6243 | Notification type, following the `UserNotificationType` enum: | |
84f6e32c | 6244 | |
f4d59981 | 6245 | - `1` NEW_VIDEO_FROM_SUBSCRIPTION |
84f6e32c | 6246 | |
f4d59981 | 6247 | - `2` NEW_COMMENT_ON_MY_VIDEO |
84f6e32c | 6248 | |
310b5219 | 6249 | - `3` NEW_ABUSE_FOR_MODERATORS |
84f6e32c | 6250 | |
f4d59981 | 6251 | - `4` BLACKLIST_ON_MY_VIDEO |
84f6e32c | 6252 | |
f4d59981 | 6253 | - `5` UNBLACKLIST_ON_MY_VIDEO |
84f6e32c | 6254 | |
f4d59981 | 6255 | - `6` MY_VIDEO_PUBLISHED |
84f6e32c | 6256 | |
f4d59981 | 6257 | - `7` MY_VIDEO_IMPORT_SUCCESS |
84f6e32c | 6258 | |
f4d59981 | 6259 | - `8` MY_VIDEO_IMPORT_ERROR |
84f6e32c | 6260 | |
f4d59981 | 6261 | - `9` NEW_USER_REGISTRATION |
84f6e32c | 6262 | |
f4d59981 | 6263 | - `10` NEW_FOLLOW |
84f6e32c | 6264 | |
f4d59981 | 6265 | - `11` COMMENT_MENTION |
84f6e32c | 6266 | |
f4d59981 | 6267 | - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS |
84f6e32c | 6268 | |
f4d59981 | 6269 | - `13` NEW_INSTANCE_FOLLOWER |
84f6e32c | 6270 | |
f4d59981 RK |
6271 | - `14` AUTO_INSTANCE_FOLLOWING |
6272 | read: | |
6273 | type: boolean | |
6274 | video: | |
6275 | nullable: true | |
6276 | allOf: | |
6277 | - $ref: '#/components/schemas/VideoInfo' | |
6278 | - type: object | |
6279 | properties: | |
6280 | channel: | |
6281 | $ref: '#/components/schemas/ActorInfo' | |
6282 | videoImport: | |
6283 | nullable: true | |
6284 | type: object | |
6285 | properties: | |
6286 | id: | |
b8375da9 | 6287 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6288 | video: |
6289 | nullable: true | |
6290 | $ref: '#/components/schemas/VideoInfo' | |
6291 | torrentName: | |
6292 | type: string | |
6293 | nullable: true | |
6294 | magnetUri: | |
2c4876f2 | 6295 | $ref: '#/components/schemas/VideoImport/properties/magnetUri' |
f4d59981 RK |
6296 | targetUri: |
6297 | type: string | |
84f6e32c | 6298 | format: uri |
f4d59981 RK |
6299 | nullable: true |
6300 | comment: | |
6301 | nullable: true | |
6302 | type: object | |
6303 | properties: | |
6304 | id: | |
b8375da9 | 6305 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6306 | threadId: |
6307 | type: integer | |
6308 | video: | |
6309 | $ref: '#/components/schemas/VideoInfo' | |
6310 | account: | |
6311 | $ref: '#/components/schemas/ActorInfo' | |
6312 | videoAbuse: | |
6313 | nullable: true | |
6314 | type: object | |
6315 | properties: | |
6316 | id: | |
b8375da9 | 6317 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6318 | video: |
6319 | allOf: | |
6320 | - $ref: '#/components/schemas/VideoInfo' | |
6321 | videoBlacklist: | |
6322 | nullable: true | |
6323 | type: object | |
6324 | properties: | |
6325 | id: | |
b8375da9 | 6326 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6327 | video: |
6328 | allOf: | |
6329 | - $ref: '#/components/schemas/VideoInfo' | |
6330 | account: | |
6331 | nullable: true | |
6332 | allOf: | |
6333 | - $ref: '#/components/schemas/ActorInfo' | |
6334 | actorFollow: | |
6335 | type: object | |
6336 | nullable: true | |
6337 | properties: | |
6338 | id: | |
b8375da9 | 6339 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6340 | follower: |
6341 | $ref: '#/components/schemas/ActorInfo' | |
6342 | state: | |
6343 | type: string | |
6344 | enum: | |
6345 | - pending | |
6346 | - accepted | |
6347 | following: | |
6348 | type: object | |
6349 | properties: | |
6350 | type: | |
6351 | type: string | |
6352 | enum: | |
6353 | - account | |
6354 | - channel | |
6355 | - instance | |
6356 | name: | |
6357 | type: string | |
6358 | displayName: | |
6359 | type: string | |
6360 | host: | |
6361 | type: string | |
84f6e32c | 6362 | format: hostname |
f4d59981 RK |
6363 | createdAt: |
6364 | type: string | |
6365 | format: date-time | |
6366 | updatedAt: | |
6367 | type: string | |
6368 | format: date-time | |
6369 | NotificationListResponse: | |
6370 | properties: | |
6371 | total: | |
6372 | type: integer | |
84f6e32c | 6373 | example: 1 |
f4d59981 RK |
6374 | data: |
6375 | type: array | |
84f6e32c | 6376 | maxItems: 100 |
f4d59981 | 6377 | items: |
7461d440 RK |
6378 | $ref: '#/components/schemas/Notification' |
6379 | Plugin: | |
6380 | properties: | |
6381 | name: | |
6382 | type: string | |
84f6e32c | 6383 | example: peertube-plugin-auth-ldap |
7461d440 RK |
6384 | type: |
6385 | type: integer | |
84f6e32c RK |
6386 | description: > |
6387 | - `1`: PLUGIN | |
6388 | ||
6389 | - `2`: THEME | |
7461d440 RK |
6390 | enum: |
6391 | - 1 | |
6392 | - 2 | |
6393 | latestVersion: | |
6394 | type: string | |
84f6e32c | 6395 | example: 0.0.3 |
7461d440 RK |
6396 | version: |
6397 | type: string | |
84f6e32c | 6398 | example: 0.0.1 |
7461d440 RK |
6399 | enabled: |
6400 | type: boolean | |
6401 | uninstalled: | |
6402 | type: boolean | |
6403 | peertubeEngine: | |
6404 | type: string | |
84f6e32c | 6405 | example: 2.2.0 |
7461d440 RK |
6406 | description: |
6407 | type: string | |
6408 | homepage: | |
6409 | type: string | |
84f6e32c RK |
6410 | format: url |
6411 | example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap | |
7461d440 RK |
6412 | settings: |
6413 | type: object | |
6414 | additionalProperties: true | |
6415 | createdAt: | |
6416 | type: string | |
6417 | format: date-time | |
6418 | updatedAt: | |
6419 | type: string | |
6420 | format: date-time | |
6421 | PluginResponse: | |
6422 | properties: | |
6423 | total: | |
6424 | type: integer | |
84f6e32c | 6425 | example: 1 |
7461d440 RK |
6426 | data: |
6427 | type: array | |
84f6e32c | 6428 | maxItems: 100 |
7461d440 | 6429 | items: |
2c318664 | 6430 | $ref: '#/components/schemas/Plugin' |
4e239e35 C |
6431 | |
6432 | LiveVideoUpdate: | |
6433 | properties: | |
6434 | saveReplay: | |
6435 | type: boolean | |
bb4ba6d9 C |
6436 | permanentLive: |
6437 | description: User can stream multiple times in a permanent live | |
6438 | type: boolean | |
4e239e35 C |
6439 | |
6440 | LiveVideoResponse: | |
6441 | properties: | |
6442 | rtmpUrl: | |
6443 | type: string | |
6444 | streamKey: | |
6445 | type: string | |
6446 | description: RTMP stream key to use to stream into this live video | |
6447 | saveReplay: | |
6448 | type: boolean | |
bb4ba6d9 C |
6449 | permanentLive: |
6450 | description: User can stream multiple times in a permanent live | |
6451 | type: boolean | |
4e239e35 | 6452 | |
75cba40d C |
6453 | |
6454 | ||
2c318664 RK |
6455 | callbacks: |
6456 | searchIndex: | |
c00f96ce | 6457 | 'https://search.example.org/api/v1/search/videos': |
2c318664 RK |
6458 | post: |
6459 | summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget` | |
6460 | responses: | |
6461 | '200': | |
6462 | description: successful operation | |
6463 | content: | |
6464 | application/json: | |
6465 | schema: | |
1e904cde | 6466 | $ref: '#/components/schemas/VideoListResponse' |