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