]>
Commit | Line | Data |
---|---|---|
3e9e6f2f | 1 | openapi: 3.0.0 |
1569a818 | 2 | info: |
5e1c08eb | 3 | title: PeerTube |
1d859b5a | 4 | version: 1.1.0-alpha.2 |
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' | |
13 | description: | | |
14 | # Introduction | |
15 | The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable | |
16 | resource URLs. It returns HTTP response codes to indicate errors. It also | |
17 | accepts and returns JSON in the HTTP body. You can use your favorite | |
18 | HTTP/REST library for your programming language to use PeerTube. No official | |
19 | SDK is currently provided. | |
3e9e6f2f | 20 | |
2963c343 RK |
21 | # Authentication |
22 | When you sign up for an account, you are given the possibility to generate | |
23 | sessions, and authenticate using this session token. One session token can | |
24 | currently be used at a time. | |
2963c343 RK |
25 | tags: |
26 | - name: Accounts | |
3e9e6f2f | 27 | description: > |
2963c343 | 28 | Using some features of PeerTube require authentication, for which Accounts |
3e9e6f2f RK |
29 | |
30 | provide different levels of permission as well as associated user | |
31 | information. | |
32 | ||
2963c343 RK |
33 | Accounts also encompass remote accounts discovered across the federation. |
34 | - name: Config | |
3e9e6f2f RK |
35 | description: > |
36 | Each server exposes public information regarding supported videos and | |
37 | options. | |
2963c343 RK |
38 | - name: Feeds |
39 | description: | | |
40 | Feeds of videos and feeds of comments allow to see updates and get them in | |
41 | an aggregator or script of your choice. | |
42 | - name: Job | |
3e9e6f2f RK |
43 | description: > |
44 | Jobs are long-running tasks enqueued and processed by the instance | |
45 | itself. | |
46 | ||
2963c343 RK |
47 | No additional worker registration is currently available. |
48 | - name: ServerFollowing | |
3e9e6f2f RK |
49 | description: > |
50 | Managing servers which the instance interacts with is crucial to the | |
51 | concept | |
52 | ||
53 | of federation in PeerTube and external video indexation. The PeerTube | |
54 | server | |
55 | ||
2963c343 | 56 | then deals with inter-server ActivityPub operations and propagates |
3e9e6f2f | 57 | |
2963c343 | 58 | information across its social graph by posting activities to actors' inbox |
3e9e6f2f | 59 | |
2963c343 RK |
60 | endpoints. |
61 | - name: VideoAbuse | |
62 | description: | | |
63 | Video abuses deal with reports of local or remote videos alike. | |
64 | - name: Video | |
65 | description: | | |
66 | Operations dealing with listing, uploading, fetching or modifying videos. | |
67 | - name: Search | |
68 | description: | | |
69 | The search helps to find _videos_ from within the instance and beyond. | |
70 | Videos from other instances federated by the instance (that is, instances | |
71 | followed by the instance) can be found via keywords and other criteria of | |
72 | the advanced search. | |
73 | - name: VideoComment | |
3e9e6f2f RK |
74 | description: > |
75 | Operations dealing with comments to a video. Comments are organized in | |
76 | threads. | |
2963c343 | 77 | - name: VideoChannel |
3e9e6f2f RK |
78 | description: > |
79 | Operations dealing with creation, modification and video listing of a | |
80 | user's | |
81 | ||
2963c343 | 82 | channels. |
1569a818 | 83 | paths: |
ad9e39fb | 84 | '/accounts/{name}': |
1569a818 DG |
85 | get: |
86 | tags: | |
87 | - Accounts | |
2963c343 | 88 | summary: Get the account by name |
1569a818 | 89 | parameters: |
3e9e6f2f RK |
90 | - $ref: '#/components/parameters/name' |
91 | - $ref: '#/components/parameters/start' | |
92 | - $ref: '#/components/parameters/count' | |
93 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
94 | responses: |
95 | '200': | |
96 | description: successful operation | |
3e9e6f2f RK |
97 | content: |
98 | application/json: | |
99 | schema: | |
100 | $ref: '#/components/schemas/Account' | |
ad9e39fb | 101 | '/accounts/{name}/videos': |
6b738c7a C |
102 | get: |
103 | tags: | |
104 | - Accounts | |
2963c343 | 105 | - Video |
3e9e6f2f | 106 | summary: 'Get videos for an account, provided the name of that account' |
6b738c7a | 107 | parameters: |
3e9e6f2f | 108 | - $ref: '#/components/parameters/name' |
6b738c7a C |
109 | responses: |
110 | '200': | |
111 | description: successful operation | |
3e9e6f2f RK |
112 | content: |
113 | application/json: | |
114 | schema: | |
115 | $ref: '#/components/schemas/Video' | |
2963c343 RK |
116 | x-code-samples: |
117 | - lang: JavaScript | |
118 | source: | | |
119 | fetch('https://peertube.cpy.re/api/v1/accounts/{name}/videos') | |
120 | .then(function(response) { | |
121 | return response.json() | |
122 | }).then(function(data) { | |
123 | console.log(data) | |
124 | }) | |
1569a818 DG |
125 | /accounts: |
126 | get: | |
127 | tags: | |
128 | - Accounts | |
2963c343 | 129 | summary: Get all accounts |
1569a818 DG |
130 | responses: |
131 | '200': | |
132 | description: successful operation | |
3e9e6f2f RK |
133 | content: |
134 | 'application/jsonhttps://peertube.cpy.re/api/v1': | |
135 | schema: | |
136 | type: array | |
137 | items: | |
138 | $ref: '#/components/schemas/Account' | |
1569a818 DG |
139 | /config: |
140 | get: | |
141 | tags: | |
142 | - Config | |
2963c343 | 143 | summary: Get the configuration of the server |
1569a818 DG |
144 | responses: |
145 | '200': | |
146 | description: successful operation | |
3e9e6f2f RK |
147 | content: |
148 | application/json: | |
149 | schema: | |
150 | $ref: '#/components/schemas/ServerConfig' | |
151 | '/feeds/videos.{format}': | |
244e76a5 | 152 | get: |
3e9e6f2f RK |
153 | summary: >- |
154 | Get the feed of videos for the server, with optional filter by account | |
155 | name or id | |
244e76a5 RK |
156 | tags: |
157 | - Feeds | |
244e76a5 RK |
158 | parameters: |
159 | - name: format | |
160 | in: path | |
161 | required: true | |
3e9e6f2f RK |
162 | description: >- |
163 | The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and | |
164 | json to JSON FEED 1.0 | |
165 | schema: | |
166 | type: string | |
167 | enum: | |
168 | - xml | |
169 | - atom | |
170 | - json | |
171 | default: xml | |
244e76a5 RK |
172 | - name: accountId |
173 | in: query | |
174 | required: false | |
3e9e6f2f RK |
175 | description: >- |
176 | The id of the local account to filter to (beware, users IDs and not | |
177 | actors IDs which will return empty feeds | |
178 | schema: | |
179 | type: number | |
244e76a5 RK |
180 | - name: accountName |
181 | in: query | |
182 | required: false | |
3e9e6f2f RK |
183 | description: The name of the local account to filter to |
184 | schema: | |
185 | type: string | |
244e76a5 RK |
186 | responses: |
187 | '200': | |
188 | description: successful operation | |
1569a818 DG |
189 | /jobs: |
190 | get: | |
2963c343 | 191 | summary: Get list of jobs |
94ff4c23 | 192 | security: |
3e9e6f2f RK |
193 | - OAuth2: |
194 | - admin | |
1569a818 DG |
195 | tags: |
196 | - Job | |
44cb3b85 DG |
197 | parameters: |
198 | - name: state | |
199 | in: path | |
200 | required: true | |
3e9e6f2f RK |
201 | description: The state of the job |
202 | schema: | |
203 | type: string | |
204 | - $ref: '#/components/parameters/start' | |
205 | - $ref: '#/components/parameters/count' | |
206 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
207 | responses: |
208 | '200': | |
209 | description: successful operation | |
3e9e6f2f RK |
210 | content: |
211 | application/json: | |
212 | schema: | |
213 | type: array | |
214 | items: | |
215 | $ref: '#/components/schemas/Job' | |
1569a818 DG |
216 | '/server/following/{host}': |
217 | delete: | |
94ff4c23 | 218 | security: |
3e9e6f2f RK |
219 | - OAuth2: |
220 | - admin | |
1569a818 DG |
221 | tags: |
222 | - ServerFollowing | |
2963c343 | 223 | summary: Unfollow a server by hostname |
1569a818 DG |
224 | parameters: |
225 | - name: host | |
226 | in: path | |
227 | required: true | |
1569a818 | 228 | description: 'The host to unfollow ' |
3e9e6f2f RK |
229 | schema: |
230 | type: string | |
1569a818 DG |
231 | responses: |
232 | '201': | |
233 | description: successful operation | |
234 | /server/followers: | |
235 | get: | |
236 | tags: | |
237 | - ServerFollowing | |
2963c343 | 238 | summary: Get followers of the server |
44cb3b85 | 239 | parameters: |
3e9e6f2f RK |
240 | - $ref: '#/components/parameters/start' |
241 | - $ref: '#/components/parameters/count' | |
242 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
243 | responses: |
244 | '200': | |
245 | description: successful operation | |
3e9e6f2f RK |
246 | content: |
247 | application/json: | |
248 | schema: | |
249 | type: array | |
250 | items: | |
251 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
252 | /server/following: |
253 | get: | |
254 | tags: | |
255 | - ServerFollowing | |
2963c343 | 256 | summary: Get servers followed by the server |
44cb3b85 | 257 | parameters: |
3e9e6f2f RK |
258 | - $ref: '#/components/parameters/start' |
259 | - $ref: '#/components/parameters/count' | |
260 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
261 | responses: |
262 | '200': | |
263 | description: successful operation | |
3e9e6f2f RK |
264 | content: |
265 | application/json: | |
266 | schema: | |
267 | type: array | |
268 | items: | |
269 | $ref: '#/components/schemas/Follow' | |
1569a818 | 270 | post: |
94ff4c23 | 271 | security: |
3e9e6f2f RK |
272 | - OAuth2: |
273 | - admin | |
1569a818 DG |
274 | tags: |
275 | - ServerFollowing | |
2963c343 | 276 | summary: Follow a server |
1569a818 DG |
277 | responses: |
278 | '204': | |
3e9e6f2f RK |
279 | $ref: '#/paths/~1users~1me/put/responses/204' |
280 | requestBody: | |
281 | content: | |
282 | application/json: | |
283 | schema: | |
284 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
285 | /users: |
286 | post: | |
2963c343 | 287 | summary: Creates user |
94ff4c23 | 288 | security: |
3e9e6f2f RK |
289 | - OAuth2: |
290 | - admin | |
1569a818 DG |
291 | tags: |
292 | - User | |
1569a818 DG |
293 | responses: |
294 | '200': | |
295 | description: successful operation | |
3e9e6f2f RK |
296 | content: |
297 | application/json: | |
298 | schema: | |
299 | $ref: '#/components/schemas/AddUserResponse' | |
300 | requestBody: | |
301 | content: | |
302 | application/json: | |
303 | schema: | |
304 | $ref: '#/components/schemas/AddUser' | |
305 | description: User to create | |
306 | required: true | |
1569a818 | 307 | get: |
2963c343 | 308 | summary: Get a list of users |
94ff4c23 | 309 | security: |
3e9e6f2f | 310 | - OAuth2: [] |
1569a818 DG |
311 | tags: |
312 | - User | |
44cb3b85 | 313 | parameters: |
3e9e6f2f RK |
314 | - $ref: '#/components/parameters/start' |
315 | - $ref: '#/components/parameters/count' | |
316 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
317 | responses: |
318 | '200': | |
319 | description: successful operation | |
3e9e6f2f RK |
320 | content: |
321 | application/json: | |
322 | schema: | |
323 | type: array | |
324 | items: | |
325 | $ref: '#/components/schemas/User' | |
1569a818 DG |
326 | '/users/{id}': |
327 | delete: | |
2963c343 | 328 | summary: Delete a user by its id |
94ff4c23 | 329 | security: |
3e9e6f2f RK |
330 | - OAuth2: |
331 | - admin | |
1569a818 DG |
332 | tags: |
333 | - User | |
1569a818 | 334 | parameters: |
3e9e6f2f | 335 | - $ref: '#/components/parameters/id' |
1569a818 DG |
336 | responses: |
337 | '204': | |
3e9e6f2f | 338 | $ref: '#/paths/~1users~1me/put/responses/204' |
1569a818 | 339 | get: |
2963c343 | 340 | summary: Get user by its id |
94ff4c23 | 341 | security: |
3e9e6f2f | 342 | - OAuth2: [] |
1569a818 DG |
343 | tags: |
344 | - User | |
1569a818 | 345 | parameters: |
3e9e6f2f | 346 | - $ref: '#/components/parameters/id' |
1569a818 DG |
347 | responses: |
348 | '200': | |
349 | description: successful operation | |
3e9e6f2f RK |
350 | content: |
351 | application/json: | |
352 | schema: | |
353 | $ref: '#/components/schemas/User' | |
1569a818 | 354 | put: |
2963c343 | 355 | summary: Update user profile by its id |
94ff4c23 | 356 | security: |
3e9e6f2f | 357 | - OAuth2: [] |
1569a818 DG |
358 | tags: |
359 | - User | |
1569a818 | 360 | parameters: |
3e9e6f2f | 361 | - $ref: '#/components/parameters/id' |
1569a818 DG |
362 | responses: |
363 | '204': | |
3e9e6f2f RK |
364 | $ref: '#/paths/~1users~1me/put/responses/204' |
365 | requestBody: | |
366 | content: | |
367 | application/json: | |
368 | schema: | |
369 | $ref: '#/components/schemas/UpdateUser' | |
370 | required: true | |
1569a818 DG |
371 | /users/me: |
372 | get: | |
2963c343 | 373 | summary: Get current user information |
94ff4c23 | 374 | security: |
3e9e6f2f | 375 | - OAuth2: [] |
1569a818 DG |
376 | tags: |
377 | - User | |
1569a818 DG |
378 | responses: |
379 | '200': | |
380 | description: successful operation | |
3e9e6f2f RK |
381 | content: |
382 | application/json: | |
383 | schema: | |
384 | type: array | |
385 | items: | |
386 | $ref: '#/components/schemas/User' | |
1569a818 | 387 | put: |
2963c343 | 388 | summary: Update current user information |
94ff4c23 | 389 | security: |
3e9e6f2f | 390 | - OAuth2: [] |
1569a818 DG |
391 | tags: |
392 | - User | |
1569a818 DG |
393 | responses: |
394 | '204': | |
3e9e6f2f RK |
395 | description: Successful operation |
396 | requestBody: | |
397 | content: | |
398 | application/json: | |
399 | schema: | |
400 | $ref: '#/components/schemas/UpdateMe' | |
401 | required: true | |
1569a818 DG |
402 | /users/me/video-quota-used: |
403 | get: | |
2963c343 | 404 | summary: Get current user used quota |
94ff4c23 | 405 | security: |
3e9e6f2f | 406 | - OAuth2: [] |
1569a818 DG |
407 | tags: |
408 | - User | |
1569a818 DG |
409 | responses: |
410 | '200': | |
411 | description: successful operation | |
3e9e6f2f RK |
412 | content: |
413 | application/json: | |
414 | schema: | |
415 | type: number | |
1569a818 DG |
416 | '/users/me/videos/{videoId}/rating': |
417 | get: | |
3e9e6f2f | 418 | summary: 'Get rating of video by its id, among those of the current user' |
94ff4c23 | 419 | security: |
3e9e6f2f | 420 | - OAuth2: [] |
1569a818 DG |
421 | tags: |
422 | - User | |
1569a818 DG |
423 | parameters: |
424 | - name: videoId | |
425 | in: path | |
426 | required: true | |
1569a818 | 427 | description: 'The video id ' |
3e9e6f2f RK |
428 | schema: |
429 | type: string | |
1569a818 DG |
430 | responses: |
431 | '200': | |
432 | description: successful operation | |
3e9e6f2f RK |
433 | content: |
434 | application/json: | |
435 | schema: | |
436 | $ref: '#/components/schemas/GetMeVideoRating' | |
1569a818 DG |
437 | /users/me/videos: |
438 | get: | |
2963c343 | 439 | summary: Get videos of the current user |
94ff4c23 | 440 | security: |
3e9e6f2f | 441 | - OAuth2: [] |
1569a818 DG |
442 | tags: |
443 | - User | |
44cb3b85 | 444 | parameters: |
3e9e6f2f RK |
445 | - $ref: '#/components/parameters/start' |
446 | - $ref: '#/components/parameters/count' | |
447 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
448 | responses: |
449 | '200': | |
450 | description: successful operation | |
3e9e6f2f RK |
451 | content: |
452 | application/json: | |
453 | schema: | |
454 | type: array | |
455 | items: | |
456 | $ref: '#/components/schemas/Video' | |
1569a818 DG |
457 | /users/register: |
458 | post: | |
2963c343 | 459 | summary: Register a user |
1569a818 DG |
460 | tags: |
461 | - User | |
1569a818 DG |
462 | responses: |
463 | '204': | |
3e9e6f2f RK |
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/avatar/pick: |
472 | post: | |
2963c343 | 473 | summary: Update current user avatar |
94ff4c23 | 474 | security: |
3e9e6f2f | 475 | - OAuth2: [] |
1569a818 DG |
476 | tags: |
477 | - User | |
1569a818 DG |
478 | responses: |
479 | '200': | |
480 | description: successful operation | |
3e9e6f2f RK |
481 | content: |
482 | application/json: | |
483 | schema: | |
484 | $ref: '#/components/schemas/Avatar' | |
485 | requestBody: | |
486 | content: | |
487 | multipart/form-data: | |
488 | schema: | |
489 | type: object | |
490 | properties: | |
491 | avatarfile: | |
492 | description: The file to upload. | |
493 | type: string | |
494 | format: binary | |
495 | encoding: | |
496 | profileImage: | |
497 | # only accept png/jpeg | |
498 | contentType: image/png, image/jpeg | |
c360c494 | 499 | /videos: |
1569a818 | 500 | get: |
2963c343 | 501 | summary: Get list of videos |
1569a818 DG |
502 | tags: |
503 | - Video | |
44cb3b85 | 504 | parameters: |
61b909b9 P |
505 | - name: category |
506 | in: query | |
507 | required: false | |
61b909b9 | 508 | description: category id of the video |
3e9e6f2f RK |
509 | schema: |
510 | type: number | |
511 | - $ref: '#/components/parameters/start' | |
512 | - $ref: '#/components/parameters/count' | |
513 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
514 | responses: |
515 | '200': | |
516 | description: successful operation | |
3e9e6f2f RK |
517 | content: |
518 | application/json: | |
519 | schema: | |
520 | type: array | |
521 | items: | |
522 | $ref: '#/components/schemas/Video' | |
c360c494 | 523 | /videos/categories: |
1569a818 | 524 | get: |
2963c343 | 525 | summary: Get list of video licences known by the server |
1569a818 DG |
526 | tags: |
527 | - Video | |
1569a818 DG |
528 | responses: |
529 | '200': | |
530 | description: successful operation | |
3e9e6f2f RK |
531 | content: |
532 | application/json: | |
533 | schema: | |
534 | type: array | |
535 | items: | |
536 | type: string | |
c360c494 | 537 | /videos/licences: |
1569a818 | 538 | get: |
2963c343 | 539 | summary: Get list of video licences known by the server |
1569a818 DG |
540 | tags: |
541 | - Video | |
1569a818 DG |
542 | responses: |
543 | '200': | |
544 | description: successful operation | |
3e9e6f2f RK |
545 | content: |
546 | application/json: | |
547 | schema: | |
548 | type: array | |
549 | items: | |
550 | type: string | |
c360c494 | 551 | /videos/languages: |
1569a818 | 552 | get: |
2963c343 | 553 | summary: Get list of languages known by the server |
1569a818 DG |
554 | tags: |
555 | - Video | |
1569a818 DG |
556 | responses: |
557 | '200': | |
558 | description: successful operation | |
3e9e6f2f RK |
559 | content: |
560 | application/json: | |
561 | schema: | |
562 | type: array | |
563 | items: | |
564 | type: string | |
c360c494 | 565 | /videos/privacies: |
1569a818 | 566 | get: |
2963c343 | 567 | summary: Get list of privacy policies supported by the server |
1569a818 DG |
568 | tags: |
569 | - Video | |
1569a818 DG |
570 | responses: |
571 | '200': | |
572 | description: successful operation | |
3e9e6f2f RK |
573 | content: |
574 | application/json: | |
575 | schema: | |
576 | type: array | |
577 | items: | |
578 | type: string | |
579 | '/videos/{id}': | |
1569a818 | 580 | put: |
2963c343 | 581 | summary: Update metadata for a video by its id |
94ff4c23 | 582 | security: |
3e9e6f2f | 583 | - OAuth2: [] |
1569a818 DG |
584 | tags: |
585 | - Video | |
1569a818 | 586 | parameters: |
3e9e6f2f | 587 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
588 | responses: |
589 | '200': | |
590 | description: successful operation | |
3e9e6f2f RK |
591 | content: |
592 | application/json: | |
593 | schema: | |
594 | $ref: '#/components/schemas/Video' | |
595 | requestBody: | |
596 | content: | |
597 | multipart/form-data: | |
598 | schema: | |
599 | type: object | |
600 | properties: | |
601 | thumbnailfile: | |
602 | description: Video thumbnail file | |
603 | type: string | |
604 | previewfile: | |
605 | description: Video preview file | |
606 | type: string | |
607 | category: | |
608 | description: Video category | |
609 | type: string | |
610 | licence: | |
611 | description: Video licence | |
612 | type: string | |
613 | language: | |
614 | description: Video language | |
615 | type: string | |
616 | description: | |
617 | description: Video description | |
618 | type: string | |
619 | waitTranscoding: | |
620 | description: Whether or not we wait transcoding before publish the video | |
621 | type: string | |
622 | support: | |
623 | description: Text describing how to support the video uploader | |
624 | type: string | |
625 | nsfw: | |
626 | description: Whether or not this video contains sensitive content | |
627 | type: string | |
628 | name: | |
629 | description: Video name | |
630 | type: string | |
631 | tags: | |
632 | description: Video tags | |
633 | type: string | |
634 | commentsEnabled: | |
635 | description: Enable or disable comments for this video | |
636 | type: string | |
637 | scheduleUpdate: &ref_0 | |
638 | type: object | |
639 | properties: | |
640 | privacy: | |
641 | type: string | |
642 | enum: | |
643 | - Public | |
644 | - Unlisted | |
645 | description: Video privacy target | |
646 | updateAt: | |
647 | type: string | |
648 | format: date | |
649 | description: When to update the video | |
650 | required: | |
651 | - updateAt | |
1569a818 | 652 | get: |
2963c343 | 653 | summary: Get a video by its id |
1569a818 DG |
654 | tags: |
655 | - Video | |
1569a818 | 656 | parameters: |
3e9e6f2f | 657 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
658 | responses: |
659 | '200': | |
660 | description: successful operation | |
3e9e6f2f RK |
661 | content: |
662 | application/json: | |
663 | schema: | |
664 | $ref: '#/components/schemas/Video' | |
1569a818 | 665 | delete: |
2963c343 | 666 | summary: Delete a video by its id |
94ff4c23 | 667 | security: |
3e9e6f2f | 668 | - OAuth2: [] |
1569a818 DG |
669 | tags: |
670 | - Video | |
1569a818 | 671 | parameters: |
3e9e6f2f | 672 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
673 | responses: |
674 | '204': | |
3e9e6f2f RK |
675 | $ref: '#/paths/~1users~1me/put/responses/204' |
676 | '/videos/{id}/description': | |
1569a818 | 677 | get: |
2963c343 | 678 | summary: Get a video description by its id |
1569a818 DG |
679 | tags: |
680 | - Video | |
1569a818 | 681 | parameters: |
3e9e6f2f | 682 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
683 | responses: |
684 | '200': | |
685 | description: successful operation | |
3e9e6f2f RK |
686 | content: |
687 | application/json: | |
688 | schema: | |
689 | type: string | |
690 | '/videos/{id}/views': | |
1569a818 | 691 | post: |
2963c343 | 692 | summary: Add a view to the video by its id |
1569a818 DG |
693 | tags: |
694 | - Video | |
1569a818 | 695 | parameters: |
3e9e6f2f | 696 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
697 | responses: |
698 | '204': | |
3e9e6f2f | 699 | $ref: '#/paths/~1users~1me/put/responses/204' |
c360c494 | 700 | /videos/upload: |
1569a818 | 701 | post: |
2963c343 | 702 | summary: Upload a video file with its metadata |
94ff4c23 | 703 | security: |
3e9e6f2f | 704 | - OAuth2: [] |
1569a818 DG |
705 | tags: |
706 | - Video | |
1569a818 DG |
707 | responses: |
708 | '200': | |
709 | description: successful operation | |
3e9e6f2f RK |
710 | content: |
711 | application/json: | |
712 | schema: | |
713 | $ref: '#/components/schemas/VideoUploadResponse' | |
714 | requestBody: | |
715 | content: | |
716 | multipart/form-data: | |
717 | schema: | |
718 | type: object | |
719 | properties: | |
720 | videofile: | |
721 | description: Video file | |
722 | type: string | |
723 | format: binary | |
724 | channelId: | |
725 | description: Channel id that will contain this video | |
726 | type: number | |
727 | thumbnailfile: | |
728 | description: Video thumbnail file | |
729 | type: string | |
730 | previewfile: | |
731 | description: Video preview file | |
732 | type: string | |
733 | category: | |
734 | description: Video category | |
735 | type: string | |
736 | licence: | |
737 | description: Video licence | |
738 | type: string | |
739 | language: | |
740 | description: Video language | |
741 | type: string | |
742 | description: | |
743 | description: Video description | |
744 | type: string | |
745 | waitTranscoding: | |
746 | description: Whether or not we wait transcoding before publish the video | |
747 | type: string | |
748 | support: | |
749 | description: Text describing how to support the video uploader | |
750 | type: string | |
751 | nsfw: | |
752 | description: Whether or not this video contains sensitive content | |
753 | type: string | |
754 | name: | |
755 | description: Video name | |
756 | type: string | |
757 | tags: | |
758 | description: Video tags | |
759 | type: string | |
760 | commentsEnabled: | |
761 | description: Enable or disable comments for this video | |
762 | type: string | |
763 | scheduleUpdate: *ref_0 | |
764 | required: | |
765 | - videofile | |
766 | - channelId | |
c360c494 | 767 | /videos/abuse: |
1569a818 | 768 | get: |
2963c343 | 769 | summary: Get list of reported video abuses |
94ff4c23 | 770 | security: |
3e9e6f2f | 771 | - OAuth2: [] |
1569a818 DG |
772 | tags: |
773 | - VideoAbuse | |
44cb3b85 | 774 | parameters: |
3e9e6f2f RK |
775 | - $ref: '#/components/parameters/start' |
776 | - $ref: '#/components/parameters/count' | |
777 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
778 | responses: |
779 | '200': | |
780 | description: successful operation | |
3e9e6f2f RK |
781 | content: |
782 | application/json: | |
783 | schema: | |
784 | type: array | |
785 | items: | |
786 | $ref: '#/components/schemas/VideoAbuse' | |
787 | '/videos/{id}/abuse': | |
1569a818 | 788 | post: |
3e9e6f2f | 789 | summary: 'Report an abuse, on a video by its id' |
94ff4c23 | 790 | security: |
3e9e6f2f | 791 | - OAuth2: [] |
1569a818 DG |
792 | tags: |
793 | - VideoAbuse | |
1569a818 | 794 | parameters: |
3e9e6f2f | 795 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
796 | responses: |
797 | '204': | |
3e9e6f2f RK |
798 | $ref: '#/paths/~1users~1me/put/responses/204' |
799 | '/videos/{id}/blacklist': | |
1569a818 | 800 | post: |
2963c343 | 801 | summary: Put on blacklist a video by its id |
94ff4c23 | 802 | security: |
3e9e6f2f RK |
803 | - OAuth2: |
804 | - admin | |
805 | - moderator | |
1569a818 DG |
806 | tags: |
807 | - VideoBlacklist | |
1569a818 | 808 | parameters: |
3e9e6f2f | 809 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
810 | responses: |
811 | '204': | |
3e9e6f2f | 812 | $ref: '#/paths/~1users~1me/put/responses/204' |
1569a818 | 813 | delete: |
2963c343 | 814 | summary: Delete an entry of the blacklist of a video by its id |
94ff4c23 | 815 | security: |
3e9e6f2f RK |
816 | - OAuth2: |
817 | - admin | |
818 | - moderator | |
1569a818 DG |
819 | tags: |
820 | - VideoBlacklist | |
1569a818 | 821 | parameters: |
3e9e6f2f | 822 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
823 | responses: |
824 | '204': | |
3e9e6f2f | 825 | $ref: '#/paths/~1users~1me/put/responses/204' |
c360c494 | 826 | /videos/blacklist: |
1569a818 | 827 | get: |
2963c343 | 828 | summary: Get list of videos on blacklist |
94ff4c23 | 829 | security: |
3e9e6f2f RK |
830 | - OAuth2: |
831 | - admin | |
832 | - moderator | |
1569a818 DG |
833 | tags: |
834 | - VideoBlacklist | |
44cb3b85 | 835 | parameters: |
3e9e6f2f RK |
836 | - $ref: '#/components/parameters/start' |
837 | - $ref: '#/components/parameters/count' | |
838 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
839 | responses: |
840 | '200': | |
841 | description: successful operation | |
3e9e6f2f RK |
842 | content: |
843 | application/json: | |
844 | schema: | |
845 | type: array | |
846 | items: | |
847 | $ref: '#/components/schemas/VideoBlacklist' | |
48dce1c9 | 848 | /video-channels: |
1569a818 | 849 | get: |
2963c343 | 850 | summary: Get list of video channels |
1569a818 DG |
851 | tags: |
852 | - VideoChannel | |
44cb3b85 | 853 | parameters: |
3e9e6f2f RK |
854 | - $ref: '#/components/parameters/start' |
855 | - $ref: '#/components/parameters/count' | |
856 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
857 | responses: |
858 | '200': | |
859 | description: successful operation | |
3e9e6f2f RK |
860 | content: |
861 | application/json: | |
862 | schema: | |
863 | type: array | |
864 | items: | |
865 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 866 | post: |
2963c343 | 867 | summary: Creates a video channel for the current user |
94ff4c23 | 868 | security: |
3e9e6f2f | 869 | - OAuth2: [] |
1569a818 DG |
870 | tags: |
871 | - VideoChannel | |
1569a818 DG |
872 | responses: |
873 | '204': | |
3e9e6f2f RK |
874 | $ref: '#/paths/~1users~1me/put/responses/204' |
875 | requestBody: | |
876 | $ref: '#/components/requestBodies/VideoChannelInput' | |
877 | '/video-channels/{id}': | |
1569a818 | 878 | get: |
2963c343 | 879 | summary: Get a video channel by its id |
1569a818 DG |
880 | tags: |
881 | - VideoChannel | |
1569a818 | 882 | parameters: |
3e9e6f2f | 883 | - $ref: '#/components/parameters/id3' |
1569a818 DG |
884 | responses: |
885 | '200': | |
886 | description: successful operation | |
3e9e6f2f RK |
887 | content: |
888 | application/json: | |
889 | schema: | |
890 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 891 | put: |
2963c343 | 892 | summary: Update a video channel by its id |
94ff4c23 | 893 | security: |
3e9e6f2f | 894 | - OAuth2: [] |
1569a818 DG |
895 | tags: |
896 | - VideoChannel | |
1569a818 | 897 | parameters: |
3e9e6f2f | 898 | - $ref: '#/components/parameters/id3' |
1569a818 DG |
899 | responses: |
900 | '204': | |
3e9e6f2f RK |
901 | $ref: '#/paths/~1users~1me/put/responses/204' |
902 | requestBody: | |
903 | $ref: '#/components/requestBodies/VideoChannelInput' | |
1569a818 | 904 | delete: |
2963c343 | 905 | summary: Delete a video channel by its id |
94ff4c23 | 906 | security: |
3e9e6f2f | 907 | - OAuth2: [] |
1569a818 DG |
908 | tags: |
909 | - VideoChannel | |
1569a818 | 910 | parameters: |
3e9e6f2f | 911 | - $ref: '#/components/parameters/id3' |
cc918ac3 C |
912 | responses: |
913 | '204': | |
3e9e6f2f RK |
914 | $ref: '#/paths/~1users~1me/put/responses/204' |
915 | '/video-channels/{id}/videos': | |
cc918ac3 | 916 | get: |
2963c343 | 917 | summary: Get videos of a video channel by its id |
cc918ac3 C |
918 | tags: |
919 | - VideoChannel | |
cc918ac3 | 920 | parameters: |
3e9e6f2f | 921 | - $ref: '#/components/parameters/id3' |
1569a818 | 922 | responses: |
cc918ac3 | 923 | '200': |
1569a818 | 924 | description: successful operation |
3e9e6f2f RK |
925 | content: |
926 | application/json: | |
927 | schema: | |
928 | $ref: '#/components/schemas/Video' | |
929 | '/accounts/{name}/video-channels': | |
6b738c7a | 930 | get: |
2963c343 | 931 | summary: Get video channels of an account by its name |
6b738c7a C |
932 | tags: |
933 | - VideoChannel | |
6b738c7a | 934 | parameters: |
3e9e6f2f | 935 | - $ref: '#/components/parameters/name' |
6b738c7a C |
936 | responses: |
937 | '200': | |
938 | description: successful operation | |
3e9e6f2f RK |
939 | content: |
940 | application/json: | |
941 | schema: | |
942 | type: array | |
943 | items: | |
944 | $ref: '#/components/schemas/VideoChannel' | |
945 | '/videos/{id}/comment-threads': | |
1569a818 | 946 | get: |
2963c343 | 947 | summary: Get the comment threads of a video by its id |
1569a818 DG |
948 | tags: |
949 | - VideoComment | |
1569a818 | 950 | parameters: |
3e9e6f2f RK |
951 | - $ref: '#/components/parameters/id2' |
952 | - $ref: '#/components/parameters/start' | |
953 | - $ref: '#/components/parameters/count' | |
954 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
955 | responses: |
956 | '200': | |
957 | description: successful operation | |
3e9e6f2f RK |
958 | content: |
959 | application/json: | |
960 | schema: | |
961 | $ref: '#/components/schemas/CommentThreadResponse' | |
1569a818 | 962 | post: |
3e9e6f2f | 963 | summary: 'Creates a comment thread, on a video by its id' |
94ff4c23 | 964 | security: |
3e9e6f2f | 965 | - OAuth2: [] |
1569a818 DG |
966 | tags: |
967 | - VideoComment | |
1569a818 | 968 | parameters: |
3e9e6f2f | 969 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
970 | responses: |
971 | '200': | |
972 | description: successful operation | |
3e9e6f2f RK |
973 | content: |
974 | application/json: | |
975 | schema: | |
976 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
977 | '/videos/{id}/comment-threads/{threadId}': | |
1569a818 | 978 | get: |
3e9e6f2f | 979 | summary: 'Get the comment thread by its id, of a video by its id' |
1569a818 DG |
980 | tags: |
981 | - VideoComment | |
1569a818 | 982 | parameters: |
3e9e6f2f RK |
983 | - $ref: '#/components/parameters/id2' |
984 | - name: threadId | |
985 | in: path | |
986 | required: true | |
987 | description: The thread id (root comment id) | |
988 | schema: | |
989 | type: number | |
1569a818 DG |
990 | responses: |
991 | '200': | |
992 | description: successful operation | |
3e9e6f2f RK |
993 | content: |
994 | application/json: | |
995 | schema: | |
996 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
997 | '/videos/{id}/comments/{commentId}': | |
1569a818 | 998 | post: |
3e9e6f2f | 999 | summary: 'Creates a comment in a comment thread by its id, of a video by its id' |
94ff4c23 | 1000 | security: |
3e9e6f2f | 1001 | - OAuth2: [] |
1569a818 DG |
1002 | tags: |
1003 | - VideoComment | |
1569a818 | 1004 | parameters: |
3e9e6f2f RK |
1005 | - $ref: '#/components/parameters/id2' |
1006 | - $ref: '#/components/parameters/commentId' | |
1569a818 DG |
1007 | responses: |
1008 | '200': | |
1009 | description: successful operation | |
3e9e6f2f RK |
1010 | content: |
1011 | application/json: | |
1012 | schema: | |
1013 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
1569a818 | 1014 | delete: |
3e9e6f2f | 1015 | summary: 'Delete a comment in a comment therad by its id, of a video by its id' |
94ff4c23 | 1016 | security: |
3e9e6f2f | 1017 | - OAuth2: [] |
1569a818 DG |
1018 | tags: |
1019 | - VideoComment | |
1569a818 | 1020 | parameters: |
3e9e6f2f RK |
1021 | - $ref: '#/components/parameters/id2' |
1022 | - $ref: '#/components/parameters/commentId' | |
1569a818 DG |
1023 | responses: |
1024 | '204': | |
3e9e6f2f RK |
1025 | $ref: '#/paths/~1users~1me/put/responses/204' |
1026 | '/videos/{id}/rate': | |
1569a818 | 1027 | put: |
2963c343 | 1028 | summary: Vote for a video by its id |
94ff4c23 | 1029 | security: |
3e9e6f2f | 1030 | - OAuth2: [] |
1569a818 DG |
1031 | tags: |
1032 | - VideoRate | |
1569a818 | 1033 | parameters: |
3e9e6f2f | 1034 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
1035 | responses: |
1036 | '204': | |
3e9e6f2f | 1037 | $ref: '#/paths/~1users~1me/put/responses/204' |
fb72c193 DL |
1038 | /search/videos: |
1039 | get: | |
1040 | tags: | |
1041 | - Search | |
2963c343 | 1042 | summary: Get the videos corresponding to a given query |
fb72c193 | 1043 | parameters: |
3e9e6f2f RK |
1044 | - $ref: '#/components/parameters/start' |
1045 | - $ref: '#/components/parameters/count' | |
1046 | - $ref: '#/components/parameters/sort' | |
655b5490 | 1047 | - name: search |
fb72c193 DL |
1048 | in: query |
1049 | required: true | |
3e9e6f2f RK |
1050 | description: String to search |
1051 | schema: | |
1052 | type: string | |
fb72c193 DL |
1053 | responses: |
1054 | '200': | |
1055 | description: successful operation | |
3e9e6f2f RK |
1056 | content: |
1057 | application/json: | |
1058 | schema: | |
1569a818 DG |
1059 | type: array |
1060 | items: | |
3e9e6f2f RK |
1061 | $ref: '#/components/schemas/Video' |
1062 | servers: | |
1063 | - url: 'https://peertube.cpy.re/api/v1' | |
1064 | description: Live Server | |
1065 | components: | |
1066 | parameters: | |
1067 | start: | |
1068 | name: start | |
1069 | in: query | |
1070 | required: false | |
1071 | description: Offset | |
1072 | schema: | |
1569a818 | 1073 | type: number |
3e9e6f2f RK |
1074 | count: |
1075 | name: count | |
1076 | in: query | |
1077 | required: false | |
1078 | description: Number of items | |
1079 | schema: | |
1569a818 | 1080 | type: number |
3e9e6f2f RK |
1081 | sort: |
1082 | name: sort | |
1083 | in: query | |
1084 | required: false | |
1085 | description: Sort column (-createdAt for example) | |
1086 | schema: | |
1087 | type: string | |
1088 | name: | |
1089 | name: name | |
1090 | in: path | |
1091 | required: true | |
1092 | description: >- | |
1093 | The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for | |
1094 | example) | |
1095 | schema: | |
1096 | type: string | |
1097 | id: | |
1098 | name: id | |
1099 | in: path | |
1100 | required: true | |
1101 | description: The user id | |
1102 | schema: | |
1569a818 | 1103 | type: number |
3e9e6f2f RK |
1104 | id2: |
1105 | name: id | |
1106 | in: path | |
1107 | required: true | |
1108 | description: The video id or uuid | |
1109 | schema: | |
1110 | type: string | |
1111 | id3: | |
1112 | name: id | |
1113 | in: path | |
1114 | required: true | |
1115 | description: The video channel id or uuid | |
1116 | schema: | |
1117 | type: string | |
1118 | commentId: | |
1119 | name: threadId | |
1120 | in: path | |
1121 | required: true | |
1122 | description: The comment id | |
1123 | schema: | |
c360c494 | 1124 | type: number |
3e9e6f2f RK |
1125 | requestBodies: |
1126 | VideoChannelInput: | |
1127 | content: | |
1128 | application/json: | |
1129 | schema: | |
1130 | $ref: '#/components/schemas/VideoChannelInput' | |
1131 | securitySchemes: | |
1132 | OAuth2: | |
1133 | description: > | |
1134 | In the header: *Authorization: Bearer <token\>* | |
1135 | ||
1136 | ||
1137 | Authenticating via OAuth requires the following steps: | |
1138 | ||
1139 | ||
1140 | - Have an account with sufficient authorization levels | |
1141 | ||
1142 | - [Generate](https://docs.joinpeertube.org/lang/en/devdocs/rest.html) a | |
1143 | Bearer Token | |
1144 | ||
1145 | - Make Authenticated Requests | |
1146 | type: oauth2 | |
1147 | flows: | |
1148 | password: | |
1149 | tokenUrl: 'https://peertube.example.com/api/v1/users/token' | |
1150 | scopes: | |
1151 | admin: Admin scope | |
1152 | moderator: Moderator scope | |
1153 | user: User scope | |
1154 | schemas: | |
1155 | VideoConstantNumber: | |
1156 | properties: | |
1157 | id: | |
1158 | type: number | |
1159 | label: | |
1160 | type: string | |
1161 | VideoConstantString: | |
1162 | properties: | |
1163 | id: | |
1164 | type: string | |
1165 | label: | |
1166 | type: string | |
1167 | VideoPrivacy: | |
1168 | type: string | |
1169 | enum: | |
1170 | - Public | |
1171 | - Unlisted | |
1172 | - Private | |
1173 | Video: | |
1174 | properties: | |
1175 | id: | |
1176 | type: number | |
1177 | uuid: | |
1178 | type: string | |
1179 | createdAt: | |
1180 | type: string | |
1181 | publishedAt: | |
1182 | type: string | |
1183 | updatedAt: | |
1184 | type: string | |
1185 | category: | |
1186 | $ref: '#/components/schemas/VideoConstantNumber' | |
1187 | licence: | |
1188 | $ref: '#/components/schemas/VideoConstantNumber' | |
1189 | language: | |
1190 | $ref: '#/components/schemas/VideoConstantString' | |
1191 | privacy: | |
1192 | $ref: '#/components/schemas/VideoPrivacy' | |
1193 | description: | |
1194 | type: string | |
1195 | duration: | |
1196 | type: number | |
1197 | isLocal: | |
1198 | type: boolean | |
1199 | name: | |
1200 | type: string | |
1201 | thumbnailPath: | |
1202 | type: string | |
1203 | previewPath: | |
1204 | type: string | |
1205 | embedPath: | |
1206 | type: string | |
1207 | views: | |
1208 | type: number | |
1209 | likes: | |
1210 | type: number | |
1211 | dislikes: | |
1212 | type: number | |
1213 | nsfw: | |
1214 | type: boolean | |
1215 | account: | |
1216 | type: object | |
1217 | properties: | |
1218 | name: | |
1219 | type: string | |
1220 | displayName: | |
1221 | type: string | |
1222 | url: | |
1223 | type: string | |
1224 | host: | |
1225 | type: string | |
1226 | avatar: | |
1227 | $ref: '#/components/schemas/Avatar' | |
1228 | VideoAbuse: | |
1229 | properties: | |
1230 | id: | |
1231 | type: number | |
1232 | reason: | |
1233 | type: string | |
1234 | reporterAccount: | |
1235 | $ref: '#/components/schemas/Account' | |
1236 | video: | |
1237 | type: object | |
1238 | properties: | |
1239 | id: | |
1240 | type: number | |
1241 | name: | |
1242 | type: string | |
1243 | uuid: | |
1244 | type: string | |
1245 | url: | |
1246 | type: string | |
1247 | createdAt: | |
1248 | type: string | |
1249 | VideoBlacklist: | |
1250 | properties: | |
1251 | id: | |
1252 | type: number | |
1253 | videoId: | |
1254 | type: number | |
1255 | createdAt: | |
1256 | type: string | |
1257 | updatedAt: | |
1258 | type: string | |
1259 | name: | |
1260 | type: string | |
1261 | uuid: | |
1262 | type: string | |
1263 | description: | |
1264 | type: string | |
1265 | duration: | |
1266 | type: number | |
1267 | views: | |
1268 | type: number | |
1269 | likes: | |
1270 | type: number | |
1271 | dislikes: | |
1272 | type: number | |
1273 | nsfw: | |
1274 | type: boolean | |
1275 | VideoChannel: | |
1276 | properties: | |
1277 | displayName: | |
1278 | type: string | |
1279 | description: | |
1280 | type: string | |
1281 | isLocal: | |
1282 | type: boolean | |
1283 | ownerAccount: | |
1284 | type: object | |
1285 | properties: | |
1286 | id: | |
1287 | type: number | |
1288 | uuid: | |
1289 | type: string | |
1290 | VideoComment: | |
1291 | properties: | |
1292 | id: | |
1293 | type: number | |
1294 | url: | |
1295 | type: string | |
1296 | text: | |
1297 | type: string | |
1298 | threadId: | |
1299 | type: number | |
1300 | inReplyToCommentId: | |
1301 | type: number | |
1302 | videoId: | |
1303 | type: number | |
1304 | createdAt: | |
1305 | type: string | |
1306 | updatedAt: | |
1307 | type: string | |
1308 | totalReplies: | |
1309 | type: number | |
1310 | account: | |
1311 | $ref: '#/components/schemas/Account' | |
1312 | VideoCommentThreadTree: | |
1313 | properties: | |
1314 | comment: | |
1315 | $ref: '#/components/schemas/VideoComment' | |
1316 | children: | |
1317 | type: array | |
1318 | items: | |
1319 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
1320 | Avatar: | |
1321 | properties: | |
1322 | path: | |
1323 | type: string | |
1324 | createdAt: | |
1325 | type: string | |
1326 | updatedAt: | |
1327 | type: string | |
1328 | Actor: | |
1329 | properties: | |
1330 | id: | |
1331 | type: number | |
1332 | uuid: | |
1333 | type: string | |
1334 | url: | |
1335 | type: string | |
1336 | name: | |
1337 | type: string | |
1338 | host: | |
1339 | type: string | |
1340 | followingCount: | |
1341 | type: number | |
1342 | followersCount: | |
1343 | type: number | |
1344 | createdAt: | |
1345 | type: string | |
1346 | updatedAt: | |
1347 | type: string | |
1348 | avatar: | |
1349 | $ref: '#/components/schemas/Avatar' | |
1350 | Account: | |
1351 | allOf: | |
1352 | - $ref: '#/components/schemas/Actor' | |
1353 | - properties: | |
1354 | displayName: | |
1355 | type: string | |
1356 | User: | |
1357 | properties: | |
1358 | id: | |
1359 | type: number | |
1360 | username: | |
1361 | type: string | |
1362 | email: | |
1363 | type: string | |
1364 | displayNSFW: | |
1365 | type: boolean | |
1366 | autoPlayVideo: | |
1367 | type: boolean | |
1368 | role: | |
1369 | type: string | |
1370 | enum: | |
1371 | - User | |
1372 | - Moderator | |
1373 | - Administrator | |
1374 | videoQuota: | |
1375 | type: number | |
1376 | createdAt: | |
1377 | type: string | |
1378 | account: | |
1379 | $ref: '#/components/schemas/Account' | |
1380 | videoChannels: | |
1381 | type: array | |
1382 | items: | |
1383 | $ref: '#/components/schemas/VideoChannel' | |
1384 | ServerConfig: | |
1385 | properties: | |
1386 | signup: | |
1387 | type: object | |
1388 | properties: | |
1389 | allowed: | |
1390 | type: boolean | |
1391 | transcoding: | |
1392 | type: object | |
1393 | properties: | |
1394 | enabledResolutions: | |
1395 | type: array | |
1396 | items: | |
1397 | type: number | |
1398 | avatar: | |
1399 | type: object | |
1400 | properties: | |
1401 | file: | |
1402 | type: object | |
1403 | properties: | |
1404 | size: | |
1405 | type: object | |
1406 | properties: | |
1407 | max: | |
1408 | type: number | |
1409 | extensions: | |
1410 | type: array | |
1411 | items: | |
1412 | type: string | |
1413 | video: | |
1414 | type: object | |
1415 | properties: | |
1416 | file: | |
1417 | type: object | |
1418 | properties: | |
1419 | extensions: | |
1420 | type: array | |
1421 | items: | |
1422 | type: string | |
1423 | Follow: | |
1424 | properties: | |
1425 | id: | |
1426 | type: number | |
1427 | follower: | |
1428 | $ref: '#/components/schemas/Actor' | |
1429 | following: | |
1430 | $ref: '#/components/schemas/Actor' | |
1431 | score: | |
1432 | type: number | |
1433 | state: | |
1434 | type: string | |
1435 | enum: | |
1436 | - pending | |
1437 | - accepted | |
1438 | createdAt: | |
1439 | type: string | |
1440 | updatedAt: | |
1441 | type: string | |
1442 | Job: | |
1443 | properties: | |
1444 | id: | |
1445 | type: number | |
1446 | state: | |
1447 | type: string | |
1448 | enum: | |
1449 | - pending | |
1450 | - processing | |
1451 | - error | |
1452 | - success | |
1453 | category: | |
1454 | type: string | |
1455 | enum: | |
1456 | - transcoding | |
1457 | - activitypub-http | |
1458 | handlerName: | |
1459 | type: string | |
1460 | handlerInputData: | |
1461 | type: string | |
1462 | createdAt: | |
1463 | type: string | |
1464 | updatedAt: | |
1465 | type: string | |
1466 | AddUserResponse: | |
1467 | properties: | |
1468 | id: | |
1469 | type: number | |
1470 | uuid: | |
1471 | type: string | |
1472 | VideoUploadResponse: | |
1473 | properties: | |
1474 | video: | |
1475 | type: object | |
1476 | properties: | |
1477 | id: | |
1478 | type: number | |
1479 | uuid: | |
1480 | type: string | |
1481 | CommentThreadResponse: | |
1482 | properties: | |
1483 | total: | |
1484 | type: number | |
1485 | data: | |
1486 | type: array | |
1487 | items: | |
1488 | $ref: '#/components/schemas/VideoComment' | |
1489 | CommentThreadPostResponse: | |
1490 | properties: | |
1491 | comment: | |
1492 | $ref: '#/components/schemas/VideoComment' | |
1493 | AddUser: | |
1494 | properties: | |
1495 | username: | |
1496 | type: string | |
1497 | description: 'The user username ' | |
1498 | password: | |
1499 | type: string | |
1500 | description: 'The user password ' | |
1501 | email: | |
1502 | type: string | |
1503 | description: 'The user email ' | |
1504 | videoQuota: | |
1505 | type: string | |
1506 | description: 'The user videoQuota ' | |
1507 | role: | |
1508 | type: string | |
1509 | description: 'The user role ' | |
1510 | required: | |
1511 | - username | |
1512 | - password | |
1513 | ||
1514 | - videoQuota | |
1515 | - role | |
1516 | UpdateUser: | |
1517 | properties: | |
1518 | id: | |
1519 | type: string | |
1520 | description: 'The user id ' | |
1521 | email: | |
1522 | type: string | |
1523 | description: 'The updated email of the user ' | |
1524 | videoQuota: | |
1525 | type: string | |
1526 | description: 'The updated videoQuota of the user ' | |
1527 | role: | |
1528 | type: string | |
1529 | description: 'The updated role of the user ' | |
1530 | required: | |
1531 | - id | |
1532 | ||
1533 | - videoQuota | |
1534 | - role | |
1535 | UpdateMe: | |
1536 | properties: | |
1537 | password: | |
1538 | type: string | |
1539 | description: 'Your new password ' | |
1540 | email: | |
1541 | type: string | |
1542 | description: 'Your new email ' | |
1543 | displayNSFW: | |
1544 | type: string | |
1545 | description: 'Your new displayNSFW ' | |
1546 | autoPlayVideo: | |
1547 | type: string | |
1548 | description: 'Your new autoPlayVideo ' | |
1549 | required: | |
1550 | - password | |
1551 | ||
1552 | - displayNSFW | |
1553 | - autoPlayVideo | |
1554 | GetMeVideoRating: | |
1555 | properties: | |
1556 | id: | |
1557 | type: string | |
1558 | description: 'Id of the video ' | |
1559 | rating: | |
1560 | type: number | |
1561 | description: 'Rating of the video ' | |
1562 | required: | |
1563 | - id | |
1564 | - rating | |
1565 | RegisterUser: | |
1566 | properties: | |
1567 | username: | |
1568 | type: string | |
1569 | description: 'The username of the user ' | |
1570 | password: | |
1571 | type: string | |
1572 | description: 'The password of the user ' | |
1573 | email: | |
1574 | type: string | |
1575 | description: 'The email of the user ' | |
1576 | required: | |
1577 | - username | |
1578 | - password | |
1579 | ||
1580 | VideoChannelInput: | |
1581 | properties: | |
1582 | name: | |
1583 | type: string | |
1584 | description: | |
1585 | type: string | |
1569a818 | 1586 |