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