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