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