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