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