]>
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 |
2963c343 | 18 | HTTP/REST library for your programming language to use PeerTube. No official |
5776f78e RK |
19 | SDK is currently provided, but the spec API is fully compatible with |
20 | [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) | |
21 | which generates a client SDK in the language of your choice. | |
3e9e6f2f | 22 | |
b029d58a C |
23 | See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API. |
24 | ||
2963c343 | 25 | # Authentication |
002df381 | 26 | |
2963c343 | 27 | When you sign up for an account, you are given the possibility to generate |
1fd12c7c | 28 | sessions, and authenticate using this session token. One session token can |
2963c343 | 29 | currently be used at a time. |
5776f78e RK |
30 | |
31 | # Errors | |
002df381 | 32 | |
5776f78e RK |
33 | The API uses standard HTTP status codes to indicate the success or failure |
34 | of the API call. The body of the response will be JSON in the following | |
35 | format. | |
36 | ||
37 | ``` | |
38 | { | |
39 | "code": "unauthorized_request", // example inner error code | |
40 | "error": "Token is invalid." // example exposed error message | |
41 | } | |
42 | ``` | |
6441981b | 43 | externalDocs: |
512a5759 | 44 | url: https://docs.joinpeertube.org/api-rest-reference.html |
2963c343 RK |
45 | tags: |
46 | - name: Accounts | |
3e9e6f2f | 47 | description: > |
2963c343 | 48 | Using some features of PeerTube require authentication, for which Accounts |
3e9e6f2f | 49 | provide different levels of permission as well as associated user |
5776f78e | 50 | information. Accounts also encompass remote accounts discovered across the federation. |
2963c343 | 51 | - name: Config |
3e9e6f2f RK |
52 | description: > |
53 | Each server exposes public information regarding supported videos and | |
54 | options. | |
2963c343 | 55 | - name: Job |
3e9e6f2f RK |
56 | description: > |
57 | Jobs are long-running tasks enqueued and processed by the instance | |
5776f78e | 58 | itself. No additional worker registration is currently available. |
b029d58a | 59 | - name: Instance Follows |
3e9e6f2f RK |
60 | description: > |
61 | Managing servers which the instance interacts with is crucial to the | |
5776f78e | 62 | concept of federation in PeerTube and external video indexation. The PeerTube |
1fd12c7c | 63 | server then deals with inter-server ActivityPub operations and propagates |
2963c343 RK |
64 | information across its social graph by posting activities to actors' inbox |
65 | endpoints. | |
50e16ccf | 66 | - name: Video Abuses |
2963c343 RK |
67 | description: | |
68 | Video abuses deal with reports of local or remote videos alike. | |
69 | - name: Video | |
70 | description: | | |
71 | Operations dealing with listing, uploading, fetching or modifying videos. | |
72 | - name: Search | |
73 | description: | | |
ad031145 | 74 | The search helps to find _videos_ or _channels_ from within the instance and beyond. |
2963c343 RK |
75 | Videos from other instances federated by the instance (that is, instances |
76 | followed by the instance) can be found via keywords and other criteria of | |
77 | the advanced search. | |
ad031145 C |
78 | |
79 | Administrators can also enable the use of a remote search system, indexing | |
80 | videos and channels not could be not federated by the instance. | |
b029d58a | 81 | - name: Video Comments |
3e9e6f2f RK |
82 | description: > |
83 | Operations dealing with comments to a video. Comments are organized in | |
84 | threads. | |
b029d58a | 85 | - name: Video Playlists |
71810d0b RK |
86 | description: > |
87 | Operations dealing with playlists of videos. Playlists are bound to users | |
88 | and/or channels. | |
b029d58a | 89 | - name: Video Channels |
3e9e6f2f RK |
90 | description: > |
91 | Operations dealing with creation, modification and video listing of a | |
5776f78e RK |
92 | user's channels. |
93 | - name: Video Blacklist | |
94 | description: > | |
95 | Operations dealing with blacklisting videos (removing them from view and | |
96 | preventing interactions). | |
b029d58a | 97 | - name: Video Rates |
5776f78e | 98 | description: > |
b029d58a | 99 | Like/dislike a video. |
5776f78e RK |
100 | x-tagGroups: |
101 | - name: Accounts | |
102 | tags: | |
103 | - Accounts | |
b029d58a | 104 | - Users |
1f82e3e8 | 105 | - My User |
b029d58a | 106 | - My Subscriptions |
5776f78e RK |
107 | - name: Videos |
108 | tags: | |
109 | - Video | |
67ae04a5 | 110 | - Video Caption |
b029d58a C |
111 | - Video Channels |
112 | - Video Comments | |
5776f78e | 113 | - Video Following |
b029d58a C |
114 | - Video Rates |
115 | - Video Playlists | |
116 | - Video Ownership Change | |
117 | - name: Search | |
118 | tags: | |
119 | - Search | |
5776f78e RK |
120 | - name: Moderation |
121 | tags: | |
50e16ccf | 122 | - Video Abuses |
1ebddadd | 123 | - Video Blocks |
65f02679 | 124 | - name: Instance Configuration |
5776f78e RK |
125 | tags: |
126 | - Config | |
b029d58a | 127 | - Instance Follows |
5776f78e RK |
128 | - name: Jobs |
129 | tags: | |
130 | - Job | |
1569a818 | 131 | paths: |
ad9e39fb | 132 | '/accounts/{name}': |
1569a818 DG |
133 | get: |
134 | tags: | |
135 | - Accounts | |
b029d58a | 136 | summary: Get an account |
1569a818 | 137 | parameters: |
3e9e6f2f | 138 | - $ref: '#/components/parameters/name' |
1569a818 DG |
139 | responses: |
140 | '200': | |
141 | description: successful operation | |
3e9e6f2f RK |
142 | content: |
143 | application/json: | |
144 | schema: | |
145 | $ref: '#/components/schemas/Account' | |
ad9e39fb | 146 | '/accounts/{name}/videos': |
6b738c7a C |
147 | get: |
148 | tags: | |
149 | - Accounts | |
2963c343 | 150 | - Video |
b029d58a | 151 | summary: 'List videos of an account' |
6b738c7a | 152 | parameters: |
3e9e6f2f | 153 | - $ref: '#/components/parameters/name' |
59c794a5 C |
154 | - $ref: '#/components/parameters/categoryOneOf' |
155 | - $ref: '#/components/parameters/tagsOneOf' | |
156 | - $ref: '#/components/parameters/tagsAllOf' | |
157 | - $ref: '#/components/parameters/licenceOneOf' | |
158 | - $ref: '#/components/parameters/languageOneOf' | |
159 | - $ref: '#/components/parameters/nsfw' | |
160 | - $ref: '#/components/parameters/filter' | |
161 | - $ref: '#/components/parameters/skipCount' | |
162 | - $ref: '#/components/parameters/start' | |
163 | - $ref: '#/components/parameters/count' | |
164 | - $ref: '#/components/parameters/videosSort' | |
6b738c7a C |
165 | responses: |
166 | '200': | |
167 | description: successful operation | |
3e9e6f2f RK |
168 | content: |
169 | application/json: | |
170 | schema: | |
048b6946 | 171 | $ref: '#/components/schemas/VideoListResponse' |
2963c343 RK |
172 | x-code-samples: |
173 | - lang: JavaScript | |
174 | source: | | |
8f9e8be1 | 175 | fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos') |
2963c343 RK |
176 | .then(function(response) { |
177 | return response.json() | |
178 | }).then(function(data) { | |
179 | console.log(data) | |
180 | }) | |
8f9e8be1 RK |
181 | - lang: Shell |
182 | source: | | |
183 | # pip install httpie | |
184 | http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos | |
5776f78e RK |
185 | - lang: Ruby |
186 | source: | | |
5776f78e | 187 | require 'net/http' |
f6d51cfe | 188 | require 'json' |
5776f78e | 189 | |
f6d51cfe | 190 | uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos") |
5776f78e | 191 | |
f6d51cfe | 192 | http = Net::HTTP.new(uri.host, uri.port) |
5776f78e | 193 | http.use_ssl = true |
5776f78e | 194 | |
f6d51cfe MDB |
195 | response = http.get(uri.request_uri) |
196 | ||
197 | puts JSON.parse(response.read_body) | |
5776f78e RK |
198 | - lang: Python |
199 | source: | | |
f6d51cfe | 200 | import requests |
5776f78e | 201 | |
f6d51cfe MDB |
202 | r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos") |
203 | json = r.json() | |
5776f78e | 204 | |
f6d51cfe | 205 | print(json) |
1569a818 DG |
206 | /accounts: |
207 | get: | |
208 | tags: | |
209 | - Accounts | |
b029d58a | 210 | summary: List accounts |
2a8ae759 FS |
211 | parameters: |
212 | - $ref: '#/components/parameters/start' | |
213 | - $ref: '#/components/parameters/count' | |
214 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
215 | responses: |
216 | '200': | |
217 | description: successful operation | |
3e9e6f2f | 218 | content: |
8f9e8be1 | 219 | 'application/json': |
3e9e6f2f RK |
220 | schema: |
221 | type: array | |
222 | items: | |
223 | $ref: '#/components/schemas/Account' | |
1569a818 DG |
224 | /config: |
225 | get: | |
226 | tags: | |
227 | - Config | |
b029d58a | 228 | summary: Get instance public configuration |
1569a818 DG |
229 | responses: |
230 | '200': | |
231 | description: successful operation | |
3e9e6f2f RK |
232 | content: |
233 | application/json: | |
234 | schema: | |
235 | $ref: '#/components/schemas/ServerConfig' | |
6441981b RK |
236 | /config/about: |
237 | get: | |
b029d58a | 238 | summary: Get instance "About" information |
6441981b RK |
239 | tags: |
240 | - Config | |
241 | responses: | |
242 | '200': | |
243 | description: successful operation | |
2a8ae759 FS |
244 | content: |
245 | application/json: | |
246 | schema: | |
247 | $ref: '#/components/schemas/ServerConfigAbout' | |
6441981b RK |
248 | /config/custom: |
249 | get: | |
b029d58a | 250 | summary: Get instance runtime configuration |
6441981b RK |
251 | tags: |
252 | - Config | |
253 | security: | |
254 | - OAuth2: | |
255 | - admin | |
256 | responses: | |
257 | '200': | |
258 | description: successful operation | |
2a8ae759 FS |
259 | content: |
260 | application/json: | |
261 | schema: | |
262 | $ref: '#/components/schemas/ServerConfigCustom' | |
6441981b | 263 | put: |
b029d58a | 264 | summary: Set instance runtime configuration |
6441981b RK |
265 | tags: |
266 | - Config | |
267 | security: | |
268 | - OAuth2: | |
269 | - admin | |
270 | responses: | |
271 | '200': | |
272 | description: successful operation | |
273 | delete: | |
b029d58a | 274 | summary: Delete instance runtime configuration |
6441981b RK |
275 | tags: |
276 | - Config | |
277 | security: | |
278 | - OAuth2: | |
279 | - admin | |
280 | responses: | |
281 | '200': | |
282 | description: successful operation | |
d216b538 | 283 | /jobs/{state}: |
1569a818 | 284 | get: |
b029d58a | 285 | summary: List instance jobs |
94ff4c23 | 286 | security: |
3e9e6f2f RK |
287 | - OAuth2: |
288 | - admin | |
1569a818 DG |
289 | tags: |
290 | - Job | |
44cb3b85 DG |
291 | parameters: |
292 | - name: state | |
293 | in: path | |
294 | required: true | |
3e9e6f2f RK |
295 | description: The state of the job |
296 | schema: | |
297 | type: string | |
65f02679 RK |
298 | enum: |
299 | - active | |
300 | - completed | |
301 | - failed | |
302 | - waiting | |
303 | - delayed | |
3e9e6f2f RK |
304 | - $ref: '#/components/parameters/start' |
305 | - $ref: '#/components/parameters/count' | |
306 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
307 | responses: |
308 | '200': | |
309 | description: successful operation | |
3e9e6f2f RK |
310 | content: |
311 | application/json: | |
312 | schema: | |
313 | type: array | |
314 | items: | |
315 | $ref: '#/components/schemas/Job' | |
1569a818 DG |
316 | '/server/following/{host}': |
317 | delete: | |
94ff4c23 | 318 | security: |
3e9e6f2f RK |
319 | - OAuth2: |
320 | - admin | |
1569a818 | 321 | tags: |
b029d58a C |
322 | - Instance Follows |
323 | summary: Unfollow a server | |
1569a818 DG |
324 | parameters: |
325 | - name: host | |
326 | in: path | |
327 | required: true | |
1569a818 | 328 | description: 'The host to unfollow ' |
3e9e6f2f RK |
329 | schema: |
330 | type: string | |
1569a818 DG |
331 | responses: |
332 | '201': | |
333 | description: successful operation | |
334 | /server/followers: | |
335 | get: | |
336 | tags: | |
b029d58a C |
337 | - Instance Follows |
338 | summary: List instance followers | |
44cb3b85 | 339 | parameters: |
3e9e6f2f RK |
340 | - $ref: '#/components/parameters/start' |
341 | - $ref: '#/components/parameters/count' | |
342 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
343 | responses: |
344 | '200': | |
345 | description: successful operation | |
3e9e6f2f RK |
346 | content: |
347 | application/json: | |
348 | schema: | |
349 | type: array | |
350 | items: | |
351 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
352 | /server/following: |
353 | get: | |
354 | tags: | |
b029d58a C |
355 | - Instance Follows |
356 | summary: List instance followings | |
44cb3b85 | 357 | parameters: |
3e9e6f2f RK |
358 | - $ref: '#/components/parameters/start' |
359 | - $ref: '#/components/parameters/count' | |
360 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
361 | responses: |
362 | '200': | |
363 | description: successful operation | |
3e9e6f2f RK |
364 | content: |
365 | application/json: | |
366 | schema: | |
367 | type: array | |
368 | items: | |
369 | $ref: '#/components/schemas/Follow' | |
1569a818 | 370 | post: |
94ff4c23 | 371 | security: |
3e9e6f2f RK |
372 | - OAuth2: |
373 | - admin | |
1569a818 | 374 | tags: |
b029d58a | 375 | - Instance Follows |
2963c343 | 376 | summary: Follow a server |
1569a818 DG |
377 | responses: |
378 | '204': | |
c1843150 | 379 | description: successful operation |
3e9e6f2f RK |
380 | requestBody: |
381 | content: | |
382 | application/json: | |
383 | schema: | |
384 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
385 | /users: |
386 | post: | |
b029d58a | 387 | summary: Create a user |
94ff4c23 | 388 | security: |
3e9e6f2f RK |
389 | - OAuth2: |
390 | - admin | |
1569a818 | 391 | tags: |
b029d58a | 392 | - Users |
1569a818 DG |
393 | responses: |
394 | '200': | |
395 | description: successful operation | |
3e9e6f2f RK |
396 | content: |
397 | application/json: | |
398 | schema: | |
399 | $ref: '#/components/schemas/AddUserResponse' | |
400 | requestBody: | |
401 | content: | |
402 | application/json: | |
403 | schema: | |
404 | $ref: '#/components/schemas/AddUser' | |
405 | description: User to create | |
406 | required: true | |
1569a818 | 407 | get: |
b029d58a | 408 | summary: List users |
94ff4c23 | 409 | security: |
3e9e6f2f | 410 | - OAuth2: [] |
1569a818 | 411 | tags: |
b029d58a | 412 | - Users |
44cb3b85 | 413 | parameters: |
3e9e6f2f RK |
414 | - $ref: '#/components/parameters/start' |
415 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 416 | - $ref: '#/components/parameters/usersSort' |
1569a818 DG |
417 | responses: |
418 | '200': | |
419 | description: successful operation | |
3e9e6f2f RK |
420 | content: |
421 | application/json: | |
422 | schema: | |
423 | type: array | |
424 | items: | |
425 | $ref: '#/components/schemas/User' | |
1569a818 DG |
426 | '/users/{id}': |
427 | delete: | |
b029d58a | 428 | summary: Delete a user |
94ff4c23 | 429 | security: |
3e9e6f2f RK |
430 | - OAuth2: |
431 | - admin | |
1569a818 | 432 | tags: |
b029d58a | 433 | - Users |
1569a818 | 434 | parameters: |
3e9e6f2f | 435 | - $ref: '#/components/parameters/id' |
1569a818 DG |
436 | responses: |
437 | '204': | |
c1843150 | 438 | description: successful operation |
1569a818 | 439 | get: |
b029d58a | 440 | summary: Get a user |
94ff4c23 | 441 | security: |
3e9e6f2f | 442 | - OAuth2: [] |
1569a818 | 443 | tags: |
b029d58a | 444 | - Users |
1569a818 | 445 | parameters: |
3e9e6f2f | 446 | - $ref: '#/components/parameters/id' |
1569a818 DG |
447 | responses: |
448 | '200': | |
449 | description: successful operation | |
3e9e6f2f RK |
450 | content: |
451 | application/json: | |
452 | schema: | |
453 | $ref: '#/components/schemas/User' | |
1569a818 | 454 | put: |
b029d58a | 455 | summary: Update a user |
94ff4c23 | 456 | security: |
3e9e6f2f | 457 | - OAuth2: [] |
1569a818 | 458 | tags: |
b029d58a | 459 | - Users |
1569a818 | 460 | parameters: |
3e9e6f2f | 461 | - $ref: '#/components/parameters/id' |
1569a818 DG |
462 | responses: |
463 | '204': | |
c1843150 | 464 | description: successful operation |
3e9e6f2f RK |
465 | requestBody: |
466 | content: | |
467 | application/json: | |
468 | schema: | |
469 | $ref: '#/components/schemas/UpdateUser' | |
470 | required: true | |
1f82e3e8 C |
471 | /users/register: |
472 | post: | |
473 | summary: Register a user | |
474 | tags: | |
b029d58a | 475 | - Users |
1f82e3e8 C |
476 | responses: |
477 | '204': | |
c1843150 | 478 | description: successful operation |
1f82e3e8 C |
479 | requestBody: |
480 | content: | |
481 | application/json: | |
482 | schema: | |
483 | $ref: '#/components/schemas/RegisterUser' | |
484 | required: true | |
1569a818 DG |
485 | /users/me: |
486 | get: | |
b029d58a | 487 | summary: Get my user information |
94ff4c23 | 488 | security: |
e76d5784 RK |
489 | - OAuth2: |
490 | - user | |
1569a818 | 491 | tags: |
1f82e3e8 | 492 | - My User |
1569a818 DG |
493 | responses: |
494 | '200': | |
495 | description: successful operation | |
3e9e6f2f RK |
496 | content: |
497 | application/json: | |
498 | schema: | |
499 | type: array | |
500 | items: | |
501 | $ref: '#/components/schemas/User' | |
1569a818 | 502 | put: |
b029d58a | 503 | summary: Update my user information |
94ff4c23 | 504 | security: |
e76d5784 RK |
505 | - OAuth2: |
506 | - user | |
1569a818 | 507 | tags: |
1f82e3e8 | 508 | - My User |
1569a818 DG |
509 | responses: |
510 | '204': | |
37db4176 | 511 | description: successful operation |
3e9e6f2f RK |
512 | requestBody: |
513 | content: | |
514 | application/json: | |
515 | schema: | |
516 | $ref: '#/components/schemas/UpdateMe' | |
517 | required: true | |
1f82e3e8 C |
518 | /users/me/videos/imports: |
519 | get: | |
b029d58a | 520 | summary: Get video imports of my user |
1f82e3e8 C |
521 | security: |
522 | - OAuth2: | |
523 | - user | |
524 | tags: | |
b029d58a | 525 | - Videos |
1f82e3e8 C |
526 | - My User |
527 | parameters: | |
528 | - $ref: '#/components/parameters/start' | |
529 | - $ref: '#/components/parameters/count' | |
530 | - $ref: '#/components/parameters/sort' | |
531 | responses: | |
532 | '200': | |
533 | description: successful operation | |
534 | content: | |
535 | application/json: | |
536 | schema: | |
537 | $ref: '#/components/schemas/VideoImport' | |
1569a818 DG |
538 | /users/me/video-quota-used: |
539 | get: | |
b029d58a | 540 | summary: Get my user used quota |
94ff4c23 | 541 | security: |
e76d5784 RK |
542 | - OAuth2: |
543 | - user | |
1569a818 | 544 | tags: |
1f82e3e8 | 545 | - My User |
1569a818 DG |
546 | responses: |
547 | '200': | |
548 | description: successful operation | |
3e9e6f2f RK |
549 | content: |
550 | application/json: | |
551 | schema: | |
552 | type: number | |
1569a818 DG |
553 | '/users/me/videos/{videoId}/rating': |
554 | get: | |
50e16ccf | 555 | summary: Get rate of my user for a video |
94ff4c23 | 556 | security: |
3e9e6f2f | 557 | - OAuth2: [] |
1569a818 | 558 | tags: |
1f82e3e8 | 559 | - My User |
b029d58a | 560 | - Video Rates |
1569a818 DG |
561 | parameters: |
562 | - name: videoId | |
563 | in: path | |
564 | required: true | |
1569a818 | 565 | description: 'The video id ' |
3e9e6f2f RK |
566 | schema: |
567 | type: string | |
1569a818 DG |
568 | responses: |
569 | '200': | |
570 | description: successful operation | |
3e9e6f2f RK |
571 | content: |
572 | application/json: | |
573 | schema: | |
574 | $ref: '#/components/schemas/GetMeVideoRating' | |
1569a818 DG |
575 | /users/me/videos: |
576 | get: | |
b029d58a | 577 | summary: Get videos of my user |
94ff4c23 | 578 | security: |
e76d5784 RK |
579 | - OAuth2: |
580 | - user | |
1569a818 | 581 | tags: |
1f82e3e8 | 582 | - My User |
b029d58a | 583 | - Videos |
44cb3b85 | 584 | parameters: |
3e9e6f2f RK |
585 | - $ref: '#/components/parameters/start' |
586 | - $ref: '#/components/parameters/count' | |
587 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
588 | responses: |
589 | '200': | |
590 | description: successful operation | |
3e9e6f2f RK |
591 | content: |
592 | application/json: | |
593 | schema: | |
048b6946 | 594 | $ref: '#/components/schemas/VideoListResponse' |
e76d5784 RK |
595 | /users/me/subscriptions: |
596 | get: | |
b029d58a | 597 | summary: Get my user subscriptions |
e76d5784 RK |
598 | security: |
599 | - OAuth2: | |
600 | - user | |
601 | tags: | |
b029d58a | 602 | - My Subscriptions |
e76d5784 RK |
603 | parameters: |
604 | - $ref: '#/components/parameters/start' | |
605 | - $ref: '#/components/parameters/count' | |
606 | - $ref: '#/components/parameters/sort' | |
607 | responses: | |
608 | '200': | |
609 | description: successful operation | |
610 | post: | |
b029d58a | 611 | summary: Add subscription to my user |
e76d5784 RK |
612 | security: |
613 | - OAuth2: | |
614 | - user | |
615 | tags: | |
b029d58a | 616 | - My Subscriptions |
e76d5784 RK |
617 | responses: |
618 | '200': | |
619 | description: successful operation | |
620 | /users/me/subscriptions/exist: | |
621 | get: | |
b029d58a | 622 | summary: Get if subscriptions exist for my user |
e76d5784 RK |
623 | security: |
624 | - OAuth2: | |
625 | - user | |
626 | tags: | |
b029d58a | 627 | - My Subscriptions |
e76d5784 RK |
628 | parameters: |
629 | - $ref: '#/components/parameters/subscriptionsUris' | |
630 | responses: | |
631 | '200': | |
632 | description: successful operation | |
633 | content: | |
634 | application/json: | |
635 | schema: | |
636 | type: object | |
637 | /users/me/subscriptions/videos: | |
638 | get: | |
b029d58a | 639 | summary: List videos of subscriptions of my user |
e76d5784 RK |
640 | security: |
641 | - OAuth2: | |
642 | - user | |
643 | tags: | |
b029d58a C |
644 | - My Subscriptions |
645 | - Videos | |
e76d5784 | 646 | parameters: |
59c794a5 C |
647 | - $ref: '#/components/parameters/categoryOneOf' |
648 | - $ref: '#/components/parameters/tagsOneOf' | |
649 | - $ref: '#/components/parameters/tagsAllOf' | |
650 | - $ref: '#/components/parameters/licenceOneOf' | |
651 | - $ref: '#/components/parameters/languageOneOf' | |
652 | - $ref: '#/components/parameters/nsfw' | |
653 | - $ref: '#/components/parameters/filter' | |
654 | - $ref: '#/components/parameters/skipCount' | |
e76d5784 RK |
655 | - $ref: '#/components/parameters/start' |
656 | - $ref: '#/components/parameters/count' | |
59c794a5 | 657 | - $ref: '#/components/parameters/videosSort' |
e76d5784 RK |
658 | responses: |
659 | '200': | |
660 | description: successful operation | |
661 | content: | |
662 | application/json: | |
663 | schema: | |
048b6946 | 664 | $ref: '#/components/schemas/VideoListResponse' |
cb9d028a | 665 | '/users/me/subscriptions/{subscriptionHandle}': |
e76d5784 | 666 | get: |
b029d58a | 667 | summary: Get subscription of my user |
e76d5784 RK |
668 | security: |
669 | - OAuth2: | |
670 | - user | |
671 | tags: | |
b029d58a | 672 | - My Subscriptions |
cb9d028a C |
673 | parameters: |
674 | - $ref: '#/components/parameters/subscriptionHandle' | |
e76d5784 RK |
675 | responses: |
676 | '200': | |
677 | description: successful operation | |
678 | content: | |
679 | application/json: | |
680 | schema: | |
681 | $ref: '#/components/schemas/VideoChannel' | |
682 | delete: | |
b029d58a | 683 | summary: Delete subscription of my user |
e76d5784 RK |
684 | security: |
685 | - OAuth2: | |
686 | - user | |
687 | tags: | |
b029d58a | 688 | - My Subscriptions |
cb9d028a C |
689 | parameters: |
690 | - $ref: '#/components/parameters/subscriptionHandle' | |
e76d5784 RK |
691 | responses: |
692 | '200': | |
693 | description: successful operation | |
1569a818 DG |
694 | /users/me/avatar/pick: |
695 | post: | |
b029d58a | 696 | summary: Update my user avatar |
94ff4c23 | 697 | security: |
3e9e6f2f | 698 | - OAuth2: [] |
1569a818 | 699 | tags: |
1f82e3e8 | 700 | - My User |
1569a818 DG |
701 | responses: |
702 | '200': | |
703 | description: successful operation | |
3e9e6f2f RK |
704 | content: |
705 | application/json: | |
706 | schema: | |
707 | $ref: '#/components/schemas/Avatar' | |
708 | requestBody: | |
709 | content: | |
710 | multipart/form-data: | |
711 | schema: | |
712 | type: object | |
713 | properties: | |
714 | avatarfile: | |
715 | description: The file to upload. | |
716 | type: string | |
717 | format: binary | |
718 | encoding: | |
0ad45af7 | 719 | avatarfile: |
3e9e6f2f | 720 | contentType: image/png, image/jpeg |
b029d58a C |
721 | /videos/ownership: |
722 | get: | |
723 | summary: List video ownership changes | |
724 | tags: | |
725 | - Video Ownership Change | |
726 | security: | |
727 | - OAuth2: [] | |
728 | responses: | |
729 | '200': | |
730 | description: successful operation | |
731 | '/videos/ownership/{id}/accept': | |
732 | post: | |
733 | summary: Accept ownership change request | |
734 | tags: | |
735 | - Video Ownership Change | |
736 | security: | |
737 | - OAuth2: [] | |
738 | parameters: | |
739 | - $ref: '#/components/parameters/idOrUUID' | |
740 | responses: | |
741 | '204': | |
c1843150 | 742 | description: successful operation |
b029d58a C |
743 | '/videos/ownership/{id}/refuse': |
744 | post: | |
745 | summary: Refuse ownership change request | |
746 | tags: | |
747 | - Video Ownership Change | |
748 | security: | |
749 | - OAuth2: [] | |
750 | parameters: | |
751 | - $ref: '#/components/parameters/idOrUUID' | |
752 | responses: | |
753 | '204': | |
c1843150 | 754 | description: successful operation |
b029d58a C |
755 | '/videos/{id}/give-ownership': |
756 | post: | |
757 | summary: Request ownership change | |
758 | tags: | |
759 | - Video Ownership Change | |
760 | security: | |
761 | - OAuth2: [] | |
762 | parameters: | |
763 | - $ref: '#/components/parameters/idOrUUID' | |
764 | requestBody: | |
765 | required: true | |
766 | content: | |
767 | application/x-www-form-urlencoded: | |
768 | schema: | |
769 | type: object | |
770 | properties: | |
771 | username: | |
772 | type: string | |
773 | required: | |
774 | - username | |
775 | responses: | |
776 | '204': | |
c1843150 | 777 | description: successful operation |
b029d58a C |
778 | '400': |
779 | description: 'Changing video ownership to a remote account is not supported yet' | |
c360c494 | 780 | /videos: |
1569a818 | 781 | get: |
b029d58a | 782 | summary: List videos |
1569a818 DG |
783 | tags: |
784 | - Video | |
44cb3b85 | 785 | parameters: |
fd5af7a2 RK |
786 | - $ref: '#/components/parameters/categoryOneOf' |
787 | - $ref: '#/components/parameters/tagsOneOf' | |
788 | - $ref: '#/components/parameters/tagsAllOf' | |
789 | - $ref: '#/components/parameters/licenceOneOf' | |
790 | - $ref: '#/components/parameters/languageOneOf' | |
791 | - $ref: '#/components/parameters/nsfw' | |
792 | - $ref: '#/components/parameters/filter' | |
59c794a5 | 793 | - $ref: '#/components/parameters/skipCount' |
3e9e6f2f RK |
794 | - $ref: '#/components/parameters/start' |
795 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 796 | - $ref: '#/components/parameters/videosSort' |
1569a818 DG |
797 | responses: |
798 | '200': | |
799 | description: successful operation | |
3e9e6f2f RK |
800 | content: |
801 | application/json: | |
802 | schema: | |
048b6946 | 803 | $ref: '#/components/schemas/VideoListResponse' |
c360c494 | 804 | /videos/categories: |
1569a818 | 805 | get: |
b029d58a | 806 | summary: List available video categories |
1569a818 DG |
807 | tags: |
808 | - Video | |
1569a818 DG |
809 | responses: |
810 | '200': | |
811 | description: successful operation | |
3e9e6f2f RK |
812 | content: |
813 | application/json: | |
814 | schema: | |
815 | type: array | |
816 | items: | |
817 | type: string | |
c360c494 | 818 | /videos/licences: |
1569a818 | 819 | get: |
b029d58a | 820 | summary: List available video licences |
1569a818 DG |
821 | tags: |
822 | - Video | |
1569a818 DG |
823 | responses: |
824 | '200': | |
825 | description: successful operation | |
3e9e6f2f RK |
826 | content: |
827 | application/json: | |
828 | schema: | |
829 | type: array | |
830 | items: | |
831 | type: string | |
c360c494 | 832 | /videos/languages: |
1569a818 | 833 | get: |
b029d58a | 834 | summary: List available video languages |
1569a818 DG |
835 | tags: |
836 | - Video | |
1569a818 DG |
837 | responses: |
838 | '200': | |
839 | description: successful operation | |
3e9e6f2f RK |
840 | content: |
841 | application/json: | |
842 | schema: | |
843 | type: array | |
844 | items: | |
845 | type: string | |
c360c494 | 846 | /videos/privacies: |
1569a818 | 847 | get: |
b029d58a | 848 | summary: List available video privacies |
1569a818 DG |
849 | tags: |
850 | - Video | |
1569a818 DG |
851 | responses: |
852 | '200': | |
853 | description: successful operation | |
3e9e6f2f RK |
854 | content: |
855 | application/json: | |
856 | schema: | |
857 | type: array | |
858 | items: | |
859 | type: string | |
860 | '/videos/{id}': | |
1569a818 | 861 | put: |
b029d58a | 862 | summary: Update a video |
94ff4c23 | 863 | security: |
3e9e6f2f | 864 | - OAuth2: [] |
1569a818 DG |
865 | tags: |
866 | - Video | |
1569a818 | 867 | parameters: |
cb9d028a | 868 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 | 869 | responses: |
37db4176 | 870 | '204': |
1569a818 | 871 | description: successful operation |
3e9e6f2f RK |
872 | requestBody: |
873 | content: | |
874 | multipart/form-data: | |
875 | schema: | |
876 | type: object | |
877 | properties: | |
878 | thumbnailfile: | |
879 | description: Video thumbnail file | |
880 | type: string | |
0ad45af7 | 881 | format: binary |
3e9e6f2f RK |
882 | previewfile: |
883 | description: Video preview file | |
884 | type: string | |
0ad45af7 | 885 | format: binary |
3e9e6f2f RK |
886 | category: |
887 | description: Video category | |
888 | type: string | |
889 | licence: | |
890 | description: Video licence | |
891 | type: string | |
892 | language: | |
893 | description: Video language | |
894 | type: string | |
c1843150 C |
895 | privacy: |
896 | $ref: '#/components/schemas/VideoPrivacySet' | |
3e9e6f2f RK |
897 | description: |
898 | description: Video description | |
899 | type: string | |
900 | waitTranscoding: | |
901 | description: Whether or not we wait transcoding before publish the video | |
902 | type: string | |
903 | support: | |
904 | description: Text describing how to support the video uploader | |
905 | type: string | |
906 | nsfw: | |
907 | description: Whether or not this video contains sensitive content | |
908 | type: string | |
909 | name: | |
910 | description: Video name | |
911 | type: string | |
912 | tags: | |
12fed49e | 913 | description: Video tags (maximum 5 tags each between 2 and 30 characters) |
1fd12c7c | 914 | type: array |
07d02f6d FS |
915 | minItems: 1 |
916 | maxItems: 5 | |
1fd12c7c C |
917 | items: |
918 | type: string | |
07d02f6d FS |
919 | minLength: 2 |
920 | maxLength: 30 | |
3e9e6f2f RK |
921 | commentsEnabled: |
922 | description: Enable or disable comments for this video | |
923 | type: string | |
37db4176 FS |
924 | originallyPublishedAt: |
925 | description: Date when the content was originally published | |
926 | type: string | |
927 | format: date-time | |
5dce26d2 C |
928 | scheduleUpdate: |
929 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
0ad45af7 FS |
930 | encoding: |
931 | thumbnailfile: | |
932 | contentType: image/jpeg | |
933 | previewfile: | |
934 | contentType: image/jpeg | |
1569a818 | 935 | get: |
b029d58a | 936 | summary: Get a video |
1569a818 DG |
937 | tags: |
938 | - Video | |
1569a818 | 939 | parameters: |
cb9d028a | 940 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
941 | responses: |
942 | '200': | |
943 | description: successful operation | |
3e9e6f2f RK |
944 | content: |
945 | application/json: | |
946 | schema: | |
5dce26d2 | 947 | $ref: '#/components/schemas/VideoDetails' |
1569a818 | 948 | delete: |
b029d58a | 949 | summary: Delete a video |
94ff4c23 | 950 | security: |
3e9e6f2f | 951 | - OAuth2: [] |
1569a818 DG |
952 | tags: |
953 | - Video | |
1569a818 | 954 | parameters: |
cb9d028a | 955 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
956 | responses: |
957 | '204': | |
c1843150 | 958 | description: successful operation |
3e9e6f2f | 959 | '/videos/{id}/description': |
1569a818 | 960 | get: |
b029d58a | 961 | summary: Get complete video description |
1569a818 DG |
962 | tags: |
963 | - Video | |
1569a818 | 964 | parameters: |
cb9d028a | 965 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
966 | responses: |
967 | '200': | |
968 | description: successful operation | |
3e9e6f2f RK |
969 | content: |
970 | application/json: | |
971 | schema: | |
972 | type: string | |
973 | '/videos/{id}/views': | |
1569a818 | 974 | post: |
b029d58a | 975 | summary: Add a view to a video |
1569a818 DG |
976 | tags: |
977 | - Video | |
1569a818 | 978 | parameters: |
cb9d028a | 979 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
980 | responses: |
981 | '204': | |
c1843150 | 982 | description: successful operation |
6441981b RK |
983 | '/videos/{id}/watching': |
984 | put: | |
b029d58a | 985 | summary: Set watching progress of a video |
6441981b RK |
986 | tags: |
987 | - Video | |
988 | security: | |
989 | - OAuth2: [] | |
990 | parameters: | |
cb9d028a | 991 | - $ref: '#/components/parameters/idOrUUID' |
6441981b RK |
992 | requestBody: |
993 | content: | |
994 | application/json: | |
995 | schema: | |
996 | $ref: '#/components/schemas/UserWatchingVideo' | |
997 | required: true | |
998 | responses: | |
999 | '204': | |
c1843150 | 1000 | description: successful operation |
c360c494 | 1001 | /videos/upload: |
1569a818 | 1002 | post: |
b029d58a | 1003 | summary: Upload a video |
94ff4c23 | 1004 | security: |
3e9e6f2f | 1005 | - OAuth2: [] |
1569a818 DG |
1006 | tags: |
1007 | - Video | |
1569a818 DG |
1008 | responses: |
1009 | '200': | |
1010 | description: successful operation | |
3e9e6f2f RK |
1011 | content: |
1012 | application/json: | |
1013 | schema: | |
1014 | $ref: '#/components/schemas/VideoUploadResponse' | |
06bcfbd9 RK |
1015 | '403': |
1016 | description: 'The user video quota is exceeded with this video.' | |
1017 | '408': | |
1018 | description: 'Upload has timed out' | |
1019 | '422': | |
1020 | description: 'Invalid input file.' | |
3e9e6f2f RK |
1021 | requestBody: |
1022 | content: | |
1023 | multipart/form-data: | |
1024 | schema: | |
1025 | type: object | |
1026 | properties: | |
1027 | videofile: | |
1028 | description: Video file | |
1029 | type: string | |
1030 | format: binary | |
1031 | channelId: | |
1032 | description: Channel id that will contain this video | |
1033 | type: number | |
1034 | thumbnailfile: | |
1035 | description: Video thumbnail file | |
1036 | type: string | |
0ad45af7 | 1037 | format: binary |
3e9e6f2f RK |
1038 | previewfile: |
1039 | description: Video preview file | |
1040 | type: string | |
0ad45af7 | 1041 | format: binary |
8f9e8be1 | 1042 | privacy: |
ee89e8fd | 1043 | $ref: '#/components/schemas/VideoPrivacySet' |
3e9e6f2f RK |
1044 | category: |
1045 | description: Video category | |
1046 | type: string | |
1047 | licence: | |
1048 | description: Video licence | |
1049 | type: string | |
1050 | language: | |
1051 | description: Video language | |
1052 | type: string | |
1053 | description: | |
1054 | description: Video description | |
1055 | type: string | |
1056 | waitTranscoding: | |
1057 | description: Whether or not we wait transcoding before publish the video | |
1058 | type: string | |
1059 | support: | |
1060 | description: Text describing how to support the video uploader | |
1061 | type: string | |
1062 | nsfw: | |
1063 | description: Whether or not this video contains sensitive content | |
1064 | type: string | |
1065 | name: | |
1066 | description: Video name | |
1067 | type: string | |
1068 | tags: | |
07d02f6d | 1069 | description: Video tags (maximum 5 tags each between 2 and 30 characters) |
1fd12c7c | 1070 | type: array |
07d02f6d FS |
1071 | minItems: 1 |
1072 | maxItems: 5 | |
1fd12c7c C |
1073 | items: |
1074 | type: string | |
07d02f6d FS |
1075 | minLength: 2 |
1076 | maxLength: 30 | |
3e9e6f2f RK |
1077 | commentsEnabled: |
1078 | description: Enable or disable comments for this video | |
1079 | type: string | |
f9f89092 FS |
1080 | originallyPublishedAt: |
1081 | description: Date when the content was originally published | |
1082 | type: string | |
1083 | format: date-time | |
5dce26d2 C |
1084 | scheduleUpdate: |
1085 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
3e9e6f2f RK |
1086 | required: |
1087 | - videofile | |
1088 | - channelId | |
8f9e8be1 | 1089 | - name |
0ad45af7 FS |
1090 | encoding: |
1091 | videofile: | |
1092 | contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream | |
1093 | thumbnailfile: | |
1094 | contentType: image/jpeg | |
1095 | previewfile: | |
1096 | contentType: image/jpeg | |
8f9e8be1 RK |
1097 | x-code-samples: |
1098 | - lang: Shell | |
1099 | source: | | |
1100 | ## DEPENDENCIES: httpie, jq | |
1101 | # pip install httpie | |
1102 | USERNAME="<your_username>" | |
1103 | PASSWORD="<your_password>" | |
1104 | FILE_PATH="<your_file_path>" | |
1105 | CHANNEL_ID="<your_channel_id>" | |
8f9e8be1 RK |
1106 | NAME="<video_name>" |
1107 | ||
1108 | API_PATH="https://peertube2.cpy.re/api/v1" | |
1109 | ## AUTH | |
1110 | client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id") | |
1111 | client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret") | |
1112 | token=$(http -b --form POST "$API_PATH/users/token" \ | |
1113 | client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \ | |
1114 | username=$USERNAME \ | |
1115 | password=$PASSWORD \ | |
1116 | | jq -r ".access_token") | |
1117 | ## VIDEO UPLOAD | |
1118 | http -b --form POST "$API_PATH/videos/upload" \ | |
1119 | videofile@$FILE_PATH \ | |
1120 | channelId=$CHANNEL_ID \ | |
1121 | name=$NAME \ | |
8f9e8be1 | 1122 | "Authorization:Bearer $token" |
28c8e63e C |
1123 | /videos/imports: |
1124 | post: | |
b029d58a C |
1125 | summary: Import a video |
1126 | description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator) | |
28c8e63e C |
1127 | security: |
1128 | - OAuth2: [] | |
1129 | tags: | |
1130 | - Video | |
1131 | responses: | |
1132 | '200': | |
1133 | description: successful operation | |
1134 | content: | |
1135 | application/json: | |
1136 | schema: | |
1137 | $ref: '#/components/schemas/VideoUploadResponse' | |
1138 | requestBody: | |
1139 | content: | |
1140 | multipart/form-data: | |
1141 | schema: | |
1142 | type: object | |
1143 | properties: | |
1144 | torrentfile: | |
1145 | description: Torrent File | |
1146 | type: string | |
1147 | format: binary | |
1148 | targetUrl: | |
1149 | description: HTTP target URL | |
1150 | type: string | |
1151 | magnetUri: | |
1152 | description: Magnet URI | |
1153 | type: string | |
1154 | channelId: | |
1155 | description: Channel id that will contain this video | |
1156 | type: number | |
1157 | thumbnailfile: | |
1158 | description: Video thumbnail file | |
1159 | type: string | |
0ad45af7 | 1160 | format: binary |
28c8e63e C |
1161 | previewfile: |
1162 | description: Video preview file | |
1163 | type: string | |
0ad45af7 | 1164 | format: binary |
28c8e63e | 1165 | privacy: |
ee89e8fd | 1166 | $ref: '#/components/schemas/VideoPrivacySet' |
28c8e63e C |
1167 | category: |
1168 | description: Video category | |
1169 | type: string | |
1170 | licence: | |
1171 | description: Video licence | |
1172 | type: string | |
1173 | language: | |
1174 | description: Video language | |
1175 | type: string | |
1176 | description: | |
1177 | description: Video description | |
1178 | type: string | |
1179 | waitTranscoding: | |
1180 | description: Whether or not we wait transcoding before publish the video | |
1181 | type: string | |
1182 | support: | |
1183 | description: Text describing how to support the video uploader | |
1184 | type: string | |
1185 | nsfw: | |
1186 | description: Whether or not this video contains sensitive content | |
1187 | type: string | |
1188 | name: | |
1189 | description: Video name | |
1190 | type: string | |
1191 | tags: | |
07d02f6d | 1192 | description: Video tags (maximum 5 tags each between 2 and 30 characters) |
28c8e63e | 1193 | type: array |
07d02f6d FS |
1194 | minItems: 1 |
1195 | maxItems: 5 | |
28c8e63e C |
1196 | items: |
1197 | type: string | |
07d02f6d FS |
1198 | minLength: 2 |
1199 | maxLength: 30 | |
28c8e63e C |
1200 | commentsEnabled: |
1201 | description: Enable or disable comments for this video | |
1202 | type: string | |
5dce26d2 C |
1203 | scheduleUpdate: |
1204 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
28c8e63e C |
1205 | required: |
1206 | - channelId | |
1207 | - name | |
0ad45af7 FS |
1208 | encoding: |
1209 | torrentfile: | |
1210 | contentType: application/x-bittorrent | |
1211 | thumbnailfile: | |
1212 | contentType: image/jpeg | |
1213 | previewfile: | |
1214 | contentType: image/jpeg | |
c360c494 | 1215 | /videos/abuse: |
1569a818 | 1216 | get: |
b029d58a | 1217 | summary: List video abuses |
94ff4c23 | 1218 | security: |
b029d58a C |
1219 | - OAuth2: |
1220 | - admin | |
1221 | - moderator | |
1569a818 | 1222 | tags: |
50e16ccf | 1223 | - Video Abuses |
44cb3b85 | 1224 | parameters: |
3e9e6f2f RK |
1225 | - $ref: '#/components/parameters/start' |
1226 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1227 | - $ref: '#/components/parameters/abusesSort' |
1569a818 DG |
1228 | responses: |
1229 | '200': | |
1230 | description: successful operation | |
3e9e6f2f RK |
1231 | content: |
1232 | application/json: | |
1233 | schema: | |
1234 | type: array | |
1235 | items: | |
1236 | $ref: '#/components/schemas/VideoAbuse' | |
1237 | '/videos/{id}/abuse': | |
1569a818 | 1238 | post: |
b029d58a | 1239 | summary: Report an abuse |
94ff4c23 | 1240 | security: |
3e9e6f2f | 1241 | - OAuth2: [] |
1569a818 | 1242 | tags: |
50e16ccf C |
1243 | - Video Abuses |
1244 | - Videos | |
1569a818 | 1245 | parameters: |
cb9d028a | 1246 | - $ref: '#/components/parameters/idOrUUID' |
50e16ccf | 1247 | requestBody: |
1ebddadd | 1248 | required: true |
50e16ccf C |
1249 | content: |
1250 | application/json: | |
1251 | schema: | |
1252 | type: object | |
1253 | properties: | |
1254 | reason: | |
1255 | description: Reason why the user reports this video | |
1256 | type: string | |
1ebddadd RK |
1257 | predefinedReasons: |
1258 | description: Reason categories that help triage reports | |
1259 | type: array | |
1260 | items: | |
1261 | type: string | |
1262 | enum: | |
1263 | - violentOrAbusive | |
1264 | - hatefulOrAbusive | |
1265 | - spamOrMisleading | |
1266 | - privacy | |
1267 | - rights | |
1268 | - serverRules | |
1269 | - thumbnails | |
1270 | - captions | |
1271 | startAt: | |
1272 | type: number | |
1273 | description: Timestamp in the video that marks the beginning of the report | |
1274 | endAt: | |
1275 | type: number | |
1276 | description: Timestamp in the video that marks the ending of the report | |
1277 | required: | |
1278 | - reason | |
50e16ccf C |
1279 | responses: |
1280 | '204': | |
1281 | description: successful operation | |
1282 | '/videos/{id}/abuse/{abuseId}': | |
1283 | put: | |
1284 | summary: Update an abuse | |
1285 | security: | |
1286 | - OAuth2: | |
1287 | - admin | |
1288 | - moderator | |
1289 | tags: | |
1290 | - Video Abuses | |
1569a818 DG |
1291 | responses: |
1292 | '204': | |
c1843150 | 1293 | description: successful operation |
50e16ccf C |
1294 | parameters: |
1295 | - $ref: '#/components/parameters/idOrUUID' | |
1296 | - $ref: '#/components/parameters/abuseId' | |
1297 | requestBody: | |
1298 | content: | |
1299 | application/json: | |
1300 | schema: | |
1301 | type: object | |
1302 | properties: | |
1303 | state: | |
1304 | $ref: '#/components/schemas/VideoAbuseStateSet' | |
1305 | moderationComment: | |
1306 | type: string | |
1307 | description: 'Update the comment of the video abuse for other admin/moderators' | |
1308 | delete: | |
1309 | summary: Delete an abuse | |
1310 | security: | |
1311 | - OAuth2: | |
1312 | - admin | |
1313 | - moderator | |
1314 | tags: | |
1315 | - Video Abuses | |
1316 | responses: | |
1317 | '204': | |
1318 | description: successful operation | |
1319 | parameters: | |
1320 | - $ref: '#/components/parameters/idOrUUID' | |
1321 | - $ref: '#/components/parameters/abuseId' | |
1322 | ||
3e9e6f2f | 1323 | '/videos/{id}/blacklist': |
1569a818 | 1324 | post: |
b029d58a | 1325 | summary: Blacklist a video |
94ff4c23 | 1326 | security: |
3e9e6f2f RK |
1327 | - OAuth2: |
1328 | - admin | |
1329 | - moderator | |
1569a818 | 1330 | tags: |
5776f78e | 1331 | - Video Blacklist |
1569a818 | 1332 | parameters: |
cb9d028a | 1333 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1334 | responses: |
1335 | '204': | |
c1843150 | 1336 | description: successful operation |
1569a818 | 1337 | delete: |
2963c343 | 1338 | summary: Delete an entry of the blacklist of a video by its id |
94ff4c23 | 1339 | security: |
3e9e6f2f RK |
1340 | - OAuth2: |
1341 | - admin | |
1342 | - moderator | |
1569a818 | 1343 | tags: |
5776f78e | 1344 | - Video Blacklist |
1569a818 | 1345 | parameters: |
cb9d028a | 1346 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1347 | responses: |
1348 | '204': | |
c1843150 | 1349 | description: successful operation |
c360c494 | 1350 | /videos/blacklist: |
1569a818 | 1351 | get: |
b029d58a | 1352 | summary: List blacklisted videos |
94ff4c23 | 1353 | security: |
3e9e6f2f RK |
1354 | - OAuth2: |
1355 | - admin | |
1356 | - moderator | |
1569a818 | 1357 | tags: |
5776f78e | 1358 | - Video Blacklist |
44cb3b85 | 1359 | parameters: |
3e9e6f2f RK |
1360 | - $ref: '#/components/parameters/start' |
1361 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1362 | - $ref: '#/components/parameters/blacklistsSort' |
1569a818 DG |
1363 | responses: |
1364 | '200': | |
1365 | description: successful operation | |
3e9e6f2f RK |
1366 | content: |
1367 | application/json: | |
1368 | schema: | |
1369 | type: array | |
1370 | items: | |
1371 | $ref: '#/components/schemas/VideoBlacklist' | |
67ae04a5 C |
1372 | /videos/{id}/captions: |
1373 | get: | |
b029d58a | 1374 | summary: List captions of a video |
67ae04a5 C |
1375 | tags: |
1376 | - Video Caption | |
1377 | parameters: | |
cb9d028a | 1378 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
1379 | responses: |
1380 | '200': | |
1381 | description: successful operation | |
1382 | content: | |
1383 | application/json: | |
1384 | schema: | |
1385 | type: object | |
1386 | properties: | |
1387 | total: | |
1388 | type: integer | |
1389 | data: | |
1390 | type: array | |
1391 | items: | |
1392 | $ref: '#/components/schemas/VideoCaption' | |
1393 | /videos/{id}/captions/{captionLanguage}: | |
1394 | put: | |
1395 | summary: Add or replace a video caption | |
1396 | tags: | |
1397 | - Video Caption | |
1398 | parameters: | |
cb9d028a | 1399 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
1400 | - $ref: '#/components/parameters/captionLanguage' |
1401 | requestBody: | |
1402 | content: | |
1403 | multipart/form-data: | |
1404 | schema: | |
1405 | type: object | |
1406 | properties: | |
1407 | captionfile: | |
1408 | description: The file to upload. | |
1409 | type: string | |
1410 | format: binary | |
0ad45af7 FS |
1411 | encoding: |
1412 | captionfile: | |
205ed5b7 | 1413 | contentType: text/vtt, application/x-subrip, text/plain |
67ae04a5 C |
1414 | responses: |
1415 | '204': | |
c1843150 | 1416 | description: successful operation |
67ae04a5 C |
1417 | delete: |
1418 | summary: Delete a video caption | |
1419 | tags: | |
1420 | - Video Caption | |
1421 | parameters: | |
cb9d028a | 1422 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
1423 | - $ref: '#/components/parameters/captionLanguage' |
1424 | responses: | |
1425 | '204': | |
c1843150 | 1426 | description: successful operation |
48dce1c9 | 1427 | /video-channels: |
1569a818 | 1428 | get: |
b029d58a | 1429 | summary: List video channels |
1569a818 | 1430 | tags: |
b029d58a | 1431 | - Video Channels |
44cb3b85 | 1432 | parameters: |
3e9e6f2f RK |
1433 | - $ref: '#/components/parameters/start' |
1434 | - $ref: '#/components/parameters/count' | |
1435 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
1436 | responses: |
1437 | '200': | |
1438 | description: successful operation | |
3e9e6f2f RK |
1439 | content: |
1440 | application/json: | |
1441 | schema: | |
1442 | type: array | |
1443 | items: | |
1444 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 1445 | post: |
b029d58a | 1446 | summary: Create a video channel |
94ff4c23 | 1447 | security: |
3e9e6f2f | 1448 | - OAuth2: [] |
1569a818 | 1449 | tags: |
b029d58a | 1450 | - Video Channels |
1569a818 DG |
1451 | responses: |
1452 | '204': | |
c1843150 | 1453 | description: successful operation |
3e9e6f2f | 1454 | requestBody: |
7d14d4d2 C |
1455 | content: |
1456 | application/json: | |
1457 | schema: | |
1458 | $ref: '#/components/schemas/VideoChannelCreate' | |
9ce3d302 | 1459 | '/video-channels/{channelHandle}': |
1569a818 | 1460 | get: |
b029d58a | 1461 | summary: Get a video channel |
1569a818 | 1462 | tags: |
b029d58a | 1463 | - Video Channels |
1569a818 | 1464 | parameters: |
9ce3d302 | 1465 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
1466 | responses: |
1467 | '200': | |
1468 | description: successful operation | |
3e9e6f2f RK |
1469 | content: |
1470 | application/json: | |
1471 | schema: | |
1472 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 1473 | put: |
b029d58a | 1474 | summary: Update a video channel |
94ff4c23 | 1475 | security: |
3e9e6f2f | 1476 | - OAuth2: [] |
1569a818 | 1477 | tags: |
b029d58a | 1478 | - Video Channels |
1569a818 | 1479 | parameters: |
9ce3d302 | 1480 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
1481 | responses: |
1482 | '204': | |
c1843150 | 1483 | description: successful operation |
3e9e6f2f | 1484 | requestBody: |
7d14d4d2 C |
1485 | content: |
1486 | application/json: | |
1487 | schema: | |
1488 | $ref: '#/components/schemas/VideoChannelUpdate' | |
1569a818 | 1489 | delete: |
b029d58a | 1490 | summary: Delete a video channel |
94ff4c23 | 1491 | security: |
3e9e6f2f | 1492 | - OAuth2: [] |
1569a818 | 1493 | tags: |
b029d58a | 1494 | - Video Channels |
1569a818 | 1495 | parameters: |
9ce3d302 | 1496 | - $ref: '#/components/parameters/channelHandle' |
cc918ac3 C |
1497 | responses: |
1498 | '204': | |
c1843150 | 1499 | description: successful operation |
9ce3d302 | 1500 | '/video-channels/{channelHandle}/videos': |
cc918ac3 | 1501 | get: |
b029d58a | 1502 | summary: List videos of a video channel |
cc918ac3 | 1503 | tags: |
048b6946 | 1504 | - Video |
b029d58a | 1505 | - Video Channels |
cc918ac3 | 1506 | parameters: |
9ce3d302 | 1507 | - $ref: '#/components/parameters/channelHandle' |
59c794a5 C |
1508 | - $ref: '#/components/parameters/categoryOneOf' |
1509 | - $ref: '#/components/parameters/tagsOneOf' | |
1510 | - $ref: '#/components/parameters/tagsAllOf' | |
1511 | - $ref: '#/components/parameters/licenceOneOf' | |
1512 | - $ref: '#/components/parameters/languageOneOf' | |
1513 | - $ref: '#/components/parameters/nsfw' | |
1514 | - $ref: '#/components/parameters/filter' | |
1515 | - $ref: '#/components/parameters/skipCount' | |
1516 | - $ref: '#/components/parameters/start' | |
1517 | - $ref: '#/components/parameters/count' | |
1518 | - $ref: '#/components/parameters/videosSort' | |
1569a818 | 1519 | responses: |
cc918ac3 | 1520 | '200': |
1569a818 | 1521 | description: successful operation |
3e9e6f2f RK |
1522 | content: |
1523 | application/json: | |
1524 | schema: | |
048b6946 | 1525 | $ref: '#/components/schemas/VideoListResponse' |
c1843150 C |
1526 | |
1527 | /video-playlists/privacies: | |
1528 | get: | |
1529 | summary: List available playlist privacies | |
1530 | tags: | |
1531 | - Video Playlists | |
1532 | responses: | |
1533 | '200': | |
1534 | description: successful operation | |
1535 | content: | |
1536 | application/json: | |
1537 | schema: | |
1538 | type: array | |
1539 | items: | |
1540 | type: string | |
1541 | ||
71810d0b RK |
1542 | /video-playlists: |
1543 | get: | |
b029d58a | 1544 | summary: List video playlists |
71810d0b | 1545 | tags: |
b029d58a | 1546 | - Video Playlists |
71810d0b RK |
1547 | parameters: |
1548 | - $ref: '#/components/parameters/start' | |
1549 | - $ref: '#/components/parameters/count' | |
1550 | - $ref: '#/components/parameters/sort' | |
1551 | responses: | |
1552 | '200': | |
1553 | description: successful operation | |
1554 | content: | |
1555 | application/json: | |
1556 | schema: | |
1557 | type: array | |
1558 | items: | |
1559 | $ref: '#/components/schemas/VideoPlaylist' | |
c1843150 C |
1560 | post: |
1561 | summary: Create a video playlist | |
1562 | description: 'If the video playlist is set as public, the videoChannelId is mandatory.' | |
1563 | security: | |
1564 | - OAuth2: [] | |
1565 | tags: | |
1566 | - Video Playlists | |
1567 | responses: | |
1568 | '200': | |
1569 | description: successful operation | |
1570 | content: | |
1571 | application/json: | |
1572 | schema: | |
1573 | type: object | |
1574 | properties: | |
1575 | videoPlaylist: | |
1576 | type: object | |
1577 | properties: | |
1578 | id: | |
1579 | type: number | |
1580 | uuid: | |
1581 | type: string | |
1582 | requestBody: | |
1583 | content: | |
1584 | multipart/form-data: | |
1585 | schema: | |
1586 | type: object | |
1587 | properties: | |
1588 | displayName: | |
1589 | description: Video playlist display name | |
1590 | type: string | |
1591 | thumbnailfile: | |
1592 | description: Video playlist thumbnail file | |
1593 | type: string | |
1594 | format: binary | |
1595 | privacy: | |
1596 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
1597 | description: | |
1598 | description: Video playlist description | |
1599 | type: string | |
1600 | videoChannelId: | |
1601 | description: Video channel in which the playlist will be published | |
1602 | type: number | |
1603 | required: | |
1604 | - displayName | |
1605 | ||
1606 | /video-playlists/{id}: | |
1607 | get: | |
1608 | summary: Get a video playlist | |
1609 | tags: | |
1610 | - Video Playlists | |
1611 | parameters: | |
1612 | - $ref: '#/components/parameters/idOrUUID' | |
1613 | responses: | |
1614 | '200': | |
1615 | description: successful operation | |
1616 | content: | |
1617 | application/json: | |
1618 | schema: | |
1619 | $ref: '#/components/schemas/VideoPlaylist' | |
1620 | put: | |
1621 | summary: Update a video playlist | |
1622 | description: 'If the video playlist is set as public, the playlist must have a assigned channel.' | |
1623 | security: | |
1624 | - OAuth2: [] | |
1625 | tags: | |
1626 | - Video Playlists | |
1627 | responses: | |
1628 | '204': | |
1629 | description: successful operation | |
1630 | parameters: | |
1631 | - $ref: '#/components/parameters/idOrUUID' | |
1632 | requestBody: | |
1633 | content: | |
1634 | multipart/form-data: | |
1635 | schema: | |
1636 | type: object | |
1637 | properties: | |
1638 | displayName: | |
1639 | description: Video playlist display name | |
1640 | type: string | |
1641 | thumbnailfile: | |
1642 | description: Video playlist thumbnail file | |
1643 | type: string | |
1644 | format: binary | |
1645 | privacy: | |
1646 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
1647 | description: | |
1648 | description: Video playlist description | |
1649 | type: string | |
1650 | videoChannelId: | |
1651 | description: Video channel in which the playlist will be published | |
1652 | type: number | |
1653 | delete: | |
1654 | summary: Delete a video playlist | |
1655 | security: | |
1656 | - OAuth2: [] | |
1657 | tags: | |
1658 | - Video Playlists | |
1659 | parameters: | |
1660 | - $ref: '#/components/parameters/idOrUUID' | |
1661 | responses: | |
1662 | '204': | |
1663 | description: successful operation | |
1664 | ||
1665 | /video-playlists/{id}/videos: | |
1666 | get: | |
1667 | summary: 'List videos of a playlist' | |
1668 | tags: | |
1669 | - Videos | |
1670 | - Video Playlists | |
1671 | parameters: | |
1672 | - $ref: '#/components/parameters/idOrUUID' | |
1673 | responses: | |
1674 | '200': | |
1675 | description: successful operation | |
1676 | content: | |
1677 | application/json: | |
1678 | schema: | |
1679 | $ref: '#/components/schemas/VideoListResponse' | |
1680 | post: | |
1681 | summary: 'Add a video in a playlist' | |
1682 | security: | |
1683 | - OAuth2: [] | |
1684 | tags: | |
1685 | - Videos | |
1686 | - Video Playlists | |
1687 | parameters: | |
1688 | - $ref: '#/components/parameters/idOrUUID' | |
1689 | responses: | |
1690 | '200': | |
1691 | description: successful operation | |
1692 | content: | |
1693 | application/json: | |
1694 | schema: | |
1695 | type: object | |
1696 | properties: | |
1697 | videoPlaylistElement: | |
1698 | type: object | |
1699 | properties: | |
1700 | id: | |
1701 | type: number | |
1702 | requestBody: | |
1703 | content: | |
1704 | application/json: | |
1705 | schema: | |
1706 | type: object | |
1707 | properties: | |
1708 | videoId: | |
1709 | type: number | |
1710 | description: 'Video to add in the playlist' | |
1711 | startTimestamp: | |
1712 | type: number | |
1713 | description: 'Start the video at this specific timestamp (in seconds)' | |
1714 | stopTimestamp: | |
1715 | type: number | |
1716 | description: 'Stop the video at this specific timestamp (in seconds)' | |
1717 | required: | |
1718 | - videoId | |
1719 | ||
1720 | /video-playlists/{id}/videos/reorder: | |
1721 | post: | |
1722 | summary: 'Reorder a playlist' | |
1723 | security: | |
1724 | - OAuth2: [] | |
1725 | tags: | |
1726 | - Video Playlists | |
1727 | parameters: | |
1728 | - $ref: '#/components/parameters/idOrUUID' | |
1729 | responses: | |
1730 | '204': | |
1731 | description: successful operation | |
1732 | requestBody: | |
1733 | content: | |
1734 | application/json: | |
1735 | schema: | |
1736 | type: object | |
1737 | properties: | |
1738 | startPosition: | |
1739 | type: number | |
1740 | description: 'Start position of the element to reorder (starts from 1)' | |
1741 | insertAfterPosition: | |
1742 | type: number | |
1743 | description: 'New position for the block to reorder (starts from 0, to add the block before the first element)' | |
1744 | reorderLength: | |
1745 | type: number | |
1746 | description: 'How many element from startPosition to reorder (minimum length is 1)' | |
1747 | required: | |
1748 | - startPosition | |
1749 | - insertAfterPosition | |
1750 | ||
b9e924a8 | 1751 | /video-playlists/{id}/videos/{playlistElementId}: |
c1843150 C |
1752 | put: |
1753 | summary: 'Update a playlist element' | |
1754 | security: | |
1755 | - OAuth2: [] | |
1756 | tags: | |
1757 | - Video Playlists | |
1758 | parameters: | |
1759 | - $ref: '#/components/parameters/idOrUUID' | |
1760 | - $ref: '#/components/parameters/playlistElementId' | |
1761 | responses: | |
1762 | '204': | |
1763 | description: successful operation | |
1764 | requestBody: | |
1765 | content: | |
1766 | application/json: | |
1767 | schema: | |
1768 | type: object | |
1769 | properties: | |
1770 | startTimestamp: | |
1771 | type: number | |
1772 | description: 'Start the video at this specific timestamp (in seconds)' | |
1773 | stopTimestamp: | |
1774 | type: number | |
1775 | description: 'Stop the video at this specific timestamp (in seconds)' | |
1776 | delete: | |
1777 | summary: 'Delete an element from a playlist' | |
1778 | security: | |
1779 | - OAuth2: [] | |
1780 | tags: | |
1781 | - Video Playlists | |
1782 | parameters: | |
1783 | - $ref: '#/components/parameters/idOrUUID' | |
1784 | - $ref: '#/components/parameters/playlistElementId' | |
1785 | responses: | |
1786 | '204': | |
1787 | description: successful operation | |
1788 | ||
0590bb46 C |
1789 | '/users/me/video-playlists/videos-exist': |
1790 | get: | |
1791 | summary: 'Check video exists in my playlists' | |
1792 | security: | |
1793 | - OAuth2: [] | |
1794 | tags: | |
1795 | - Video Playlists | |
1796 | parameters: | |
1797 | - name: videoIds | |
1798 | in: query | |
1799 | required: true | |
1800 | description: The video ids to check | |
1801 | schema: | |
1802 | type: array | |
1803 | items: | |
1804 | type: number | |
1805 | responses: | |
1806 | '200': | |
1807 | description: successful operation | |
1808 | content: | |
1809 | application/json: | |
1810 | schema: | |
1811 | type: object | |
1812 | properties: | |
1813 | videoId: | |
1814 | type: array | |
1815 | items: | |
1816 | type: object | |
1817 | properties: | |
1818 | playlistElementId: | |
1819 | type: number | |
1820 | playlistId: | |
1821 | type: number | |
1822 | startTimestamp: | |
1823 | type: number | |
1824 | stopTimestamp: | |
1825 | type: number | |
1826 | ||
3e9e6f2f | 1827 | '/accounts/{name}/video-channels': |
6b738c7a | 1828 | get: |
b029d58a | 1829 | summary: List video channels of an account |
6b738c7a | 1830 | tags: |
b029d58a C |
1831 | - Video Channels |
1832 | - Accounts | |
6b738c7a | 1833 | parameters: |
3e9e6f2f | 1834 | - $ref: '#/components/parameters/name' |
6b738c7a C |
1835 | responses: |
1836 | '200': | |
1837 | description: successful operation | |
3e9e6f2f RK |
1838 | content: |
1839 | application/json: | |
1840 | schema: | |
1841 | type: array | |
1842 | items: | |
1843 | $ref: '#/components/schemas/VideoChannel' | |
c100a614 YB |
1844 | '/accounts/{name}/ratings': |
1845 | get: | |
b029d58a | 1846 | summary: List ratings of an account |
c100a614 YB |
1847 | security: |
1848 | - OAuth2: [] | |
1849 | tags: | |
b029d58a | 1850 | - Accounts |
c100a614 | 1851 | parameters: |
cb9d028a | 1852 | - $ref: '#/components/parameters/name' |
c100a614 YB |
1853 | - $ref: '#/components/parameters/start' |
1854 | - $ref: '#/components/parameters/count' | |
1855 | - $ref: '#/components/parameters/sort' | |
1856 | - name: rating | |
1857 | in: query | |
1858 | required: false | |
b3d1054e | 1859 | description: Optionally filter which ratings to retrieve |
c100a614 YB |
1860 | schema: |
1861 | type: string | |
1862 | enum: | |
1863 | - like | |
1864 | - dislike | |
1865 | responses: | |
1866 | '200': | |
1867 | description: successful operation | |
1868 | content: | |
1869 | application/json: | |
1870 | schema: | |
1871 | type: array | |
1872 | items: | |
1873 | $ref: '#/components/schemas/VideoRating' | |
3e9e6f2f | 1874 | '/videos/{id}/comment-threads': |
1569a818 | 1875 | get: |
b029d58a | 1876 | summary: List threads of a video |
1569a818 | 1877 | tags: |
b029d58a | 1878 | - Video Comments |
1569a818 | 1879 | parameters: |
cb9d028a | 1880 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f RK |
1881 | - $ref: '#/components/parameters/start' |
1882 | - $ref: '#/components/parameters/count' | |
71810d0b | 1883 | - $ref: '#/components/parameters/commentsSort' |
1569a818 DG |
1884 | responses: |
1885 | '200': | |
1886 | description: successful operation | |
3e9e6f2f RK |
1887 | content: |
1888 | application/json: | |
1889 | schema: | |
1890 | $ref: '#/components/schemas/CommentThreadResponse' | |
1569a818 | 1891 | post: |
b029d58a | 1892 | summary: Create a thread |
94ff4c23 | 1893 | security: |
3e9e6f2f | 1894 | - OAuth2: [] |
1569a818 | 1895 | tags: |
b029d58a | 1896 | - Video Comments |
1569a818 | 1897 | parameters: |
cb9d028a | 1898 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1899 | responses: |
1900 | '200': | |
1901 | description: successful operation | |
3e9e6f2f RK |
1902 | content: |
1903 | application/json: | |
1904 | schema: | |
1905 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
98639806 C |
1906 | requestBody: |
1907 | content: | |
1908 | application/json: | |
1909 | schema: | |
1910 | type: object | |
1911 | properties: | |
1912 | text: | |
1913 | type: string | |
1914 | description: 'Text comment' | |
1915 | required: | |
1916 | - text | |
1917 | ||
3e9e6f2f | 1918 | '/videos/{id}/comment-threads/{threadId}': |
1569a818 | 1919 | get: |
b029d58a | 1920 | summary: Get a thread |
1569a818 | 1921 | tags: |
b029d58a | 1922 | - Video Comments |
1569a818 | 1923 | parameters: |
cb9d028a C |
1924 | - $ref: '#/components/parameters/idOrUUID' |
1925 | - $ref: '#/components/parameters/threadId' | |
1569a818 DG |
1926 | responses: |
1927 | '200': | |
1928 | description: successful operation | |
3e9e6f2f RK |
1929 | content: |
1930 | application/json: | |
1931 | schema: | |
1932 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
1933 | '/videos/{id}/comments/{commentId}': | |
1569a818 | 1934 | post: |
b029d58a | 1935 | summary: Reply to a thread of a video |
94ff4c23 | 1936 | security: |
3e9e6f2f | 1937 | - OAuth2: [] |
1569a818 | 1938 | tags: |
b029d58a | 1939 | - Video Comments |
1569a818 | 1940 | parameters: |
cb9d028a | 1941 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 1942 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
1943 | responses: |
1944 | '200': | |
1945 | description: successful operation | |
3e9e6f2f RK |
1946 | content: |
1947 | application/json: | |
1948 | schema: | |
1949 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
98639806 C |
1950 | requestBody: |
1951 | content: | |
1952 | application/json: | |
1953 | schema: | |
1954 | type: object | |
1955 | properties: | |
1956 | text: | |
1957 | type: string | |
1958 | description: 'Text comment' | |
1959 | required: | |
1960 | - text | |
1961 | ||
1569a818 | 1962 | delete: |
b029d58a | 1963 | summary: Delete a comment or a reply |
94ff4c23 | 1964 | security: |
3e9e6f2f | 1965 | - OAuth2: [] |
1569a818 | 1966 | tags: |
b029d58a | 1967 | - Video Comments |
1569a818 | 1968 | parameters: |
cb9d028a | 1969 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 1970 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
1971 | responses: |
1972 | '204': | |
c1843150 | 1973 | description: successful operation |
3e9e6f2f | 1974 | '/videos/{id}/rate': |
1569a818 | 1975 | put: |
b029d58a | 1976 | summary: Like/dislike a video |
94ff4c23 | 1977 | security: |
3e9e6f2f | 1978 | - OAuth2: [] |
1569a818 | 1979 | tags: |
b029d58a | 1980 | - Video Rates |
1569a818 | 1981 | parameters: |
cb9d028a | 1982 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
1983 | responses: |
1984 | '204': | |
c1843150 | 1985 | description: successful operation |
fb72c193 DL |
1986 | /search/videos: |
1987 | get: | |
1988 | tags: | |
1989 | - Search | |
b029d58a | 1990 | summary: Search videos |
fb72c193 | 1991 | parameters: |
59c794a5 C |
1992 | - $ref: '#/components/parameters/categoryOneOf' |
1993 | - $ref: '#/components/parameters/tagsOneOf' | |
1994 | - $ref: '#/components/parameters/tagsAllOf' | |
1995 | - $ref: '#/components/parameters/licenceOneOf' | |
1996 | - $ref: '#/components/parameters/languageOneOf' | |
1997 | - $ref: '#/components/parameters/nsfw' | |
1998 | - $ref: '#/components/parameters/filter' | |
1999 | - $ref: '#/components/parameters/skipCount' | |
3e9e6f2f RK |
2000 | - $ref: '#/components/parameters/start' |
2001 | - $ref: '#/components/parameters/count' | |
ad031145 | 2002 | - $ref: '#/components/parameters/searchTarget' |
fd5af7a2 | 2003 | - $ref: '#/components/parameters/videosSearchSort' |
655b5490 | 2004 | - name: search |
fb72c193 DL |
2005 | in: query |
2006 | required: true | |
ad031145 C |
2007 | description: > |
2008 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
2009 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
2010 | you can use the REST API to fetch the complete video information and interact with it. | |
2011 | schema: | |
2012 | type: string | |
2013 | - name: startDate | |
2014 | in: query | |
2015 | required: true | |
2016 | description: Get videos that are published after this date | |
2017 | schema: | |
2018 | type: string | |
2019 | format: date-time | |
2020 | - name: endDate | |
2021 | in: query | |
2022 | required: true | |
2023 | description: Get videos that are published before this date | |
2024 | schema: | |
2025 | type: string | |
2026 | format: date-time | |
2027 | - name: originallyPublishedStartDate | |
2028 | in: query | |
2029 | required: true | |
2030 | description: Get videos that are originally published after this date | |
3e9e6f2f RK |
2031 | schema: |
2032 | type: string | |
ad031145 C |
2033 | format: date-time |
2034 | - name: originallyPublishedEndDate | |
2035 | in: query | |
2036 | required: true | |
2037 | description: Get videos that are originally published before this date | |
2038 | schema: | |
2039 | type: string | |
2040 | format: date-time | |
2041 | - name: durationMin | |
2042 | in: query | |
2043 | required: true | |
2044 | description: Get videos that have this minimum duration | |
2045 | schema: | |
2046 | type: number | |
2047 | - name: durationMax | |
2048 | in: query | |
2049 | required: true | |
2050 | description: Get videos that have this maximum duration | |
2051 | schema: | |
2052 | type: number | |
fb72c193 DL |
2053 | responses: |
2054 | '200': | |
2055 | description: successful operation | |
3e9e6f2f RK |
2056 | content: |
2057 | application/json: | |
2058 | schema: | |
048b6946 | 2059 | $ref: '#/components/schemas/VideoListResponse' |
ad031145 C |
2060 | /search/video-channels: |
2061 | get: | |
2062 | tags: | |
2063 | - Search | |
2064 | summary: Search channels | |
2065 | parameters: | |
2066 | - $ref: '#/components/parameters/start' | |
2067 | - $ref: '#/components/parameters/count' | |
2068 | - $ref: '#/components/parameters/searchTarget' | |
2069 | - $ref: '#/components/parameters/sort' | |
2070 | - name: search | |
2071 | in: query | |
2072 | required: true | |
2073 | description: > | |
2074 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
2075 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
2076 | you can use the REST API to fetch the complete channel information and interact with it. | |
2077 | schema: | |
2078 | type: string | |
2079 | responses: | |
2080 | '200': | |
2081 | description: successful operation | |
2082 | content: | |
2083 | application/json: | |
2084 | schema: | |
2085 | type: array | |
2086 | items: | |
2087 | $ref: '#/components/schemas/VideoChannel' | |
3e9e6f2f | 2088 | servers: |
6441981b RK |
2089 | - url: 'https://peertube.cpy.re/api/v1' |
2090 | description: Live Test Server (live data - stable version) | |
8f9e8be1 | 2091 | - url: 'https://peertube2.cpy.re/api/v1' |
b029d58a | 2092 | description: Live Test Server (live data - latest nighlty version) |
6441981b | 2093 | - url: 'https://peertube3.cpy.re/api/v1' |
b029d58a | 2094 | description: Live Test Server (live data - latest RC version) |
3e9e6f2f RK |
2095 | components: |
2096 | parameters: | |
2097 | start: | |
2098 | name: start | |
2099 | in: query | |
2100 | required: false | |
2101 | description: Offset | |
2102 | schema: | |
1569a818 | 2103 | type: number |
3e9e6f2f RK |
2104 | count: |
2105 | name: count | |
2106 | in: query | |
2107 | required: false | |
6676056a | 2108 | description: "Number of items (max: 100)" |
3e9e6f2f | 2109 | schema: |
1569a818 | 2110 | type: number |
3e9e6f2f RK |
2111 | sort: |
2112 | name: sort | |
2113 | in: query | |
2114 | required: false | |
2115 | description: Sort column (-createdAt for example) | |
2116 | schema: | |
2117 | type: string | |
ad031145 C |
2118 | searchTarget: |
2119 | name: searchTarget | |
2120 | in: query | |
2121 | required: false | |
2122 | description: > | |
2123 | If the administrator enabled search index support, you can override the default search target. | |
2124 | ||
2125 | ||
2126 | **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. | |
2127 | It means the instance may not know the objects you fetched. If you want to load video/channel information: | |
2128 | * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), | |
2129 | then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. | |
2130 | After that, you can use the classic REST API endpoints to fetch the complete object or interact with it | |
2131 | * If the current user has not the ability to make a remote URI search, then redirect the user on the origin instance or fetch | |
2132 | the data from the origin instance API | |
2133 | schema: | |
2134 | type: string | |
2135 | enum: | |
2136 | - 'local' | |
2137 | - 'search-index' | |
fd5af7a2 RK |
2138 | videosSort: |
2139 | name: sort | |
2140 | in: query | |
2141 | required: false | |
2142 | description: Sort videos by criteria | |
2143 | schema: | |
2144 | type: string | |
2145 | enum: | |
2146 | - -name | |
2147 | - -duration | |
2148 | - -createdAt | |
2149 | - -publishedAt | |
2150 | - -views | |
2151 | - -likes | |
2152 | - -trending | |
2153 | videosSearchSort: | |
2154 | name: sort | |
2155 | in: query | |
2156 | required: false | |
2157 | description: Sort videos by criteria | |
2158 | schema: | |
2159 | type: string | |
2160 | enum: | |
2161 | - -name | |
2162 | - -duration | |
2163 | - -createdAt | |
2164 | - -publishedAt | |
2165 | - -views | |
2166 | - -likes | |
2167 | - -match | |
71810d0b RK |
2168 | commentsSort: |
2169 | name: sort | |
2170 | in: query | |
2171 | required: false | |
2172 | description: Sort comments by criteria | |
2173 | schema: | |
2174 | type: string | |
2175 | enum: | |
2176 | - -createdAt | |
2177 | - -totalReplies | |
fd5af7a2 RK |
2178 | blacklistsSort: |
2179 | name: sort | |
2180 | in: query | |
2181 | required: false | |
2182 | description: Sort blacklists by criteria | |
2183 | schema: | |
2184 | type: string | |
2185 | enum: | |
2186 | - -id | |
2187 | - -name | |
2188 | - -duration | |
2189 | - -views | |
2190 | - -likes | |
2191 | - -dislikes | |
2192 | - -uuid | |
2193 | - -createdAt | |
2194 | usersSort: | |
2195 | name: sort | |
2196 | in: query | |
2197 | required: false | |
2198 | description: Sort users by criteria | |
2199 | schema: | |
2200 | type: string | |
2201 | enum: | |
2202 | - -id | |
2203 | - -username | |
2204 | - -createdAt | |
2205 | abusesSort: | |
2206 | name: sort | |
2207 | in: query | |
2208 | required: false | |
2209 | description: Sort abuses by criteria | |
2210 | schema: | |
2211 | type: string | |
2212 | enum: | |
2213 | - -id | |
2214 | - -createdAt | |
2215 | - -state | |
3e9e6f2f RK |
2216 | name: |
2217 | name: name | |
2218 | in: path | |
2219 | required: true | |
2220 | description: >- | |
2221 | The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for | |
2222 | example) | |
2223 | schema: | |
2224 | type: string | |
2225 | id: | |
2226 | name: id | |
2227 | in: path | |
2228 | required: true | |
2229 | description: The user id | |
2230 | schema: | |
1569a818 | 2231 | type: number |
cb9d028a | 2232 | idOrUUID: |
3e9e6f2f RK |
2233 | name: id |
2234 | in: path | |
2235 | required: true | |
c1843150 | 2236 | description: The object id or uuid |
3e9e6f2f RK |
2237 | schema: |
2238 | type: string | |
c1843150 C |
2239 | playlistElementId: |
2240 | name: playlistElementId | |
2241 | in: path | |
2242 | required: true | |
2243 | description: Playlist element id | |
2244 | schema: | |
2245 | type: number | |
50e16ccf C |
2246 | abuseId: |
2247 | name: abuseId | |
2248 | in: path | |
2249 | required: true | |
2250 | description: Video abuse id | |
2251 | schema: | |
2252 | type: number | |
67ae04a5 C |
2253 | captionLanguage: |
2254 | name: captionLanguage | |
2255 | in: path | |
2256 | required: true | |
2257 | description: The caption language | |
2258 | schema: | |
2259 | type: string | |
9ce3d302 C |
2260 | channelHandle: |
2261 | name: channelHandle | |
3e9e6f2f RK |
2262 | in: path |
2263 | required: true | |
9ce3d302 | 2264 | description: "The video channel handle (example: 'my_username@example.com' or 'my_username')" |
3e9e6f2f RK |
2265 | schema: |
2266 | type: string | |
cb9d028a C |
2267 | subscriptionHandle: |
2268 | name: subscriptionHandle | |
2269 | in: path | |
2270 | required: true | |
2271 | description: "The subscription handle (example: 'my_username@example.com' or 'my_username')" | |
2272 | schema: | |
2273 | type: string | |
2274 | threadId: | |
3e9e6f2f RK |
2275 | name: threadId |
2276 | in: path | |
2277 | required: true | |
cb9d028a C |
2278 | description: The thread id (root comment id) |
2279 | schema: | |
2280 | type: number | |
2281 | commentId: | |
2282 | name: commentId | |
2283 | in: path | |
2284 | required: true | |
3e9e6f2f RK |
2285 | description: The comment id |
2286 | schema: | |
c360c494 | 2287 | type: number |
fd5af7a2 RK |
2288 | categoryOneOf: |
2289 | name: categoryOneOf | |
2290 | in: query | |
2291 | required: false | |
59c794a5 | 2292 | description: category id of the video (see /videos/categories) |
fd5af7a2 RK |
2293 | schema: |
2294 | oneOf: | |
2295 | - type: number | |
2296 | - type: array | |
2297 | items: | |
2298 | type: number | |
2beb9895 RK |
2299 | style: form |
2300 | explode: false | |
fd5af7a2 RK |
2301 | tagsOneOf: |
2302 | name: tagsOneOf | |
2303 | in: query | |
2304 | required: false | |
2305 | description: tag(s) of the video | |
2306 | schema: | |
2307 | oneOf: | |
2308 | - type: string | |
2309 | - type: array | |
2310 | items: | |
2311 | type: string | |
2beb9895 RK |
2312 | style: form |
2313 | explode: false | |
fd5af7a2 RK |
2314 | tagsAllOf: |
2315 | name: tagsAllOf | |
2316 | in: query | |
2317 | required: false | |
2318 | description: tag(s) of the video, where all should be present in the video | |
2319 | schema: | |
2320 | oneOf: | |
2321 | - type: string | |
2322 | - type: array | |
2323 | items: | |
2324 | type: string | |
2beb9895 RK |
2325 | style: form |
2326 | explode: false | |
fd5af7a2 RK |
2327 | languageOneOf: |
2328 | name: languageOneOf | |
2329 | in: query | |
2330 | required: false | |
59c794a5 | 2331 | description: language id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language |
fd5af7a2 RK |
2332 | schema: |
2333 | oneOf: | |
2beb9895 | 2334 | - type: string |
fd5af7a2 RK |
2335 | - type: array |
2336 | items: | |
2beb9895 RK |
2337 | type: string |
2338 | style: form | |
2339 | explode: false | |
fd5af7a2 RK |
2340 | licenceOneOf: |
2341 | name: licenceOneOf | |
2342 | in: query | |
2343 | required: false | |
59c794a5 | 2344 | description: licence id of the video (see /videos/licences) |
fd5af7a2 RK |
2345 | schema: |
2346 | oneOf: | |
2347 | - type: number | |
2348 | - type: array | |
2349 | items: | |
2350 | type: number | |
2beb9895 RK |
2351 | style: form |
2352 | explode: false | |
59c794a5 C |
2353 | skipCount: |
2354 | name: skipCount | |
2355 | in: query | |
2356 | required: false | |
2357 | description: if you don't need the `total` in the response | |
2358 | schema: | |
2359 | type: string | |
2360 | enum: | |
2361 | - 'true' | |
2362 | - 'false' | |
fd5af7a2 RK |
2363 | nsfw: |
2364 | name: nsfw | |
2365 | in: query | |
2366 | required: false | |
2367 | description: whether to include nsfw videos, if any | |
2368 | schema: | |
2369 | type: string | |
2370 | enum: | |
2371 | - 'true' | |
2372 | - 'false' | |
2373 | filter: | |
2374 | name: filter | |
2375 | in: query | |
2376 | required: false | |
2377 | description: > | |
2378 | Special filters (local for instance) which might require special rights: | |
2379 | * `local` - only videos local to the instance | |
2380 | * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges) | |
2381 | schema: | |
2382 | type: string | |
2383 | enum: | |
2384 | - local | |
2385 | - all-local | |
e76d5784 RK |
2386 | subscriptionsUris: |
2387 | name: uris | |
2388 | in: query | |
2389 | required: true | |
2390 | description: list of uris to check if each is part of the user subscriptions | |
2391 | schema: | |
2392 | type: array | |
2393 | items: | |
2394 | type: string | |
3e9e6f2f RK |
2395 | securitySchemes: |
2396 | OAuth2: | |
2397 | description: > | |
2398 | In the header: *Authorization: Bearer <token\>* | |
2399 | ||
2400 | ||
2401 | Authenticating via OAuth requires the following steps: | |
2402 | ||
2403 | ||
2404 | - Have an account with sufficient authorization levels | |
2405 | ||
46e9407c | 2406 | - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a |
3e9e6f2f RK |
2407 | Bearer Token |
2408 | ||
2409 | - Make Authenticated Requests | |
2410 | type: oauth2 | |
2411 | flows: | |
2412 | password: | |
2413 | tokenUrl: 'https://peertube.example.com/api/v1/users/token' | |
2414 | scopes: | |
2415 | admin: Admin scope | |
2416 | moderator: Moderator scope | |
2417 | user: User scope | |
2418 | schemas: | |
2419 | VideoConstantNumber: | |
2420 | properties: | |
2421 | id: | |
2422 | type: number | |
2423 | label: | |
2424 | type: string | |
2425 | VideoConstantString: | |
2426 | properties: | |
2427 | id: | |
2428 | type: string | |
2429 | label: | |
2430 | type: string | |
c1843150 C |
2431 | |
2432 | VideoPlaylistPrivacySet: | |
2433 | type: integer | |
2434 | enum: | |
2435 | - 1 | |
2436 | - 2 | |
2437 | - 3 | |
2438 | description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)' | |
2439 | VideoPlaylistPrivacyConstant: | |
2440 | properties: | |
2441 | id: | |
2442 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
2443 | label: | |
2444 | type: string | |
2445 | ||
2446 | VideoPlaylistTypeSet: | |
2447 | type: integer | |
2448 | enum: | |
2449 | - 1 | |
2450 | - 2 | |
2451 | description: 'The video playlist type (Regular = 1, Watch Later = 2)' | |
2452 | VideoPlaylistTypeConstant: | |
2453 | properties: | |
2454 | id: | |
2455 | $ref: '#/components/schemas/VideoPlaylistTypeSet' | |
2456 | label: | |
2457 | type: string | |
2458 | ||
ee89e8fd C |
2459 | VideoPrivacySet: |
2460 | type: integer | |
3e9e6f2f | 2461 | enum: |
ee89e8fd C |
2462 | - 1 |
2463 | - 2 | |
2464 | - 3 | |
c1843150 C |
2465 | - 4 |
2466 | description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)' | |
ee89e8fd C |
2467 | VideoPrivacyConstant: |
2468 | properties: | |
2469 | id: | |
c1843150 | 2470 | $ref: '#/components/schemas/VideoPrivacySet' |
ee89e8fd C |
2471 | label: |
2472 | type: string | |
50e16ccf | 2473 | |
0590bb46 C |
2474 | NSFWPolicy: |
2475 | type: string | |
2476 | enum: | |
2477 | - display | |
2478 | - blur | |
2479 | - do_not_list | |
2480 | ||
2481 | UserRole: | |
2482 | type: number | |
2483 | enum: | |
2484 | - 0 | |
2485 | - 1 | |
2486 | - 2 | |
2487 | description: 'The user role (Admin = 0, Moderator = 1, User = 2)' | |
2488 | ||
5dce26d2 C |
2489 | VideoStateConstant: |
2490 | properties: | |
2491 | id: | |
2492 | type: integer | |
2493 | enum: | |
2494 | - 1 | |
2495 | - 2 | |
2496 | - 3 | |
2497 | description: 'The video state (Published = 1, to transcode = 2, to import = 3)' | |
2498 | label: | |
2499 | type: string | |
50e16ccf C |
2500 | |
2501 | VideoAbuseStateSet: | |
2502 | type: integer | |
2503 | enum: | |
2504 | - 1 | |
2505 | - 2 | |
2506 | - 3 | |
2507 | description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)' | |
2508 | VideoAbuseStateConstant: | |
2509 | properties: | |
2510 | id: | |
2511 | $ref: '#/components/schemas/VideoAbuseStateSet' | |
2512 | label: | |
2513 | type: string | |
1ebddadd RK |
2514 | VideoAbusePredefinedReasons: |
2515 | type: array | |
2516 | items: | |
2517 | type: string | |
2518 | enum: | |
2519 | - violentOrAbusive | |
2520 | - hatefulOrAbusive | |
2521 | - spamOrMisleading | |
2522 | - privacy | |
2523 | - rights | |
2524 | - serverRules | |
2525 | - thumbnails | |
2526 | - captions | |
50e16ccf | 2527 | |
5dce26d2 C |
2528 | VideoResolutionConstant: |
2529 | properties: | |
2530 | id: | |
2531 | type: integer | |
2532 | description: 'Video resolution (240, 360, 720 ...)' | |
2533 | label: | |
2534 | type: string | |
2535 | VideoScheduledUpdate: | |
2536 | properties: | |
2537 | privacy: | |
2538 | $ref: '#/components/schemas/VideoPrivacySet' | |
5dce26d2 C |
2539 | updateAt: |
2540 | type: string | |
2541 | format: date | |
2542 | description: When to update the video | |
2543 | required: | |
2544 | - updateAt | |
c1843150 | 2545 | AccountSummary: |
5dce26d2 C |
2546 | properties: |
2547 | id: | |
2548 | type: number | |
2549 | name: | |
2550 | type: string | |
2551 | displayName: | |
2552 | type: string | |
2553 | url: | |
2554 | type: string | |
2555 | host: | |
2556 | type: string | |
2557 | avatar: | |
2558 | nullable: true | |
c1843150 C |
2559 | allOf: |
2560 | - $ref: '#/components/schemas/Avatar' | |
5dce26d2 C |
2561 | VideoChannelSummary: |
2562 | properties: | |
2563 | id: | |
2564 | type: number | |
2565 | name: | |
2566 | type: string | |
2567 | displayName: | |
2568 | type: string | |
2569 | url: | |
2570 | type: string | |
2571 | host: | |
2572 | type: string | |
2573 | avatar: | |
2574 | nullable: true | |
c1843150 C |
2575 | allOf: |
2576 | - $ref: '#/components/schemas/Avatar' | |
5dce26d2 C |
2577 | PlaylistElement: |
2578 | properties: | |
2579 | position: | |
2580 | type: number | |
2581 | startTimestamp: | |
2582 | type: number | |
2583 | stopTimestamp: | |
2584 | type: number | |
bfbd9128 C |
2585 | video: |
2586 | nullable: true | |
c1843150 C |
2587 | allOf: |
2588 | - $ref: '#/components/schemas/Video' | |
5dce26d2 C |
2589 | VideoFile: |
2590 | properties: | |
2591 | magnetUri: | |
2592 | type: string | |
2593 | resolution: | |
2594 | $ref: '#/components/schemas/VideoResolutionConstant' | |
2595 | size: | |
2596 | type: number | |
2597 | description: 'Video file size in bytes' | |
2598 | torrentUrl: | |
2599 | type: string | |
0ad45af7 | 2600 | torrentDownloadUrl: |
5dce26d2 C |
2601 | type: string |
2602 | fileUrl: | |
2603 | type: string | |
2604 | fileDownloadUrl: | |
2605 | type: string | |
2606 | fps: | |
2607 | type: number | |
63748ad0 C |
2608 | metadataUrl: |
2609 | type: string | |
5dce26d2 C |
2610 | VideoStreamingPlaylists: |
2611 | properties: | |
2612 | id: | |
2613 | type: number | |
2614 | type: | |
2615 | type: number | |
2616 | enum: | |
2617 | - 1 | |
2618 | description: 'Playlist type (HLS = 1)' | |
2619 | playlistUrl: | |
2620 | type: string | |
2621 | segmentsSha256Url: | |
2622 | type: string | |
63748ad0 C |
2623 | files: |
2624 | type: array | |
2625 | items: | |
2626 | $ref: '#/components/schemas/VideoFile' | |
5dce26d2 C |
2627 | redundancies: |
2628 | type: array | |
2629 | items: | |
2630 | type: object | |
2631 | properties: | |
2632 | baseUrl: | |
2633 | type: string | |
3e9e6f2f RK |
2634 | Video: |
2635 | properties: | |
2636 | id: | |
2637 | type: number | |
2638 | uuid: | |
2639 | type: string | |
2640 | createdAt: | |
2641 | type: string | |
2642 | publishedAt: | |
2643 | type: string | |
2644 | updatedAt: | |
2645 | type: string | |
5dce26d2 C |
2646 | originallyPublishedAt: |
2647 | type: string | |
3e9e6f2f RK |
2648 | category: |
2649 | $ref: '#/components/schemas/VideoConstantNumber' | |
2650 | licence: | |
2651 | $ref: '#/components/schemas/VideoConstantNumber' | |
2652 | language: | |
2653 | $ref: '#/components/schemas/VideoConstantString' | |
2654 | privacy: | |
ee89e8fd | 2655 | $ref: '#/components/schemas/VideoPrivacyConstant' |
3e9e6f2f RK |
2656 | description: |
2657 | type: string | |
2658 | duration: | |
2659 | type: number | |
2660 | isLocal: | |
2661 | type: boolean | |
2662 | name: | |
2663 | type: string | |
2664 | thumbnailPath: | |
2665 | type: string | |
2666 | previewPath: | |
2667 | type: string | |
2668 | embedPath: | |
2669 | type: string | |
2670 | views: | |
2671 | type: number | |
2672 | likes: | |
2673 | type: number | |
2674 | dislikes: | |
2675 | type: number | |
2676 | nsfw: | |
2677 | type: boolean | |
5dce26d2 C |
2678 | waitTranscoding: |
2679 | type: boolean | |
2680 | nullable: true | |
2681 | state: | |
2682 | $ref: '#/components/schemas/VideoStateConstant' | |
2683 | scheduledUpdate: | |
2684 | nullable: true | |
c1843150 C |
2685 | allOf: |
2686 | - $ref: '#/components/schemas/VideoScheduledUpdate' | |
5dce26d2 C |
2687 | blacklisted: |
2688 | nullable: true | |
2689 | type: boolean | |
2690 | blacklistedReason: | |
2691 | nullable: true | |
2692 | type: string | |
3e9e6f2f | 2693 | account: |
c1843150 | 2694 | $ref: '#/components/schemas/AccountSummary' |
5dce26d2 C |
2695 | channel: |
2696 | $ref: '#/components/schemas/VideoChannelSummary' | |
2697 | userHistory: | |
2698 | nullable: true | |
3e9e6f2f RK |
2699 | type: object |
2700 | properties: | |
5dce26d2 C |
2701 | currentTime: |
2702 | type: number | |
5dce26d2 C |
2703 | VideoDetails: |
2704 | allOf: | |
2705 | - $ref: '#/components/schemas/Video' | |
2706 | - type: object | |
2707 | properties: | |
2708 | descriptionPath: | |
3e9e6f2f | 2709 | type: string |
5dce26d2 | 2710 | support: |
3e9e6f2f | 2711 | type: string |
5dce26d2 C |
2712 | channel: |
2713 | $ref: '#/components/schemas/VideoChannel' | |
2714 | account: | |
2715 | $ref: '#/components/schemas/Account' | |
2716 | tags: | |
2717 | type: array | |
2718 | items: | |
2719 | type: string | |
2720 | files: | |
2721 | type: array | |
2722 | items: | |
2723 | $ref: '#/components/schemas/VideoFile' | |
2724 | commentsEnabled: | |
2725 | type: boolean | |
2726 | downloadEnabled: | |
2727 | type: boolean | |
2728 | trackerUrls: | |
2729 | type: array | |
2730 | items: | |
2731 | type: string | |
2732 | streamingPlaylists: | |
2733 | type: array | |
2734 | items: | |
2735 | $ref: '#/components/schemas/VideoStreamingPlaylists' | |
1f82e3e8 C |
2736 | VideoImportStateConstant: |
2737 | properties: | |
2738 | id: | |
2739 | type: integer | |
2740 | enum: | |
2741 | - 1 | |
2742 | - 2 | |
2743 | - 3 | |
2744 | description: 'The video import state (Pending = 1, Success = 2, Failed = 3)' | |
2745 | label: | |
2746 | type: string | |
2747 | VideoImport: | |
2748 | properties: | |
2749 | id: | |
2750 | type: number | |
2751 | targetUrl: | |
2752 | type: string | |
2753 | magnetUri: | |
2754 | type: string | |
2755 | torrentName: | |
2756 | type: string | |
2757 | state: | |
2758 | type: object | |
2759 | properties: | |
2760 | id: | |
2761 | $ref: '#/components/schemas/VideoImportStateConstant' | |
2762 | label: | |
2763 | type: string | |
2764 | error: | |
2765 | type: string | |
2766 | createdAt: | |
2767 | type: string | |
2768 | updatedAt: | |
2769 | type: string | |
2770 | video: | |
2771 | $ref: '#/components/schemas/Video' | |
3e9e6f2f RK |
2772 | VideoAbuse: |
2773 | properties: | |
2774 | id: | |
2775 | type: number | |
2776 | reason: | |
2777 | type: string | |
1ebddadd RK |
2778 | predefinedReasons: |
2779 | $ref: '#/components/schemas/VideoAbusePredefinedReasons' | |
3e9e6f2f RK |
2780 | reporterAccount: |
2781 | $ref: '#/components/schemas/Account' | |
50e16ccf C |
2782 | state: |
2783 | $ref: '#/components/schemas/VideoAbuseStateConstant' | |
2784 | moderationComment: | |
2785 | type: string | |
3e9e6f2f RK |
2786 | video: |
2787 | type: object | |
2788 | properties: | |
2789 | id: | |
2790 | type: number | |
2791 | name: | |
2792 | type: string | |
2793 | uuid: | |
2794 | type: string | |
3e9e6f2f RK |
2795 | createdAt: |
2796 | type: string | |
2797 | VideoBlacklist: | |
2798 | properties: | |
2799 | id: | |
2800 | type: number | |
2801 | videoId: | |
2802 | type: number | |
2803 | createdAt: | |
2804 | type: string | |
2805 | updatedAt: | |
2806 | type: string | |
2807 | name: | |
2808 | type: string | |
2809 | uuid: | |
2810 | type: string | |
2811 | description: | |
2812 | type: string | |
2813 | duration: | |
2814 | type: number | |
2815 | views: | |
2816 | type: number | |
2817 | likes: | |
2818 | type: number | |
2819 | dislikes: | |
2820 | type: number | |
2821 | nsfw: | |
2822 | type: boolean | |
2823 | VideoChannel: | |
2824 | properties: | |
2825 | displayName: | |
2826 | type: string | |
2827 | description: | |
2828 | type: string | |
2829 | isLocal: | |
2830 | type: boolean | |
2831 | ownerAccount: | |
2832 | type: object | |
2833 | properties: | |
2834 | id: | |
2835 | type: number | |
2836 | uuid: | |
2837 | type: string | |
71810d0b RK |
2838 | VideoPlaylist: |
2839 | properties: | |
2840 | id: | |
2841 | type: number | |
2842 | createdAt: | |
2843 | type: string | |
2844 | updatedAt: | |
2845 | type: string | |
2846 | description: | |
2847 | type: string | |
2848 | uuid: | |
2849 | type: string | |
2850 | displayName: | |
2851 | type: string | |
2852 | isLocal: | |
2853 | type: boolean | |
2854 | videoLength: | |
2855 | type: number | |
2856 | thumbnailPath: | |
2857 | type: string | |
2858 | privacy: | |
c1843150 | 2859 | $ref: '#/components/schemas/VideoPlaylistPrivacyConstant' |
71810d0b | 2860 | type: |
c1843150 | 2861 | $ref: '#/components/schemas/VideoPlaylistTypeConstant' |
71810d0b | 2862 | ownerAccount: |
c1843150 C |
2863 | $ref: '#/components/schemas/AccountSummary' |
2864 | videoChannel: | |
2865 | $ref: '#/components/schemas/VideoChannelSummary' | |
3e9e6f2f RK |
2866 | VideoComment: |
2867 | properties: | |
2868 | id: | |
2869 | type: number | |
2870 | url: | |
2871 | type: string | |
2872 | text: | |
2873 | type: string | |
2874 | threadId: | |
2875 | type: number | |
2876 | inReplyToCommentId: | |
2877 | type: number | |
2878 | videoId: | |
2879 | type: number | |
2880 | createdAt: | |
2881 | type: string | |
2882 | updatedAt: | |
2883 | type: string | |
5b0413dd RK |
2884 | totalRepliesFromVideoAuthor: |
2885 | type: number | |
3e9e6f2f RK |
2886 | totalReplies: |
2887 | type: number | |
2888 | account: | |
2889 | $ref: '#/components/schemas/Account' | |
2890 | VideoCommentThreadTree: | |
2891 | properties: | |
2892 | comment: | |
2893 | $ref: '#/components/schemas/VideoComment' | |
2894 | children: | |
2895 | type: array | |
2896 | items: | |
2897 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
67ae04a5 C |
2898 | VideoCaption: |
2899 | properties: | |
2900 | language: | |
2901 | $ref: '#/components/schemas/VideoConstantString' | |
2902 | captionPath: | |
2903 | type: string | |
3e9e6f2f RK |
2904 | Avatar: |
2905 | properties: | |
2906 | path: | |
2907 | type: string | |
2908 | createdAt: | |
2909 | type: string | |
2910 | updatedAt: | |
2911 | type: string | |
2912 | Actor: | |
2913 | properties: | |
2914 | id: | |
2915 | type: number | |
3e9e6f2f RK |
2916 | url: |
2917 | type: string | |
2918 | name: | |
2919 | type: string | |
2920 | host: | |
2921 | type: string | |
2922 | followingCount: | |
2923 | type: number | |
2924 | followersCount: | |
2925 | type: number | |
2926 | createdAt: | |
2927 | type: string | |
2928 | updatedAt: | |
2929 | type: string | |
2930 | avatar: | |
2931 | $ref: '#/components/schemas/Avatar' | |
2932 | Account: | |
2933 | allOf: | |
2934 | - $ref: '#/components/schemas/Actor' | |
2935 | - properties: | |
2a8ae759 FS |
2936 | userId: |
2937 | type: string | |
3e9e6f2f RK |
2938 | displayName: |
2939 | type: string | |
2a8ae759 FS |
2940 | description: |
2941 | type: string | |
3e9e6f2f RK |
2942 | User: |
2943 | properties: | |
2944 | id: | |
2945 | type: number | |
2946 | username: | |
2947 | type: string | |
2948 | email: | |
2949 | type: string | |
0590bb46 C |
2950 | theme: |
2951 | type: string | |
2952 | description: 'Theme enabled by this user' | |
2953 | emailVerified: | |
2954 | type: boolean | |
2955 | description: 'Is email verified?' | |
2956 | nsfwPolicy: | |
2957 | $ref: '#/components/schemas/NSFWPolicy' | |
2958 | webtorrentEnabled: | |
3e9e6f2f RK |
2959 | type: boolean |
2960 | autoPlayVideo: | |
2961 | type: boolean | |
2962 | role: | |
0590bb46 | 2963 | $ref: '#/components/schemas/UserRole' |
63d17405 | 2964 | roleLabel: |
3e9e6f2f RK |
2965 | type: string |
2966 | enum: | |
2967 | - User | |
2968 | - Moderator | |
2969 | - Administrator | |
2970 | videoQuota: | |
2971 | type: number | |
ff40a4eb | 2972 | videoQuotaDaily: |
fbe1bc2a | 2973 | type: number |
0590bb46 C |
2974 | videosCount: |
2975 | type: number | |
2976 | videoAbusesCount: | |
2977 | type: number | |
2978 | videoAbusesAcceptedCount: | |
2979 | type: number | |
2980 | videoAbusesCreatedCount: | |
2981 | type: number | |
2982 | videoCommentsCount: | |
2983 | type: number | |
2984 | noInstanceConfigWarningModal: | |
2985 | type: boolean | |
2986 | noWelcomeModal: | |
2987 | type: boolean | |
2988 | blocked: | |
2989 | type: boolean | |
2990 | blockedReason: | |
2991 | type: string | |
3e9e6f2f RK |
2992 | createdAt: |
2993 | type: string | |
2994 | account: | |
2995 | $ref: '#/components/schemas/Account' | |
2996 | videoChannels: | |
2997 | type: array | |
2998 | items: | |
2999 | $ref: '#/components/schemas/VideoChannel' | |
6441981b RK |
3000 | UserWatchingVideo: |
3001 | properties: | |
3002 | currentTime: | |
3003 | type: number | |
3e9e6f2f RK |
3004 | ServerConfig: |
3005 | properties: | |
2a8ae759 FS |
3006 | instance: |
3007 | type: object | |
3008 | properties: | |
3009 | name: | |
3010 | type: string | |
3011 | shortDescription: | |
3012 | type: string | |
3013 | defaultClientRoute: | |
3014 | type: string | |
3015 | isNSFW: | |
3016 | type: boolean | |
3017 | defaultNSFWPolicy: | |
3018 | type: string | |
3019 | customizations: | |
3020 | type: object | |
3021 | properties: | |
3022 | javascript: | |
3023 | type: string | |
3024 | css: | |
3025 | type: string | |
f30736c8 RK |
3026 | search: |
3027 | type: object | |
3028 | properties: | |
3029 | remoteUri: | |
3030 | type: object | |
3031 | properties: | |
3032 | users: | |
3033 | type: boolean | |
3034 | anonymous: | |
3035 | type: boolean | |
2a8ae759 FS |
3036 | plugin: |
3037 | type: object | |
3038 | properties: | |
3039 | registered: | |
3040 | type: array | |
3041 | items: | |
3042 | type: string | |
3043 | theme: | |
3044 | type: object | |
3045 | properties: | |
3046 | registered: | |
3047 | type: array | |
3048 | items: | |
3049 | type: string | |
3050 | email: | |
3051 | type: object | |
3052 | properties: | |
3053 | enabled: | |
3054 | type: boolean | |
3055 | contactForm: | |
3056 | type: object | |
3057 | properties: | |
3058 | enabled: | |
3059 | type: boolean | |
3060 | serverVersion: | |
3061 | type: string | |
3062 | serverCommit: | |
3063 | type: string | |
3e9e6f2f RK |
3064 | signup: |
3065 | type: object | |
3066 | properties: | |
3067 | allowed: | |
3068 | type: boolean | |
2a8ae759 FS |
3069 | allowedForCurrentIP: |
3070 | type: boolean | |
3071 | requiresEmailVerification: | |
3072 | type: boolean | |
3e9e6f2f RK |
3073 | transcoding: |
3074 | type: object | |
3075 | properties: | |
2a8ae759 FS |
3076 | hls: |
3077 | type: object | |
3078 | properties: | |
3079 | enabled: | |
3080 | type: boolean | |
f30736c8 RK |
3081 | webtorrent: |
3082 | type: object | |
3083 | properties: | |
3084 | enabled: | |
3085 | type: boolean | |
3e9e6f2f RK |
3086 | enabledResolutions: |
3087 | type: array | |
3088 | items: | |
3089 | type: number | |
2a8ae759 FS |
3090 | import: |
3091 | type: object | |
3092 | properties: | |
3093 | videos: | |
3094 | type: object | |
3095 | properties: | |
3096 | http: | |
3097 | type: object | |
3098 | properties: | |
3099 | enabled: | |
3100 | type: boolean | |
3101 | torrent: | |
3102 | type: object | |
3103 | properties: | |
3104 | enabled: | |
3105 | type: boolean | |
3106 | autoBlacklist: | |
3107 | type: object | |
3108 | properties: | |
3109 | videos: | |
3110 | type: object | |
3111 | properties: | |
3112 | ofUsers: | |
3113 | type: object | |
3114 | properties: | |
3115 | enabled: | |
3116 | type: boolean | |
3e9e6f2f RK |
3117 | avatar: |
3118 | type: object | |
3119 | properties: | |
3120 | file: | |
3121 | type: object | |
3122 | properties: | |
3123 | size: | |
3124 | type: object | |
3125 | properties: | |
3126 | max: | |
3127 | type: number | |
3128 | extensions: | |
3129 | type: array | |
3130 | items: | |
3131 | type: string | |
3132 | video: | |
3133 | type: object | |
3134 | properties: | |
2a8ae759 FS |
3135 | image: |
3136 | type: object | |
3137 | properties: | |
3138 | extensions: | |
3139 | type: array | |
3140 | items: | |
3141 | type: string | |
3142 | size: | |
3143 | type: object | |
3144 | properties: | |
3145 | max: | |
3146 | type: number | |
3e9e6f2f RK |
3147 | file: |
3148 | type: object | |
3149 | properties: | |
3150 | extensions: | |
3151 | type: array | |
3152 | items: | |
3153 | type: string | |
2a8ae759 FS |
3154 | videoCaption: |
3155 | type: object | |
3156 | properties: | |
3157 | file: | |
3158 | type: object | |
3159 | properties: | |
3160 | size: | |
3161 | type: object | |
3162 | properties: | |
3163 | max: | |
3164 | type: number | |
3165 | extensions: | |
3166 | type: array | |
3167 | items: | |
3168 | type: string | |
3169 | user: | |
3170 | type: object | |
3171 | properties: | |
3172 | videoQuota: | |
3173 | type: number | |
3174 | videoQuotaDaily: | |
3175 | type: number | |
3176 | trending: | |
3177 | type: object | |
3178 | properties: | |
3179 | videos: | |
3180 | type: object | |
3181 | properties: | |
3182 | intervalDays: | |
3183 | type: number | |
3184 | tracker: | |
747b17c7 | 3185 | type: object |
2a8ae759 FS |
3186 | properties: |
3187 | enabled: | |
3188 | type: boolean | |
f30736c8 RK |
3189 | followings: |
3190 | type: object | |
3191 | properties: | |
3192 | instance: | |
3193 | type: object | |
3194 | properties: | |
3195 | autoFollowIndex: | |
3196 | type: object | |
3197 | properties: | |
3198 | indexUrl: | |
3199 | type: string | |
2a8ae759 FS |
3200 | ServerConfigAbout: |
3201 | properties: | |
3202 | instance: | |
3203 | type: object | |
3204 | properties: | |
3205 | name: | |
3206 | type: string | |
3207 | shortDescription: | |
3208 | type: string | |
3209 | description: | |
3210 | type: string | |
3211 | terms: | |
3212 | type: string | |
3213 | ServerConfigCustom: | |
3214 | properties: | |
3215 | instance: | |
3216 | type: object | |
3217 | properties: | |
3218 | name: | |
3219 | type: string | |
3220 | shortDescription: | |
3221 | type: string | |
3222 | description: | |
3223 | type: string | |
3224 | terms: | |
3225 | type: string | |
3226 | defaultClientRoute: | |
3227 | type: string | |
3228 | isNSFW: | |
3229 | type: boolean | |
3230 | defaultNSFWPolicy: | |
3231 | type: string | |
3232 | customizations: | |
3233 | type: object | |
3234 | properties: | |
3235 | javascript: | |
3236 | type: string | |
3237 | css: | |
3238 | type: string | |
3239 | theme: | |
3240 | type: object | |
3241 | properties: | |
3242 | default: | |
3243 | type: string | |
3244 | services: | |
3245 | type: object | |
3246 | properties: | |
3247 | twitter: | |
3248 | type: object | |
3249 | properties: | |
3250 | username: | |
3251 | type: string | |
3252 | whitelisted: | |
3253 | type: boolean | |
3254 | cache: | |
3255 | type: object | |
3256 | properties: | |
3257 | previews: | |
3258 | type: object | |
3259 | properties: | |
3260 | size: | |
3261 | type: number | |
3262 | captions: | |
3263 | type: object | |
3264 | properties: | |
3265 | size: | |
3266 | type: number | |
3267 | signup: | |
3268 | type: object | |
3269 | properties: | |
3270 | enabled: | |
3271 | type: boolean | |
3272 | limit: | |
3273 | type: number | |
3274 | requiresEmailVerification: | |
3275 | type: boolean | |
3276 | admin: | |
3277 | type: object | |
3278 | properties: | |
3279 | email: | |
3280 | type: string | |
3281 | contactForm: | |
3282 | type: object | |
3283 | properties: | |
3284 | enabled: | |
3285 | type: boolean | |
3286 | user: | |
3287 | type: object | |
3288 | properties: | |
3289 | videoQuota: | |
3290 | type: number | |
3291 | videoQuotaDaily: | |
3292 | type: number | |
3293 | transcoding: | |
3294 | type: object | |
3295 | properties: | |
3296 | enabled: | |
3297 | type: boolean | |
3298 | allowAdditionalExtensions: | |
3299 | type: boolean | |
3300 | allowAudioFiles: | |
3301 | type: boolean | |
3302 | threads: | |
3303 | type: number | |
3304 | resolutions: | |
3305 | type: object | |
3306 | properties: | |
3307 | 240p: | |
3308 | type: boolean | |
3309 | 360p: | |
3310 | type: boolean | |
3311 | 480p: | |
3312 | type: boolean | |
3313 | 720p: | |
3314 | type: boolean | |
3315 | 1080p: | |
3316 | type: boolean | |
3317 | 2160p: | |
3318 | type: boolean | |
3319 | hls: | |
3320 | type: object | |
3321 | properties: | |
3322 | enabled: | |
3323 | type: boolean | |
3324 | import: | |
3325 | type: object | |
3326 | properties: | |
3327 | videos: | |
3328 | type: object | |
3329 | properties: | |
3330 | http: | |
3331 | type: object | |
3332 | properties: | |
3333 | enabled: | |
3334 | type: boolean | |
3335 | torrent: | |
3336 | type: object | |
3337 | properties: | |
3338 | enabled: | |
3339 | type: boolean | |
3340 | autoBlacklist: | |
3341 | type: object | |
3342 | properties: | |
3343 | videos: | |
3344 | type: object | |
3345 | properties: | |
3346 | ofUsers: | |
3347 | type: object | |
3348 | properties: | |
3349 | enabled: | |
3350 | type: boolean | |
3351 | followers: | |
3352 | type: object | |
3353 | properties: | |
3354 | instance: | |
3355 | type: object | |
3356 | properties: | |
3357 | enabled: | |
3358 | type: boolean | |
3359 | manualApproval: | |
3360 | type: boolean | |
3e9e6f2f RK |
3361 | Follow: |
3362 | properties: | |
3363 | id: | |
3364 | type: number | |
3365 | follower: | |
3366 | $ref: '#/components/schemas/Actor' | |
3367 | following: | |
3368 | $ref: '#/components/schemas/Actor' | |
3369 | score: | |
3370 | type: number | |
3371 | state: | |
3372 | type: string | |
3373 | enum: | |
3374 | - pending | |
3375 | - accepted | |
3376 | createdAt: | |
3377 | type: string | |
3378 | updatedAt: | |
3379 | type: string | |
3380 | Job: | |
3381 | properties: | |
3382 | id: | |
3383 | type: number | |
3384 | state: | |
3385 | type: string | |
3386 | enum: | |
3387 | - pending | |
3388 | - processing | |
3389 | - error | |
3390 | - success | |
3391 | category: | |
3392 | type: string | |
3393 | enum: | |
3394 | - transcoding | |
3395 | - activitypub-http | |
3396 | handlerName: | |
3397 | type: string | |
3398 | handlerInputData: | |
3399 | type: string | |
3400 | createdAt: | |
3401 | type: string | |
3402 | updatedAt: | |
3403 | type: string | |
3404 | AddUserResponse: | |
3405 | properties: | |
3406 | id: | |
3407 | type: number | |
3408 | uuid: | |
3409 | type: string | |
3410 | VideoUploadResponse: | |
3411 | properties: | |
3412 | video: | |
3413 | type: object | |
3414 | properties: | |
3415 | id: | |
3416 | type: number | |
3417 | uuid: | |
3418 | type: string | |
3419 | CommentThreadResponse: | |
3420 | properties: | |
3421 | total: | |
3422 | type: number | |
3423 | data: | |
3424 | type: array | |
3425 | items: | |
3426 | $ref: '#/components/schemas/VideoComment' | |
3427 | CommentThreadPostResponse: | |
3428 | properties: | |
3429 | comment: | |
3430 | $ref: '#/components/schemas/VideoComment' | |
048b6946 C |
3431 | VideoListResponse: |
3432 | properties: | |
3433 | total: | |
3434 | type: number | |
3435 | data: | |
3436 | type: array | |
3437 | items: | |
3438 | $ref: '#/components/schemas/Video' | |
3e9e6f2f RK |
3439 | AddUser: |
3440 | properties: | |
3441 | username: | |
3442 | type: string | |
3443 | description: 'The user username ' | |
3444 | password: | |
3445 | type: string | |
45f1bd72 | 3446 | description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent ' |
3e9e6f2f RK |
3447 | email: |
3448 | type: string | |
3449 | description: 'The user email ' | |
3450 | videoQuota: | |
3451 | type: string | |
3452 | description: 'The user videoQuota ' | |
fbe1bc2a C |
3453 | videoQuotaDaily: |
3454 | type: string | |
3455 | description: 'The user daily video quota ' | |
3e9e6f2f | 3456 | role: |
0590bb46 | 3457 | $ref: '#/components/schemas/UserRole' |
3e9e6f2f RK |
3458 | required: |
3459 | - username | |
3460 | - password | |
3461 | ||
3462 | - videoQuota | |
fbe1bc2a | 3463 | - videoQuotaDaily |
3e9e6f2f RK |
3464 | - role |
3465 | UpdateUser: | |
3466 | properties: | |
3467 | id: | |
3468 | type: string | |
3469 | description: 'The user id ' | |
3470 | email: | |
3471 | type: string | |
3472 | description: 'The updated email of the user ' | |
3473 | videoQuota: | |
3474 | type: string | |
3475 | description: 'The updated videoQuota of the user ' | |
fbe1bc2a C |
3476 | videoQuotaDaily: |
3477 | type: string | |
3478 | description: 'The updated daily video quota of the user ' | |
3e9e6f2f | 3479 | role: |
0590bb46 | 3480 | $ref: '#/components/schemas/UserRole' |
3e9e6f2f RK |
3481 | required: |
3482 | - id | |
3483 | ||
3484 | - videoQuota | |
fbe1bc2a | 3485 | - videoQuotaDaily |
3e9e6f2f RK |
3486 | - role |
3487 | UpdateMe: | |
3488 | properties: | |
3489 | password: | |
3490 | type: string | |
3491 | description: 'Your new password ' | |
3492 | email: | |
3493 | type: string | |
3494 | description: 'Your new email ' | |
3495 | displayNSFW: | |
3496 | type: string | |
3497 | description: 'Your new displayNSFW ' | |
3498 | autoPlayVideo: | |
3499 | type: string | |
3500 | description: 'Your new autoPlayVideo ' | |
3501 | required: | |
3502 | - password | |
3503 | ||
3504 | - displayNSFW | |
3505 | - autoPlayVideo | |
3506 | GetMeVideoRating: | |
3507 | properties: | |
3508 | id: | |
3509 | type: string | |
3510 | description: 'Id of the video ' | |
3511 | rating: | |
3512 | type: number | |
3513 | description: 'Rating of the video ' | |
3514 | required: | |
3515 | - id | |
3516 | - rating | |
c100a614 YB |
3517 | VideoRating: |
3518 | properties: | |
3519 | video: | |
3520 | $ref: '#/components/schemas/Video' | |
3521 | rating: | |
3522 | type: number | |
3523 | description: 'Rating of the video' | |
3524 | required: | |
3525 | - video | |
3526 | - rating | |
3e9e6f2f RK |
3527 | RegisterUser: |
3528 | properties: | |
3529 | username: | |
3530 | type: string | |
3531 | description: 'The username of the user ' | |
3532 | password: | |
3533 | type: string | |
3534 | description: 'The password of the user ' | |
3535 | email: | |
3536 | type: string | |
3537 | description: 'The email of the user ' | |
1f20622f C |
3538 | displayName: |
3539 | type: string | |
3540 | description: 'The user display name' | |
3541 | channel: | |
3542 | type: object | |
3543 | properties: | |
3544 | name: | |
3545 | type: string | |
3546 | description: 'The default channel name' | |
3547 | displayName: | |
3548 | type: string | |
3549 | description: 'The default channel display name' | |
3550 | ||
3e9e6f2f RK |
3551 | required: |
3552 | - username | |
3553 | - password | |
3554 | ||
7d14d4d2 | 3555 | VideoChannelCreate: |
3e9e6f2f RK |
3556 | properties: |
3557 | name: | |
3558 | type: string | |
7d14d4d2 C |
3559 | displayName: |
3560 | type: string | |
3e9e6f2f RK |
3561 | description: |
3562 | type: string | |
7d14d4d2 C |
3563 | support: |
3564 | type: string | |
3565 | required: | |
3566 | - name | |
3567 | - displayName | |
3568 | VideoChannelUpdate: | |
3569 | properties: | |
3570 | displayName: | |
3571 | type: string | |
3572 | description: | |
3573 | type: string | |
3574 | support: | |
3575 | type: string | |
3576 | bulkVideosSupportUpdate: | |
3577 | type: boolean | |
3578 | description: 'Update all videos support field of this channel' | |
1569a818 | 3579 |