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