]>
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 | |
c00100b6 | 1979 | format: seconds |
e3489df9 C |
1980 | description: Timestamp in the video that marks the beginning of the report |
1981 | minimum: 0 | |
1982 | endAt: | |
1983 | type: integer | |
c00100b6 | 1984 | format: seconds |
e3489df9 C |
1985 | description: Timestamp in the video that marks the ending of the report |
1986 | minimum: 0 | |
1987 | comment: | |
1988 | type: object | |
1989 | properties: | |
1990 | id: | |
1991 | description: Comment id to report | |
b8375da9 RK |
1992 | allOf: |
1993 | - $ref: '#/components/schemas/VideoComment/properties/id' | |
e3489df9 C |
1994 | account: |
1995 | type: object | |
1996 | properties: | |
1997 | id: | |
1998 | description: Account id to report | |
b8375da9 | 1999 | type: integer |
1ebddadd RK |
2000 | required: |
2001 | - reason | |
50e16ccf C |
2002 | responses: |
2003 | '204': | |
2004 | description: successful operation | |
84f6e32c RK |
2005 | '400': |
2006 | description: incorrect request parameters | |
e3489df9 | 2007 | '/abuses/{abuseId}': |
50e16ccf C |
2008 | put: |
2009 | summary: Update an abuse | |
2010 | security: | |
2011 | - OAuth2: | |
2012 | - admin | |
2013 | - moderator | |
2014 | tags: | |
310b5219 | 2015 | - Abuses |
50e16ccf | 2016 | parameters: |
50e16ccf C |
2017 | - $ref: '#/components/parameters/abuseId' |
2018 | requestBody: | |
2019 | content: | |
2020 | application/json: | |
2021 | schema: | |
2022 | type: object | |
2023 | properties: | |
2024 | state: | |
4f32032f | 2025 | $ref: '#/components/schemas/AbuseStateSet' |
50e16ccf C |
2026 | moderationComment: |
2027 | type: string | |
84f6e32c | 2028 | description: Update the report comment visible only to the moderation team |
4302058c RK |
2029 | minLength: 2 |
2030 | maxLength: 3000 | |
84f6e32c RK |
2031 | responses: |
2032 | '204': | |
2033 | description: successful operation | |
2034 | '404': | |
310b5219 | 2035 | description: abuse not found |
50e16ccf | 2036 | delete: |
84f6e32c | 2037 | tags: |
310b5219 | 2038 | - Abuses |
50e16ccf C |
2039 | summary: Delete an abuse |
2040 | security: | |
2041 | - OAuth2: | |
64b5c247 RK |
2042 | - admin |
2043 | - moderator | |
84f6e32c | 2044 | parameters: |
84f6e32c | 2045 | - $ref: '#/components/parameters/abuseId' |
50e16ccf C |
2046 | responses: |
2047 | '204': | |
2048 | description: successful operation | |
06746a8b RK |
2049 | '404': |
2050 | description: block not found | |
668b7f09 C |
2051 | '/abuses/{abuseId}/messages': |
2052 | get: | |
2053 | summary: List messages of an abuse | |
2054 | security: | |
2055 | - OAuth2: [] | |
2056 | tags: | |
2057 | - Abuses | |
2058 | parameters: | |
2059 | - $ref: '#/components/parameters/abuseId' | |
2060 | responses: | |
2061 | '200': | |
2062 | description: successful operation | |
2063 | content: | |
2064 | application/json: | |
2065 | schema: | |
2066 | type: array | |
2067 | items: | |
2068 | $ref: '#/components/schemas/AbuseMessage' | |
2069 | ||
2070 | post: | |
2071 | summary: Add message to an abuse | |
2072 | security: | |
2073 | - OAuth2: [] | |
2074 | tags: | |
2075 | - Abuses | |
fcc4466e C |
2076 | parameters: |
2077 | - $ref: '#/components/parameters/abuseId' | |
668b7f09 C |
2078 | requestBody: |
2079 | required: true | |
2080 | content: | |
2081 | application/json: | |
2082 | schema: | |
2083 | type: object | |
2084 | properties: | |
2085 | message: | |
2086 | description: Message to send | |
2087 | type: string | |
4302058c RK |
2088 | minLength: 2 |
2089 | maxLength: 3000 | |
668b7f09 C |
2090 | required: |
2091 | - message | |
2092 | responses: | |
2093 | '200': | |
2094 | description: successful operation | |
2095 | '400': | |
2096 | description: incorrect request parameters | |
2097 | '/abuses/{abuseId}/messages/{abuseMessageId}': | |
2098 | delete: | |
2099 | summary: Delete an abuse message | |
2100 | security: | |
2101 | - OAuth2: [] | |
2102 | tags: | |
2103 | - Abuses | |
2104 | parameters: | |
2105 | - $ref: '#/components/parameters/abuseId' | |
2106 | - $ref: '#/components/parameters/abuseMessageId' | |
2107 | responses: | |
2108 | '204': | |
2109 | description: successful operation | |
50e16ccf | 2110 | |
3e9e6f2f | 2111 | '/videos/{id}/blacklist': |
1569a818 | 2112 | post: |
06746a8b | 2113 | summary: Block a video |
94ff4c23 | 2114 | security: |
3e9e6f2f | 2115 | - OAuth2: |
64b5c247 RK |
2116 | - admin |
2117 | - moderator | |
1569a818 | 2118 | tags: |
06746a8b | 2119 | - Video Blocks |
1569a818 | 2120 | parameters: |
cb9d028a | 2121 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2122 | responses: |
2123 | '204': | |
c1843150 | 2124 | description: successful operation |
1569a818 | 2125 | delete: |
06746a8b | 2126 | summary: Unblock a video by its id |
94ff4c23 | 2127 | security: |
3e9e6f2f | 2128 | - OAuth2: |
64b5c247 RK |
2129 | - admin |
2130 | - moderator | |
1569a818 | 2131 | tags: |
06746a8b | 2132 | - Video Blocks |
1569a818 | 2133 | parameters: |
cb9d028a | 2134 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2135 | responses: |
2136 | '204': | |
c1843150 | 2137 | description: successful operation |
06746a8b RK |
2138 | '404': |
2139 | description: block not found | |
c360c494 | 2140 | /videos/blacklist: |
1569a818 | 2141 | get: |
06746a8b RK |
2142 | tags: |
2143 | - Video Blocks | |
f4d59981 | 2144 | summary: List video blocks |
94ff4c23 | 2145 | security: |
3e9e6f2f | 2146 | - OAuth2: |
64b5c247 RK |
2147 | - admin |
2148 | - moderator | |
44cb3b85 | 2149 | parameters: |
84f6e32c RK |
2150 | - name: type |
2151 | in: query | |
2152 | description: > | |
2153 | list only blocks that match this type: | |
2154 | ||
2155 | - `1`: manual block | |
2156 | ||
2157 | - `2`: automatic block that needs review | |
2158 | schema: | |
2159 | type: integer | |
2160 | enum: | |
2161 | - 1 | |
2162 | - 2 | |
2163 | - name: search | |
2164 | in: query | |
2165 | description: plain search that will match with video titles, and more | |
2166 | schema: | |
2167 | type: string | |
3e9e6f2f RK |
2168 | - $ref: '#/components/parameters/start' |
2169 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 2170 | - $ref: '#/components/parameters/blacklistsSort' |
1569a818 DG |
2171 | responses: |
2172 | '200': | |
2173 | description: successful operation | |
3e9e6f2f RK |
2174 | content: |
2175 | application/json: | |
2176 | schema: | |
84f6e32c RK |
2177 | type: object |
2178 | properties: | |
2179 | total: | |
2180 | type: integer | |
2181 | example: 1 | |
2182 | data: | |
2183 | type: array | |
2184 | items: | |
2185 | $ref: '#/components/schemas/VideoBlacklist' | |
67ae04a5 C |
2186 | /videos/{id}/captions: |
2187 | get: | |
b029d58a | 2188 | summary: List captions of a video |
67ae04a5 | 2189 | tags: |
04b703f6 | 2190 | - Video Captions |
67ae04a5 | 2191 | parameters: |
cb9d028a | 2192 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
2193 | responses: |
2194 | '200': | |
2195 | description: successful operation | |
2196 | content: | |
2197 | application/json: | |
2198 | schema: | |
2199 | type: object | |
2200 | properties: | |
2201 | total: | |
2202 | type: integer | |
84f6e32c | 2203 | example: 1 |
67ae04a5 C |
2204 | data: |
2205 | type: array | |
2206 | items: | |
2207 | $ref: '#/components/schemas/VideoCaption' | |
2208 | /videos/{id}/captions/{captionLanguage}: | |
2209 | put: | |
2210 | summary: Add or replace a video caption | |
64b5c247 RK |
2211 | security: |
2212 | - OAuth2: | |
2213 | - user | |
67ae04a5 | 2214 | tags: |
04b703f6 | 2215 | - Video Captions |
67ae04a5 | 2216 | parameters: |
cb9d028a | 2217 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
2218 | - $ref: '#/components/parameters/captionLanguage' |
2219 | requestBody: | |
2220 | content: | |
2221 | multipart/form-data: | |
2222 | schema: | |
2223 | type: object | |
2224 | properties: | |
2225 | captionfile: | |
2226 | description: The file to upload. | |
2227 | type: string | |
2228 | format: binary | |
0ad45af7 FS |
2229 | encoding: |
2230 | captionfile: | |
205ed5b7 | 2231 | contentType: text/vtt, application/x-subrip, text/plain |
67ae04a5 C |
2232 | responses: |
2233 | '204': | |
c1843150 | 2234 | description: successful operation |
06746a8b RK |
2235 | '404': |
2236 | description: video or language not found | |
67ae04a5 C |
2237 | delete: |
2238 | summary: Delete a video caption | |
64b5c247 RK |
2239 | security: |
2240 | - OAuth2: | |
2241 | - user | |
67ae04a5 | 2242 | tags: |
04b703f6 | 2243 | - Video Captions |
67ae04a5 | 2244 | parameters: |
cb9d028a | 2245 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
2246 | - $ref: '#/components/parameters/captionLanguage' |
2247 | responses: | |
2248 | '204': | |
c1843150 | 2249 | description: successful operation |
06746a8b RK |
2250 | '404': |
2251 | description: video or language or caption for that language not found | |
48dce1c9 | 2252 | /video-channels: |
1569a818 | 2253 | get: |
b029d58a | 2254 | summary: List video channels |
9a320a06 | 2255 | operationId: getVideoChannels |
1569a818 | 2256 | tags: |
b029d58a | 2257 | - Video Channels |
44cb3b85 | 2258 | parameters: |
3e9e6f2f RK |
2259 | - $ref: '#/components/parameters/start' |
2260 | - $ref: '#/components/parameters/count' | |
2261 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
2262 | responses: |
2263 | '200': | |
2264 | description: successful operation | |
3e9e6f2f RK |
2265 | content: |
2266 | application/json: | |
2267 | schema: | |
045bcd0d | 2268 | $ref: '#/components/schemas/VideoChannelList' |
1569a818 | 2269 | post: |
b029d58a | 2270 | summary: Create a video channel |
9a320a06 | 2271 | operationId: createVideoChannel |
94ff4c23 | 2272 | security: |
3e9e6f2f | 2273 | - OAuth2: [] |
1569a818 | 2274 | tags: |
b029d58a | 2275 | - Video Channels |
1569a818 DG |
2276 | responses: |
2277 | '204': | |
c1843150 | 2278 | description: successful operation |
9a320a06 RK |
2279 | content: |
2280 | application/json: | |
2281 | schema: | |
2282 | type: object | |
2283 | properties: | |
2284 | videoChannel: | |
2285 | type: object | |
2286 | properties: | |
2287 | id: | |
2288 | $ref: '#/components/schemas/VideoChannel/properties/id' | |
3e9e6f2f | 2289 | requestBody: |
7d14d4d2 C |
2290 | content: |
2291 | application/json: | |
2292 | schema: | |
2293 | $ref: '#/components/schemas/VideoChannelCreate' | |
9ce3d302 | 2294 | '/video-channels/{channelHandle}': |
1569a818 | 2295 | get: |
b029d58a | 2296 | summary: Get a video channel |
9a320a06 | 2297 | operationId: getVideoChannel |
1569a818 | 2298 | tags: |
b029d58a | 2299 | - Video Channels |
1569a818 | 2300 | parameters: |
9ce3d302 | 2301 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
2302 | responses: |
2303 | '200': | |
2304 | description: successful operation | |
3e9e6f2f RK |
2305 | content: |
2306 | application/json: | |
2307 | schema: | |
2308 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 2309 | put: |
b029d58a | 2310 | summary: Update a video channel |
94ff4c23 | 2311 | security: |
3e9e6f2f | 2312 | - OAuth2: [] |
1569a818 | 2313 | tags: |
b029d58a | 2314 | - Video Channels |
1569a818 | 2315 | parameters: |
9ce3d302 | 2316 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
2317 | responses: |
2318 | '204': | |
c1843150 | 2319 | description: successful operation |
3e9e6f2f | 2320 | requestBody: |
7d14d4d2 C |
2321 | content: |
2322 | application/json: | |
2323 | schema: | |
2324 | $ref: '#/components/schemas/VideoChannelUpdate' | |
1569a818 | 2325 | delete: |
b029d58a | 2326 | summary: Delete a video channel |
94ff4c23 | 2327 | security: |
3e9e6f2f | 2328 | - OAuth2: [] |
1569a818 | 2329 | tags: |
b029d58a | 2330 | - Video Channels |
1569a818 | 2331 | parameters: |
9ce3d302 | 2332 | - $ref: '#/components/parameters/channelHandle' |
cc918ac3 C |
2333 | responses: |
2334 | '204': | |
c1843150 | 2335 | description: successful operation |
9ce3d302 | 2336 | '/video-channels/{channelHandle}/videos': |
cc918ac3 | 2337 | get: |
b029d58a | 2338 | summary: List videos of a video channel |
cc918ac3 | 2339 | tags: |
048b6946 | 2340 | - Video |
b029d58a | 2341 | - Video Channels |
cc918ac3 | 2342 | parameters: |
9ce3d302 | 2343 | - $ref: '#/components/parameters/channelHandle' |
59c794a5 | 2344 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 2345 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
2346 | - $ref: '#/components/parameters/tagsOneOf' |
2347 | - $ref: '#/components/parameters/tagsAllOf' | |
2348 | - $ref: '#/components/parameters/licenceOneOf' | |
2349 | - $ref: '#/components/parameters/languageOneOf' | |
2350 | - $ref: '#/components/parameters/nsfw' | |
2351 | - $ref: '#/components/parameters/filter' | |
2352 | - $ref: '#/components/parameters/skipCount' | |
2353 | - $ref: '#/components/parameters/start' | |
2354 | - $ref: '#/components/parameters/count' | |
2355 | - $ref: '#/components/parameters/videosSort' | |
1569a818 | 2356 | responses: |
cc918ac3 | 2357 | '200': |
1569a818 | 2358 | description: successful operation |
3e9e6f2f RK |
2359 | content: |
2360 | application/json: | |
2361 | schema: | |
048b6946 | 2362 | $ref: '#/components/schemas/VideoListResponse' |
75cba40d C |
2363 | '/video-channels/{channelHandle}/avatar/pick': |
2364 | post: | |
2365 | summary: Update channel avatar | |
2366 | security: | |
2367 | - OAuth2: [] | |
2368 | tags: | |
2369 | - Video Channels | |
2370 | parameters: | |
2371 | - $ref: '#/components/parameters/channelHandle' | |
2372 | responses: | |
2373 | '200': | |
2374 | description: successful operation | |
2375 | content: | |
2376 | application/json: | |
2377 | schema: | |
2378 | type: object | |
2379 | properties: | |
2380 | avatar: | |
2381 | $ref: '#/components/schemas/ActorImage' | |
2382 | '413': | |
2383 | description: image file too large | |
2384 | headers: | |
2385 | X-File-Maximum-Size: | |
2386 | schema: | |
2387 | type: string | |
2388 | format: Nginx size | |
2389 | description: Maximum file size for the avatar | |
2390 | requestBody: | |
2391 | content: | |
2392 | multipart/form-data: | |
2393 | schema: | |
2394 | type: object | |
2395 | properties: | |
2396 | avatarfile: | |
2397 | description: The file to upload. | |
2398 | type: string | |
2399 | format: binary | |
2400 | encoding: | |
2401 | avatarfile: | |
2402 | contentType: image/png, image/jpeg | |
2403 | '/video-channels/{channelHandle}/avatar': | |
2404 | delete: | |
2405 | summary: Delete channel avatar | |
2406 | security: | |
2407 | - OAuth2: [] | |
2408 | tags: | |
2409 | - Video Channels | |
2410 | parameters: | |
2411 | - $ref: '#/components/parameters/channelHandle' | |
2412 | responses: | |
2413 | '204': | |
2414 | description: successful operation | |
2415 | ||
2416 | ||
2417 | '/video-channels/{channelHandle}/banner/pick': | |
2418 | post: | |
2419 | summary: Update channel banner | |
2420 | security: | |
2421 | - OAuth2: [] | |
2422 | tags: | |
2423 | - Video Channels | |
2424 | parameters: | |
2425 | - $ref: '#/components/parameters/channelHandle' | |
2426 | responses: | |
2427 | '200': | |
2428 | description: successful operation | |
2429 | content: | |
2430 | application/json: | |
2431 | schema: | |
2432 | type: object | |
2433 | properties: | |
2434 | banner: | |
2435 | $ref: '#/components/schemas/ActorImage' | |
2436 | '413': | |
2437 | description: image file too large | |
2438 | headers: | |
2439 | X-File-Maximum-Size: | |
2440 | schema: | |
2441 | type: string | |
2442 | format: Nginx size | |
2443 | description: Maximum file size for the banner | |
2444 | requestBody: | |
2445 | content: | |
2446 | multipart/form-data: | |
2447 | schema: | |
2448 | type: object | |
2449 | properties: | |
2450 | bannerfile: | |
2451 | description: The file to upload. | |
2452 | type: string | |
2453 | format: binary | |
2454 | encoding: | |
2455 | bannerfile: | |
2456 | contentType: image/png, image/jpeg | |
2457 | '/video-channels/{channelHandle}/banner': | |
2458 | delete: | |
2459 | summary: Delete channel banner | |
2460 | security: | |
2461 | - OAuth2: [] | |
2462 | tags: | |
2463 | - Video Channels | |
2464 | parameters: | |
2465 | - $ref: '#/components/parameters/channelHandle' | |
2466 | responses: | |
2467 | '204': | |
2468 | description: successful operation | |
c1843150 C |
2469 | |
2470 | /video-playlists/privacies: | |
2471 | get: | |
40cfb36b RK |
2472 | summary: List available playlist privacy policies |
2473 | operationId: getPlaylistPrivacyPolicies | |
c1843150 C |
2474 | tags: |
2475 | - Video Playlists | |
2476 | responses: | |
2477 | '200': | |
2478 | description: successful operation | |
2479 | content: | |
2480 | application/json: | |
2481 | schema: | |
2482 | type: array | |
2483 | items: | |
2484 | type: string | |
84f6e32c RK |
2485 | examples: |
2486 | nightly: | |
2487 | externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies | |
c1843150 | 2488 | |
71810d0b RK |
2489 | /video-playlists: |
2490 | get: | |
b029d58a | 2491 | summary: List video playlists |
40cfb36b | 2492 | operationId: getPlaylists |
71810d0b | 2493 | tags: |
b029d58a | 2494 | - Video Playlists |
71810d0b RK |
2495 | parameters: |
2496 | - $ref: '#/components/parameters/start' | |
2497 | - $ref: '#/components/parameters/count' | |
2498 | - $ref: '#/components/parameters/sort' | |
2499 | responses: | |
2500 | '200': | |
2501 | description: successful operation | |
2502 | content: | |
2503 | application/json: | |
2504 | schema: | |
84f6e32c RK |
2505 | type: object |
2506 | properties: | |
2507 | total: | |
2508 | type: integer | |
2509 | example: 1 | |
2510 | data: | |
2511 | type: array | |
2512 | items: | |
2513 | $ref: '#/components/schemas/VideoPlaylist' | |
c1843150 C |
2514 | post: |
2515 | summary: Create a video playlist | |
b8375da9 | 2516 | description: If the video playlist is set as public, `videoChannelId` is mandatory. |
40cfb36b | 2517 | operationId: createPlaylist |
c1843150 C |
2518 | security: |
2519 | - OAuth2: [] | |
2520 | tags: | |
2521 | - Video Playlists | |
2522 | responses: | |
2523 | '200': | |
2524 | description: successful operation | |
2525 | content: | |
2526 | application/json: | |
2527 | schema: | |
2528 | type: object | |
2529 | properties: | |
2530 | videoPlaylist: | |
2531 | type: object | |
2532 | properties: | |
2533 | id: | |
b8375da9 | 2534 | $ref: '#/components/schemas/VideoPlaylist/properties/id' |
c1843150 | 2535 | uuid: |
b8375da9 | 2536 | $ref: '#/components/schemas/VideoPlaylist/properties/uuid' |
c1843150 C |
2537 | requestBody: |
2538 | content: | |
2539 | multipart/form-data: | |
2540 | schema: | |
2541 | type: object | |
2542 | properties: | |
2543 | displayName: | |
2544 | description: Video playlist display name | |
2545 | type: string | |
bdac0584 RK |
2546 | minLength: 1 |
2547 | maxLength: 120 | |
c1843150 C |
2548 | thumbnailfile: |
2549 | description: Video playlist thumbnail file | |
2550 | type: string | |
2551 | format: binary | |
2552 | privacy: | |
2553 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
2554 | description: | |
2555 | description: Video playlist description | |
2556 | type: string | |
b8375da9 RK |
2557 | minLength: 3 |
2558 | maxLength: 1000 | |
c1843150 | 2559 | videoChannelId: |
b8375da9 RK |
2560 | allOf: |
2561 | - $ref: '#/components/schemas/id' | |
c1843150 | 2562 | description: Video channel in which the playlist will be published |
c1843150 C |
2563 | required: |
2564 | - displayName | |
2c318664 RK |
2565 | encoding: |
2566 | thumbnailfile: | |
2567 | contentType: image/jpeg | |
c1843150 | 2568 | |
c00100b6 | 2569 | /video-playlists/{playlistId}: |
c1843150 C |
2570 | get: |
2571 | summary: Get a video playlist | |
2572 | tags: | |
2573 | - Video Playlists | |
2574 | parameters: | |
c00100b6 | 2575 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2576 | responses: |
2577 | '200': | |
2578 | description: successful operation | |
2579 | content: | |
2580 | application/json: | |
2581 | schema: | |
2582 | $ref: '#/components/schemas/VideoPlaylist' | |
2583 | put: | |
2584 | summary: Update a video playlist | |
2585 | description: 'If the video playlist is set as public, the playlist must have a assigned channel.' | |
2586 | security: | |
2587 | - OAuth2: [] | |
2588 | tags: | |
2589 | - Video Playlists | |
2590 | responses: | |
2591 | '204': | |
2592 | description: successful operation | |
2593 | parameters: | |
c00100b6 | 2594 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2595 | requestBody: |
2596 | content: | |
2597 | multipart/form-data: | |
2598 | schema: | |
2599 | type: object | |
2600 | properties: | |
2601 | displayName: | |
2602 | description: Video playlist display name | |
2603 | type: string | |
bdac0584 RK |
2604 | minLength: 1 |
2605 | maxLength: 120 | |
c1843150 C |
2606 | thumbnailfile: |
2607 | description: Video playlist thumbnail file | |
2608 | type: string | |
2609 | format: binary | |
2610 | privacy: | |
2611 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
2612 | description: | |
2613 | description: Video playlist description | |
2614 | type: string | |
2615 | videoChannelId: | |
b8375da9 RK |
2616 | allOf: |
2617 | - $ref: '#/components/schemas/id' | |
c1843150 | 2618 | description: Video channel in which the playlist will be published |
2c318664 RK |
2619 | encoding: |
2620 | thumbnailfile: | |
2621 | contentType: image/jpeg | |
c1843150 C |
2622 | delete: |
2623 | summary: Delete a video playlist | |
2624 | security: | |
2625 | - OAuth2: [] | |
2626 | tags: | |
2627 | - Video Playlists | |
2628 | parameters: | |
c00100b6 | 2629 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2630 | responses: |
2631 | '204': | |
2632 | description: successful operation | |
2633 | ||
c00100b6 | 2634 | /video-playlists/{playlistId}/videos: |
c1843150 C |
2635 | get: |
2636 | summary: 'List videos of a playlist' | |
2637 | tags: | |
2638 | - Videos | |
2639 | - Video Playlists | |
2640 | parameters: | |
c00100b6 | 2641 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2642 | responses: |
2643 | '200': | |
2644 | description: successful operation | |
2645 | content: | |
2646 | application/json: | |
2647 | schema: | |
2648 | $ref: '#/components/schemas/VideoListResponse' | |
2649 | post: | |
c00100b6 | 2650 | summary: Add a video in a playlist |
c1843150 C |
2651 | security: |
2652 | - OAuth2: [] | |
2653 | tags: | |
2654 | - Videos | |
2655 | - Video Playlists | |
2656 | parameters: | |
c00100b6 | 2657 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2658 | responses: |
2659 | '200': | |
2660 | description: successful operation | |
2661 | content: | |
2662 | application/json: | |
2663 | schema: | |
2664 | type: object | |
2665 | properties: | |
2666 | videoPlaylistElement: | |
2667 | type: object | |
2668 | properties: | |
2669 | id: | |
06746a8b | 2670 | type: integer |
c00100b6 | 2671 | example: 2 |
c1843150 C |
2672 | requestBody: |
2673 | content: | |
2674 | application/json: | |
2675 | schema: | |
2676 | type: object | |
2677 | properties: | |
2678 | videoId: | |
c00100b6 RK |
2679 | oneOf: |
2680 | - $ref: '#/components/schemas/Video/properties/uuid' | |
b8375da9 RK |
2681 | - $ref: '#/components/schemas/Video/properties/id' |
2682 | description: Video to add in the playlist | |
c1843150 | 2683 | startTimestamp: |
06746a8b | 2684 | type: integer |
c00100b6 RK |
2685 | format: seconds |
2686 | description: Start the video at this specific timestamp | |
c1843150 | 2687 | stopTimestamp: |
06746a8b | 2688 | type: integer |
c00100b6 RK |
2689 | format: seconds |
2690 | description: Stop the video at this specific timestamp | |
c1843150 C |
2691 | required: |
2692 | - videoId | |
2693 | ||
c00100b6 | 2694 | /video-playlists/{playlistId}/videos/reorder: |
c1843150 C |
2695 | post: |
2696 | summary: 'Reorder a playlist' | |
2697 | security: | |
2698 | - OAuth2: [] | |
2699 | tags: | |
2700 | - Video Playlists | |
2701 | parameters: | |
c00100b6 | 2702 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2703 | responses: |
2704 | '204': | |
2705 | description: successful operation | |
2706 | requestBody: | |
2707 | content: | |
2708 | application/json: | |
2709 | schema: | |
2710 | type: object | |
2711 | properties: | |
2712 | startPosition: | |
06746a8b RK |
2713 | type: integer |
2714 | description: 'Start position of the element to reorder' | |
2715 | minimum: 1 | |
c1843150 | 2716 | insertAfterPosition: |
06746a8b RK |
2717 | type: integer |
2718 | description: 'New position for the block to reorder, to add the block before the first element' | |
2719 | minimum: 0 | |
c1843150 | 2720 | reorderLength: |
06746a8b RK |
2721 | type: integer |
2722 | description: 'How many element from `startPosition` to reorder' | |
2723 | minimum: 1 | |
c1843150 C |
2724 | required: |
2725 | - startPosition | |
2726 | - insertAfterPosition | |
2727 | ||
c00100b6 | 2728 | /video-playlists/{playlistId}/videos/{playlistElementId}: |
c1843150 | 2729 | put: |
c00100b6 | 2730 | summary: Update a playlist element |
c1843150 C |
2731 | security: |
2732 | - OAuth2: [] | |
2733 | tags: | |
2734 | - Video Playlists | |
2735 | parameters: | |
c00100b6 | 2736 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2737 | - $ref: '#/components/parameters/playlistElementId' |
2738 | responses: | |
2739 | '204': | |
2740 | description: successful operation | |
2741 | requestBody: | |
2742 | content: | |
2743 | application/json: | |
2744 | schema: | |
2745 | type: object | |
2746 | properties: | |
2747 | startTimestamp: | |
06746a8b | 2748 | type: integer |
c00100b6 RK |
2749 | format: seconds |
2750 | description: Start the video at this specific timestamp | |
c1843150 | 2751 | stopTimestamp: |
06746a8b | 2752 | type: integer |
c00100b6 RK |
2753 | format: seconds |
2754 | description: Stop the video at this specific timestamp | |
c1843150 | 2755 | delete: |
c00100b6 | 2756 | summary: Delete an element from a playlist |
c1843150 C |
2757 | security: |
2758 | - OAuth2: [] | |
2759 | tags: | |
2760 | - Video Playlists | |
2761 | parameters: | |
c00100b6 | 2762 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
2763 | - $ref: '#/components/parameters/playlistElementId' |
2764 | responses: | |
2765 | '204': | |
2766 | description: successful operation | |
2767 | ||
0590bb46 C |
2768 | '/users/me/video-playlists/videos-exist': |
2769 | get: | |
c00100b6 | 2770 | summary: Check video exists in my playlists |
0590bb46 C |
2771 | security: |
2772 | - OAuth2: [] | |
2773 | tags: | |
2774 | - Video Playlists | |
2775 | parameters: | |
2776 | - name: videoIds | |
2777 | in: query | |
2778 | required: true | |
2779 | description: The video ids to check | |
2780 | schema: | |
2781 | type: array | |
2782 | items: | |
b8375da9 | 2783 | $ref: '#/components/schemas/Video/properties/id' |
0590bb46 C |
2784 | responses: |
2785 | '200': | |
2786 | description: successful operation | |
2787 | content: | |
2788 | application/json: | |
2789 | schema: | |
2790 | type: object | |
2791 | properties: | |
2792 | videoId: | |
2793 | type: array | |
2794 | items: | |
2795 | type: object | |
2796 | properties: | |
2797 | playlistElementId: | |
06746a8b | 2798 | type: integer |
0590bb46 | 2799 | playlistId: |
06746a8b | 2800 | type: integer |
0590bb46 | 2801 | startTimestamp: |
06746a8b | 2802 | type: integer |
c00100b6 | 2803 | format: seconds |
0590bb46 | 2804 | stopTimestamp: |
06746a8b | 2805 | type: integer |
c00100b6 | 2806 | format: seconds |
0590bb46 | 2807 | |
3e9e6f2f | 2808 | '/accounts/{name}/video-channels': |
6b738c7a | 2809 | get: |
b029d58a | 2810 | summary: List video channels of an account |
6b738c7a | 2811 | tags: |
b029d58a C |
2812 | - Video Channels |
2813 | - Accounts | |
6b738c7a | 2814 | parameters: |
3e9e6f2f | 2815 | - $ref: '#/components/parameters/name' |
84f6e32c RK |
2816 | - name: withStats |
2817 | in: query | |
2818 | description: include view statistics for the last 30 days (only if authentified as the account user) | |
2819 | schema: | |
2820 | type: boolean | |
2821 | - $ref: '#/components/parameters/start' | |
2822 | - $ref: '#/components/parameters/count' | |
2823 | - $ref: '#/components/parameters/sort' | |
6b738c7a C |
2824 | responses: |
2825 | '200': | |
2826 | description: successful operation | |
3e9e6f2f RK |
2827 | content: |
2828 | application/json: | |
2829 | schema: | |
045bcd0d | 2830 | $ref: '#/components/schemas/VideoChannelList' |
c100a614 YB |
2831 | '/accounts/{name}/ratings': |
2832 | get: | |
b029d58a | 2833 | summary: List ratings of an account |
c100a614 YB |
2834 | security: |
2835 | - OAuth2: [] | |
2836 | tags: | |
b029d58a | 2837 | - Accounts |
c100a614 | 2838 | parameters: |
cb9d028a | 2839 | - $ref: '#/components/parameters/name' |
c100a614 YB |
2840 | - $ref: '#/components/parameters/start' |
2841 | - $ref: '#/components/parameters/count' | |
2842 | - $ref: '#/components/parameters/sort' | |
2843 | - name: rating | |
2844 | in: query | |
2845 | required: false | |
b3d1054e | 2846 | description: Optionally filter which ratings to retrieve |
c100a614 YB |
2847 | schema: |
2848 | type: string | |
2849 | enum: | |
2850 | - like | |
2851 | - dislike | |
2852 | responses: | |
2853 | '200': | |
2854 | description: successful operation | |
2855 | content: | |
2856 | application/json: | |
2857 | schema: | |
2858 | type: array | |
2859 | items: | |
2860 | $ref: '#/components/schemas/VideoRating' | |
3e9e6f2f | 2861 | '/videos/{id}/comment-threads': |
1569a818 | 2862 | get: |
b029d58a | 2863 | summary: List threads of a video |
1569a818 | 2864 | tags: |
b029d58a | 2865 | - Video Comments |
1569a818 | 2866 | parameters: |
cb9d028a | 2867 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f RK |
2868 | - $ref: '#/components/parameters/start' |
2869 | - $ref: '#/components/parameters/count' | |
71810d0b | 2870 | - $ref: '#/components/parameters/commentsSort' |
1569a818 DG |
2871 | responses: |
2872 | '200': | |
2873 | description: successful operation | |
3e9e6f2f RK |
2874 | content: |
2875 | application/json: | |
2876 | schema: | |
2877 | $ref: '#/components/schemas/CommentThreadResponse' | |
1569a818 | 2878 | post: |
b029d58a | 2879 | summary: Create a thread |
94ff4c23 | 2880 | security: |
3e9e6f2f | 2881 | - OAuth2: [] |
1569a818 | 2882 | tags: |
b029d58a | 2883 | - Video Comments |
1569a818 | 2884 | parameters: |
cb9d028a | 2885 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2886 | responses: |
2887 | '200': | |
2888 | description: successful operation | |
3e9e6f2f RK |
2889 | content: |
2890 | application/json: | |
2891 | schema: | |
2892 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
2c318664 RK |
2893 | '404': |
2894 | description: video does not exist | |
98639806 C |
2895 | requestBody: |
2896 | content: | |
2897 | application/json: | |
2898 | schema: | |
2899 | type: object | |
2900 | properties: | |
2901 | text: | |
bf3c3fea RK |
2902 | allOf: |
2903 | - $ref: '#/components/schemas/VideoComment/properties/text' | |
2904 | format: markdown | |
2905 | maxLength: 10000 | |
98639806 C |
2906 | required: |
2907 | - text | |
2908 | ||
3e9e6f2f | 2909 | '/videos/{id}/comment-threads/{threadId}': |
1569a818 | 2910 | get: |
b029d58a | 2911 | summary: Get a thread |
1569a818 | 2912 | tags: |
b029d58a | 2913 | - Video Comments |
1569a818 | 2914 | parameters: |
cb9d028a C |
2915 | - $ref: '#/components/parameters/idOrUUID' |
2916 | - $ref: '#/components/parameters/threadId' | |
1569a818 DG |
2917 | responses: |
2918 | '200': | |
2919 | description: successful operation | |
3e9e6f2f RK |
2920 | content: |
2921 | application/json: | |
2922 | schema: | |
2923 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
2924 | '/videos/{id}/comments/{commentId}': | |
1569a818 | 2925 | post: |
b029d58a | 2926 | summary: Reply to a thread of a video |
94ff4c23 | 2927 | security: |
3e9e6f2f | 2928 | - OAuth2: [] |
1569a818 | 2929 | tags: |
b029d58a | 2930 | - Video Comments |
1569a818 | 2931 | parameters: |
cb9d028a | 2932 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 2933 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
2934 | responses: |
2935 | '200': | |
2936 | description: successful operation | |
3e9e6f2f RK |
2937 | content: |
2938 | application/json: | |
2939 | schema: | |
2940 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
2c318664 RK |
2941 | '404': |
2942 | description: thread or video does not exist | |
98639806 C |
2943 | requestBody: |
2944 | content: | |
2945 | application/json: | |
2946 | schema: | |
2947 | type: object | |
2948 | properties: | |
2949 | text: | |
bf3c3fea RK |
2950 | allOf: |
2951 | - $ref: '#/components/schemas/VideoComment/properties/text' | |
2952 | format: markdown | |
2953 | maxLength: 10000 | |
98639806 C |
2954 | required: |
2955 | - text | |
2956 | ||
1569a818 | 2957 | delete: |
b029d58a | 2958 | summary: Delete a comment or a reply |
94ff4c23 | 2959 | security: |
3e9e6f2f | 2960 | - OAuth2: [] |
1569a818 | 2961 | tags: |
b029d58a | 2962 | - Video Comments |
1569a818 | 2963 | parameters: |
cb9d028a | 2964 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 2965 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
2966 | responses: |
2967 | '204': | |
c1843150 | 2968 | description: successful operation |
84f6e32c RK |
2969 | '403': |
2970 | description: cannot remove comment of another user | |
2971 | '404': | |
2972 | description: comment or video does not exist | |
2973 | '409': | |
2974 | description: comment is already deleted | |
3e9e6f2f | 2975 | '/videos/{id}/rate': |
1569a818 | 2976 | put: |
b029d58a | 2977 | summary: Like/dislike a video |
94ff4c23 | 2978 | security: |
3e9e6f2f | 2979 | - OAuth2: [] |
1569a818 | 2980 | tags: |
b029d58a | 2981 | - Video Rates |
1569a818 | 2982 | parameters: |
cb9d028a | 2983 | - $ref: '#/components/parameters/idOrUUID' |
4c440ced RK |
2984 | requestBody: |
2985 | content: | |
2986 | application/json: | |
2987 | schema: | |
2988 | type: object | |
2989 | properties: | |
2990 | rating: | |
2991 | type: string | |
2992 | enum: | |
2993 | - like | |
2994 | - dislike | |
9a320a06 RK |
2995 | required: |
2996 | - rating | |
1569a818 DG |
2997 | responses: |
2998 | '204': | |
c1843150 | 2999 | description: successful operation |
2c318664 RK |
3000 | '404': |
3001 | description: video does not exist | |
fb72c193 DL |
3002 | /search/videos: |
3003 | get: | |
3004 | tags: | |
3005 | - Search | |
b029d58a | 3006 | summary: Search videos |
fb72c193 | 3007 | parameters: |
84f6e32c RK |
3008 | - name: search |
3009 | in: query | |
3010 | required: true | |
3011 | allowEmptyValue: false | |
3012 | description: > | |
3013 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
3014 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
3015 | you can use the REST API to fetch the complete video information and interact with it. | |
3016 | schema: | |
3017 | type: string | |
59c794a5 | 3018 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 3019 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
3020 | - $ref: '#/components/parameters/tagsOneOf' |
3021 | - $ref: '#/components/parameters/tagsAllOf' | |
3022 | - $ref: '#/components/parameters/licenceOneOf' | |
3023 | - $ref: '#/components/parameters/languageOneOf' | |
3024 | - $ref: '#/components/parameters/nsfw' | |
3025 | - $ref: '#/components/parameters/filter' | |
3026 | - $ref: '#/components/parameters/skipCount' | |
3e9e6f2f RK |
3027 | - $ref: '#/components/parameters/start' |
3028 | - $ref: '#/components/parameters/count' | |
ad031145 | 3029 | - $ref: '#/components/parameters/searchTarget' |
fd5af7a2 | 3030 | - $ref: '#/components/parameters/videosSearchSort' |
ad031145 C |
3031 | - name: startDate |
3032 | in: query | |
ad031145 C |
3033 | description: Get videos that are published after this date |
3034 | schema: | |
3035 | type: string | |
3036 | format: date-time | |
3037 | - name: endDate | |
3038 | in: query | |
ad031145 C |
3039 | description: Get videos that are published before this date |
3040 | schema: | |
3041 | type: string | |
3042 | format: date-time | |
3043 | - name: originallyPublishedStartDate | |
3044 | in: query | |
ad031145 | 3045 | description: Get videos that are originally published after this date |
3e9e6f2f RK |
3046 | schema: |
3047 | type: string | |
ad031145 C |
3048 | format: date-time |
3049 | - name: originallyPublishedEndDate | |
3050 | in: query | |
ad031145 C |
3051 | description: Get videos that are originally published before this date |
3052 | schema: | |
3053 | type: string | |
3054 | format: date-time | |
3055 | - name: durationMin | |
3056 | in: query | |
ad031145 C |
3057 | description: Get videos that have this minimum duration |
3058 | schema: | |
06746a8b | 3059 | type: integer |
ad031145 C |
3060 | - name: durationMax |
3061 | in: query | |
ad031145 C |
3062 | description: Get videos that have this maximum duration |
3063 | schema: | |
06746a8b | 3064 | type: integer |
2c318664 RK |
3065 | callbacks: |
3066 | 'searchTarget === search-index': | |
3067 | $ref: '#/components/callbacks/searchIndex' | |
fb72c193 DL |
3068 | responses: |
3069 | '200': | |
3070 | description: successful operation | |
3e9e6f2f RK |
3071 | content: |
3072 | application/json: | |
3073 | schema: | |
048b6946 | 3074 | $ref: '#/components/schemas/VideoListResponse' |
2c318664 RK |
3075 | '500': |
3076 | description: search index unavailable | |
ad031145 C |
3077 | /search/video-channels: |
3078 | get: | |
3079 | tags: | |
3080 | - Search | |
3081 | summary: Search channels | |
3082 | parameters: | |
ad031145 C |
3083 | - name: search |
3084 | in: query | |
3085 | required: true | |
3086 | description: > | |
3087 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
3088 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
3089 | you can use the REST API to fetch the complete channel information and interact with it. | |
3090 | schema: | |
3091 | type: string | |
84f6e32c RK |
3092 | - $ref: '#/components/parameters/start' |
3093 | - $ref: '#/components/parameters/count' | |
3094 | - $ref: '#/components/parameters/searchTarget' | |
3095 | - $ref: '#/components/parameters/sort' | |
2c318664 RK |
3096 | callbacks: |
3097 | 'searchTarget === search-index': | |
3098 | $ref: '#/components/callbacks/searchIndex' | |
ad031145 C |
3099 | responses: |
3100 | '200': | |
3101 | description: successful operation | |
3102 | content: | |
3103 | application/json: | |
3104 | schema: | |
045bcd0d | 3105 | $ref: '#/components/schemas/VideoChannelList' |
2c318664 RK |
3106 | '500': |
3107 | description: search index unavailable | |
06746a8b RK |
3108 | /blocklist/accounts: |
3109 | get: | |
3110 | tags: | |
3111 | - Account Blocks | |
3112 | summary: List account blocks | |
3113 | security: | |
3114 | - OAuth2: | |
3115 | - admin | |
3116 | parameters: | |
3117 | - $ref: '#/components/parameters/start' | |
3118 | - $ref: '#/components/parameters/count' | |
3119 | - $ref: '#/components/parameters/sort' | |
3120 | responses: | |
3121 | '200': | |
3122 | description: successful operation | |
3123 | post: | |
3124 | tags: | |
3125 | - Account Blocks | |
3126 | summary: Block an account | |
3127 | security: | |
3128 | - OAuth2: | |
3129 | - admin | |
3130 | requestBody: | |
3131 | content: | |
3132 | application/json: | |
3133 | schema: | |
3134 | type: object | |
3135 | properties: | |
3136 | accountName: | |
3137 | type: string | |
84f6e32c | 3138 | example: chocobozzz@example.org |
06746a8b RK |
3139 | description: account to block, in the form `username@domain` |
3140 | required: | |
3141 | - accountName | |
3142 | responses: | |
3143 | '200': | |
3144 | description: successful operation | |
3145 | '409': | |
3146 | description: self-blocking forbidden | |
3147 | '/blocklist/accounts/{accountName}': | |
3148 | delete: | |
3149 | tags: | |
3150 | - Account Blocks | |
3151 | summary: Unblock an account by its handle | |
3152 | security: | |
3153 | - OAuth2: | |
3154 | - admin | |
3155 | parameters: | |
3156 | - name: accountName | |
3157 | in: path | |
3158 | required: true | |
3159 | description: account to unblock, in the form `username@domain` | |
3160 | schema: | |
3161 | type: string | |
3162 | responses: | |
3163 | '201': | |
3164 | description: successful operation | |
3165 | '404': | |
3166 | description: account or account block does not exist | |
3167 | /blocklist/servers: | |
3168 | get: | |
3169 | tags: | |
3170 | - Server Blocks | |
3171 | summary: List server blocks | |
3172 | security: | |
3173 | - OAuth2: | |
3174 | - admin | |
3175 | parameters: | |
3176 | - $ref: '#/components/parameters/start' | |
3177 | - $ref: '#/components/parameters/count' | |
3178 | - $ref: '#/components/parameters/sort' | |
3179 | responses: | |
3180 | '200': | |
3181 | description: successful operation | |
3182 | post: | |
3183 | tags: | |
3184 | - Server Blocks | |
3185 | summary: Block a server | |
3186 | security: | |
3187 | - OAuth2: | |
3188 | - admin | |
3189 | requestBody: | |
3190 | content: | |
3191 | application/json: | |
3192 | schema: | |
3193 | type: object | |
3194 | properties: | |
84f6e32c | 3195 | host: |
06746a8b | 3196 | type: string |
84f6e32c | 3197 | format: hostname |
06746a8b RK |
3198 | description: server domain to block |
3199 | required: | |
84f6e32c | 3200 | - host |
06746a8b RK |
3201 | responses: |
3202 | '200': | |
3203 | description: successful operation | |
3204 | '409': | |
3205 | description: self-blocking forbidden | |
3206 | '/blocklist/servers/{host}': | |
3207 | delete: | |
3208 | tags: | |
3209 | - Server Blocks | |
3210 | summary: Unblock a server by its domain | |
3211 | security: | |
3212 | - OAuth2: | |
3213 | - admin | |
3214 | parameters: | |
3215 | - name: host | |
3216 | in: path | |
3217 | required: true | |
3218 | description: server domain to unblock | |
3219 | schema: | |
3220 | type: string | |
84f6e32c | 3221 | format: hostname |
06746a8b RK |
3222 | responses: |
3223 | '201': | |
3224 | description: successful operation | |
3225 | '404': | |
3226 | description: account block does not exist | |
04b703f6 RK |
3227 | /redundancy/{host}: |
3228 | put: | |
3229 | tags: | |
3230 | - Instance Redundancy | |
3231 | summary: Update a server redundancy policy | |
3232 | security: | |
3233 | - OAuth2: | |
3234 | - admin | |
3235 | parameters: | |
3236 | - name: host | |
3237 | in: path | |
3238 | required: true | |
3239 | description: server domain to mirror | |
3240 | schema: | |
3241 | type: string | |
84f6e32c | 3242 | format: hostname |
04b703f6 RK |
3243 | requestBody: |
3244 | content: | |
3245 | application/json: | |
3246 | schema: | |
3247 | type: object | |
3248 | properties: | |
3249 | redundancyAllowed: | |
3250 | type: boolean | |
3251 | description: allow mirroring of the host's local videos | |
3252 | required: | |
3253 | - redundancyAllowed | |
3254 | responses: | |
3255 | '204': | |
3256 | description: successful operation | |
3257 | '404': | |
3258 | description: server is not already known | |
3259 | /redundancy/videos: | |
3260 | get: | |
3261 | tags: | |
3262 | - Video Mirroring | |
3263 | summary: List videos being mirrored | |
3264 | security: | |
3265 | - OAuth2: | |
3266 | - admin | |
3267 | parameters: | |
3268 | - name: target | |
3269 | in: query | |
3270 | required: true | |
3271 | description: direction of the mirror | |
3272 | schema: | |
3273 | type: string | |
3274 | enum: | |
3275 | - my-videos | |
3276 | - remote-videos | |
3277 | - $ref: '#/components/parameters/start' | |
3278 | - $ref: '#/components/parameters/count' | |
3279 | - $ref: '#/components/parameters/videoRedundanciesSort' | |
3280 | responses: | |
3281 | '200': | |
3282 | description: successful operation | |
3283 | content: | |
3284 | application/json: | |
3285 | schema: | |
3286 | type: array | |
3287 | items: | |
3288 | $ref: '#/components/schemas/VideoRedundancy' | |
3289 | post: | |
3290 | tags: | |
3291 | - Video Mirroring | |
3292 | summary: Mirror a video | |
3293 | security: | |
3294 | - OAuth2: | |
3295 | - admin | |
3296 | requestBody: | |
3297 | content: | |
3298 | application/json: | |
3299 | schema: | |
3300 | type: object | |
3301 | properties: | |
3302 | videoId: | |
b8375da9 | 3303 | $ref: '#/components/schemas/Video/properties/id' |
04b703f6 RK |
3304 | required: |
3305 | - videoId | |
3306 | responses: | |
3307 | '204': | |
3308 | description: successful operation | |
3309 | '400': | |
3310 | description: cannot mirror a local video | |
3311 | '404': | |
3312 | description: video does not exist | |
3313 | '409': | |
3314 | description: video is already mirrored | |
3315 | /redundancy/videos/{redundancyId}: | |
3316 | delete: | |
3317 | tags: | |
3318 | - Video Mirroring | |
3319 | summary: Delete a mirror done on a video | |
3320 | security: | |
3321 | - OAuth2: | |
3322 | - admin | |
3323 | parameters: | |
3324 | - name: redundancyId | |
3325 | in: path | |
3326 | required: true | |
3327 | description: id of an existing redundancy on a video | |
3328 | schema: | |
3329 | type: string | |
3330 | responses: | |
3331 | '204': | |
3332 | description: successful operation | |
3333 | '404': | |
3334 | description: video redundancy not found | |
06746a8b RK |
3335 | '/feeds/video-comments.{format}': |
3336 | get: | |
3337 | tags: | |
3338 | - Feeds | |
3339 | summary: List comments on videos | |
3340 | parameters: | |
3341 | - name: format | |
3342 | in: path | |
3343 | required: true | |
00494d6e | 3344 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' |
06746a8b RK |
3345 | schema: |
3346 | type: string | |
3347 | enum: | |
3348 | - xml | |
3349 | - rss | |
3350 | - rss2 | |
3351 | - atom | |
3352 | - atom1 | |
3353 | - json | |
3354 | - json1 | |
3355 | - name: videoId | |
d73810be | 3356 | in: query |
06746a8b RK |
3357 | description: 'limit listing to a specific video' |
3358 | schema: | |
3359 | type: string | |
00494d6e RK |
3360 | - name: accountId |
3361 | in: query | |
3362 | description: 'limit listing to a specific account' | |
3363 | schema: | |
3364 | type: string | |
3365 | - name: accountName | |
3366 | in: query | |
3367 | description: 'limit listing to a specific account' | |
3368 | schema: | |
3369 | type: string | |
3370 | - name: videoChannelId | |
3371 | in: query | |
3372 | description: 'limit listing to a specific video channel' | |
3373 | schema: | |
3374 | type: string | |
3375 | - name: videoChannelName | |
3376 | in: query | |
3377 | description: 'limit listing to a specific video channel' | |
3378 | schema: | |
3379 | type: string | |
06746a8b RK |
3380 | responses: |
3381 | '204': | |
3382 | description: successful operation | |
3383 | headers: | |
3384 | Cache-Control: | |
3385 | schema: | |
3386 | type: string | |
3387 | default: 'max-age=900' # 15 min cache | |
3388 | content: | |
3389 | application/xml: | |
3390 | schema: | |
3391 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3392 | examples: |
3393 | nightly: | |
3394 | externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local | |
06746a8b RK |
3395 | application/rss+xml: |
3396 | schema: | |
3397 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3398 | examples: |
3399 | nightly: | |
3400 | externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local | |
06746a8b RK |
3401 | text/xml: |
3402 | schema: | |
3403 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3404 | examples: |
3405 | nightly: | |
3406 | externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local | |
06746a8b RK |
3407 | application/atom+xml: |
3408 | schema: | |
3409 | $ref: '#/components/schemas/VideoCommentsForXML' | |
64df4b65 RK |
3410 | examples: |
3411 | nightly: | |
3412 | externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local | |
06746a8b RK |
3413 | application/json: |
3414 | schema: | |
3415 | type: object | |
64df4b65 RK |
3416 | examples: |
3417 | nightly: | |
3418 | externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local | |
00494d6e RK |
3419 | '400': |
3420 | x-summary: field inconsistencies | |
3421 | description: > | |
3422 | Arises when: | |
3423 | - videoId filter is mixed with a channel filter | |
3424 | '404': | |
3425 | description: video, video channel or account not found | |
06746a8b RK |
3426 | '406': |
3427 | description: accept header unsupported | |
3428 | '/feeds/videos.{format}': | |
3429 | get: | |
3430 | tags: | |
3431 | - Feeds | |
3432 | summary: List videos | |
3433 | parameters: | |
3434 | - name: format | |
3435 | in: path | |
3436 | required: true | |
00494d6e | 3437 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' |
06746a8b RK |
3438 | schema: |
3439 | type: string | |
3440 | enum: | |
3441 | - xml | |
3442 | - rss | |
3443 | - rss2 | |
3444 | - atom | |
3445 | - atom1 | |
3446 | - json | |
3447 | - json1 | |
3448 | - name: accountId | |
d73810be | 3449 | in: query |
06746a8b RK |
3450 | description: 'limit listing to a specific account' |
3451 | schema: | |
3452 | type: string | |
3453 | - name: accountName | |
d73810be | 3454 | in: query |
06746a8b RK |
3455 | description: 'limit listing to a specific account' |
3456 | schema: | |
3457 | type: string | |
3458 | - name: videoChannelId | |
d73810be | 3459 | in: query |
06746a8b RK |
3460 | description: 'limit listing to a specific video channel' |
3461 | schema: | |
3462 | type: string | |
3463 | - name: videoChannelName | |
d73810be | 3464 | in: query |
06746a8b RK |
3465 | description: 'limit listing to a specific video channel' |
3466 | schema: | |
3467 | type: string | |
84f6e32c RK |
3468 | - $ref: '#/components/parameters/sort' |
3469 | - $ref: '#/components/parameters/nsfw' | |
3470 | - $ref: '#/components/parameters/filter' | |
06746a8b RK |
3471 | responses: |
3472 | '204': | |
3473 | description: successful operation | |
3474 | headers: | |
3475 | Cache-Control: | |
3476 | schema: | |
3477 | type: string | |
3478 | default: 'max-age=900' # 15 min cache | |
3479 | content: | |
3480 | application/xml: | |
3481 | schema: | |
3482 | $ref: '#/components/schemas/VideosForXML' | |
84f6e32c RK |
3483 | examples: |
3484 | nightly: | |
3485 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | |
06746a8b RK |
3486 | application/rss+xml: |
3487 | schema: | |
3488 | $ref: '#/components/schemas/VideosForXML' | |
64df4b65 RK |
3489 | examples: |
3490 | nightly: | |
3491 | externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local | |
06746a8b RK |
3492 | text/xml: |
3493 | schema: | |
3494 | $ref: '#/components/schemas/VideosForXML' | |
64df4b65 RK |
3495 | examples: |
3496 | nightly: | |
3497 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | |
06746a8b RK |
3498 | application/atom+xml: |
3499 | schema: | |
3500 | $ref: '#/components/schemas/VideosForXML' | |
64df4b65 RK |
3501 | examples: |
3502 | nightly: | |
3503 | externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local | |
06746a8b RK |
3504 | application/json: |
3505 | schema: | |
3506 | type: object | |
64df4b65 RK |
3507 | examples: |
3508 | nightly: | |
3509 | externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local | |
00494d6e RK |
3510 | '404': |
3511 | description: video channel or account not found | |
06746a8b RK |
3512 | '406': |
3513 | description: accept header unsupported | |
64df4b65 RK |
3514 | '/feeds/subscriptions.{format}': |
3515 | get: | |
3516 | tags: | |
3517 | - Feeds | |
3518 | - Account | |
3519 | summary: List videos of subscriptions tied to a token | |
3520 | parameters: | |
3521 | - name: format | |
3522 | in: path | |
3523 | required: true | |
3524 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' | |
3525 | schema: | |
3526 | type: string | |
3527 | enum: | |
3528 | - xml | |
3529 | - rss | |
3530 | - rss2 | |
3531 | - atom | |
3532 | - atom1 | |
3533 | - json | |
3534 | - json1 | |
3535 | - name: accountId | |
3536 | in: query | |
3537 | description: limit listing to a specific account | |
3538 | schema: | |
3539 | type: string | |
3540 | required: true | |
3541 | - name: token | |
3542 | in: query | |
3543 | description: private token allowing access | |
3544 | schema: | |
3545 | type: string | |
3546 | required: true | |
3547 | - $ref: '#/components/parameters/sort' | |
3548 | - $ref: '#/components/parameters/nsfw' | |
3549 | - $ref: '#/components/parameters/filter' | |
3550 | responses: | |
3551 | '204': | |
3552 | description: successful operation | |
3553 | headers: | |
3554 | Cache-Control: | |
3555 | schema: | |
3556 | type: string | |
3557 | default: 'max-age=900' # 15 min cache | |
3558 | content: | |
3559 | application/xml: | |
3560 | schema: | |
3561 | $ref: '#/components/schemas/VideosForXML' | |
3562 | application/rss+xml: | |
3563 | schema: | |
3564 | $ref: '#/components/schemas/VideosForXML' | |
3565 | text/xml: | |
3566 | schema: | |
3567 | $ref: '#/components/schemas/VideosForXML' | |
3568 | application/atom+xml: | |
3569 | schema: | |
3570 | $ref: '#/components/schemas/VideosForXML' | |
3571 | application/json: | |
3572 | schema: | |
3573 | type: object | |
3574 | '406': | |
3575 | description: accept header unsupported | |
7461d440 RK |
3576 | /plugins: |
3577 | get: | |
3578 | tags: | |
3579 | - Plugins | |
3580 | summary: List plugins | |
3581 | security: | |
3582 | - OAuth2: | |
3583 | - admin | |
3584 | parameters: | |
3585 | - name: pluginType | |
3586 | in: query | |
3587 | schema: | |
3588 | type: integer | |
3589 | - name: uninstalled | |
3590 | in: query | |
3591 | schema: | |
3592 | type: boolean | |
3593 | - $ref: '#/components/parameters/start' | |
3594 | - $ref: '#/components/parameters/count' | |
3595 | - $ref: '#/components/parameters/sort' | |
3596 | responses: | |
3597 | '200': | |
3598 | description: successful operation | |
3599 | content: | |
3600 | application/json: | |
3601 | schema: | |
3602 | $ref: '#/components/schemas/PluginResponse' | |
3603 | /plugins/available: | |
3604 | get: | |
3605 | tags: | |
3606 | - Plugins | |
3607 | summary: List available plugins | |
3608 | security: | |
3609 | - OAuth2: | |
3610 | - admin | |
3611 | parameters: | |
3612 | - name: search | |
3613 | in: query | |
3614 | schema: | |
3615 | type: string | |
3616 | - name: pluginType | |
3617 | in: query | |
3618 | schema: | |
3619 | type: integer | |
3620 | - name: currentPeerTubeEngine | |
3621 | in: query | |
3622 | schema: | |
3623 | type: string | |
3624 | - $ref: '#/components/parameters/start' | |
3625 | - $ref: '#/components/parameters/count' | |
3626 | - $ref: '#/components/parameters/sort' | |
3627 | responses: | |
3628 | '200': | |
3629 | description: successful operation | |
3630 | content: | |
3631 | application/json: | |
3632 | schema: | |
3633 | $ref: '#/components/schemas/PluginResponse' | |
3634 | '503': | |
3635 | description: plugin index unavailable | |
3636 | /plugins/install: | |
3637 | post: | |
3638 | tags: | |
3639 | - Plugins | |
3640 | summary: Install a plugin | |
3641 | security: | |
3642 | - OAuth2: | |
3643 | - admin | |
3644 | requestBody: | |
3645 | content: | |
3646 | application/json: | |
3647 | schema: | |
3648 | oneOf: | |
3649 | - type: object | |
3650 | properties: | |
3651 | npmName: | |
3652 | type: string | |
84f6e32c | 3653 | example: peertube-plugin-auth-ldap |
7461d440 RK |
3654 | required: |
3655 | - npmName | |
3656 | additionalProperties: false | |
3657 | - type: object | |
3658 | properties: | |
3659 | path: | |
3660 | type: string | |
3661 | required: | |
3662 | - path | |
3663 | additionalProperties: false | |
3664 | responses: | |
3665 | '204': | |
3666 | description: successful operation | |
3667 | '400': | |
3668 | description: should have either `npmName` or `path` set | |
3669 | /plugins/update: | |
3670 | post: | |
3671 | tags: | |
3672 | - Plugins | |
3673 | summary: Update a plugin | |
3674 | security: | |
3675 | - OAuth2: | |
3676 | - admin | |
3677 | requestBody: | |
3678 | content: | |
3679 | application/json: | |
3680 | schema: | |
3681 | oneOf: | |
3682 | - type: object | |
3683 | properties: | |
3684 | npmName: | |
3685 | type: string | |
84f6e32c | 3686 | example: peertube-plugin-auth-ldap |
7461d440 RK |
3687 | required: |
3688 | - npmName | |
3689 | additionalProperties: false | |
3690 | - type: object | |
3691 | properties: | |
3692 | path: | |
3693 | type: string | |
3694 | required: | |
3695 | - path | |
3696 | additionalProperties: false | |
3697 | responses: | |
3698 | '204': | |
3699 | description: successful operation | |
3700 | '400': | |
3701 | description: should have either `npmName` or `path` set | |
3702 | '404': | |
3703 | description: existing plugin not found | |
3704 | /plugins/uninstall: | |
3705 | post: | |
3706 | tags: | |
3707 | - Plugins | |
3708 | summary: Uninstall a plugin | |
3709 | security: | |
3710 | - OAuth2: | |
3711 | - admin | |
3712 | requestBody: | |
3713 | content: | |
3714 | application/json: | |
3715 | schema: | |
3716 | type: object | |
3717 | properties: | |
3718 | npmName: | |
3719 | type: string | |
84f6e32c RK |
3720 | description: name of the plugin/theme in its package.json |
3721 | example: peertube-plugin-auth-ldap | |
7461d440 RK |
3722 | required: |
3723 | - npmName | |
3724 | responses: | |
3725 | '204': | |
3726 | description: successful operation | |
3727 | '404': | |
3728 | description: existing plugin not found | |
3729 | /plugins/{npmName}: | |
3730 | get: | |
3731 | tags: | |
3732 | - Plugins | |
3733 | summary: Get a plugin | |
3734 | security: | |
3735 | - OAuth2: | |
3736 | - admin | |
3737 | parameters: | |
84f6e32c | 3738 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3739 | responses: |
3740 | '200': | |
3741 | description: successful operation | |
3742 | content: | |
3743 | application/json: | |
3744 | schema: | |
3745 | $ref: '#/components/schemas/Plugin' | |
3746 | '404': | |
3747 | description: plugin not found | |
3748 | /plugins/{npmName}/settings: | |
3749 | put: | |
3750 | tags: | |
3751 | - Plugins | |
3752 | summary: Set a plugin's settings | |
3753 | security: | |
3754 | - OAuth2: | |
3755 | - admin | |
3756 | parameters: | |
84f6e32c | 3757 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3758 | requestBody: |
3759 | content: | |
3760 | application/json: | |
3761 | schema: | |
3762 | type: object | |
3763 | properties: | |
3764 | settings: | |
3765 | type: object | |
3766 | additionalProperties: true | |
3767 | responses: | |
3768 | '204': | |
3769 | description: successful operation | |
3770 | '404': | |
3771 | description: plugin not found | |
3772 | /plugins/{npmName}/public-settings: | |
3773 | get: | |
3774 | tags: | |
3775 | - Plugins | |
3776 | summary: Get a plugin's public settings | |
7461d440 | 3777 | parameters: |
84f6e32c | 3778 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3779 | responses: |
3780 | '200': | |
3781 | description: successful operation | |
3782 | content: | |
3783 | application/json: | |
3784 | schema: | |
3785 | type: object | |
3786 | additionalProperties: true | |
3787 | '404': | |
3788 | description: plugin not found | |
3789 | /plugins/{npmName}/registered-settings: | |
3790 | get: | |
3791 | tags: | |
3792 | - Plugins | |
3793 | summary: Get a plugin's registered settings | |
3794 | security: | |
3795 | - OAuth2: | |
3796 | - admin | |
3797 | parameters: | |
84f6e32c | 3798 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
3799 | responses: |
3800 | '200': | |
3801 | description: successful operation | |
3802 | content: | |
3803 | application/json: | |
3804 | schema: | |
3805 | type: object | |
3806 | additionalProperties: true | |
3807 | '404': | |
3808 | description: plugin not found | |
3e9e6f2f | 3809 | servers: |
8f9e8be1 | 3810 | - url: 'https://peertube2.cpy.re/api/v1' |
f4d59981 | 3811 | description: Live Test Server (live data - latest nightly version) |
6441981b | 3812 | - url: 'https://peertube3.cpy.re/api/v1' |
b029d58a | 3813 | description: Live Test Server (live data - latest RC version) |
f4d59981 RK |
3814 | - url: 'https://peertube.cpy.re/api/v1' |
3815 | description: Live Test Server (live data - stable version) | |
3e9e6f2f RK |
3816 | components: |
3817 | parameters: | |
3818 | start: | |
3819 | name: start | |
3820 | in: query | |
3821 | required: false | |
06746a8b | 3822 | description: Offset used to paginate results |
3e9e6f2f | 3823 | schema: |
06746a8b | 3824 | type: integer |
84f6e32c | 3825 | minimum: 0 |
3e9e6f2f RK |
3826 | count: |
3827 | name: count | |
3828 | in: query | |
3829 | required: false | |
06746a8b | 3830 | description: "Number of items to return" |
3e9e6f2f | 3831 | schema: |
06746a8b | 3832 | type: integer |
84f6e32c | 3833 | default: 15 |
06746a8b RK |
3834 | maximum: 100 |
3835 | minimum: 1 | |
3e9e6f2f RK |
3836 | sort: |
3837 | name: sort | |
3838 | in: query | |
3839 | required: false | |
84f6e32c | 3840 | description: Sort column |
3e9e6f2f RK |
3841 | schema: |
3842 | type: string | |
84f6e32c | 3843 | example: -createdAt |
8491293b RK |
3844 | search: |
3845 | name: search | |
3846 | in: query | |
3847 | required: false | |
3848 | description: Plain text search, applied to various parts of the model depending on endpoint | |
3849 | schema: | |
3850 | type: string | |
ad031145 C |
3851 | searchTarget: |
3852 | name: searchTarget | |
3853 | in: query | |
3854 | required: false | |
3855 | description: > | |
3856 | If the administrator enabled search index support, you can override the default search target. | |
3857 | ||
3858 | ||
3859 | **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. | |
84f6e32c | 3860 | It means the instance may not yet know the objects you fetched. If you want to load video/channel information: |
ad031145 C |
3861 | * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), |
3862 | then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. | |
3863 | After that, you can use the classic REST API endpoints to fetch the complete object or interact with it | |
84f6e32c | 3864 | * 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 |
3865 | the data from the origin instance API |
3866 | schema: | |
3867 | type: string | |
3868 | enum: | |
3869 | - 'local' | |
3870 | - 'search-index' | |
fd5af7a2 RK |
3871 | videosSort: |
3872 | name: sort | |
3873 | in: query | |
3874 | required: false | |
3875 | description: Sort videos by criteria | |
3876 | schema: | |
3877 | type: string | |
3878 | enum: | |
04b703f6 | 3879 | - name |
fd5af7a2 RK |
3880 | - -duration |
3881 | - -createdAt | |
3882 | - -publishedAt | |
3883 | - -views | |
3884 | - -likes | |
3885 | - -trending | |
923d3d5a | 3886 | - -hot |
fd5af7a2 RK |
3887 | videosSearchSort: |
3888 | name: sort | |
3889 | in: query | |
3890 | required: false | |
3891 | description: Sort videos by criteria | |
3892 | schema: | |
3893 | type: string | |
3894 | enum: | |
04b703f6 | 3895 | - name |
fd5af7a2 RK |
3896 | - -duration |
3897 | - -createdAt | |
3898 | - -publishedAt | |
3899 | - -views | |
3900 | - -likes | |
3901 | - -match | |
71810d0b RK |
3902 | commentsSort: |
3903 | name: sort | |
3904 | in: query | |
3905 | required: false | |
3906 | description: Sort comments by criteria | |
3907 | schema: | |
3908 | type: string | |
3909 | enum: | |
3910 | - -createdAt | |
3911 | - -totalReplies | |
fd5af7a2 RK |
3912 | blacklistsSort: |
3913 | name: sort | |
3914 | in: query | |
3915 | required: false | |
3916 | description: Sort blacklists by criteria | |
3917 | schema: | |
3918 | type: string | |
3919 | enum: | |
3920 | - -id | |
04b703f6 | 3921 | - name |
fd5af7a2 RK |
3922 | - -duration |
3923 | - -views | |
3924 | - -likes | |
3925 | - -dislikes | |
3926 | - -uuid | |
3927 | - -createdAt | |
8491293b RK |
3928 | usersSearch: |
3929 | name: search | |
3930 | in: query | |
3931 | required: false | |
3932 | description: Plain text search that will match with user usernames or emails | |
3933 | schema: | |
3934 | type: string | |
3935 | usersBlocked: | |
3936 | name: blocked | |
3937 | in: query | |
3938 | required: false | |
3939 | description: Filter results down to (un)banned users | |
3940 | schema: | |
3941 | type: boolean | |
fd5af7a2 RK |
3942 | usersSort: |
3943 | name: sort | |
3944 | in: query | |
3945 | required: false | |
3946 | description: Sort users by criteria | |
3947 | schema: | |
3948 | type: string | |
3949 | enum: | |
3950 | - -id | |
3951 | - -username | |
3952 | - -createdAt | |
3953 | abusesSort: | |
3954 | name: sort | |
3955 | in: query | |
3956 | required: false | |
3957 | description: Sort abuses by criteria | |
3958 | schema: | |
3959 | type: string | |
3960 | enum: | |
3961 | - -id | |
3962 | - -createdAt | |
3963 | - -state | |
04b703f6 RK |
3964 | videoRedundanciesSort: |
3965 | name: sort | |
3966 | in: query | |
3967 | required: false | |
3968 | description: Sort abuses by criteria | |
3969 | schema: | |
3970 | type: string | |
3971 | enum: | |
3972 | - name | |
3e9e6f2f RK |
3973 | name: |
3974 | name: name | |
3975 | in: path | |
3976 | required: true | |
f2eb23cd | 3977 | description: The username or handle of the account |
3e9e6f2f RK |
3978 | schema: |
3979 | type: string | |
84f6e32c | 3980 | example: chocobozzz | chocobozzz@example.org |
3e9e6f2f RK |
3981 | id: |
3982 | name: id | |
3983 | in: path | |
3984 | required: true | |
3985 | description: The user id | |
3986 | schema: | |
b8375da9 | 3987 | $ref: '#/components/schemas/id' |
cb9d028a | 3988 | idOrUUID: |
3e9e6f2f RK |
3989 | name: id |
3990 | in: path | |
3991 | required: true | |
c1843150 | 3992 | description: The object id or uuid |
3e9e6f2f | 3993 | schema: |
84f6e32c | 3994 | oneOf: |
b8375da9 | 3995 | - $ref: '#/components/schemas/id' |
f880a5e7 | 3996 | - $ref: '#/components/schemas/UUIDv4' |
c00100b6 RK |
3997 | playlistId: |
3998 | name: playlistId | |
3999 | in: path | |
4000 | required: true | |
4001 | description: Playlist id | |
4002 | schema: | |
4003 | $ref: '#/components/schemas/VideoPlaylist/properties/id' | |
c1843150 C |
4004 | playlistElementId: |
4005 | name: playlistElementId | |
4006 | in: path | |
4007 | required: true | |
4008 | description: Playlist element id | |
4009 | schema: | |
b8375da9 | 4010 | $ref: '#/components/schemas/id' |
50e16ccf C |
4011 | abuseId: |
4012 | name: abuseId | |
4013 | in: path | |
4014 | required: true | |
310b5219 | 4015 | description: Abuse id |
50e16ccf | 4016 | schema: |
b8375da9 | 4017 | $ref: '#/components/schemas/Abuse/properties/id' |
668b7f09 C |
4018 | abuseMessageId: |
4019 | name: abuseMessageId | |
4020 | in: path | |
4021 | required: true | |
4022 | description: Abuse message id | |
4023 | schema: | |
b8375da9 | 4024 | $ref: '#/components/schemas/AbuseMessage/properties/id' |
67ae04a5 C |
4025 | captionLanguage: |
4026 | name: captionLanguage | |
4027 | in: path | |
4028 | required: true | |
4029 | description: The caption language | |
4030 | schema: | |
b8375da9 | 4031 | $ref: '#/components/schemas/VideoLanguageSet' |
9ce3d302 C |
4032 | channelHandle: |
4033 | name: channelHandle | |
3e9e6f2f RK |
4034 | in: path |
4035 | required: true | |
84f6e32c | 4036 | description: The video channel handle |
3e9e6f2f RK |
4037 | schema: |
4038 | type: string | |
84f6e32c | 4039 | example: my_username | my_username@example.com |
cb9d028a C |
4040 | subscriptionHandle: |
4041 | name: subscriptionHandle | |
4042 | in: path | |
4043 | required: true | |
84f6e32c | 4044 | description: The subscription handle |
cb9d028a C |
4045 | schema: |
4046 | type: string | |
84f6e32c | 4047 | example: my_username | my_username@example.com |
cb9d028a | 4048 | threadId: |
3e9e6f2f RK |
4049 | name: threadId |
4050 | in: path | |
4051 | required: true | |
cb9d028a C |
4052 | description: The thread id (root comment id) |
4053 | schema: | |
b8375da9 | 4054 | $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id' |
cb9d028a C |
4055 | commentId: |
4056 | name: commentId | |
4057 | in: path | |
4058 | required: true | |
3e9e6f2f RK |
4059 | description: The comment id |
4060 | schema: | |
b8375da9 | 4061 | $ref: '#/components/schemas/VideoComment/properties/id' |
1fd61899 C |
4062 | isLive: |
4063 | name: isLive | |
4064 | in: query | |
4065 | required: false | |
4066 | description: whether or not the video is a live | |
4067 | schema: | |
4068 | type: boolean | |
fd5af7a2 RK |
4069 | categoryOneOf: |
4070 | name: categoryOneOf | |
4071 | in: query | |
4072 | required: false | |
40cfb36b | 4073 | description: category id of the video (see [/videos/categories](#operation/getCategories)) |
fd5af7a2 RK |
4074 | schema: |
4075 | oneOf: | |
b8375da9 | 4076 | - $ref: '#/components/schemas/VideoCategorySet' |
fd5af7a2 RK |
4077 | - type: array |
4078 | items: | |
b8375da9 | 4079 | $ref: '#/components/schemas/VideoCategorySet' |
2beb9895 RK |
4080 | style: form |
4081 | explode: false | |
fd5af7a2 RK |
4082 | tagsOneOf: |
4083 | name: tagsOneOf | |
4084 | in: query | |
4085 | required: false | |
4086 | description: tag(s) of the video | |
4087 | schema: | |
4088 | oneOf: | |
4089 | - type: string | |
4090 | - type: array | |
f6d6e7f8 | 4091 | maxItems: 5 |
fd5af7a2 RK |
4092 | items: |
4093 | type: string | |
2beb9895 RK |
4094 | style: form |
4095 | explode: false | |
fd5af7a2 RK |
4096 | tagsAllOf: |
4097 | name: tagsAllOf | |
4098 | in: query | |
4099 | required: false | |
4100 | description: tag(s) of the video, where all should be present in the video | |
4101 | schema: | |
4102 | oneOf: | |
4103 | - type: string | |
4104 | - type: array | |
4105 | items: | |
4106 | type: string | |
2beb9895 RK |
4107 | style: form |
4108 | explode: false | |
fd5af7a2 RK |
4109 | languageOneOf: |
4110 | name: languageOneOf | |
4111 | in: query | |
4112 | required: false | |
40cfb36b | 4113 | 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 |
4114 | schema: |
4115 | oneOf: | |
b8375da9 | 4116 | - $ref: '#/components/schemas/VideoLanguageSet' |
fd5af7a2 RK |
4117 | - type: array |
4118 | items: | |
b8375da9 | 4119 | $ref: '#/components/schemas/VideoLanguageSet' |
2beb9895 RK |
4120 | style: form |
4121 | explode: false | |
fd5af7a2 RK |
4122 | licenceOneOf: |
4123 | name: licenceOneOf | |
4124 | in: query | |
4125 | required: false | |
40cfb36b | 4126 | description: licence id of the video (see [/videos/licences](#operation/getLicences)) |
fd5af7a2 RK |
4127 | schema: |
4128 | oneOf: | |
b8375da9 | 4129 | - $ref: '#/components/schemas/VideoLicenceSet' |
fd5af7a2 RK |
4130 | - type: array |
4131 | items: | |
b8375da9 | 4132 | $ref: '#/components/schemas/VideoLicenceSet' |
2beb9895 RK |
4133 | style: form |
4134 | explode: false | |
59c794a5 C |
4135 | skipCount: |
4136 | name: skipCount | |
4137 | in: query | |
4138 | required: false | |
4139 | description: if you don't need the `total` in the response | |
4140 | schema: | |
4141 | type: string | |
4142 | enum: | |
4143 | - 'true' | |
4144 | - 'false' | |
06746a8b | 4145 | default: 'false' |
fd5af7a2 RK |
4146 | nsfw: |
4147 | name: nsfw | |
4148 | in: query | |
4149 | required: false | |
4150 | description: whether to include nsfw videos, if any | |
4151 | schema: | |
4152 | type: string | |
4153 | enum: | |
4154 | - 'true' | |
4155 | - 'false' | |
4156 | filter: | |
4157 | name: filter | |
4158 | in: query | |
4159 | required: false | |
4160 | description: > | |
0aa52e17 | 4161 | Special filters which might require special rights: |
fd5af7a2 RK |
4162 | * `local` - only videos local to the instance |
4163 | * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges) | |
0aa52e17 | 4164 | * `all` - all videos, showing private and unlisted videos (requires Admin privileges) |
fd5af7a2 RK |
4165 | schema: |
4166 | type: string | |
4167 | enum: | |
4168 | - local | |
4169 | - all-local | |
e76d5784 RK |
4170 | subscriptionsUris: |
4171 | name: uris | |
4172 | in: query | |
4173 | required: true | |
4174 | description: list of uris to check if each is part of the user subscriptions | |
4175 | schema: | |
4176 | type: array | |
4177 | items: | |
4178 | type: string | |
84f6e32c RK |
4179 | format: uri |
4180 | npmName: | |
4181 | name: npmName | |
4182 | in: path | |
4183 | required: true | |
4184 | description: name of the plugin/theme on npmjs.com or in its package.json | |
4185 | schema: | |
4186 | type: string | |
4187 | example: peertube-plugin-auth-ldap | |
040d6896 RK |
4188 | jobType: |
4189 | name: jobType | |
4190 | in: query | |
4191 | required: false | |
4192 | description: job type | |
4193 | schema: | |
4194 | type: string | |
4195 | enum: | |
4196 | - activitypub-follow | |
4197 | - activitypub-http-broadcast | |
4198 | - activitypub-http-fetcher | |
4199 | - activitypub-http-unicast | |
4200 | ||
4201 | - video-transcoding | |
4202 | - video-file-import | |
4203 | - video-import | |
4204 | - videos-views | |
4205 | - activitypub-refresher | |
4206 | - video-redundancy | |
4207 | - video-live-ending | |
3e9e6f2f RK |
4208 | securitySchemes: |
4209 | OAuth2: | |
3c5e02f3 | 4210 | description: | |
3e9e6f2f | 4211 | Authenticating via OAuth requires the following steps: |
3c5e02f3 | 4212 | - Have an activated account |
9817060f | 4213 | - [Generate](https://docs.joinpeertube.org/api-rest-getting-started) a |
3c5e02f3 RK |
4214 | Bearer Token for that account at `/api/v1/users/token` |
4215 | - Make authenticated requests, putting *Authorization: Bearer <token\>* | |
4216 | - Profit, depending on the role assigned to the account | |
3e9e6f2f | 4217 | |
3c5e02f3 RK |
4218 | Note that the __access token is valid for 1 day__ and, and is given |
4219 | along with a __refresh token valid for 2 weeks__. | |
3e9e6f2f RK |
4220 | type: oauth2 |
4221 | flows: | |
4222 | password: | |
4223 | tokenUrl: 'https://peertube.example.com/api/v1/users/token' | |
4224 | scopes: | |
4225 | admin: Admin scope | |
4226 | moderator: Moderator scope | |
4227 | user: User scope | |
4228 | schemas: | |
b8375da9 RK |
4229 | # Resuable core properties |
4230 | id: | |
4231 | type: integer | |
4232 | minimum: 1 | |
4233 | example: 42 | |
f880a5e7 RK |
4234 | UUIDv4: |
4235 | type: string | |
4236 | format: uuid | |
4237 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | |
4238 | pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' | |
f880a5e7 RK |
4239 | minLength: 36 |
4240 | maxLength: 36 | |
b8375da9 RK |
4241 | username: |
4242 | type: string | |
77b0c6b5 | 4243 | description: immutable name of the user, used to find or mention its actor |
b8375da9 RK |
4244 | example: chocobozzz |
4245 | pattern: '/^[a-z0-9._]{1,50}$/' | |
4246 | minLength: 1 | |
4247 | maxLength: 50 | |
4248 | usernameChannel: | |
4249 | type: string | |
77b0c6b5 | 4250 | description: immutable name of the channel, used to interact with its actor |
9a320a06 | 4251 | example: framasoft_videos |
b8375da9 RK |
4252 | pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/' |
4253 | password: | |
4254 | type: string | |
4255 | format: password | |
b8375da9 RK |
4256 | minLength: 6 |
4257 | maxLength: 255 | |
f880a5e7 | 4258 | |
40cfb36b RK |
4259 | VideoCategorySet: |
4260 | type: integer | |
4261 | description: category id of the video (see [/videos/categories](#operation/getCategories)) | |
b8375da9 | 4262 | example: 15 |
dfcb6f50 | 4263 | VideoConstantNumber-Category: |
3e9e6f2f RK |
4264 | properties: |
4265 | id: | |
40cfb36b | 4266 | $ref: '#/components/schemas/VideoCategorySet' |
3e9e6f2f RK |
4267 | label: |
4268 | type: string | |
b8375da9 | 4269 | example: Science & Technology |
40cfb36b RK |
4270 | |
4271 | VideoLicenceSet: | |
4272 | type: integer | |
4273 | description: licence id of the video (see [/videos/licences](#operation/getLicences)) | |
b8375da9 | 4274 | example: 2 |
dfcb6f50 RK |
4275 | VideoConstantNumber-Licence: |
4276 | properties: | |
4277 | id: | |
40cfb36b | 4278 | $ref: '#/components/schemas/VideoLicenceSet' |
dfcb6f50 RK |
4279 | label: |
4280 | type: string | |
b8375da9 RK |
4281 | example: Attribution - Share Alike |
4282 | ||
40cfb36b RK |
4283 | VideoLanguageSet: |
4284 | type: string | |
4285 | description: language id of the video (see [/videos/languages](#operation/getLanguages)) | |
b8375da9 | 4286 | example: en |
dfcb6f50 | 4287 | VideoConstantString-Language: |
3e9e6f2f RK |
4288 | properties: |
4289 | id: | |
40cfb36b | 4290 | $ref: '#/components/schemas/VideoLanguageSet' |
3e9e6f2f RK |
4291 | label: |
4292 | type: string | |
b8375da9 | 4293 | example: English |
c1843150 C |
4294 | |
4295 | VideoPlaylistPrivacySet: | |
4296 | type: integer | |
4297 | enum: | |
4298 | - 1 | |
4299 | - 2 | |
4300 | - 3 | |
40cfb36b | 4301 | description: Video playlist privacy policy (see [/video-playlists/privacies]) |
c1843150 C |
4302 | VideoPlaylistPrivacyConstant: |
4303 | properties: | |
4304 | id: | |
4305 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
4306 | label: | |
4307 | type: string | |
4308 | ||
4309 | VideoPlaylistTypeSet: | |
4310 | type: integer | |
4311 | enum: | |
4312 | - 1 | |
4313 | - 2 | |
40cfb36b | 4314 | description: The video playlist type (Regular = `1`, Watch Later = `2`) |
c1843150 C |
4315 | VideoPlaylistTypeConstant: |
4316 | properties: | |
4317 | id: | |
4318 | $ref: '#/components/schemas/VideoPlaylistTypeSet' | |
4319 | label: | |
4320 | type: string | |
4321 | ||
ee89e8fd C |
4322 | VideoPrivacySet: |
4323 | type: integer | |
3e9e6f2f | 4324 | enum: |
ee89e8fd C |
4325 | - 1 |
4326 | - 2 | |
4327 | - 3 | |
c1843150 | 4328 | - 4 |
40cfb36b | 4329 | description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies)) |
ee89e8fd C |
4330 | VideoPrivacyConstant: |
4331 | properties: | |
4332 | id: | |
c1843150 | 4333 | $ref: '#/components/schemas/VideoPrivacySet' |
ee89e8fd C |
4334 | label: |
4335 | type: string | |
50e16ccf | 4336 | |
0590bb46 C |
4337 | NSFWPolicy: |
4338 | type: string | |
4339 | enum: | |
4340 | - display | |
4341 | - blur | |
4342 | - do_not_list | |
4343 | ||
4344 | UserRole: | |
06746a8b | 4345 | type: integer |
0590bb46 C |
4346 | enum: |
4347 | - 0 | |
4348 | - 1 | |
4349 | - 2 | |
06746a8b | 4350 | description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)' |
2c318664 | 4351 | example: 2 |
6d989edc C |
4352 | UserAdminFlags: |
4353 | type: integer | |
4354 | enum: | |
4355 | - 0 | |
4356 | - 1 | |
4357 | description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)' | |
4358 | example: 1 | |
0590bb46 | 4359 | |
5dce26d2 C |
4360 | VideoStateConstant: |
4361 | properties: | |
4362 | id: | |
4363 | type: integer | |
4364 | enum: | |
4365 | - 1 | |
4366 | - 2 | |
4367 | - 3 | |
06746a8b | 4368 | description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)' |
5dce26d2 C |
4369 | label: |
4370 | type: string | |
50e16ccf | 4371 | |
4f32032f | 4372 | AbuseStateSet: |
50e16ccf C |
4373 | type: integer |
4374 | enum: | |
4375 | - 1 | |
4376 | - 2 | |
4377 | - 3 | |
668b7f09 | 4378 | description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)' |
4f32032f | 4379 | AbuseStateConstant: |
50e16ccf C |
4380 | properties: |
4381 | id: | |
4f32032f | 4382 | $ref: '#/components/schemas/AbuseStateSet' |
50e16ccf C |
4383 | label: |
4384 | type: string | |
4f32032f | 4385 | AbusePredefinedReasons: |
1ebddadd RK |
4386 | type: array |
4387 | items: | |
4388 | type: string | |
4389 | enum: | |
4390 | - violentOrAbusive | |
4391 | - hatefulOrAbusive | |
4392 | - spamOrMisleading | |
4393 | - privacy | |
4394 | - rights | |
4395 | - serverRules | |
4396 | - thumbnails | |
4397 | - captions | |
84f6e32c | 4398 | example: [spamOrMisleading] |
50e16ccf | 4399 | |
40cfb36b RK |
4400 | VideoResolutionSet: |
4401 | type: integer | |
4402 | description: | | |
4403 | Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`) | |
4404 | ||
4405 | `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos. | |
4406 | example: 240 | |
5dce26d2 | 4407 | VideoResolutionConstant: |
2c4876f2 | 4408 | description: resolutions and their labels for the video |
5dce26d2 C |
4409 | properties: |
4410 | id: | |
40cfb36b | 4411 | $ref: '#/components/schemas/VideoResolutionSet' |
5dce26d2 C |
4412 | label: |
4413 | type: string | |
84f6e32c | 4414 | example: 240p |
5dce26d2 C |
4415 | VideoScheduledUpdate: |
4416 | properties: | |
4417 | privacy: | |
4418 | $ref: '#/components/schemas/VideoPrivacySet' | |
5dce26d2 C |
4419 | updateAt: |
4420 | type: string | |
4421 | format: date | |
4422 | description: When to update the video | |
4423 | required: | |
4424 | - updateAt | |
c1843150 | 4425 | AccountSummary: |
5dce26d2 C |
4426 | properties: |
4427 | id: | |
06746a8b | 4428 | type: integer |
5dce26d2 C |
4429 | name: |
4430 | type: string | |
4431 | displayName: | |
4432 | type: string | |
4433 | url: | |
4434 | type: string | |
84f6e32c | 4435 | format: url |
5dce26d2 C |
4436 | host: |
4437 | type: string | |
84f6e32c | 4438 | format: hostname |
5dce26d2 C |
4439 | avatar: |
4440 | nullable: true | |
c1843150 | 4441 | allOf: |
75cba40d | 4442 | - $ref: '#/components/schemas/ActorImage' |
5dce26d2 C |
4443 | VideoChannelSummary: |
4444 | properties: | |
4445 | id: | |
b8375da9 | 4446 | $ref: '#/components/schemas/id' |
5dce26d2 C |
4447 | name: |
4448 | type: string | |
4449 | displayName: | |
4450 | type: string | |
4451 | url: | |
4452 | type: string | |
84f6e32c | 4453 | format: url |
5dce26d2 C |
4454 | host: |
4455 | type: string | |
84f6e32c | 4456 | format: hostname |
5dce26d2 C |
4457 | avatar: |
4458 | nullable: true | |
c1843150 | 4459 | allOf: |
75cba40d | 4460 | - $ref: '#/components/schemas/ActorImage' |
5dce26d2 C |
4461 | PlaylistElement: |
4462 | properties: | |
4463 | position: | |
06746a8b | 4464 | type: integer |
5dce26d2 | 4465 | startTimestamp: |
06746a8b | 4466 | type: integer |
c00100b6 | 4467 | format: seconds |
5dce26d2 | 4468 | stopTimestamp: |
06746a8b | 4469 | type: integer |
c00100b6 | 4470 | format: seconds |
bfbd9128 C |
4471 | video: |
4472 | nullable: true | |
c1843150 C |
4473 | allOf: |
4474 | - $ref: '#/components/schemas/Video' | |
5dce26d2 | 4475 | VideoFile: |
2c4876f2 | 4476 | readOnly: true |
5dce26d2 C |
4477 | properties: |
4478 | magnetUri: | |
4479 | type: string | |
2c4876f2 RK |
4480 | format: uri |
4481 | description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file | |
4482 | 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 | |
4483 | pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i | |
5dce26d2 C |
4484 | resolution: |
4485 | $ref: '#/components/schemas/VideoResolutionConstant' | |
4486 | size: | |
06746a8b | 4487 | type: integer |
2c4876f2 | 4488 | description: Video file size in bytes |
5dce26d2 C |
4489 | torrentUrl: |
4490 | type: string | |
e81af300 | 4491 | description: Direct URL of the torrent file |
84f6e32c | 4492 | format: url |
0ad45af7 | 4493 | torrentDownloadUrl: |
5dce26d2 | 4494 | type: string |
e81af300 | 4495 | description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog) |
84f6e32c | 4496 | format: url |
5dce26d2 C |
4497 | fileUrl: |
4498 | type: string | |
e81af300 | 4499 | description: Direct URL of the video |
84f6e32c | 4500 | format: url |
5dce26d2 C |
4501 | fileDownloadUrl: |
4502 | type: string | |
e81af300 | 4503 | description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog) |
84f6e32c | 4504 | format: url |
5dce26d2 C |
4505 | fps: |
4506 | type: number | |
2c4876f2 | 4507 | description: Frames per second of the video file |
63748ad0 C |
4508 | metadataUrl: |
4509 | type: string | |
84f6e32c | 4510 | format: url |
2c4876f2 | 4511 | description: URL dereferencing the output of ffprobe on the file |
5dce26d2 | 4512 | VideoStreamingPlaylists: |
4ca669e3 RK |
4513 | allOf: |
4514 | - type: object | |
4515 | properties: | |
4516 | id: | |
b8375da9 | 4517 | $ref: '#/components/schemas/id' |
4ca669e3 RK |
4518 | type: |
4519 | type: integer | |
4520 | enum: | |
4521 | - 1 | |
4522 | description: | | |
4523 | Playlist type: | |
4524 | - `1`: HLS | |
4525 | - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS' | |
4526 | VideoStreamingPlaylists-HLS: | |
5dce26d2 | 4527 | properties: |
5dce26d2 C |
4528 | playlistUrl: |
4529 | type: string | |
84f6e32c | 4530 | format: url |
5dce26d2 C |
4531 | segmentsSha256Url: |
4532 | type: string | |
84f6e32c | 4533 | format: url |
63748ad0 C |
4534 | files: |
4535 | type: array | |
c540d865 RK |
4536 | description: | |
4537 | Video files associated to this playlist. | |
4538 | ||
4539 | 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 |
4540 | items: |
4541 | $ref: '#/components/schemas/VideoFile' | |
5dce26d2 C |
4542 | redundancies: |
4543 | type: array | |
4544 | items: | |
4545 | type: object | |
4546 | properties: | |
4547 | baseUrl: | |
4548 | type: string | |
84f6e32c | 4549 | format: url |
f4d59981 RK |
4550 | VideoInfo: |
4551 | properties: | |
4552 | id: | |
b8375da9 | 4553 | $ref: '#/components/schemas/Video/properties/id' |
f4d59981 | 4554 | uuid: |
b8375da9 | 4555 | $ref: '#/components/schemas/Video/properties/uuid' |
f4d59981 | 4556 | name: |
b8375da9 | 4557 | $ref: '#/components/schemas/Video/properties/name' |
3e9e6f2f RK |
4558 | Video: |
4559 | properties: | |
4560 | id: | |
b8375da9 RK |
4561 | description: object id for the video |
4562 | allOf: | |
4563 | - $ref: '#/components/schemas/id' | |
3e9e6f2f | 4564 | uuid: |
b8375da9 RK |
4565 | description: universal identifier for the video, that can be used across instances |
4566 | allOf: | |
4567 | - $ref: '#/components/schemas/UUIDv4' | |
4e239e35 C |
4568 | isLive: |
4569 | type: boolean | |
3e9e6f2f RK |
4570 | createdAt: |
4571 | type: string | |
84f6e32c | 4572 | format: date-time |
0c114568 RK |
4573 | example: 2017-10-01T10:52:46.396Z |
4574 | description: time at which the video object was first drafted | |
3e9e6f2f RK |
4575 | publishedAt: |
4576 | type: string | |
84f6e32c | 4577 | format: date-time |
0c114568 RK |
4578 | example: 2018-10-01T10:52:46.396Z |
4579 | 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 |
4580 | updatedAt: |
4581 | type: string | |
84f6e32c | 4582 | format: date-time |
0c114568 RK |
4583 | example: 2021-05-04T08:01:01.502Z |
4584 | description: last time the video's metadata was modified | |
5dce26d2 C |
4585 | originallyPublishedAt: |
4586 | type: string | |
84f6e32c | 4587 | format: date-time |
0c114568 RK |
4588 | example: 2010-10-01T10:52:46.396Z |
4589 | description: used to represent a date of first publication, prior to the practical publication date of `publishedAt` | |
3e9e6f2f | 4590 | category: |
b8375da9 RK |
4591 | allOf: |
4592 | - $ref: '#/components/schemas/VideoConstantNumber-Category' | |
4593 | description: category in which the video is classified | |
3e9e6f2f | 4594 | licence: |
b8375da9 RK |
4595 | allOf: |
4596 | - $ref: '#/components/schemas/VideoConstantNumber-Licence' | |
4597 | description: licence under which the video is distributed | |
3e9e6f2f | 4598 | language: |
b8375da9 RK |
4599 | allOf: |
4600 | - $ref: '#/components/schemas/VideoConstantString-Language' | |
4601 | description: main language used in the video | |
3e9e6f2f | 4602 | privacy: |
b8375da9 RK |
4603 | allOf: |
4604 | - $ref: '#/components/schemas/VideoPrivacyConstant' | |
4605 | description: privacy policy used to distribute the video | |
3e9e6f2f RK |
4606 | description: |
4607 | type: string | |
0c114568 RK |
4608 | example: | |
4609 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n | |
4610 | **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr... | |
4611 | minLength: 3 | |
4612 | maxLength: 250 | |
4613 | description: | | |
4614 | truncated description of the video, written in Markdown. | |
4615 | Resolve `descriptionPath` to get the full description of maximum `10000` characters. | |
3e9e6f2f | 4616 | duration: |
06746a8b | 4617 | type: integer |
84f6e32c | 4618 | example: 1419 |
c00100b6 | 4619 | format: seconds |
0c114568 | 4620 | description: duration of the video in seconds |
3e9e6f2f RK |
4621 | isLocal: |
4622 | type: boolean | |
4623 | name: | |
4624 | type: string | |
b8375da9 | 4625 | description: title of the video |
84f6e32c | 4626 | example: What is PeerTube? |
bdac0584 RK |
4627 | minLength: 3 |
4628 | maxLength: 120 | |
3e9e6f2f RK |
4629 | thumbnailPath: |
4630 | type: string | |
84f6e32c | 4631 | example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
3e9e6f2f RK |
4632 | previewPath: |
4633 | type: string | |
20dcfd74 | 4634 | example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
3e9e6f2f RK |
4635 | embedPath: |
4636 | type: string | |
84f6e32c | 4637 | example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee |
3e9e6f2f | 4638 | views: |
06746a8b | 4639 | type: integer |
84f6e32c | 4640 | example: 1337 |
3e9e6f2f | 4641 | likes: |
06746a8b | 4642 | type: integer |
84f6e32c | 4643 | example: 42 |
3e9e6f2f | 4644 | dislikes: |
06746a8b | 4645 | type: integer |
84f6e32c | 4646 | example: 7 |
3e9e6f2f RK |
4647 | nsfw: |
4648 | type: boolean | |
5dce26d2 C |
4649 | waitTranscoding: |
4650 | type: boolean | |
4651 | nullable: true | |
4652 | state: | |
b8375da9 RK |
4653 | allOf: |
4654 | - $ref: '#/components/schemas/VideoStateConstant' | |
4655 | description: represents the internal state of the video processing within the PeerTube instance | |
5dce26d2 C |
4656 | scheduledUpdate: |
4657 | nullable: true | |
c1843150 C |
4658 | allOf: |
4659 | - $ref: '#/components/schemas/VideoScheduledUpdate' | |
5dce26d2 C |
4660 | blacklisted: |
4661 | nullable: true | |
4662 | type: boolean | |
4663 | blacklistedReason: | |
4664 | nullable: true | |
4665 | type: string | |
3e9e6f2f | 4666 | account: |
c1843150 | 4667 | $ref: '#/components/schemas/AccountSummary' |
5dce26d2 C |
4668 | channel: |
4669 | $ref: '#/components/schemas/VideoChannelSummary' | |
4670 | userHistory: | |
4671 | nullable: true | |
3e9e6f2f RK |
4672 | type: object |
4673 | properties: | |
5dce26d2 | 4674 | currentTime: |
06746a8b | 4675 | type: integer |
5dce26d2 C |
4676 | VideoDetails: |
4677 | allOf: | |
4678 | - $ref: '#/components/schemas/Video' | |
4679 | - type: object | |
4680 | properties: | |
4681 | descriptionPath: | |
3e9e6f2f | 4682 | type: string |
0c114568 RK |
4683 | example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description |
4684 | description: path at which to get the full description of maximum `10000` characters | |
5dce26d2 | 4685 | support: |
3e9e6f2f | 4686 | type: string |
00494d6e | 4687 | description: A text tell the audience how to support the video creator |
9a320a06 | 4688 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
c540d865 RK |
4689 | minLength: 3 |
4690 | maxLength: 1000 | |
5dce26d2 C |
4691 | channel: |
4692 | $ref: '#/components/schemas/VideoChannel' | |
4693 | account: | |
4694 | $ref: '#/components/schemas/Account' | |
4695 | tags: | |
bdac0584 | 4696 | example: [flowers, gardening] |
5dce26d2 | 4697 | type: array |
bdac0584 RK |
4698 | minItems: 1 |
4699 | maxItems: 5 | |
5dce26d2 C |
4700 | items: |
4701 | type: string | |
bdac0584 RK |
4702 | minLength: 2 |
4703 | maxLength: 30 | |
5dce26d2 C |
4704 | commentsEnabled: |
4705 | type: boolean | |
4706 | downloadEnabled: | |
4707 | type: boolean | |
4708 | trackerUrls: | |
4709 | type: array | |
4710 | items: | |
4711 | type: string | |
84f6e32c | 4712 | format: url |
2c4876f2 RK |
4713 | example: |
4714 | - https://peertube2.cpy.re/tracker/announce | |
4715 | - wss://peertube2.cpy.re/tracker/socket | |
c540d865 RK |
4716 | files: |
4717 | type: array | |
4718 | items: | |
4719 | $ref: '#/components/schemas/VideoFile' | |
4720 | description: | | |
4721 | WebTorrent/raw video files. If WebTorrent is disabled on the server: | |
4722 | ||
4723 | - field will be empty | |
4724 | - video files will be found in `streamingPlaylists[].files` field | |
5dce26d2 C |
4725 | streamingPlaylists: |
4726 | type: array | |
4727 | items: | |
4728 | $ref: '#/components/schemas/VideoStreamingPlaylists' | |
c540d865 RK |
4729 | description: | |
4730 | HLS playlists/manifest files. If HLS is disabled on the server: | |
4731 | ||
4732 | - field will be empty | |
4733 | - video files will be found in `files` field | |
04b703f6 RK |
4734 | FileRedundancyInformation: |
4735 | properties: | |
4736 | id: | |
b8375da9 | 4737 | $ref: '#/components/schemas/id' |
04b703f6 RK |
4738 | fileUrl: |
4739 | type: string | |
84f6e32c | 4740 | format: url |
04b703f6 RK |
4741 | strategy: |
4742 | type: string | |
84f6e32c RK |
4743 | enum: |
4744 | - manual | |
4745 | - most-views | |
4746 | - trending | |
4747 | - recently-added | |
04b703f6 RK |
4748 | size: |
4749 | type: integer | |
4750 | createdAt: | |
4751 | type: string | |
4752 | format: date-time | |
4753 | updatedAt: | |
4754 | type: string | |
4755 | format: date-time | |
4756 | expiresOn: | |
4757 | type: string | |
4758 | format: date-time | |
4759 | VideoRedundancy: | |
4760 | properties: | |
4761 | id: | |
b8375da9 | 4762 | $ref: '#/components/schemas/id' |
04b703f6 RK |
4763 | name: |
4764 | type: string | |
4765 | url: | |
4766 | type: string | |
84f6e32c | 4767 | format: url |
04b703f6 | 4768 | uuid: |
f880a5e7 | 4769 | $ref: '#/components/schemas/UUIDv4' |
04b703f6 RK |
4770 | redundancies: |
4771 | type: object | |
4772 | properties: | |
4773 | files: | |
4774 | type: array | |
4775 | items: | |
1e904cde | 4776 | $ref: '#/components/schemas/FileRedundancyInformation' |
04b703f6 RK |
4777 | streamingPlaylists: |
4778 | type: array | |
4779 | items: | |
1e904cde | 4780 | $ref: '#/components/schemas/FileRedundancyInformation' |
1f82e3e8 C |
4781 | VideoImportStateConstant: |
4782 | properties: | |
4783 | id: | |
4784 | type: integer | |
4785 | enum: | |
4786 | - 1 | |
4787 | - 2 | |
4788 | - 3 | |
06746a8b | 4789 | description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' |
1f82e3e8 C |
4790 | label: |
4791 | type: string | |
84f6e32c | 4792 | example: Pending |
ac2a5b54 RK |
4793 | VideoCreateImport: |
4794 | allOf: | |
4795 | - type: object | |
4796 | additionalProperties: false | |
4797 | oneOf: | |
4798 | - properties: | |
4799 | targetUrl: | |
4800 | $ref: '#/components/schemas/VideoImport/properties/targetUrl' | |
4801 | required: [targetUrl] | |
4802 | - properties: | |
4803 | magnetUri: | |
4804 | $ref: '#/components/schemas/VideoImport/properties/magnetUri' | |
4805 | required: [magnetUri] | |
4806 | - properties: | |
4807 | torrentfile: | |
4808 | $ref: '#/components/schemas/VideoImport/properties/torrentfile' | |
4809 | required: [torrentfile] | |
4810 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
4811 | required: | |
4812 | - channelId | |
4813 | - name | |
1f82e3e8 C |
4814 | VideoImport: |
4815 | properties: | |
4816 | id: | |
ac2a5b54 RK |
4817 | readOnly: true |
4818 | allOf: | |
4819 | - $ref: '#/components/schemas/id' | |
1f82e3e8 C |
4820 | targetUrl: |
4821 | type: string | |
84f6e32c | 4822 | format: url |
2c4876f2 | 4823 | description: remote URL where to find the import's source video |
84f6e32c | 4824 | example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d |
1f82e3e8 C |
4825 | magnetUri: |
4826 | type: string | |
84f6e32c | 4827 | format: uri |
2c4876f2 | 4828 | description: magnet URI allowing to resolve the import's source video |
84f6e32c | 4829 | 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 | 4830 | pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i |
ac2a5b54 RK |
4831 | torrentfile: |
4832 | writeOnly: true | |
4833 | type: string | |
4834 | format: binary | |
4835 | description: Torrent file containing only the video file | |
1f82e3e8 | 4836 | torrentName: |
ac2a5b54 | 4837 | readOnly: true |
1f82e3e8 C |
4838 | type: string |
4839 | state: | |
ac2a5b54 RK |
4840 | readOnly: true |
4841 | allOf: | |
4842 | - $ref: '#/components/schemas/VideoImportStateConstant' | |
1f82e3e8 | 4843 | error: |
ac2a5b54 | 4844 | readOnly: true |
1f82e3e8 C |
4845 | type: string |
4846 | createdAt: | |
ac2a5b54 | 4847 | readOnly: true |
1f82e3e8 | 4848 | type: string |
84f6e32c | 4849 | format: date-time |
1f82e3e8 | 4850 | updatedAt: |
ac2a5b54 | 4851 | readOnly: true |
1f82e3e8 | 4852 | type: string |
84f6e32c | 4853 | format: date-time |
1f82e3e8 | 4854 | video: |
ac2a5b54 | 4855 | readOnly: true |
2c4876f2 RK |
4856 | nullable: true |
4857 | allOf: | |
4858 | - $ref: '#/components/schemas/Video' | |
5844dde3 RK |
4859 | VideoImportsList: |
4860 | properties: | |
4861 | total: | |
4862 | type: integer | |
4863 | example: 1 | |
4864 | data: | |
4865 | type: array | |
4866 | maxItems: 100 | |
4867 | items: | |
4868 | $ref: '#/components/schemas/VideoImport' | |
668b7f09 | 4869 | Abuse: |
3e9e6f2f RK |
4870 | properties: |
4871 | id: | |
b8375da9 | 4872 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
4873 | reason: |
4874 | type: string | |
84f6e32c | 4875 | example: The video is a spam |
4302058c RK |
4876 | minLength: 2 |
4877 | maxLength: 3000 | |
1ebddadd | 4878 | predefinedReasons: |
4f32032f | 4879 | $ref: '#/components/schemas/AbusePredefinedReasons' |
3e9e6f2f RK |
4880 | reporterAccount: |
4881 | $ref: '#/components/schemas/Account' | |
50e16ccf | 4882 | state: |
4f32032f | 4883 | $ref: '#/components/schemas/AbuseStateConstant' |
50e16ccf C |
4884 | moderationComment: |
4885 | type: string | |
84f6e32c | 4886 | example: Decided to ban the server since it spams us regularly |
4302058c RK |
4887 | minLength: 2 |
4888 | maxLength: 3000 | |
3e9e6f2f | 4889 | video: |
bdac0584 | 4890 | $ref: '#/components/schemas/VideoInfo' |
3e9e6f2f RK |
4891 | createdAt: |
4892 | type: string | |
84f6e32c | 4893 | format: date-time |
668b7f09 C |
4894 | AbuseMessage: |
4895 | properties: | |
4896 | id: | |
b8375da9 | 4897 | $ref: '#/components/schemas/id' |
668b7f09 C |
4898 | message: |
4899 | type: string | |
4302058c | 4900 | minLength: 2 |
f6d6e7f8 | 4901 | maxLength: 3000 |
668b7f09 C |
4902 | byModerator: |
4903 | type: boolean | |
4904 | createdAt: | |
4905 | type: string | |
4906 | format: date-time | |
4907 | account: | |
4908 | $ref: '#/components/schemas/AccountSummary' | |
3e9e6f2f RK |
4909 | VideoBlacklist: |
4910 | properties: | |
4911 | id: | |
b8375da9 | 4912 | $ref: '#/components/schemas/id' |
3e9e6f2f | 4913 | videoId: |
b8375da9 | 4914 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f RK |
4915 | createdAt: |
4916 | type: string | |
84f6e32c | 4917 | format: date-time |
3e9e6f2f RK |
4918 | updatedAt: |
4919 | type: string | |
84f6e32c | 4920 | format: date-time |
3e9e6f2f RK |
4921 | name: |
4922 | type: string | |
4302058c RK |
4923 | minLength: 3 |
4924 | maxLength: 120 | |
3e9e6f2f | 4925 | uuid: |
f880a5e7 | 4926 | $ref: '#/components/schemas/UUIDv4' |
3e9e6f2f RK |
4927 | description: |
4928 | type: string | |
4302058c RK |
4929 | minLength: 3 |
4930 | maxLength: 10000 | |
3e9e6f2f | 4931 | duration: |
06746a8b | 4932 | type: integer |
3e9e6f2f | 4933 | views: |
06746a8b | 4934 | type: integer |
3e9e6f2f | 4935 | likes: |
06746a8b | 4936 | type: integer |
3e9e6f2f | 4937 | dislikes: |
06746a8b | 4938 | type: integer |
3e9e6f2f RK |
4939 | nsfw: |
4940 | type: boolean | |
71810d0b RK |
4941 | VideoPlaylist: |
4942 | properties: | |
4943 | id: | |
b8375da9 RK |
4944 | $ref: '#/components/schemas/id' |
4945 | uuid: | |
4946 | $ref: '#/components/schemas/UUIDv4' | |
71810d0b RK |
4947 | createdAt: |
4948 | type: string | |
84f6e32c | 4949 | format: date-time |
71810d0b RK |
4950 | updatedAt: |
4951 | type: string | |
84f6e32c | 4952 | format: date-time |
71810d0b RK |
4953 | description: |
4954 | type: string | |
4302058c RK |
4955 | minLength: 3 |
4956 | maxLength: 1000 | |
71810d0b RK |
4957 | displayName: |
4958 | type: string | |
4302058c RK |
4959 | minLength: 1 |
4960 | maxLength: 120 | |
71810d0b RK |
4961 | isLocal: |
4962 | type: boolean | |
4963 | videoLength: | |
06746a8b | 4964 | type: integer |
b8375da9 | 4965 | minimum: 0 |
71810d0b RK |
4966 | thumbnailPath: |
4967 | type: string | |
4968 | privacy: | |
c1843150 | 4969 | $ref: '#/components/schemas/VideoPlaylistPrivacyConstant' |
71810d0b | 4970 | type: |
c1843150 | 4971 | $ref: '#/components/schemas/VideoPlaylistTypeConstant' |
71810d0b | 4972 | ownerAccount: |
c1843150 C |
4973 | $ref: '#/components/schemas/AccountSummary' |
4974 | videoChannel: | |
4975 | $ref: '#/components/schemas/VideoChannelSummary' | |
3e9e6f2f RK |
4976 | VideoComment: |
4977 | properties: | |
4978 | id: | |
b8375da9 | 4979 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
4980 | url: |
4981 | type: string | |
84f6e32c | 4982 | format: url |
3e9e6f2f RK |
4983 | text: |
4984 | type: string | |
bf3c3fea RK |
4985 | format: html |
4986 | description: Text of the comment | |
4302058c | 4987 | minLength: 1 |
bf3c3fea | 4988 | example: This video is wonderful! |
3e9e6f2f | 4989 | threadId: |
b8375da9 | 4990 | $ref: '#/components/schemas/id' |
bf3c3fea RK |
4991 | inReplyToCommentId: |
4992 | nullable: true | |
4993 | allOf: | |
4994 | - $ref: '#/components/schemas/id' | |
3e9e6f2f | 4995 | videoId: |
b8375da9 | 4996 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f RK |
4997 | createdAt: |
4998 | type: string | |
84f6e32c | 4999 | format: date-time |
3e9e6f2f RK |
5000 | updatedAt: |
5001 | type: string | |
84f6e32c | 5002 | format: date-time |
bf3c3fea RK |
5003 | deletedAt: |
5004 | nullable: true | |
5005 | type: string | |
5006 | format: date-time | |
5007 | default: null | |
5008 | isDeleted: | |
5009 | type: boolean | |
5010 | default: false | |
5b0413dd | 5011 | totalRepliesFromVideoAuthor: |
06746a8b | 5012 | type: integer |
b8375da9 | 5013 | minimum: 0 |
3e9e6f2f | 5014 | totalReplies: |
06746a8b | 5015 | type: integer |
b8375da9 | 5016 | minimum: 0 |
3e9e6f2f RK |
5017 | account: |
5018 | $ref: '#/components/schemas/Account' | |
5019 | VideoCommentThreadTree: | |
5020 | properties: | |
5021 | comment: | |
5022 | $ref: '#/components/schemas/VideoComment' | |
5023 | children: | |
5024 | type: array | |
5025 | items: | |
5026 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
67ae04a5 C |
5027 | VideoCaption: |
5028 | properties: | |
5029 | language: | |
dfcb6f50 | 5030 | $ref: '#/components/schemas/VideoConstantString-Language' |
67ae04a5 C |
5031 | captionPath: |
5032 | type: string | |
75cba40d | 5033 | ActorImage: |
3e9e6f2f RK |
5034 | properties: |
5035 | path: | |
5036 | type: string | |
5037 | createdAt: | |
5038 | type: string | |
84f6e32c | 5039 | format: date-time |
3e9e6f2f RK |
5040 | updatedAt: |
5041 | type: string | |
84f6e32c | 5042 | format: date-time |
f4d59981 RK |
5043 | ActorInfo: |
5044 | properties: | |
5045 | id: | |
b8375da9 | 5046 | $ref: '#/components/schemas/id' |
f4d59981 RK |
5047 | name: |
5048 | type: string | |
5049 | displayName: | |
5050 | type: string | |
5051 | host: | |
5052 | type: string | |
84f6e32c | 5053 | format: hostname |
f4d59981 RK |
5054 | avatar: |
5055 | nullable: true | |
5056 | type: object | |
5057 | properties: | |
5058 | path: | |
5059 | type: string | |
3e9e6f2f RK |
5060 | Actor: |
5061 | properties: | |
5062 | id: | |
b8375da9 | 5063 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
5064 | url: |
5065 | type: string | |
84f6e32c | 5066 | format: url |
3e9e6f2f | 5067 | name: |
77b0c6b5 | 5068 | description: immutable name of the actor, used to find or mention it |
2c4876f2 RK |
5069 | allOf: |
5070 | - $ref: '#/components/schemas/username' | |
3e9e6f2f RK |
5071 | host: |
5072 | type: string | |
84f6e32c | 5073 | format: hostname |
2c4876f2 | 5074 | description: server on which the actor is resident |
045bcd0d RK |
5075 | hostRedundancyAllowed: |
5076 | type: boolean | |
2c4876f2 | 5077 | description: whether this actor's host allows redundancy of its videos |
3e9e6f2f | 5078 | followingCount: |
06746a8b | 5079 | type: integer |
2c4876f2 RK |
5080 | minimum: 0 |
5081 | description: number of actors subscribed to by this actor, as seen by this instance | |
3e9e6f2f | 5082 | followersCount: |
06746a8b | 5083 | type: integer |
2c4876f2 RK |
5084 | minimum: 0 |
5085 | description: number of followers of this actor, as seen by this instance | |
3e9e6f2f RK |
5086 | createdAt: |
5087 | type: string | |
84f6e32c | 5088 | format: date-time |
3e9e6f2f RK |
5089 | updatedAt: |
5090 | type: string | |
84f6e32c | 5091 | format: date-time |
3e9e6f2f | 5092 | avatar: |
75cba40d | 5093 | $ref: '#/components/schemas/ActorImage' |
3e9e6f2f RK |
5094 | Account: |
5095 | allOf: | |
5096 | - $ref: '#/components/schemas/Actor' | |
5097 | - properties: | |
2a8ae759 | 5098 | userId: |
2c4876f2 RK |
5099 | description: object id for the user tied to this account |
5100 | allOf: | |
5101 | - $ref: '#/components/schemas/User/properties/id' | |
3e9e6f2f RK |
5102 | displayName: |
5103 | type: string | |
77b0c6b5 RK |
5104 | description: editable name of the account, displayed in its representations |
5105 | minLength: 3 | |
5106 | maxLength: 120 | |
2a8ae759 FS |
5107 | description: |
5108 | type: string | |
2c4876f2 | 5109 | description: text or bio displayed on the account's profile |
6441981b RK |
5110 | UserWatchingVideo: |
5111 | properties: | |
5112 | currentTime: | |
06746a8b | 5113 | type: integer |
c00100b6 | 5114 | format: seconds |
84f6e32c RK |
5115 | description: timestamp within the video, in seconds |
5116 | example: 5 | |
3e9e6f2f RK |
5117 | ServerConfig: |
5118 | properties: | |
2a8ae759 FS |
5119 | instance: |
5120 | type: object | |
5121 | properties: | |
5122 | name: | |
5123 | type: string | |
5124 | shortDescription: | |
5125 | type: string | |
5126 | defaultClientRoute: | |
5127 | type: string | |
5128 | isNSFW: | |
5129 | type: boolean | |
5130 | defaultNSFWPolicy: | |
5131 | type: string | |
5132 | customizations: | |
5133 | type: object | |
5134 | properties: | |
5135 | javascript: | |
5136 | type: string | |
5137 | css: | |
5138 | type: string | |
f30736c8 RK |
5139 | search: |
5140 | type: object | |
5141 | properties: | |
5142 | remoteUri: | |
5143 | type: object | |
5144 | properties: | |
5145 | users: | |
5146 | type: boolean | |
5147 | anonymous: | |
5148 | type: boolean | |
2a8ae759 FS |
5149 | plugin: |
5150 | type: object | |
5151 | properties: | |
5152 | registered: | |
5153 | type: array | |
5154 | items: | |
5155 | type: string | |
5156 | theme: | |
5157 | type: object | |
5158 | properties: | |
5159 | registered: | |
5160 | type: array | |
5161 | items: | |
5162 | type: string | |
5163 | email: | |
5164 | type: object | |
5165 | properties: | |
5166 | enabled: | |
5167 | type: boolean | |
5168 | contactForm: | |
5169 | type: object | |
5170 | properties: | |
5171 | enabled: | |
5172 | type: boolean | |
5173 | serverVersion: | |
5174 | type: string | |
5175 | serverCommit: | |
5176 | type: string | |
3e9e6f2f RK |
5177 | signup: |
5178 | type: object | |
5179 | properties: | |
5180 | allowed: | |
5181 | type: boolean | |
2a8ae759 FS |
5182 | allowedForCurrentIP: |
5183 | type: boolean | |
5184 | requiresEmailVerification: | |
5185 | type: boolean | |
3e9e6f2f RK |
5186 | transcoding: |
5187 | type: object | |
5188 | properties: | |
2a8ae759 FS |
5189 | hls: |
5190 | type: object | |
5191 | properties: | |
5192 | enabled: | |
5193 | type: boolean | |
f30736c8 RK |
5194 | webtorrent: |
5195 | type: object | |
5196 | properties: | |
5197 | enabled: | |
5198 | type: boolean | |
3e9e6f2f RK |
5199 | enabledResolutions: |
5200 | type: array | |
5201 | items: | |
40cfb36b | 5202 | $ref: '#/components/schemas/VideoResolutionSet' |
2a8ae759 FS |
5203 | import: |
5204 | type: object | |
5205 | properties: | |
5206 | videos: | |
5207 | type: object | |
5208 | properties: | |
5209 | http: | |
5210 | type: object | |
5211 | properties: | |
5212 | enabled: | |
5213 | type: boolean | |
5214 | torrent: | |
5215 | type: object | |
5216 | properties: | |
5217 | enabled: | |
5218 | type: boolean | |
5219 | autoBlacklist: | |
5220 | type: object | |
5221 | properties: | |
5222 | videos: | |
5223 | type: object | |
5224 | properties: | |
5225 | ofUsers: | |
5226 | type: object | |
5227 | properties: | |
5228 | enabled: | |
5229 | type: boolean | |
3e9e6f2f RK |
5230 | avatar: |
5231 | type: object | |
5232 | properties: | |
5233 | file: | |
5234 | type: object | |
5235 | properties: | |
5236 | size: | |
5237 | type: object | |
5238 | properties: | |
5239 | max: | |
06746a8b | 5240 | type: integer |
3e9e6f2f RK |
5241 | extensions: |
5242 | type: array | |
5243 | items: | |
5244 | type: string | |
5245 | video: | |
5246 | type: object | |
5247 | properties: | |
2a8ae759 FS |
5248 | image: |
5249 | type: object | |
5250 | properties: | |
5251 | extensions: | |
5252 | type: array | |
5253 | items: | |
5254 | type: string | |
5255 | size: | |
5256 | type: object | |
5257 | properties: | |
5258 | max: | |
06746a8b | 5259 | type: integer |
3e9e6f2f RK |
5260 | file: |
5261 | type: object | |
5262 | properties: | |
5263 | extensions: | |
5264 | type: array | |
5265 | items: | |
5266 | type: string | |
2a8ae759 FS |
5267 | videoCaption: |
5268 | type: object | |
5269 | properties: | |
5270 | file: | |
5271 | type: object | |
5272 | properties: | |
5273 | size: | |
5274 | type: object | |
5275 | properties: | |
5276 | max: | |
06746a8b | 5277 | type: integer |
2a8ae759 FS |
5278 | extensions: |
5279 | type: array | |
5280 | items: | |
5281 | type: string | |
5282 | user: | |
5283 | type: object | |
5284 | properties: | |
5285 | videoQuota: | |
06746a8b | 5286 | type: integer |
b8375da9 | 5287 | example: 16810141515 |
2a8ae759 | 5288 | videoQuotaDaily: |
06746a8b | 5289 | type: integer |
b8375da9 | 5290 | example: 1681014151 |
2a8ae759 FS |
5291 | trending: |
5292 | type: object | |
5293 | properties: | |
5294 | videos: | |
5295 | type: object | |
5296 | properties: | |
5297 | intervalDays: | |
06746a8b | 5298 | type: integer |
2a8ae759 | 5299 | tracker: |
747b17c7 | 5300 | type: object |
2a8ae759 FS |
5301 | properties: |
5302 | enabled: | |
5303 | type: boolean | |
f30736c8 RK |
5304 | followings: |
5305 | type: object | |
5306 | properties: | |
5307 | instance: | |
5308 | type: object | |
5309 | properties: | |
5310 | autoFollowIndex: | |
5311 | type: object | |
5312 | properties: | |
5313 | indexUrl: | |
5314 | type: string | |
84f6e32c | 5315 | format: url |
2a8ae759 FS |
5316 | ServerConfigAbout: |
5317 | properties: | |
5318 | instance: | |
5319 | type: object | |
5320 | properties: | |
5321 | name: | |
5322 | type: string | |
5323 | shortDescription: | |
5324 | type: string | |
5325 | description: | |
5326 | type: string | |
5327 | terms: | |
5328 | type: string | |
5329 | ServerConfigCustom: | |
5330 | properties: | |
5331 | instance: | |
5332 | type: object | |
5333 | properties: | |
5334 | name: | |
5335 | type: string | |
5336 | shortDescription: | |
5337 | type: string | |
5338 | description: | |
5339 | type: string | |
5340 | terms: | |
5341 | type: string | |
5342 | defaultClientRoute: | |
5343 | type: string | |
5344 | isNSFW: | |
5345 | type: boolean | |
5346 | defaultNSFWPolicy: | |
5347 | type: string | |
5348 | customizations: | |
5349 | type: object | |
5350 | properties: | |
5351 | javascript: | |
5352 | type: string | |
5353 | css: | |
5354 | type: string | |
5355 | theme: | |
5356 | type: object | |
5357 | properties: | |
5358 | default: | |
5359 | type: string | |
5360 | services: | |
5361 | type: object | |
5362 | properties: | |
5363 | twitter: | |
5364 | type: object | |
5365 | properties: | |
5366 | username: | |
5367 | type: string | |
5368 | whitelisted: | |
5369 | type: boolean | |
5370 | cache: | |
5371 | type: object | |
5372 | properties: | |
5373 | previews: | |
5374 | type: object | |
5375 | properties: | |
5376 | size: | |
06746a8b | 5377 | type: integer |
2a8ae759 FS |
5378 | captions: |
5379 | type: object | |
5380 | properties: | |
5381 | size: | |
06746a8b | 5382 | type: integer |
2a8ae759 FS |
5383 | signup: |
5384 | type: object | |
5385 | properties: | |
5386 | enabled: | |
5387 | type: boolean | |
5388 | limit: | |
06746a8b | 5389 | type: integer |
2a8ae759 FS |
5390 | requiresEmailVerification: |
5391 | type: boolean | |
5392 | admin: | |
5393 | type: object | |
5394 | properties: | |
5395 | email: | |
5396 | type: string | |
84f6e32c | 5397 | format: email |
2a8ae759 FS |
5398 | contactForm: |
5399 | type: object | |
5400 | properties: | |
5401 | enabled: | |
5402 | type: boolean | |
5403 | user: | |
5404 | type: object | |
40cfb36b | 5405 | description: Settings that apply to new users, if registration is enabled |
2a8ae759 FS |
5406 | properties: |
5407 | videoQuota: | |
06746a8b | 5408 | type: integer |
b8375da9 | 5409 | example: 16810141515 |
2a8ae759 | 5410 | videoQuotaDaily: |
06746a8b | 5411 | type: integer |
b8375da9 | 5412 | example: 1681014151 |
2a8ae759 FS |
5413 | transcoding: |
5414 | type: object | |
40cfb36b | 5415 | description: Settings pertaining to transcoding jobs |
2a8ae759 FS |
5416 | properties: |
5417 | enabled: | |
5418 | type: boolean | |
5419 | allowAdditionalExtensions: | |
5420 | type: boolean | |
40cfb36b | 5421 | description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos |
2a8ae759 FS |
5422 | allowAudioFiles: |
5423 | type: boolean | |
40cfb36b | 5424 | description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file |
2a8ae759 | 5425 | threads: |
06746a8b | 5426 | type: integer |
40cfb36b RK |
5427 | description: Amount of threads used by ffmpeg for 1 transcoding job |
5428 | concurrency: | |
5429 | type: number | |
5430 | description: Amount of transcoding jobs to execute in parallel | |
5431 | profile: | |
5432 | type: string | |
5433 | enum: | |
5434 | - default | |
5435 | description: | | |
5436 | New profiles can be added by plugins ; available in core PeerTube: 'default'. | |
2a8ae759 FS |
5437 | resolutions: |
5438 | type: object | |
40cfb36b | 5439 | description: Resolutions to transcode _new videos_ to |
2a8ae759 | 5440 | properties: |
40cfb36b RK |
5441 | 0p: |
5442 | type: boolean | |
2a8ae759 FS |
5443 | 240p: |
5444 | type: boolean | |
5445 | 360p: | |
5446 | type: boolean | |
5447 | 480p: | |
5448 | type: boolean | |
5449 | 720p: | |
5450 | type: boolean | |
5451 | 1080p: | |
5452 | type: boolean | |
b7085c71 RK |
5453 | 1440p: |
5454 | type: boolean | |
2a8ae759 FS |
5455 | 2160p: |
5456 | type: boolean | |
40cfb36b RK |
5457 | webtorrent: |
5458 | type: object | |
5459 | description: WebTorrent-specific settings | |
5460 | properties: | |
5461 | enabled: | |
5462 | type: boolean | |
2a8ae759 FS |
5463 | hls: |
5464 | type: object | |
40cfb36b | 5465 | description: HLS-specific settings |
2a8ae759 FS |
5466 | properties: |
5467 | enabled: | |
5468 | type: boolean | |
5469 | import: | |
5470 | type: object | |
5471 | properties: | |
5472 | videos: | |
5473 | type: object | |
5474 | properties: | |
5475 | http: | |
5476 | type: object | |
5477 | properties: | |
5478 | enabled: | |
5479 | type: boolean | |
5480 | torrent: | |
5481 | type: object | |
5482 | properties: | |
5483 | enabled: | |
5484 | type: boolean | |
5485 | autoBlacklist: | |
5486 | type: object | |
5487 | properties: | |
5488 | videos: | |
5489 | type: object | |
5490 | properties: | |
5491 | ofUsers: | |
5492 | type: object | |
5493 | properties: | |
5494 | enabled: | |
5495 | type: boolean | |
5496 | followers: | |
5497 | type: object | |
5498 | properties: | |
5499 | instance: | |
5500 | type: object | |
5501 | properties: | |
5502 | enabled: | |
5503 | type: boolean | |
5504 | manualApproval: | |
5505 | type: boolean | |
3e9e6f2f RK |
5506 | Follow: |
5507 | properties: | |
5508 | id: | |
b8375da9 | 5509 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
5510 | follower: |
5511 | $ref: '#/components/schemas/Actor' | |
5512 | following: | |
5513 | $ref: '#/components/schemas/Actor' | |
5514 | score: | |
5515 | type: number | |
04b703f6 | 5516 | description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`. |
3e9e6f2f RK |
5517 | state: |
5518 | type: string | |
5519 | enum: | |
5520 | - pending | |
5521 | - accepted | |
5522 | createdAt: | |
5523 | type: string | |
84f6e32c | 5524 | format: date-time |
3e9e6f2f RK |
5525 | updatedAt: |
5526 | type: string | |
84f6e32c | 5527 | format: date-time |
e3489df9 C |
5528 | |
5529 | PredefinedAbuseReasons: | |
5530 | description: Reason categories that help triage reports | |
5531 | type: array | |
f6d6e7f8 | 5532 | maxItems: 8 |
e3489df9 C |
5533 | items: |
5534 | type: string | |
5535 | enum: | |
5536 | - violentOrAbusive | |
5537 | - hatefulOrAbusive | |
5538 | - spamOrMisleading | |
5539 | - privacy | |
5540 | - rights | |
5541 | - serverRules | |
5542 | - thumbnails | |
5543 | - captions | |
5544 | ||
3e9e6f2f RK |
5545 | Job: |
5546 | properties: | |
5547 | id: | |
b8375da9 | 5548 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
5549 | state: |
5550 | type: string | |
5551 | enum: | |
84f6e32c RK |
5552 | - active |
5553 | - completed | |
5554 | - failed | |
5555 | - waiting | |
5556 | - delayed | |
5557 | type: | |
3e9e6f2f RK |
5558 | type: string |
5559 | enum: | |
84f6e32c RK |
5560 | - activitypub-http-unicast |
5561 | - activitypub-http-broadcast | |
5562 | - activitypub-http-fetcher | |
5563 | - activitypub-follow | |
5564 | - video-file-import | |
5565 | - video-transcoding | |
5566 | ||
5567 | - video-import | |
5568 | - videos-views | |
5569 | - activitypub-refresher | |
5570 | - video-redundancy | |
5571 | data: | |
5572 | type: object | |
5573 | additionalProperties: true | |
5574 | error: | |
5575 | type: object | |
5576 | additionalProperties: true | |
3e9e6f2f RK |
5577 | createdAt: |
5578 | type: string | |
84f6e32c RK |
5579 | format: date-time |
5580 | finishedOn: | |
3e9e6f2f | 5581 | type: string |
84f6e32c RK |
5582 | format: date-time |
5583 | processedOn: | |
5584 | type: string | |
5585 | format: date-time | |
3e9e6f2f RK |
5586 | AddUserResponse: |
5587 | properties: | |
2c318664 RK |
5588 | user: |
5589 | type: object | |
5590 | properties: | |
5591 | id: | |
b8375da9 | 5592 | $ref: '#/components/schemas/id' |
2c318664 RK |
5593 | account: |
5594 | type: object | |
5595 | properties: | |
5596 | id: | |
b8375da9 | 5597 | $ref: '#/components/schemas/id' |
f6d6e7f8 | 5598 | VideoUploadRequestCommon: |
5599 | properties: | |
5600 | name: | |
5601 | description: Video name | |
5602 | type: string | |
b8375da9 RK |
5603 | example: What is PeerTube? |
5604 | minLength: 3 | |
5605 | maxLength: 120 | |
f6d6e7f8 | 5606 | channelId: |
5607 | description: Channel id that will contain this video | |
5608 | type: integer | |
b8375da9 RK |
5609 | example: 3 |
5610 | minimum: 1 | |
f6d6e7f8 | 5611 | privacy: |
5612 | $ref: '#/components/schemas/VideoPrivacySet' | |
5613 | category: | |
40cfb36b | 5614 | $ref: '#/components/schemas/VideoCategorySet' |
f6d6e7f8 | 5615 | licence: |
40cfb36b | 5616 | $ref: '#/components/schemas/VideoLicenceSet' |
f6d6e7f8 | 5617 | language: |
40cfb36b | 5618 | $ref: '#/components/schemas/VideoLanguageSet' |
f6d6e7f8 | 5619 | description: |
5620 | description: Video description | |
5621 | type: string | |
b8375da9 RK |
5622 | example: | |
5623 | **[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 | 5624 | waitTranscoding: |
5625 | description: Whether or not we wait transcoding before publish the video | |
5626 | type: boolean | |
5627 | support: | |
5628 | description: A text tell the audience how to support the video creator | |
9a320a06 | 5629 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
f6d6e7f8 | 5630 | type: string |
5631 | nsfw: | |
5632 | description: Whether or not this video contains sensitive content | |
5633 | type: boolean | |
5634 | tags: | |
5635 | description: Video tags (maximum 5 tags each between 2 and 30 characters) | |
5636 | type: array | |
5637 | minItems: 1 | |
5638 | maxItems: 5 | |
5639 | uniqueItems: true | |
b8375da9 RK |
5640 | example: |
5641 | - framasoft | |
5642 | - peertube | |
f6d6e7f8 | 5643 | items: |
5644 | type: string | |
5645 | minLength: 2 | |
5646 | maxLength: 30 | |
5647 | commentsEnabled: | |
5648 | description: Enable or disable comments for this video | |
5649 | type: boolean | |
5650 | downloadEnabled: | |
5651 | description: Enable or disable downloading for this video | |
5652 | type: boolean | |
5653 | originallyPublishedAt: | |
5654 | description: Date when the content was originally published | |
5655 | type: string | |
5656 | format: date-time | |
5657 | scheduleUpdate: | |
5658 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
5659 | thumbnailfile: | |
5660 | description: Video thumbnail file | |
5661 | type: string | |
5662 | format: binary | |
5663 | previewfile: | |
5664 | description: Video preview file | |
5665 | type: string | |
5666 | format: binary | |
5667 | required: | |
5668 | - channelId | |
5669 | - name | |
5670 | VideoUploadRequestLegacy: | |
5671 | allOf: | |
5672 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
5673 | - type: object | |
5674 | required: | |
5675 | - videofile | |
5676 | properties: | |
5677 | videofile: | |
5678 | description: Video file | |
5679 | type: string | |
5680 | format: binary | |
5681 | VideoUploadRequestResumable: | |
5682 | allOf: | |
5683 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
5684 | - type: object | |
5685 | required: | |
5686 | - filename | |
5687 | properties: | |
5688 | filename: | |
5689 | description: Video filename including extension | |
5690 | type: string | |
5691 | format: filename | |
b8375da9 | 5692 | example: what_is_peertube.mp4 |
f6d6e7f8 | 5693 | thumbnailfile: |
5694 | description: Video thumbnail file | |
5695 | type: string | |
5696 | format: binary | |
5697 | previewfile: | |
5698 | description: Video preview file | |
5699 | type: string | |
5700 | format: binary | |
3e9e6f2f RK |
5701 | VideoUploadResponse: |
5702 | properties: | |
5703 | video: | |
5704 | type: object | |
5705 | properties: | |
5706 | id: | |
b8375da9 | 5707 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f | 5708 | uuid: |
b8375da9 | 5709 | $ref: '#/components/schemas/Video/properties/uuid' |
3e9e6f2f RK |
5710 | CommentThreadResponse: |
5711 | properties: | |
5712 | total: | |
06746a8b | 5713 | type: integer |
84f6e32c | 5714 | example: 1 |
3e9e6f2f RK |
5715 | data: |
5716 | type: array | |
84f6e32c | 5717 | maxItems: 100 |
3e9e6f2f RK |
5718 | items: |
5719 | $ref: '#/components/schemas/VideoComment' | |
5720 | CommentThreadPostResponse: | |
5721 | properties: | |
5722 | comment: | |
5723 | $ref: '#/components/schemas/VideoComment' | |
048b6946 C |
5724 | VideoListResponse: |
5725 | properties: | |
5726 | total: | |
06746a8b | 5727 | type: integer |
84f6e32c | 5728 | example: 1 |
048b6946 C |
5729 | data: |
5730 | type: array | |
84f6e32c | 5731 | maxItems: 100 |
048b6946 C |
5732 | items: |
5733 | $ref: '#/components/schemas/Video' | |
84f6e32c RK |
5734 | User: |
5735 | properties: | |
fd5586b3 RK |
5736 | account: |
5737 | $ref: '#/components/schemas/Account' | |
5738 | autoPlayNextVideo: | |
5739 | type: boolean | |
5740 | description: Automatically start playing the upcoming video after the currently playing video | |
5741 | autoPlayNextVideoPlaylist: | |
5742 | type: boolean | |
5743 | description: Automatically start playing the video on the playlist after the currently playing video | |
5744 | autoPlayVideo: | |
5745 | type: boolean | |
5746 | description: Automatically start playing the video on the watch page | |
5747 | blocked: | |
5748 | type: boolean | |
5749 | blockedReason: | |
5750 | type: string | |
5751 | createdAt: | |
84f6e32c | 5752 | type: string |
84f6e32c RK |
5753 | email: |
5754 | type: string | |
5755 | format: email | |
5756 | description: The user email | |
fd5586b3 RK |
5757 | emailVerified: |
5758 | type: boolean | |
5759 | description: Has the user confirmed their email address? | |
5760 | id: | |
2c4876f2 RK |
5761 | allOf: |
5762 | - $ref: '#/components/schemas/id' | |
fd5586b3 | 5763 | readOnly: true |
6d989edc C |
5764 | pluginAuth: |
5765 | type: string | |
5766 | description: Auth plugin to use to authenticate the user | |
fd5586b3 | 5767 | lastLoginDate: |
84f6e32c | 5768 | type: string |
fd5586b3 RK |
5769 | format: date-time |
5770 | noInstanceConfigWarningModal: | |
5771 | type: boolean | |
5772 | noWelcomeModal: | |
84f6e32c | 5773 | type: boolean |
84f6e32c RK |
5774 | nsfwPolicy: |
5775 | $ref: '#/components/schemas/NSFWPolicy' | |
84f6e32c RK |
5776 | role: |
5777 | $ref: '#/components/schemas/UserRole' | |
5778 | roleLabel: | |
5779 | type: string | |
5780 | enum: | |
5781 | - User | |
5782 | - Moderator | |
5783 | - Administrator | |
fd5586b3 | 5784 | theme: |
84f6e32c | 5785 | type: string |
fd5586b3 RK |
5786 | description: Theme enabled by this user |
5787 | username: | |
b8375da9 | 5788 | $ref: '#/components/schemas/username' |
84f6e32c RK |
5789 | videoChannels: |
5790 | type: array | |
5791 | items: | |
5792 | $ref: '#/components/schemas/VideoChannel' | |
fd5586b3 RK |
5793 | videoQuota: |
5794 | type: integer | |
5795 | description: The user video quota in bytes | |
5796 | example: -1 | |
5797 | videoQuotaDaily: | |
5798 | type: integer | |
5799 | description: The user daily video quota in bytes | |
5800 | example: -1 | |
5801 | webtorrentEnabled: | |
5802 | type: boolean | |
5803 | description: Enable P2P in the player | |
5804 | UserWithStats: | |
5805 | allOf: | |
5806 | - $ref: '#/components/schemas/User' | |
5807 | - properties: | |
5808 | # optionally present fields: they require WITH_STATS scope | |
5809 | videosCount: | |
5810 | type: integer | |
5811 | description: Count of videos published | |
5812 | abusesCount: | |
5813 | type: integer | |
5814 | description: Count of reports/abuses of which the user is a target | |
5815 | abusesAcceptedCount: | |
5816 | type: integer | |
5817 | description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team | |
5818 | abusesCreatedCount: | |
5819 | type: integer | |
5820 | description: Count of reports/abuses created by the user | |
5821 | videoCommentsCount: | |
5822 | type: integer | |
5823 | description: Count of comments published | |
3e9e6f2f RK |
5824 | AddUser: |
5825 | properties: | |
5826 | username: | |
b8375da9 | 5827 | $ref: '#/components/schemas/username' |
3e9e6f2f | 5828 | password: |
b8375da9 | 5829 | $ref: '#/components/schemas/password' |
3e9e6f2f RK |
5830 | email: |
5831 | type: string | |
84f6e32c RK |
5832 | format: email |
5833 | description: The user email | |
3e9e6f2f | 5834 | videoQuota: |
84f6e32c | 5835 | type: integer |
b8375da9 RK |
5836 | description: The user video quota in bytes |
5837 | example: -1 | |
fbe1bc2a | 5838 | videoQuotaDaily: |
84f6e32c | 5839 | type: integer |
b8375da9 RK |
5840 | description: The user daily video quota in bytes |
5841 | example: -1 | |
6d989edc | 5842 | channelName: |
b8375da9 | 5843 | $ref: '#/components/schemas/usernameChannel' |
3e9e6f2f | 5844 | role: |
0590bb46 | 5845 | $ref: '#/components/schemas/UserRole' |
6d989edc C |
5846 | adminFlags: |
5847 | $ref: '#/components/schemas/UserAdminFlags' | |
3e9e6f2f RK |
5848 | required: |
5849 | - username | |
5850 | - password | |
5851 | ||
5852 | - videoQuota | |
fbe1bc2a | 5853 | - videoQuotaDaily |
3e9e6f2f RK |
5854 | - role |
5855 | UpdateUser: | |
5856 | properties: | |
3e9e6f2f | 5857 | email: |
84f6e32c | 5858 | description: The updated email of the user |
77b0c6b5 RK |
5859 | allOf: |
5860 | - $ref: '#/components/schemas/User/properties/email' | |
6d989edc C |
5861 | emailVerified: |
5862 | type: boolean | |
5863 | description: Set the email as verified | |
3e9e6f2f | 5864 | videoQuota: |
84f6e32c | 5865 | type: integer |
b8375da9 | 5866 | description: The updated video quota of the user in bytes |
fbe1bc2a | 5867 | videoQuotaDaily: |
84f6e32c | 5868 | type: integer |
b8375da9 | 5869 | description: The updated daily video quota of the user in bytes |
6d989edc C |
5870 | pluginAuth: |
5871 | type: string | |
5872 | nullable: true | |
5873 | description: The auth plugin to use to authenticate the user | |
5874 | example: 'peertube-plugin-auth-saml2' | |
3e9e6f2f | 5875 | role: |
0590bb46 | 5876 | $ref: '#/components/schemas/UserRole' |
6d989edc C |
5877 | adminFlags: |
5878 | $ref: '#/components/schemas/UserAdminFlags' | |
3e9e6f2f | 5879 | UpdateMe: |
77b0c6b5 | 5880 | # see shared/models/users/user-update-me.model.ts: |
3e9e6f2f RK |
5881 | properties: |
5882 | password: | |
b8375da9 | 5883 | $ref: '#/components/schemas/password' |
77b0c6b5 RK |
5884 | currentPassword: |
5885 | $ref: '#/components/schemas/password' | |
3e9e6f2f | 5886 | email: |
77b0c6b5 RK |
5887 | description: new email used for login and service communications |
5888 | allOf: | |
5889 | - $ref: '#/components/schemas/User/properties/email' | |
5890 | displayName: | |
3e9e6f2f | 5891 | type: string |
77b0c6b5 RK |
5892 | description: new name of the user in its representations |
5893 | minLength: 3 | |
5894 | maxLength: 120 | |
3e9e6f2f RK |
5895 | displayNSFW: |
5896 | type: string | |
77b0c6b5 | 5897 | description: new NSFW display policy |
84f6e32c RK |
5898 | enum: |
5899 | - 'true' | |
5900 | - 'false' | |
5901 | - both | |
77b0c6b5 RK |
5902 | webTorrentEnabled: |
5903 | type: boolean | |
5904 | description: whether to enable P2P in the player or not | |
3e9e6f2f | 5905 | autoPlayVideo: |
84f6e32c | 5906 | type: boolean |
77b0c6b5 RK |
5907 | description: new preference regarding playing videos automatically |
5908 | autoPlayNextVideo: | |
5909 | type: boolean | |
5910 | description: new preference regarding playing following videos automatically | |
5911 | autoPlayNextVideoPlaylist: | |
5912 | type: boolean | |
5913 | description: new preference regarding playing following playlist videos automatically | |
5914 | videosHistoryEnabled: | |
5915 | type: boolean | |
5916 | description: whether to keep track of watched history or not | |
5917 | videoLanguages: | |
5918 | type: array | |
5919 | items: | |
5920 | type: string | |
5921 | description: list of languages to filter videos down to | |
5922 | theme: | |
5923 | type: string | |
5924 | noInstanceConfigWarningModal: | |
5925 | type: boolean | |
5926 | noWelcomeModal: | |
5927 | type: boolean | |
3e9e6f2f RK |
5928 | GetMeVideoRating: |
5929 | properties: | |
5930 | id: | |
b8375da9 | 5931 | $ref: '#/components/schemas/id' |
3e9e6f2f | 5932 | rating: |
30b40713 RK |
5933 | type: string |
5934 | enum: | |
5935 | - like | |
5936 | - dislike | |
5937 | - none | |
84f6e32c | 5938 | description: Rating of the video |
3e9e6f2f RK |
5939 | required: |
5940 | - id | |
5941 | - rating | |
c100a614 YB |
5942 | VideoRating: |
5943 | properties: | |
5944 | video: | |
5945 | $ref: '#/components/schemas/Video' | |
5946 | rating: | |
30b40713 RK |
5947 | type: string |
5948 | enum: | |
5949 | - like | |
5950 | - dislike | |
5951 | - none | |
5952 | description: Rating of the video | |
c100a614 YB |
5953 | required: |
5954 | - video | |
5955 | - rating | |
3e9e6f2f RK |
5956 | RegisterUser: |
5957 | properties: | |
5958 | username: | |
77b0c6b5 RK |
5959 | description: immutable name of the user, used to find or mention its actor |
5960 | allOf: | |
5961 | - $ref: '#/components/schemas/username' | |
3e9e6f2f | 5962 | password: |
b8375da9 | 5963 | $ref: '#/components/schemas/password' |
3e9e6f2f RK |
5964 | email: |
5965 | type: string | |
84f6e32c | 5966 | format: email |
77b0c6b5 | 5967 | description: email of the user, used for login or service communications |
1f20622f C |
5968 | displayName: |
5969 | type: string | |
77b0c6b5 | 5970 | description: editable name of the user, displayed in its representations |
84f6e32c RK |
5971 | minLength: 1 |
5972 | maxLength: 120 | |
1f20622f C |
5973 | channel: |
5974 | type: object | |
77b0c6b5 | 5975 | description: channel base information used to create the first channel of the user |
1f20622f C |
5976 | properties: |
5977 | name: | |
b8375da9 | 5978 | $ref: '#/components/schemas/usernameChannel' |
1f20622f | 5979 | displayName: |
77b0c6b5 | 5980 | $ref: '#/components/schemas/VideoChannel/properties/displayName' |
3e9e6f2f RK |
5981 | required: |
5982 | - username | |
5983 | - password | |
5984 | ||
4302058c | 5985 | |
b8375da9 | 5986 | VideoChannel: |
3e9e6f2f | 5987 | properties: |
b8375da9 | 5988 | # GET/POST/PUT properties |
7d14d4d2 C |
5989 | displayName: |
5990 | type: string | |
77b0c6b5 | 5991 | description: editable name of the channel, displayed in its representations |
b8375da9 | 5992 | example: Videos of Framasoft |
4302058c RK |
5993 | minLength: 1 |
5994 | maxLength: 120 | |
3e9e6f2f RK |
5995 | description: |
5996 | type: string | |
b8375da9 | 5997 | example: Videos made with <3 by Framasoft |
4302058c RK |
5998 | minLength: 3 |
5999 | maxLength: 1000 | |
7d14d4d2 C |
6000 | support: |
6001 | type: string | |
b8375da9 | 6002 | description: text shown by default on all videos of this channel, to tell the audience how to support it |
9a320a06 | 6003 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
4302058c RK |
6004 | minLength: 3 |
6005 | maxLength: 1000 | |
b8375da9 RK |
6006 | # GET-only properties |
6007 | id: | |
6008 | readOnly: true | |
6009 | allOf: | |
6010 | - $ref: '#/components/schemas/id' | |
6011 | isLocal: | |
6012 | readOnly: true | |
6013 | type: boolean | |
6014 | updatedAt: | |
6015 | readOnly: true | |
6016 | type: string | |
6017 | format: date-time | |
6018 | ownerAccount: | |
6019 | readOnly: true | |
6020 | nullable: true | |
6021 | type: object | |
6022 | properties: | |
6023 | id: | |
6024 | type: integer | |
6025 | uuid: | |
6026 | $ref: '#/components/schemas/UUIDv4' | |
4302058c RK |
6027 | VideoChannelCreate: |
6028 | allOf: | |
b8375da9 | 6029 | - $ref: '#/components/schemas/VideoChannel' |
4302058c RK |
6030 | - properties: |
6031 | name: | |
b8375da9 RK |
6032 | description: username of the channel to create |
6033 | allOf: | |
6034 | - $ref: '#/components/schemas/usernameChannel' | |
7d14d4d2 C |
6035 | required: |
6036 | - name | |
6037 | - displayName | |
6038 | VideoChannelUpdate: | |
4302058c | 6039 | allOf: |
b8375da9 | 6040 | - $ref: '#/components/schemas/VideoChannel' |
4302058c RK |
6041 | - properties: |
6042 | bulkVideosSupportUpdate: | |
6043 | type: boolean | |
b8375da9 | 6044 | description: Update the support field for all videos of this channel |
045bcd0d RK |
6045 | VideoChannelList: |
6046 | properties: | |
6047 | total: | |
6048 | type: integer | |
6049 | example: 1 | |
6050 | data: | |
6051 | type: array | |
6052 | items: | |
6053 | allOf: | |
6054 | - $ref: '#/components/schemas/VideoChannel' | |
6055 | - $ref: '#/components/schemas/Actor' | |
1569a818 | 6056 | |
06746a8b RK |
6057 | MRSSPeerLink: |
6058 | type: object | |
6059 | xml: | |
6060 | name: 'media:peerLink' | |
6061 | properties: | |
6062 | href: | |
6063 | type: string | |
6064 | xml: | |
6065 | attribute: true | |
6066 | type: | |
6067 | type: string | |
6068 | enum: | |
6069 | - application/x-bittorrent | |
6070 | xml: | |
6071 | attribute: true | |
6072 | MRSSGroupContent: | |
6073 | type: object | |
6074 | xml: | |
6075 | name: 'media:content' | |
6076 | properties: | |
6077 | url: | |
6078 | type: string | |
84f6e32c | 6079 | format: url |
06746a8b RK |
6080 | xml: |
6081 | attribute: true | |
6082 | fileSize: | |
6083 | type: integer | |
6084 | xml: | |
6085 | attribute: true | |
6086 | type: | |
6087 | type: string | |
6088 | xml: | |
6089 | attribute: true | |
6090 | framerate: | |
6091 | type: integer | |
6092 | xml: | |
6093 | attribute: true | |
6094 | duration: | |
6095 | type: integer | |
6096 | xml: | |
6097 | attribute: true | |
6098 | height: | |
6099 | type: integer | |
6100 | xml: | |
6101 | attribute: true | |
6102 | lang: | |
6103 | type: string | |
6104 | xml: | |
6105 | attribute: true | |
6106 | VideoCommentsForXML: | |
6107 | type: array | |
6108 | xml: | |
6109 | wrapped: true | |
6110 | name: 'channel' | |
6111 | items: | |
6112 | type: object | |
6113 | xml: | |
6114 | name: 'item' | |
6115 | properties: | |
6116 | link: | |
6117 | type: string | |
84f6e32c | 6118 | format: url |
06746a8b RK |
6119 | guid: |
6120 | type: string | |
6121 | pubDate: | |
6122 | type: string | |
6123 | format: date-time | |
6124 | 'content:encoded': | |
6125 | type: string | |
6126 | 'dc:creator': | |
6127 | type: string | |
6128 | VideosForXML: | |
6129 | type: array | |
6130 | xml: | |
6131 | wrapped: true | |
6132 | name: 'channel' | |
6133 | items: | |
6134 | type: object | |
6135 | xml: | |
6136 | name: 'item' | |
6137 | properties: | |
6138 | link: | |
6139 | type: string | |
84f6e32c | 6140 | format: url |
06746a8b RK |
6141 | description: video watch page URL |
6142 | guid: | |
6143 | type: string | |
6144 | description: video canonical URL | |
6145 | pubDate: | |
6146 | type: string | |
6147 | format: date-time | |
6148 | description: video publication date | |
6149 | description: | |
6150 | type: string | |
6151 | description: video description | |
6152 | 'content:encoded': | |
6153 | type: string | |
6154 | description: video description | |
6155 | 'dc:creator': | |
6156 | type: string | |
6157 | description: publisher user name | |
6158 | 'media:category': | |
6159 | type: integer | |
6160 | description: video category (MRSS) | |
6161 | 'media:community': | |
6162 | type: object | |
6163 | description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS) | |
6164 | properties: | |
6165 | 'media:statistics': | |
6166 | type: object | |
6167 | properties: | |
6168 | views: | |
6169 | type: integer | |
6170 | xml: | |
6171 | attribute: true | |
6172 | 'media:embed': | |
6173 | type: object | |
6174 | properties: | |
6175 | url: | |
6176 | type: string | |
84f6e32c | 6177 | format: url |
06746a8b RK |
6178 | description: video embed path, relative to the canonical URL domain (MRSS) |
6179 | xml: | |
6180 | attribute: true | |
6181 | 'media:player': | |
6182 | type: object | |
6183 | properties: | |
6184 | url: | |
6185 | type: string | |
84f6e32c | 6186 | format: url |
06746a8b RK |
6187 | description: video watch path, relative to the canonical URL domain (MRSS) |
6188 | xml: | |
6189 | attribute: true | |
6190 | 'media:thumbnail': | |
6191 | type: object | |
6192 | properties: | |
6193 | url: | |
6194 | type: string | |
84f6e32c | 6195 | format: url |
06746a8b RK |
6196 | xml: |
6197 | attribute: true | |
6198 | height: | |
6199 | type: integer | |
6200 | xml: | |
6201 | attribute: true | |
6202 | width: | |
6203 | type: integer | |
6204 | xml: | |
6205 | attribute: true | |
6206 | 'media:title': | |
6207 | type: string | |
6208 | description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles. | |
6209 | 'media:description': | |
6210 | type: string | |
6211 | 'media:rating': | |
6212 | type: string | |
6213 | enum: | |
6214 | - nonadult | |
6215 | - adult | |
6216 | description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS) | |
6217 | 'enclosure': | |
6218 | type: object | |
6219 | description: main streamable file for the video | |
6220 | properties: | |
6221 | url: | |
6222 | type: string | |
84f6e32c | 6223 | format: url |
06746a8b RK |
6224 | xml: |
6225 | attribute: true | |
6226 | type: | |
6227 | type: string | |
6228 | enum: | |
6229 | - application/x-bittorrent | |
6230 | xml: | |
6231 | attribute: true | |
6232 | length: | |
6233 | type: integer | |
6234 | xml: | |
6235 | attribute: true | |
6236 | 'media:group': | |
6237 | type: array | |
6238 | 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) | |
6239 | items: | |
6240 | anyOf: | |
6241 | - $ref: '#/components/schemas/MRSSPeerLink' | |
f4d59981 RK |
6242 | - $ref: '#/components/schemas/MRSSGroupContent' |
6243 | NotificationSettingValue: | |
6244 | type: integer | |
6245 | description: > | |
6246 | Notification type | |
84f6e32c | 6247 | |
f4d59981 | 6248 | - `0` NONE |
84f6e32c | 6249 | |
f4d59981 | 6250 | - `1` WEB |
84f6e32c | 6251 | |
f4d59981 RK |
6252 | - `2` EMAIL |
6253 | enum: | |
6254 | - 0 | |
6255 | - 1 | |
6256 | - 3 | |
6257 | Notification: | |
6258 | properties: | |
6259 | id: | |
b8375da9 | 6260 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6261 | type: |
6262 | type: integer | |
6263 | description: > | |
6264 | Notification type, following the `UserNotificationType` enum: | |
84f6e32c | 6265 | |
f4d59981 | 6266 | - `1` NEW_VIDEO_FROM_SUBSCRIPTION |
84f6e32c | 6267 | |
f4d59981 | 6268 | - `2` NEW_COMMENT_ON_MY_VIDEO |
84f6e32c | 6269 | |
310b5219 | 6270 | - `3` NEW_ABUSE_FOR_MODERATORS |
84f6e32c | 6271 | |
f4d59981 | 6272 | - `4` BLACKLIST_ON_MY_VIDEO |
84f6e32c | 6273 | |
f4d59981 | 6274 | - `5` UNBLACKLIST_ON_MY_VIDEO |
84f6e32c | 6275 | |
f4d59981 | 6276 | - `6` MY_VIDEO_PUBLISHED |
84f6e32c | 6277 | |
f4d59981 | 6278 | - `7` MY_VIDEO_IMPORT_SUCCESS |
84f6e32c | 6279 | |
f4d59981 | 6280 | - `8` MY_VIDEO_IMPORT_ERROR |
84f6e32c | 6281 | |
f4d59981 | 6282 | - `9` NEW_USER_REGISTRATION |
84f6e32c | 6283 | |
f4d59981 | 6284 | - `10` NEW_FOLLOW |
84f6e32c | 6285 | |
f4d59981 | 6286 | - `11` COMMENT_MENTION |
84f6e32c | 6287 | |
f4d59981 | 6288 | - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS |
84f6e32c | 6289 | |
f4d59981 | 6290 | - `13` NEW_INSTANCE_FOLLOWER |
84f6e32c | 6291 | |
f4d59981 RK |
6292 | - `14` AUTO_INSTANCE_FOLLOWING |
6293 | read: | |
6294 | type: boolean | |
6295 | video: | |
6296 | nullable: true | |
6297 | allOf: | |
6298 | - $ref: '#/components/schemas/VideoInfo' | |
6299 | - type: object | |
6300 | properties: | |
6301 | channel: | |
6302 | $ref: '#/components/schemas/ActorInfo' | |
6303 | videoImport: | |
6304 | nullable: true | |
6305 | type: object | |
6306 | properties: | |
6307 | id: | |
b8375da9 | 6308 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6309 | video: |
6310 | nullable: true | |
6311 | $ref: '#/components/schemas/VideoInfo' | |
6312 | torrentName: | |
6313 | type: string | |
6314 | nullable: true | |
6315 | magnetUri: | |
2c4876f2 | 6316 | $ref: '#/components/schemas/VideoImport/properties/magnetUri' |
f4d59981 RK |
6317 | targetUri: |
6318 | type: string | |
84f6e32c | 6319 | format: uri |
f4d59981 RK |
6320 | nullable: true |
6321 | comment: | |
6322 | nullable: true | |
6323 | type: object | |
6324 | properties: | |
6325 | id: | |
b8375da9 | 6326 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6327 | threadId: |
6328 | type: integer | |
6329 | video: | |
6330 | $ref: '#/components/schemas/VideoInfo' | |
6331 | account: | |
6332 | $ref: '#/components/schemas/ActorInfo' | |
6333 | videoAbuse: | |
6334 | nullable: true | |
6335 | type: object | |
6336 | properties: | |
6337 | id: | |
b8375da9 | 6338 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6339 | video: |
6340 | allOf: | |
6341 | - $ref: '#/components/schemas/VideoInfo' | |
6342 | videoBlacklist: | |
6343 | nullable: true | |
6344 | type: object | |
6345 | properties: | |
6346 | id: | |
b8375da9 | 6347 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6348 | video: |
6349 | allOf: | |
6350 | - $ref: '#/components/schemas/VideoInfo' | |
6351 | account: | |
6352 | nullable: true | |
6353 | allOf: | |
6354 | - $ref: '#/components/schemas/ActorInfo' | |
6355 | actorFollow: | |
6356 | type: object | |
6357 | nullable: true | |
6358 | properties: | |
6359 | id: | |
b8375da9 | 6360 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6361 | follower: |
6362 | $ref: '#/components/schemas/ActorInfo' | |
6363 | state: | |
6364 | type: string | |
6365 | enum: | |
6366 | - pending | |
6367 | - accepted | |
6368 | following: | |
6369 | type: object | |
6370 | properties: | |
6371 | type: | |
6372 | type: string | |
6373 | enum: | |
6374 | - account | |
6375 | - channel | |
6376 | - instance | |
6377 | name: | |
6378 | type: string | |
6379 | displayName: | |
6380 | type: string | |
6381 | host: | |
6382 | type: string | |
84f6e32c | 6383 | format: hostname |
f4d59981 RK |
6384 | createdAt: |
6385 | type: string | |
6386 | format: date-time | |
6387 | updatedAt: | |
6388 | type: string | |
6389 | format: date-time | |
6390 | NotificationListResponse: | |
6391 | properties: | |
6392 | total: | |
6393 | type: integer | |
84f6e32c | 6394 | example: 1 |
f4d59981 RK |
6395 | data: |
6396 | type: array | |
84f6e32c | 6397 | maxItems: 100 |
f4d59981 | 6398 | items: |
7461d440 RK |
6399 | $ref: '#/components/schemas/Notification' |
6400 | Plugin: | |
6401 | properties: | |
6402 | name: | |
6403 | type: string | |
84f6e32c | 6404 | example: peertube-plugin-auth-ldap |
7461d440 RK |
6405 | type: |
6406 | type: integer | |
84f6e32c RK |
6407 | description: > |
6408 | - `1`: PLUGIN | |
6409 | ||
6410 | - `2`: THEME | |
7461d440 RK |
6411 | enum: |
6412 | - 1 | |
6413 | - 2 | |
6414 | latestVersion: | |
6415 | type: string | |
84f6e32c | 6416 | example: 0.0.3 |
7461d440 RK |
6417 | version: |
6418 | type: string | |
84f6e32c | 6419 | example: 0.0.1 |
7461d440 RK |
6420 | enabled: |
6421 | type: boolean | |
6422 | uninstalled: | |
6423 | type: boolean | |
6424 | peertubeEngine: | |
6425 | type: string | |
84f6e32c | 6426 | example: 2.2.0 |
7461d440 RK |
6427 | description: |
6428 | type: string | |
6429 | homepage: | |
6430 | type: string | |
84f6e32c RK |
6431 | format: url |
6432 | example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap | |
7461d440 RK |
6433 | settings: |
6434 | type: object | |
6435 | additionalProperties: true | |
6436 | createdAt: | |
6437 | type: string | |
6438 | format: date-time | |
6439 | updatedAt: | |
6440 | type: string | |
6441 | format: date-time | |
6442 | PluginResponse: | |
6443 | properties: | |
6444 | total: | |
6445 | type: integer | |
84f6e32c | 6446 | example: 1 |
7461d440 RK |
6447 | data: |
6448 | type: array | |
84f6e32c | 6449 | maxItems: 100 |
7461d440 | 6450 | items: |
2c318664 | 6451 | $ref: '#/components/schemas/Plugin' |
4e239e35 C |
6452 | |
6453 | LiveVideoUpdate: | |
6454 | properties: | |
6455 | saveReplay: | |
6456 | type: boolean | |
bb4ba6d9 C |
6457 | permanentLive: |
6458 | description: User can stream multiple times in a permanent live | |
6459 | type: boolean | |
4e239e35 C |
6460 | |
6461 | LiveVideoResponse: | |
6462 | properties: | |
6463 | rtmpUrl: | |
6464 | type: string | |
6465 | streamKey: | |
6466 | type: string | |
6467 | description: RTMP stream key to use to stream into this live video | |
6468 | saveReplay: | |
6469 | type: boolean | |
bb4ba6d9 C |
6470 | permanentLive: |
6471 | description: User can stream multiple times in a permanent live | |
6472 | type: boolean | |
4e239e35 | 6473 | |
75cba40d C |
6474 | |
6475 | ||
2c318664 RK |
6476 | callbacks: |
6477 | searchIndex: | |
c00f96ce | 6478 | 'https://search.example.org/api/v1/search/videos': |
2c318664 RK |
6479 | post: |
6480 | summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget` | |
6481 | responses: | |
6482 | '200': | |
6483 | description: successful operation | |
6484 | content: | |
6485 | application/json: | |
6486 | schema: | |
1e904cde | 6487 | $ref: '#/components/schemas/VideoListResponse' |