]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/api/openapi.yaml
add description with operation link to category/licence/language constants
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
CommitLineData
3e9e6f2f 1openapi: 3.0.0
1569a818 2info:
5e1c08eb 3 title: PeerTube
d0071752 4 version: 3.1.0
2963c343
RK
5 contact:
6 name: PeerTube Community
7 url: 'https://joinpeertube.org'
8 license:
9 name: AGPLv3.0
10 url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'
11 x-logo:
12 url: 'https://joinpeertube.org/img/brand.png'
5776f78e 13 altText: PeerTube Project Homepage
2963c343
RK
14 description: |
15 # Introduction
002df381 16
b029d58a 17 The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
06746a8b 18 HTTP/REST library for your programming language to use PeerTube. The spec API is fully compatible with
5776f78e 19 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
06746a8b
RK
20 which generates a client SDK in the language of your choice - we generate some client SDKs automatically:
21
22 - [Python](https://framagit.org/framasoft/peertube/clients/python)
23 - [Go](https://framagit.org/framasoft/peertube/clients/go)
24 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
3e9e6f2f 25
9817060f 26 See the [Quick Start guide](https://docs.joinpeertube.org/api-rest-getting-started) so you can play with the PeerTube API.
b029d58a 27
2963c343 28 # Authentication
002df381 29
2963c343 30 When you sign up for an account, you are given the possibility to generate
1fd12c7c 31 sessions, and authenticate using this session token. One session token can
2963c343 32 currently be used at a time.
5776f78e 33
84f6e32c
RK
34 ## Roles
35
36 Accounts are given permissions based on their role. There are three roles on
9817060f 37 PeerTube: Administrator, Moderator, and User. See the [roles guide](https://docs.joinpeertube.org/admin-managing-users?id=roles) for a detail of their permissions.
84f6e32c 38
5776f78e 39 # Errors
002df381 40
5776f78e
RK
41 The API uses standard HTTP status codes to indicate the success or failure
42 of the API call. The body of the response will be JSON in the following
43 format.
44
45 ```
46 {
47 "code": "unauthorized_request", // example inner error code
48 "error": "Token is invalid." // example exposed error message
49 }
50 ```
6441981b 51externalDocs:
512a5759 52 url: https://docs.joinpeertube.org/api-rest-reference.html
2963c343
RK
53tags:
54 - name: Accounts
3e9e6f2f 55 description: >
1e904cde 56 Accounts encompass remote accounts discovered across the federation,
84f6e32c
RK
57 and correspond to the main Actor, along with video channels a user can create, which
58 are also Actors.
59
60 When a comment is posted, it is done with your Account's Actor.
61 - name: Users
62 description: >
63 Using some features of PeerTube require authentication, for which User
3e9e6f2f 64 provide different levels of permission as well as associated user
84f6e32c
RK
65 information. Each user has a corresponding local Account for federation.
66 - name: My User
67 description: >
68 Operations related to your own User, when logged-in.
69 - name: My Subscriptions
70 description: >
71 Operations related to your subscriptions to video channels, their
72 new videos, and how to keep up to date with their latest publications!
3520d385
A
73 - name: My History
74 description: >
bb4ba6d9 75 Operations related to your watch history.
84f6e32c
RK
76 - name: My Notifications
77 description: >
78 Notifications following new videos, follows or reports. They allow you
79 to keep track of the interactions and overall important information that
80 concerns you. You MAY set per-notification type delivery preference, to
81 receive the info either by mail, by in-browser notification or both.
2963c343 82 - name: Config
3e9e6f2f
RK
83 description: >
84 Each server exposes public information regarding supported videos and
85 options.
2963c343 86 - name: Job
3e9e6f2f
RK
87 description: >
88 Jobs are long-running tasks enqueued and processed by the instance
5776f78e 89 itself. No additional worker registration is currently available.
b029d58a 90 - name: Instance Follows
3e9e6f2f
RK
91 description: >
92 Managing servers which the instance interacts with is crucial to the
5776f78e 93 concept of federation in PeerTube and external video indexation. The PeerTube
1fd12c7c 94 server then deals with inter-server ActivityPub operations and propagates
2963c343
RK
95 information across its social graph by posting activities to actors' inbox
96 endpoints.
84f6e32c 97 externalDocs:
9817060f 98 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows
04b703f6
RK
99 - name: Instance Redundancy
100 description: >
101 Redundancy is part of the inter-server solidarity that PeerTube fosters.
102 Manage the list of instances you wish to help by seeding their videos according
103 to the policy of video selection of your choice. Note that you have a similar functionality
104 to mirror individual videos, see `Video Mirroring`.
84f6e32c 105 externalDocs:
9817060f 106 url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy
7461d440
RK
107 - name: Plugins
108 description: >
84f6e32c
RK
109 Managing plugins installed from a local path or from NPM, or search for new ones.
110 externalDocs:
9817060f 111 url: https://docs.joinpeertube.org/api-plugins
310b5219 112 - name: Abuses
2963c343 113 description: |
310b5219 114 Abuses deal with reports of local or remote videos/comments/accounts alike.
2963c343
RK
115 - name: Video
116 description: |
117 Operations dealing with listing, uploading, fetching or modifying videos.
118 - name: Search
119 description: |
ad031145 120 The search helps to find _videos_ or _channels_ from within the instance and beyond.
2963c343
RK
121 Videos from other instances federated by the instance (that is, instances
122 followed by the instance) can be found via keywords and other criteria of
123 the advanced search.
ad031145
C
124
125 Administrators can also enable the use of a remote search system, indexing
126 videos and channels not could be not federated by the instance.
b029d58a 127 - name: Video Comments
3e9e6f2f
RK
128 description: >
129 Operations dealing with comments to a video. Comments are organized in
130 threads.
b029d58a 131 - name: Video Playlists
71810d0b
RK
132 description: >
133 Operations dealing with playlists of videos. Playlists are bound to users
134 and/or channels.
b029d58a 135 - name: Video Channels
3e9e6f2f 136 description: >
d73810be 137 Operations dealing with the creation, modification and listing of videos within a channel.
06746a8b 138 - name: Video Blocks
5776f78e 139 description: >
d73810be 140 Operations dealing with blocking videos (removing them from view and
5776f78e 141 preventing interactions).
b029d58a 142 - name: Video Rates
5776f78e 143 description: >
b029d58a 144 Like/dislike a video.
06746a8b
RK
145 - name: Feeds
146 description: >
147 Server syndication feeds
5776f78e
RK
148x-tagGroups:
149 - name: Accounts
150 tags:
151 - Accounts
b029d58a 152 - Users
1f82e3e8 153 - My User
b029d58a 154 - My Subscriptions
f4d59981 155 - My Notifications
3520d385 156 - My History
5776f78e
RK
157 - name: Videos
158 tags:
159 - Video
04b703f6 160 - Video Captions
b029d58a
C
161 - Video Channels
162 - Video Comments
b029d58a
C
163 - Video Rates
164 - Video Playlists
165 - Video Ownership Change
04b703f6 166 - Video Mirroring
4e239e35 167 - Live Videos
06746a8b 168 - Feeds
b029d58a
C
169 - name: Search
170 tags:
171 - Search
5776f78e
RK
172 - name: Moderation
173 tags:
310b5219 174 - Abuses
1ebddadd 175 - Video Blocks
06746a8b
RK
176 - Account Blocks
177 - Server Blocks
65f02679 178 - name: Instance Configuration
5776f78e
RK
179 tags:
180 - Config
b029d58a 181 - Instance Follows
04b703f6 182 - Instance Redundancy
7461d440 183 - Plugins
5776f78e
RK
184 - name: Jobs
185 tags:
186 - Job
1569a818 187paths:
ad9e39fb 188 '/accounts/{name}':
1569a818
DG
189 get:
190 tags:
191 - Accounts
b029d58a 192 summary: Get an account
1569a818 193 parameters:
3e9e6f2f 194 - $ref: '#/components/parameters/name'
1569a818
DG
195 responses:
196 '200':
197 description: successful operation
3e9e6f2f
RK
198 content:
199 application/json:
200 schema:
201 $ref: '#/components/schemas/Account'
06746a8b
RK
202 '404':
203 description: account not found
ad9e39fb 204 '/accounts/{name}/videos':
6b738c7a
C
205 get:
206 tags:
207 - Accounts
2963c343 208 - Video
b029d58a 209 summary: 'List videos of an account'
6b738c7a 210 parameters:
3e9e6f2f 211 - $ref: '#/components/parameters/name'
59c794a5
C
212 - $ref: '#/components/parameters/categoryOneOf'
213 - $ref: '#/components/parameters/tagsOneOf'
214 - $ref: '#/components/parameters/tagsAllOf'
215 - $ref: '#/components/parameters/licenceOneOf'
216 - $ref: '#/components/parameters/languageOneOf'
217 - $ref: '#/components/parameters/nsfw'
218 - $ref: '#/components/parameters/filter'
219 - $ref: '#/components/parameters/skipCount'
220 - $ref: '#/components/parameters/start'
221 - $ref: '#/components/parameters/count'
222 - $ref: '#/components/parameters/videosSort'
6b738c7a
C
223 responses:
224 '200':
225 description: successful operation
3e9e6f2f
RK
226 content:
227 application/json:
228 schema:
048b6946 229 $ref: '#/components/schemas/VideoListResponse'
2963c343
RK
230 x-code-samples:
231 - lang: JavaScript
232 source: |
8f9e8be1 233 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
2963c343
RK
234 .then(function(response) {
235 return response.json()
236 }).then(function(data) {
237 console.log(data)
238 })
8f9e8be1
RK
239 - lang: Shell
240 source: |
0579dee3
JK
241 ## DEPENDENCIES: jq
242 curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq
5776f78e
RK
243 - lang: Ruby
244 source: |
5776f78e 245 require 'net/http'
f6d51cfe 246 require 'json'
5776f78e 247
f6d51cfe 248 uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
5776f78e 249
f6d51cfe 250 http = Net::HTTP.new(uri.host, uri.port)
5776f78e 251 http.use_ssl = true
5776f78e 252
f6d51cfe
MDB
253 response = http.get(uri.request_uri)
254
255 puts JSON.parse(response.read_body)
5776f78e
RK
256 - lang: Python
257 source: |
f6d51cfe 258 import requests
5776f78e 259
f6d51cfe
MDB
260 r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
261 json = r.json()
5776f78e 262
f6d51cfe 263 print(json)
1569a818
DG
264 /accounts:
265 get:
266 tags:
267 - Accounts
b029d58a 268 summary: List accounts
2a8ae759
FS
269 parameters:
270 - $ref: '#/components/parameters/start'
271 - $ref: '#/components/parameters/count'
272 - $ref: '#/components/parameters/sort'
1569a818
DG
273 responses:
274 '200':
275 description: successful operation
3e9e6f2f 276 content:
8f9e8be1 277 'application/json':
3e9e6f2f
RK
278 schema:
279 type: array
280 items:
281 $ref: '#/components/schemas/Account'
1569a818
DG
282 /config:
283 get:
284 tags:
285 - Config
b029d58a 286 summary: Get instance public configuration
1569a818
DG
287 responses:
288 '200':
289 description: successful operation
3e9e6f2f
RK
290 content:
291 application/json:
292 schema:
293 $ref: '#/components/schemas/ServerConfig'
6441981b
RK
294 /config/about:
295 get:
b029d58a 296 summary: Get instance "About" information
6441981b
RK
297 tags:
298 - Config
299 responses:
300 '200':
301 description: successful operation
2a8ae759
FS
302 content:
303 application/json:
304 schema:
305 $ref: '#/components/schemas/ServerConfigAbout'
6441981b
RK
306 /config/custom:
307 get:
b029d58a 308 summary: Get instance runtime configuration
6441981b
RK
309 tags:
310 - Config
311 security:
312 - OAuth2:
64b5c247 313 - admin
6441981b
RK
314 responses:
315 '200':
316 description: successful operation
2a8ae759
FS
317 content:
318 application/json:
319 schema:
320 $ref: '#/components/schemas/ServerConfigCustom'
6441981b 321 put:
b029d58a 322 summary: Set instance runtime configuration
6441981b
RK
323 tags:
324 - Config
325 security:
326 - OAuth2:
64b5c247 327 - admin
6441981b
RK
328 responses:
329 '200':
330 description: successful operation
84f6e32c
RK
331 '400':
332 x-summary: field inconsistencies
333 description: >
334 Arises when:
335 - the emailer is disabled and the instance is open to registrations
336 - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled
6441981b 337 delete:
b029d58a 338 summary: Delete instance runtime configuration
6441981b
RK
339 tags:
340 - Config
341 security:
342 - OAuth2:
64b5c247 343 - admin
6441981b
RK
344 responses:
345 '200':
346 description: successful operation
d216b538 347 /jobs/{state}:
1569a818 348 get:
b029d58a 349 summary: List instance jobs
94ff4c23 350 security:
3e9e6f2f 351 - OAuth2:
64b5c247 352 - admin
1569a818
DG
353 tags:
354 - Job
44cb3b85
DG
355 parameters:
356 - name: state
357 in: path
358 required: true
040d6896 359 description: The state of the job ('' for for no filter)
3e9e6f2f
RK
360 schema:
361 type: string
65f02679 362 enum:
040d6896 363 - ''
65f02679
RK
364 - active
365 - completed
366 - failed
367 - waiting
368 - delayed
040d6896 369 - $ref: '#/components/parameters/jobType'
3e9e6f2f
RK
370 - $ref: '#/components/parameters/start'
371 - $ref: '#/components/parameters/count'
372 - $ref: '#/components/parameters/sort'
1569a818
DG
373 responses:
374 '200':
375 description: successful operation
3e9e6f2f
RK
376 content:
377 application/json:
378 schema:
84f6e32c
RK
379 type: object
380 properties:
381 total:
382 type: integer
383 example: 1
384 data:
385 type: array
386 maxItems: 100
387 items:
388 $ref: '#/components/schemas/Job'
1569a818
DG
389 '/server/following/{host}':
390 delete:
94ff4c23 391 security:
3e9e6f2f 392 - OAuth2:
06746a8b 393 - admin
1569a818 394 tags:
b029d58a
C
395 - Instance Follows
396 summary: Unfollow a server
1569a818
DG
397 parameters:
398 - name: host
399 in: path
400 required: true
1569a818 401 description: 'The host to unfollow '
3e9e6f2f
RK
402 schema:
403 type: string
84f6e32c 404 format: hostname
1569a818
DG
405 responses:
406 '201':
407 description: successful operation
408 /server/followers:
409 get:
410 tags:
b029d58a
C
411 - Instance Follows
412 summary: List instance followers
44cb3b85 413 parameters:
3e9e6f2f
RK
414 - $ref: '#/components/parameters/start'
415 - $ref: '#/components/parameters/count'
416 - $ref: '#/components/parameters/sort'
1569a818
DG
417 responses:
418 '200':
419 description: successful operation
3e9e6f2f
RK
420 content:
421 application/json:
422 schema:
423 type: array
424 items:
425 $ref: '#/components/schemas/Follow'
1569a818
DG
426 /server/following:
427 get:
428 tags:
b029d58a 429 - Instance Follows
f4d59981 430 summary: List instances followed by the server
44cb3b85 431 parameters:
f4d59981
RK
432 - name: state
433 in: query
434 schema:
435 type: string
436 enum:
437 - pending
438 - accepted
439 - name: actorType
440 in: query
441 schema:
442 type: string
443 enum:
444 - Person
445 - Application
446 - Group
447 - Service
448 - Organization
3e9e6f2f
RK
449 - $ref: '#/components/parameters/start'
450 - $ref: '#/components/parameters/count'
451 - $ref: '#/components/parameters/sort'
1569a818
DG
452 responses:
453 '200':
454 description: successful operation
3e9e6f2f
RK
455 content:
456 application/json:
457 schema:
458 type: array
459 items:
460 $ref: '#/components/schemas/Follow'
1569a818 461 post:
94ff4c23 462 security:
3e9e6f2f 463 - OAuth2:
64b5c247 464 - admin
1569a818 465 tags:
b029d58a 466 - Instance Follows
2963c343 467 summary: Follow a server
1569a818
DG
468 responses:
469 '204':
c1843150 470 description: successful operation
f4d59981
RK
471 '500':
472 description: cannot follow a non-HTTPS server
3e9e6f2f
RK
473 requestBody:
474 content:
475 application/json:
476 schema:
f4d59981
RK
477 type: object
478 properties:
479 hosts:
480 type: array
481 items:
482 type: string
84f6e32c 483 format: hostname
f4d59981 484 uniqueItems: true
1569a818
DG
485 /users:
486 post:
b029d58a 487 summary: Create a user
94ff4c23 488 security:
3e9e6f2f 489 - OAuth2:
64b5c247 490 - admin
1569a818 491 tags:
b029d58a 492 - Users
1569a818 493 responses:
1e904cde 494 '200':
2c318664 495 description: user created
3e9e6f2f
RK
496 content:
497 application/json:
498 schema:
499 $ref: '#/components/schemas/AddUserResponse'
2c318664
RK
500 links:
501 # GET /users/{id}
502 GetUserId:
503 operationId: getUserId
504 parameters:
505 id: '$response.body#/user/id'
506 # PUT /users/{id}
507 PutUserId:
508 operationId: putUserId
509 parameters:
510 id: '$response.body#/user/id'
511 # DELETE /users/{id}
512 DelUserId:
513 operationId: delUserId
514 parameters:
515 id: '$response.body#/user/id'
516 '403':
517 description: insufficient authority to create an admin or moderator
3e9e6f2f
RK
518 requestBody:
519 content:
520 application/json:
521 schema:
522 $ref: '#/components/schemas/AddUser'
523 description: User to create
524 required: true
1569a818 525 get:
b029d58a 526 summary: List users
94ff4c23 527 security:
8491293b
RK
528 - OAuth2:
529 - admin
1569a818 530 tags:
b029d58a 531 - Users
44cb3b85 532 parameters:
8491293b
RK
533 - $ref: '#/components/parameters/usersSearch'
534 - $ref: '#/components/parameters/usersBlocked'
3e9e6f2f
RK
535 - $ref: '#/components/parameters/start'
536 - $ref: '#/components/parameters/count'
fd5af7a2 537 - $ref: '#/components/parameters/usersSort'
1569a818
DG
538 responses:
539 '200':
540 description: successful operation
3e9e6f2f
RK
541 content:
542 application/json:
543 schema:
544 type: array
545 items:
546 $ref: '#/components/schemas/User'
1569a818 547 '/users/{id}':
2c318664
RK
548 parameters:
549 - $ref: '#/components/parameters/id'
1569a818 550 delete:
b029d58a 551 summary: Delete a user
94ff4c23 552 security:
3e9e6f2f 553 - OAuth2:
64b5c247 554 - admin
1569a818 555 tags:
b029d58a 556 - Users
2c318664 557 operationId: delUserId
1569a818
DG
558 responses:
559 '204':
c1843150 560 description: successful operation
1569a818 561 get:
b029d58a 562 summary: Get a user
94ff4c23 563 security:
3e9e6f2f 564 - OAuth2: []
1569a818 565 tags:
b029d58a 566 - Users
2c318664 567 operationId: getUserId
1569a818
DG
568 responses:
569 '200':
570 description: successful operation
3e9e6f2f
RK
571 content:
572 application/json:
573 schema:
574 $ref: '#/components/schemas/User'
1569a818 575 put:
b029d58a 576 summary: Update a user
94ff4c23 577 security:
3e9e6f2f 578 - OAuth2: []
1569a818 579 tags:
b029d58a 580 - Users
2c318664 581 operationId: putUserId
1569a818
DG
582 responses:
583 '204':
c1843150 584 description: successful operation
3e9e6f2f
RK
585 requestBody:
586 content:
587 application/json:
588 schema:
589 $ref: '#/components/schemas/UpdateUser'
590 required: true
1f82e3e8
C
591 /users/register:
592 post:
593 summary: Register a user
594 tags:
b029d58a 595 - Users
1f82e3e8
C
596 responses:
597 '204':
c1843150 598 description: successful operation
1f82e3e8
C
599 requestBody:
600 content:
601 application/json:
602 schema:
603 $ref: '#/components/schemas/RegisterUser'
604 required: true
1569a818
DG
605 /users/me:
606 get:
b029d58a 607 summary: Get my user information
94ff4c23 608 security:
e76d5784
RK
609 - OAuth2:
610 - user
1569a818 611 tags:
1f82e3e8 612 - My User
1569a818
DG
613 responses:
614 '200':
615 description: successful operation
3e9e6f2f
RK
616 content:
617 application/json:
618 schema:
619 type: array
620 items:
621 $ref: '#/components/schemas/User'
1569a818 622 put:
b029d58a 623 summary: Update my user information
94ff4c23 624 security:
e76d5784
RK
625 - OAuth2:
626 - user
1569a818 627 tags:
1f82e3e8 628 - My User
1569a818
DG
629 responses:
630 '204':
37db4176 631 description: successful operation
3e9e6f2f
RK
632 requestBody:
633 content:
634 application/json:
635 schema:
636 $ref: '#/components/schemas/UpdateMe'
637 required: true
1f82e3e8
C
638 /users/me/videos/imports:
639 get:
b029d58a 640 summary: Get video imports of my user
1f82e3e8
C
641 security:
642 - OAuth2:
64b5c247 643 - user
1f82e3e8 644 tags:
b029d58a 645 - Videos
1f82e3e8
C
646 - My User
647 parameters:
648 - $ref: '#/components/parameters/start'
649 - $ref: '#/components/parameters/count'
650 - $ref: '#/components/parameters/sort'
651 responses:
652 '200':
653 description: successful operation
654 content:
655 application/json:
656 schema:
657 $ref: '#/components/schemas/VideoImport'
1569a818
DG
658 /users/me/video-quota-used:
659 get:
b029d58a 660 summary: Get my user used quota
94ff4c23 661 security:
e76d5784
RK
662 - OAuth2:
663 - user
1569a818 664 tags:
1f82e3e8 665 - My User
1569a818
DG
666 responses:
667 '200':
668 description: successful operation
3e9e6f2f
RK
669 content:
670 application/json:
671 schema:
672 type: number
1569a818
DG
673 '/users/me/videos/{videoId}/rating':
674 get:
50e16ccf 675 summary: Get rate of my user for a video
94ff4c23 676 security:
3e9e6f2f 677 - OAuth2: []
1569a818 678 tags:
1f82e3e8 679 - My User
b029d58a 680 - Video Rates
1569a818
DG
681 parameters:
682 - name: videoId
683 in: path
684 required: true
1569a818 685 description: 'The video id '
3e9e6f2f
RK
686 schema:
687 type: string
1569a818
DG
688 responses:
689 '200':
690 description: successful operation
3e9e6f2f
RK
691 content:
692 application/json:
693 schema:
694 $ref: '#/components/schemas/GetMeVideoRating'
1569a818
DG
695 /users/me/videos:
696 get:
b029d58a 697 summary: Get videos of my user
94ff4c23 698 security:
e76d5784
RK
699 - OAuth2:
700 - user
1569a818 701 tags:
1f82e3e8 702 - My User
b029d58a 703 - Videos
44cb3b85 704 parameters:
3e9e6f2f
RK
705 - $ref: '#/components/parameters/start'
706 - $ref: '#/components/parameters/count'
707 - $ref: '#/components/parameters/sort'
1569a818
DG
708 responses:
709 '200':
710 description: successful operation
3e9e6f2f
RK
711 content:
712 application/json:
713 schema:
048b6946 714 $ref: '#/components/schemas/VideoListResponse'
e76d5784
RK
715 /users/me/subscriptions:
716 get:
b029d58a 717 summary: Get my user subscriptions
e76d5784
RK
718 security:
719 - OAuth2:
64b5c247 720 - user
e76d5784 721 tags:
b029d58a 722 - My Subscriptions
e76d5784
RK
723 parameters:
724 - $ref: '#/components/parameters/start'
725 - $ref: '#/components/parameters/count'
726 - $ref: '#/components/parameters/sort'
727 responses:
728 '200':
729 description: successful operation
730 post:
2c318664
RK
731 tags:
732 - My Subscriptions
b029d58a 733 summary: Add subscription to my user
e76d5784
RK
734 security:
735 - OAuth2:
64b5c247 736 - user
2c318664
RK
737 requestBody:
738 content:
739 application/json:
740 schema:
741 type: object
742 properties:
743 uri:
744 type: string
745 format: uri
746 description: uri of the video channels to subscribe to
747 required:
748 - uri
749 examples:
750 default:
751 value:
752 uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr
e76d5784
RK
753 responses:
754 '200':
755 description: successful operation
756 /users/me/subscriptions/exist:
757 get:
b029d58a 758 summary: Get if subscriptions exist for my user
e76d5784
RK
759 security:
760 - OAuth2:
64b5c247 761 - user
e76d5784 762 tags:
b029d58a 763 - My Subscriptions
e76d5784
RK
764 parameters:
765 - $ref: '#/components/parameters/subscriptionsUris'
766 responses:
767 '200':
768 description: successful operation
769 content:
770 application/json:
771 schema:
772 type: object
773 /users/me/subscriptions/videos:
774 get:
b029d58a 775 summary: List videos of subscriptions of my user
e76d5784
RK
776 security:
777 - OAuth2:
778 - user
779 tags:
b029d58a
C
780 - My Subscriptions
781 - Videos
e76d5784 782 parameters:
59c794a5
C
783 - $ref: '#/components/parameters/categoryOneOf'
784 - $ref: '#/components/parameters/tagsOneOf'
785 - $ref: '#/components/parameters/tagsAllOf'
786 - $ref: '#/components/parameters/licenceOneOf'
787 - $ref: '#/components/parameters/languageOneOf'
788 - $ref: '#/components/parameters/nsfw'
789 - $ref: '#/components/parameters/filter'
790 - $ref: '#/components/parameters/skipCount'
e76d5784
RK
791 - $ref: '#/components/parameters/start'
792 - $ref: '#/components/parameters/count'
59c794a5 793 - $ref: '#/components/parameters/videosSort'
e76d5784
RK
794 responses:
795 '200':
796 description: successful operation
797 content:
798 application/json:
799 schema:
048b6946 800 $ref: '#/components/schemas/VideoListResponse'
cb9d028a 801 '/users/me/subscriptions/{subscriptionHandle}':
e76d5784 802 get:
b029d58a 803 summary: Get subscription of my user
e76d5784
RK
804 security:
805 - OAuth2:
64b5c247 806 - user
e76d5784 807 tags:
b029d58a 808 - My Subscriptions
cb9d028a
C
809 parameters:
810 - $ref: '#/components/parameters/subscriptionHandle'
e76d5784
RK
811 responses:
812 '200':
813 description: successful operation
814 content:
815 application/json:
816 schema:
817 $ref: '#/components/schemas/VideoChannel'
818 delete:
b029d58a 819 summary: Delete subscription of my user
e76d5784
RK
820 security:
821 - OAuth2:
64b5c247 822 - user
e76d5784 823 tags:
b029d58a 824 - My Subscriptions
cb9d028a
C
825 parameters:
826 - $ref: '#/components/parameters/subscriptionHandle'
e76d5784
RK
827 responses:
828 '200':
829 description: successful operation
f4d59981
RK
830 /users/me/notifications:
831 get:
832 summary: List my notifications
833 security:
834 - OAuth2: []
835 tags:
836 - My Notifications
837 parameters:
838 - name: unread
839 in: query
840 description: only list unread notifications
841 schema:
842 type: boolean
843 - $ref: '#/components/parameters/start'
844 - $ref: '#/components/parameters/count'
845 - $ref: '#/components/parameters/sort'
846 responses:
847 '200':
848 description: successful operation
849 content:
850 application/json:
851 schema:
852 $ref: '#/components/schemas/NotificationListResponse'
853 /users/me/notifications/read:
854 post:
855 summary: Mark notifications as read by their id
856 security:
857 - OAuth2: []
858 tags:
859 - My Notifications
860 requestBody:
861 content:
2c318664 862 application/json:
f4d59981
RK
863 schema:
864 type: object
865 properties:
866 ids:
867 type: array
868 description: ids of the notifications to mark as read
869 items:
870 type: integer
871 required:
872 - ids
873 responses:
874 '204':
875 description: successful operation
876 /users/me/notifications/read-all:
877 post:
878 summary: Mark all my notification as read
879 security:
880 - OAuth2: []
881 tags:
882 - My Notifications
883 responses:
884 '204':
885 description: successful operation
886 /users/me/notification-settings:
887 put:
888 summary: Update my notification settings
889 security:
890 - OAuth2: []
891 tags:
892 - My Notifications
893 requestBody:
894 content:
2c318664 895 application/json:
f4d59981
RK
896 schema:
897 type: object
898 properties:
899 newVideoFromSubscription:
900 $ref: '#/components/schemas/NotificationSettingValue'
901 newCommentOnMyVideo:
902 $ref: '#/components/schemas/NotificationSettingValue'
4f32032f 903 abuseAsModerator:
f4d59981
RK
904 $ref: '#/components/schemas/NotificationSettingValue'
905 videoAutoBlacklistAsModerator:
906 $ref: '#/components/schemas/NotificationSettingValue'
907 blacklistOnMyVideo:
908 $ref: '#/components/schemas/NotificationSettingValue'
909 myVideoPublished:
910 $ref: '#/components/schemas/NotificationSettingValue'
911 myVideoImportFinished:
912 $ref: '#/components/schemas/NotificationSettingValue'
913 newFollow:
914 $ref: '#/components/schemas/NotificationSettingValue'
915 newUserRegistration:
916 $ref: '#/components/schemas/NotificationSettingValue'
917 commentMention:
918 $ref: '#/components/schemas/NotificationSettingValue'
919 newInstanceFollower:
920 $ref: '#/components/schemas/NotificationSettingValue'
921 autoInstanceFollowing:
922 $ref: '#/components/schemas/NotificationSettingValue'
923 responses:
924 '204':
925 description: successful operation
3520d385
A
926 /users/me/history/videos:
927 get:
928 summary: List watched videos history
929 security:
930 - OAuth2: []
931 tags:
932 - My History
933 parameters:
934 - $ref: '#/components/parameters/start'
935 - $ref: '#/components/parameters/count'
d8b34ee5 936 - $ref: '#/components/parameters/search'
3520d385
A
937 responses:
938 '200':
939 description: successful operation
940 content:
941 application/json:
942 schema:
943 $ref: '#/components/schemas/VideoListResponse'
944 /users/me/history/videos/remove:
945 post:
946 summary: Clear video history
947 security:
948 - OAuth2: []
949 tags:
950 - My History
951 requestBody:
952 content:
953 multipart/form-data:
954 schema:
955 type: object
956 properties:
957 beforeDate:
958 description: history before this date will be deleted
959 type: string
960 format: date-time
961 responses:
962 '204':
963 description: successful operation
1569a818
DG
964 /users/me/avatar/pick:
965 post:
b029d58a 966 summary: Update my user avatar
94ff4c23 967 security:
3e9e6f2f 968 - OAuth2: []
1569a818 969 tags:
1f82e3e8 970 - My User
1569a818
DG
971 responses:
972 '200':
973 description: successful operation
3e9e6f2f
RK
974 content:
975 application/json:
976 schema:
75cba40d
C
977 type: object
978 properties:
979 avatar:
980 $ref: '#/components/schemas/ActorImage'
d4132d3f
RK
981 '413':
982 description: image file too large
983 headers:
984 X-File-Maximum-Size:
985 schema:
986 type: string
987 format: Nginx size
988 description: Maximum file size for the avatar
3e9e6f2f
RK
989 requestBody:
990 content:
991 multipart/form-data:
992 schema:
993 type: object
994 properties:
995 avatarfile:
996 description: The file to upload.
997 type: string
998 format: binary
999 encoding:
0ad45af7 1000 avatarfile:
3e9e6f2f 1001 contentType: image/png, image/jpeg
75cba40d
C
1002 /users/me/avatar:
1003 delete:
1004 summary: Delete my avatar
1005 security:
1006 - OAuth2: []
1007 tags:
1008 - My User
1009 responses:
1010 '204':
1011 description: successful operation
1012
b029d58a
C
1013 /videos/ownership:
1014 get:
1015 summary: List video ownership changes
1016 tags:
1017 - Video Ownership Change
1018 security:
1019 - OAuth2: []
1020 responses:
1021 '200':
1022 description: successful operation
1023 '/videos/ownership/{id}/accept':
1024 post:
1025 summary: Accept ownership change request
1026 tags:
1027 - Video Ownership Change
1028 security:
1029 - OAuth2: []
1030 parameters:
1031 - $ref: '#/components/parameters/idOrUUID'
1032 responses:
1033 '204':
c1843150 1034 description: successful operation
06746a8b
RK
1035 '403':
1036 description: cannot terminate an ownership change of another user
1037 '404':
1038 description: video owneship change not found
b029d58a
C
1039 '/videos/ownership/{id}/refuse':
1040 post:
1041 summary: Refuse ownership change request
1042 tags:
1043 - Video Ownership Change
1044 security:
1045 - OAuth2: []
1046 parameters:
1047 - $ref: '#/components/parameters/idOrUUID'
1048 responses:
1049 '204':
c1843150 1050 description: successful operation
06746a8b
RK
1051 '403':
1052 description: cannot terminate an ownership change of another user
1053 '404':
1054 description: video owneship change not found
b029d58a
C
1055 '/videos/{id}/give-ownership':
1056 post:
1057 summary: Request ownership change
1058 tags:
1059 - Video Ownership Change
1060 security:
1061 - OAuth2: []
1062 parameters:
1063 - $ref: '#/components/parameters/idOrUUID'
1064 requestBody:
1065 required: true
1066 content:
1067 application/x-www-form-urlencoded:
1068 schema:
1069 type: object
1070 properties:
1071 username:
1072 type: string
1073 required:
1074 - username
1075 responses:
1076 '204':
c1843150 1077 description: successful operation
b029d58a 1078 '400':
06746a8b
RK
1079 description: changing video ownership to a remote account is not supported yet
1080 '404':
1081 description: video not found
c360c494 1082 /videos:
1569a818 1083 get:
b029d58a 1084 summary: List videos
1569a818
DG
1085 tags:
1086 - Video
44cb3b85 1087 parameters:
fd5af7a2
RK
1088 - $ref: '#/components/parameters/categoryOneOf'
1089 - $ref: '#/components/parameters/tagsOneOf'
1090 - $ref: '#/components/parameters/tagsAllOf'
1091 - $ref: '#/components/parameters/licenceOneOf'
1092 - $ref: '#/components/parameters/languageOneOf'
1093 - $ref: '#/components/parameters/nsfw'
1094 - $ref: '#/components/parameters/filter'
59c794a5 1095 - $ref: '#/components/parameters/skipCount'
3e9e6f2f
RK
1096 - $ref: '#/components/parameters/start'
1097 - $ref: '#/components/parameters/count'
fd5af7a2 1098 - $ref: '#/components/parameters/videosSort'
1569a818
DG
1099 responses:
1100 '200':
1101 description: successful operation
3e9e6f2f
RK
1102 content:
1103 application/json:
1104 schema:
048b6946 1105 $ref: '#/components/schemas/VideoListResponse'
c360c494 1106 /videos/categories:
1569a818 1107 get:
b029d58a 1108 summary: List available video categories
1569a818
DG
1109 tags:
1110 - Video
1569a818
DG
1111 responses:
1112 '200':
1113 description: successful operation
3e9e6f2f
RK
1114 content:
1115 application/json:
1116 schema:
1117 type: array
1118 items:
1119 type: string
84f6e32c
RK
1120 examples:
1121 nightly:
1122 externalValue: https://peertube2.cpy.re/api/v1/videos/categories
c360c494 1123 /videos/licences:
1569a818 1124 get:
b029d58a 1125 summary: List available video licences
1569a818
DG
1126 tags:
1127 - Video
1569a818
DG
1128 responses:
1129 '200':
1130 description: successful operation
3e9e6f2f
RK
1131 content:
1132 application/json:
1133 schema:
1134 type: array
1135 items:
1136 type: string
84f6e32c
RK
1137 examples:
1138 nightly:
1139 externalValue: https://peertube2.cpy.re/api/v1/videos/licences
c360c494 1140 /videos/languages:
1569a818 1141 get:
b029d58a 1142 summary: List available video languages
1569a818
DG
1143 tags:
1144 - Video
1569a818
DG
1145 responses:
1146 '200':
1147 description: successful operation
3e9e6f2f
RK
1148 content:
1149 application/json:
1150 schema:
1151 type: array
1152 items:
1153 type: string
84f6e32c
RK
1154 examples:
1155 nightly:
1156 externalValue: https://peertube2.cpy.re/api/v1/videos/languages
c360c494 1157 /videos/privacies:
1569a818 1158 get:
b029d58a 1159 summary: List available video privacies
1569a818
DG
1160 tags:
1161 - Video
1569a818
DG
1162 responses:
1163 '200':
1164 description: successful operation
3e9e6f2f
RK
1165 content:
1166 application/json:
1167 schema:
1168 type: array
1169 items:
1170 type: string
84f6e32c
RK
1171 examples:
1172 nightly:
1173 externalValue: https://peertube2.cpy.re/api/v1/videos/privacies
3e9e6f2f 1174 '/videos/{id}':
1569a818 1175 put:
b029d58a 1176 summary: Update a video
94ff4c23 1177 security:
3e9e6f2f 1178 - OAuth2: []
1569a818
DG
1179 tags:
1180 - Video
1569a818 1181 parameters:
cb9d028a 1182 - $ref: '#/components/parameters/idOrUUID'
1569a818 1183 responses:
37db4176 1184 '204':
1569a818 1185 description: successful operation
3e9e6f2f
RK
1186 requestBody:
1187 content:
1188 multipart/form-data:
1189 schema:
1190 type: object
1191 properties:
1192 thumbnailfile:
1193 description: Video thumbnail file
1194 type: string
0ad45af7 1195 format: binary
3e9e6f2f
RK
1196 previewfile:
1197 description: Video preview file
1198 type: string
0ad45af7 1199 format: binary
3e9e6f2f
RK
1200 category:
1201 description: Video category
84f6e32c
RK
1202 type: integer
1203 example: 4
3e9e6f2f
RK
1204 licence:
1205 description: Video licence
84f6e32c
RK
1206 type: integer
1207 example: 2
3e9e6f2f
RK
1208 language:
1209 description: Video language
1210 type: string
c1843150
C
1211 privacy:
1212 $ref: '#/components/schemas/VideoPrivacySet'
3e9e6f2f
RK
1213 description:
1214 description: Video description
1215 type: string
1216 waitTranscoding:
1217 description: Whether or not we wait transcoding before publish the video
1218 type: string
1219 support:
00494d6e
RK
1220 description: A text tell the audience how to support the video creator
1221 example: Please support my work on <insert crowdfunding plateform>! <3
3e9e6f2f
RK
1222 type: string
1223 nsfw:
1224 description: Whether or not this video contains sensitive content
84f6e32c 1225 type: boolean
3e9e6f2f
RK
1226 name:
1227 description: Video name
1228 type: string
bdac0584
RK
1229 minLength: 3
1230 maxLength: 120
3e9e6f2f 1231 tags:
12fed49e 1232 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1fd12c7c 1233 type: array
07d02f6d
FS
1234 minItems: 1
1235 maxItems: 5
1fd12c7c
C
1236 items:
1237 type: string
07d02f6d
FS
1238 minLength: 2
1239 maxLength: 30
3e9e6f2f
RK
1240 commentsEnabled:
1241 description: Enable or disable comments for this video
84f6e32c 1242 type: boolean
37db4176
FS
1243 originallyPublishedAt:
1244 description: Date when the content was originally published
1245 type: string
1246 format: date-time
5dce26d2
C
1247 scheduleUpdate:
1248 $ref: '#/components/schemas/VideoScheduledUpdate'
0ad45af7
FS
1249 encoding:
1250 thumbnailfile:
1251 contentType: image/jpeg
1252 previewfile:
1253 contentType: image/jpeg
1569a818 1254 get:
b029d58a 1255 summary: Get a video
1569a818
DG
1256 tags:
1257 - Video
1569a818 1258 parameters:
cb9d028a 1259 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1260 responses:
1261 '200':
1262 description: successful operation
3e9e6f2f
RK
1263 content:
1264 application/json:
1265 schema:
5dce26d2 1266 $ref: '#/components/schemas/VideoDetails'
1569a818 1267 delete:
b029d58a 1268 summary: Delete a video
94ff4c23 1269 security:
3e9e6f2f 1270 - OAuth2: []
1569a818
DG
1271 tags:
1272 - Video
1569a818 1273 parameters:
cb9d028a 1274 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1275 responses:
1276 '204':
c1843150 1277 description: successful operation
3e9e6f2f 1278 '/videos/{id}/description':
1569a818 1279 get:
b029d58a 1280 summary: Get complete video description
1569a818
DG
1281 tags:
1282 - Video
1569a818 1283 parameters:
cb9d028a 1284 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1285 responses:
1286 '200':
1287 description: successful operation
3e9e6f2f
RK
1288 content:
1289 application/json:
1290 schema:
1291 type: string
1292 '/videos/{id}/views':
1569a818 1293 post:
b029d58a 1294 summary: Add a view to a video
1569a818
DG
1295 tags:
1296 - Video
1569a818 1297 parameters:
cb9d028a 1298 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1299 responses:
1300 '204':
c1843150 1301 description: successful operation
6441981b
RK
1302 '/videos/{id}/watching':
1303 put:
b029d58a 1304 summary: Set watching progress of a video
6441981b
RK
1305 tags:
1306 - Video
1307 security:
1308 - OAuth2: []
1309 parameters:
cb9d028a 1310 - $ref: '#/components/parameters/idOrUUID'
6441981b
RK
1311 requestBody:
1312 content:
1313 application/json:
1314 schema:
1315 $ref: '#/components/schemas/UserWatchingVideo'
1316 required: true
1317 responses:
1318 '204':
c1843150 1319 description: successful operation
c360c494 1320 /videos/upload:
1569a818 1321 post:
b029d58a 1322 summary: Upload a video
94ff4c23 1323 security:
3e9e6f2f 1324 - OAuth2: []
1569a818
DG
1325 tags:
1326 - Video
1569a818
DG
1327 responses:
1328 '200':
1329 description: successful operation
3e9e6f2f
RK
1330 content:
1331 application/json:
1332 schema:
1333 $ref: '#/components/schemas/VideoUploadResponse'
f2eb23cd
RK
1334 '400':
1335 description: invalid file field, schedule date or parameter
06bcfbd9 1336 '403':
f2eb23cd 1337 description: video didn't pass upload filter
06bcfbd9 1338 '408':
84f6e32c 1339 description: upload has timed out
d4132d3f 1340 '413':
f2eb23cd 1341 description: video file too large, due to quota or max body size limit set by the reverse-proxy
d4132d3f
RK
1342 headers:
1343 X-File-Maximum-Size:
1344 schema:
1345 type: string
1346 format: Nginx size
1347 description: Maximum file size for the video
f2eb23cd
RK
1348 '415':
1349 description: video type unsupported
06bcfbd9 1350 '422':
f2eb23cd 1351 description: video unreadable
3e9e6f2f
RK
1352 requestBody:
1353 content:
1354 multipart/form-data:
1355 schema:
1356 type: object
1357 properties:
1358 videofile:
1359 description: Video file
1360 type: string
1361 format: binary
1362 channelId:
1363 description: Channel id that will contain this video
06746a8b 1364 type: integer
3e9e6f2f
RK
1365 thumbnailfile:
1366 description: Video thumbnail file
1367 type: string
0ad45af7 1368 format: binary
3e9e6f2f
RK
1369 previewfile:
1370 description: Video preview file
1371 type: string
0ad45af7 1372 format: binary
8f9e8be1 1373 privacy:
ee89e8fd 1374 $ref: '#/components/schemas/VideoPrivacySet'
3e9e6f2f
RK
1375 category:
1376 description: Video category
84f6e32c
RK
1377 type: integer
1378 example: 4
3e9e6f2f
RK
1379 licence:
1380 description: Video licence
84f6e32c
RK
1381 type: integer
1382 example: 2
8726cd49
C
1383 language:
1384 description: Video language
1385 type: string
3e9e6f2f
RK
1386 description:
1387 description: Video description
1388 type: string
1389 waitTranscoding:
1390 description: Whether or not we wait transcoding before publish the video
cd372e84 1391 type: boolean
3e9e6f2f 1392 support:
00494d6e
RK
1393 description: A text tell the audience how to support the video creator
1394 example: Please support my work on <insert crowdfunding plateform>! <3
3e9e6f2f
RK
1395 type: string
1396 nsfw:
1397 description: Whether or not this video contains sensitive content
84f6e32c 1398 type: boolean
3e9e6f2f
RK
1399 name:
1400 description: Video name
1401 type: string
bdac0584
RK
1402 minLength: 3
1403 maxLength: 120
3e9e6f2f 1404 tags:
07d02f6d 1405 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1fd12c7c 1406 type: array
07d02f6d
FS
1407 minItems: 1
1408 maxItems: 5
06746a8b 1409 uniqueItems: true
1fd12c7c
C
1410 items:
1411 type: string
07d02f6d
FS
1412 minLength: 2
1413 maxLength: 30
3e9e6f2f
RK
1414 commentsEnabled:
1415 description: Enable or disable comments for this video
84f6e32c 1416 type: boolean
cd372e84
A
1417 downloadEnabled:
1418 description: Enable or disable downloading for this video
1419 type: boolean
f9f89092
FS
1420 originallyPublishedAt:
1421 description: Date when the content was originally published
1422 type: string
1423 format: date-time
5dce26d2
C
1424 scheduleUpdate:
1425 $ref: '#/components/schemas/VideoScheduledUpdate'
3e9e6f2f
RK
1426 required:
1427 - videofile
1428 - channelId
8f9e8be1 1429 - name
0ad45af7
FS
1430 encoding:
1431 videofile:
1432 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1433 thumbnailfile:
1434 contentType: image/jpeg
1435 previewfile:
1436 contentType: image/jpeg
8f9e8be1
RK
1437 x-code-samples:
1438 - lang: Shell
1439 source: |
0579dee3 1440 ## DEPENDENCIES: jq
8f9e8be1
RK
1441 USERNAME="<your_username>"
1442 PASSWORD="<your_password>"
1443 FILE_PATH="<your_file_path>"
1444 CHANNEL_ID="<your_channel_id>"
8f9e8be1
RK
1445 NAME="<video_name>"
1446
1447 API_PATH="https://peertube2.cpy.re/api/v1"
1448 ## AUTH
0579dee3
JK
1449 client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1450 client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1451 token=$(curl -s "$API_PATH/users/token" \
1452 --data client_id="$client_id" \
1453 --data client_secret="$client_secret" \
1454 --data grant_type=password \
1455 --data response_type=code \
1456 --data username="$USERNAME" \
1457 --data password="$PASSWORD" \
8f9e8be1
RK
1458 | jq -r ".access_token")
1459 ## VIDEO UPLOAD
0579dee3
JK
1460 curl -s "$API_PATH/videos/upload" \
1461 -H "Authorization: Bearer $token" \
1462 --max-time 600 \
1463 --form videofile=@"$FILE_PATH" \
1464 --form channelId=$CHANNEL_ID \
1465 --form name="$NAME"
28c8e63e
C
1466 /videos/imports:
1467 post:
b029d58a
C
1468 summary: Import a video
1469 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
28c8e63e
C
1470 security:
1471 - OAuth2: []
1472 tags:
1473 - Video
28c8e63e
C
1474 requestBody:
1475 content:
1476 multipart/form-data:
1477 schema:
1478 type: object
1479 properties:
1480 torrentfile:
1481 description: Torrent File
1482 type: string
1483 format: binary
1484 targetUrl:
1485 description: HTTP target URL
1486 type: string
1487 magnetUri:
1488 description: Magnet URI
1489 type: string
1490 channelId:
1491 description: Channel id that will contain this video
06746a8b 1492 type: integer
28c8e63e
C
1493 thumbnailfile:
1494 description: Video thumbnail file
1495 type: string
0ad45af7 1496 format: binary
28c8e63e
C
1497 previewfile:
1498 description: Video preview file
1499 type: string
0ad45af7 1500 format: binary
28c8e63e 1501 privacy:
ee89e8fd 1502 $ref: '#/components/schemas/VideoPrivacySet'
28c8e63e
C
1503 category:
1504 description: Video category
8726cd49
C
1505 type: integer
1506 example: 4
28c8e63e
C
1507 licence:
1508 description: Video licence
8726cd49
C
1509 type: integer
1510 example: 2
28c8e63e
C
1511 language:
1512 description: Video language
1513 type: string
1514 description:
1515 description: Video description
1516 type: string
1517 waitTranscoding:
1518 description: Whether or not we wait transcoding before publish the video
cd372e84 1519 type: boolean
28c8e63e 1520 support:
00494d6e
RK
1521 description: A text tell the audience how to support the video creator
1522 example: Please support my work on <insert crowdfunding plateform>! <3
28c8e63e
C
1523 type: string
1524 nsfw:
1525 description: Whether or not this video contains sensitive content
cd372e84 1526 type: boolean
28c8e63e
C
1527 name:
1528 description: Video name
1529 type: string
bdac0584
RK
1530 minLength: 3
1531 maxLength: 120
28c8e63e 1532 tags:
07d02f6d 1533 description: Video tags (maximum 5 tags each between 2 and 30 characters)
28c8e63e 1534 type: array
07d02f6d
FS
1535 minItems: 1
1536 maxItems: 5
28c8e63e
C
1537 items:
1538 type: string
07d02f6d
FS
1539 minLength: 2
1540 maxLength: 30
28c8e63e
C
1541 commentsEnabled:
1542 description: Enable or disable comments for this video
cd372e84
A
1543 type: boolean
1544 downloadEnabled:
1545 description: Enable or disable downloading for this video
1546 type: boolean
5dce26d2
C
1547 scheduleUpdate:
1548 $ref: '#/components/schemas/VideoScheduledUpdate'
28c8e63e
C
1549 required:
1550 - channelId
1551 - name
0ad45af7
FS
1552 encoding:
1553 torrentfile:
1554 contentType: application/x-bittorrent
1555 thumbnailfile:
1556 contentType: image/jpeg
1557 previewfile:
1558 contentType: image/jpeg
06746a8b
RK
1559 responses:
1560 '200':
1561 description: successful operation
1562 content:
1563 application/json:
1564 schema:
1565 $ref: '#/components/schemas/VideoUploadResponse'
06746a8b
RK
1566 '400':
1567 description: '`magnetUri` or `targetUrl` or a torrent file missing'
f2eb23cd
RK
1568 '403':
1569 description: video didn't pass pre-import filter
1570 '409':
1571 description: HTTP or Torrent/magnetURI import not enabled
668b7f09 1572
4e239e35
C
1573 /videos/live:
1574 post:
1575 summary: Create a live
1576 security:
1577 - OAuth2: []
1578 tags:
1579 - Live Videos
1580 - Video
1581 responses:
1582 '200':
1583 description: successful operation
1584 content:
1585 application/json:
1586 schema:
1587 $ref: '#/components/schemas/VideoUploadResponse'
1588 '403':
1589 description: Live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
1590 requestBody:
1591 content:
1592 multipart/form-data:
1593 schema:
1594 type: object
1595 properties:
1596 channelId:
1597 description: Channel id that will contain this live video
1598 type: integer
1599 saveReplay:
1600 type: boolean
bb4ba6d9
C
1601 permanentLive:
1602 description: User can stream multiple times in a permanent live
1603 type: boolean
4e239e35
C
1604 thumbnailfile:
1605 description: Live video/replay thumbnail file
1606 type: string
1607 format: binary
1608 previewfile:
1609 description: Live video/replay preview file
1610 type: string
1611 format: binary
1612 privacy:
1613 $ref: '#/components/schemas/VideoPrivacySet'
1614 category:
1615 description: Live video/replay category
1616 type: string
1617 licence:
1618 description: Live video/replay licence
1619 type: string
1620 language:
1621 description: Live video/replay language
1622 type: string
1623 description:
1624 description: Live video/replay description
1625 type: string
1626 support:
1627 description: A text tell the audience how to support the creator
1628 example: Please support my work on <insert crowdfunding plateform>! <3
1629 type: string
1630 nsfw:
1631 description: Whether or not this live video/replay contains sensitive content
1632 type: boolean
1633 name:
1634 description: Live video/replay name
1635 type: string
bdac0584
RK
1636 minLength: 3
1637 maxLength: 120
4e239e35
C
1638 tags:
1639 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
1640 type: array
1641 minItems: 1
1642 maxItems: 5
1643 items:
1644 type: string
1645 minLength: 2
1646 maxLength: 30
1647 commentsEnabled:
1648 description: Enable or disable comments for this live video/replay
1649 type: boolean
1650 downloadEnabled:
1651 description: Enable or disable downloading for the replay of this live
1652 type: boolean
1653 required:
1654 - channelId
1655 - name
1656 encoding:
1657 thumbnailfile:
1658 contentType: image/jpeg
1659 previewfile:
1660 contentType: image/jpeg
1661
1662 /videos/live/{id}:
1663 get:
1664 summary: Get a live information
1665 security:
1666 - OAuth2: []
1667 tags:
1668 - Live Videos
1669 - Video
1670 parameters:
1671 - $ref: '#/components/parameters/idOrUUID'
1672 responses:
1673 '200':
1674 description: successful operation
1675 content:
1676 application/json:
1677 schema:
1678 $ref: '#/components/schemas/LiveVideoResponse'
1679 put:
1680 summary: Update a live information
1681 security:
1682 - OAuth2: []
1683 tags:
1684 - Live Videos
1685 - Video
1686 parameters:
1687 - $ref: '#/components/parameters/idOrUUID'
1688 requestBody:
1689 content:
1690 application/json:
1691 schema:
1692 $ref: '#/components/schemas/LiveVideoUpdate'
1693 responses:
1694 '204':
1695 description: Successful operation
1696 '400':
1697 description: Bad parameters or trying to update a live that has already started
1698 '403':
1699 description: Trying to save replay of the live but saving replay is not enabled on the instance
1700
668b7f09
C
1701 /users/me/abuses:
1702 get:
1703 summary: List my abuses
1704 security:
1705 - OAuth2: []
1706 tags:
1707 - Abuses
1708 - My User
1709 parameters:
1710 - name: id
1711 in: query
1712 description: only list the report with this id
1713 schema:
1714 type: integer
1715 - name: state
1716 in: query
1717 schema:
1718 $ref: '#/components/schemas/AbuseStateSet'
1719 - $ref: '#/components/parameters/start'
1720 - $ref: '#/components/parameters/count'
1721 - $ref: '#/components/parameters/abusesSort'
1722 responses:
1723 '200':
1724 description: successful operation
1725 content:
1726 application/json:
1727 schema:
1728 type: array
1729 items:
1730 $ref: '#/components/schemas/Abuse'
1731
e3489df9 1732 /abuses:
1569a818 1733 get:
310b5219 1734 summary: List abuses
94ff4c23 1735 security:
b029d58a 1736 - OAuth2:
06746a8b
RK
1737 - admin
1738 - moderator
1569a818 1739 tags:
310b5219 1740 - Abuses
44cb3b85 1741 parameters:
84f6e32c
RK
1742 - name: id
1743 in: query
1744 description: only list the report with this id
1745 schema:
1746 type: integer
1747 - name: predefinedReason
1748 in: query
1749 description: predefined reason the listed reports should contain
1750 schema:
e3489df9 1751 $ref: '#/components/schemas/PredefinedAbuseReasons'
84f6e32c
RK
1752 - name: search
1753 in: query
1754 description: plain search that will match with video titles, reporter names and more
1755 schema:
1756 type: string
1757 - name: state
1758 in: query
84f6e32c 1759 schema:
668b7f09 1760 $ref: '#/components/schemas/AbuseStateSet'
84f6e32c
RK
1761 - name: searchReporter
1762 in: query
1763 description: only list reports of a specific reporter
1764 schema:
1765 type: string
1766 - name: searchReportee
1767 description: only list reports of a specific reportee
1768 in: query
1769 schema:
1770 type: string
1771 - name: searchVideo
1772 in: query
1773 description: only list reports of a specific video
1774 schema:
1775 type: string
1776 - name: searchVideoChannel
1777 in: query
1778 description: only list reports of a specific video channel
1779 schema:
1780 type: string
17b07dc5
C
1781 - name: videoIs
1782 in: query
1783 description: only list blacklisted or deleted videos
1784 schema:
1785 type: string
1786 enum:
1787 - 'deleted'
1788 - 'blacklisted'
1789 - name: filter
1790 in: query
1791 description: only list account, comment or video reports
1792 schema:
1793 type: string
1794 enum:
1795 - 'video'
1796 - 'comment'
1797 - 'account'
3e9e6f2f
RK
1798 - $ref: '#/components/parameters/start'
1799 - $ref: '#/components/parameters/count'
fd5af7a2 1800 - $ref: '#/components/parameters/abusesSort'
1569a818
DG
1801 responses:
1802 '200':
1803 description: successful operation
3e9e6f2f
RK
1804 content:
1805 application/json:
1806 schema:
1807 type: array
1808 items:
668b7f09 1809 $ref: '#/components/schemas/Abuse'
e3489df9 1810
1569a818 1811 post:
b029d58a 1812 summary: Report an abuse
94ff4c23 1813 security:
3e9e6f2f 1814 - OAuth2: []
1569a818 1815 tags:
310b5219 1816 - Abuses
50e16ccf 1817 requestBody:
1ebddadd 1818 required: true
50e16ccf
C
1819 content:
1820 application/json:
1821 schema:
1822 type: object
1823 properties:
1824 reason:
1825 description: Reason why the user reports this video
1826 type: string
4302058c
RK
1827 minLength: 2
1828 maxLength: 3000
1ebddadd 1829 predefinedReasons:
e3489df9 1830 $ref: '#/components/schemas/PredefinedAbuseReasons'
e3489df9
C
1831 video:
1832 type: object
1833 properties:
1834 id:
1835 description: Video id to report
1836 type: number
1837 startAt:
1838 type: integer
1839 description: Timestamp in the video that marks the beginning of the report
1840 minimum: 0
1841 endAt:
1842 type: integer
1843 description: Timestamp in the video that marks the ending of the report
1844 minimum: 0
1845 comment:
1846 type: object
1847 properties:
1848 id:
1849 description: Comment id to report
1850 type: number
1851 account:
1852 type: object
1853 properties:
1854 id:
1855 description: Account id to report
1856 type: number
1ebddadd
RK
1857 required:
1858 - reason
50e16ccf
C
1859 responses:
1860 '204':
1861 description: successful operation
84f6e32c
RK
1862 '400':
1863 description: incorrect request parameters
e3489df9 1864 '/abuses/{abuseId}':
50e16ccf
C
1865 put:
1866 summary: Update an abuse
1867 security:
1868 - OAuth2:
1869 - admin
1870 - moderator
1871 tags:
310b5219 1872 - Abuses
50e16ccf 1873 parameters:
50e16ccf
C
1874 - $ref: '#/components/parameters/abuseId'
1875 requestBody:
1876 content:
1877 application/json:
1878 schema:
1879 type: object
1880 properties:
1881 state:
4f32032f 1882 $ref: '#/components/schemas/AbuseStateSet'
50e16ccf
C
1883 moderationComment:
1884 type: string
84f6e32c 1885 description: Update the report comment visible only to the moderation team
4302058c
RK
1886 minLength: 2
1887 maxLength: 3000
84f6e32c
RK
1888 responses:
1889 '204':
1890 description: successful operation
1891 '404':
310b5219 1892 description: abuse not found
50e16ccf 1893 delete:
84f6e32c 1894 tags:
310b5219 1895 - Abuses
50e16ccf
C
1896 summary: Delete an abuse
1897 security:
1898 - OAuth2:
64b5c247
RK
1899 - admin
1900 - moderator
84f6e32c 1901 parameters:
84f6e32c 1902 - $ref: '#/components/parameters/abuseId'
50e16ccf
C
1903 responses:
1904 '204':
1905 description: successful operation
06746a8b
RK
1906 '404':
1907 description: block not found
668b7f09
C
1908 '/abuses/{abuseId}/messages':
1909 get:
1910 summary: List messages of an abuse
1911 security:
1912 - OAuth2: []
1913 tags:
1914 - Abuses
1915 parameters:
1916 - $ref: '#/components/parameters/abuseId'
1917 responses:
1918 '200':
1919 description: successful operation
1920 content:
1921 application/json:
1922 schema:
1923 type: array
1924 items:
1925 $ref: '#/components/schemas/AbuseMessage'
1926
1927 post:
1928 summary: Add message to an abuse
1929 security:
1930 - OAuth2: []
1931 tags:
1932 - Abuses
fcc4466e
C
1933 parameters:
1934 - $ref: '#/components/parameters/abuseId'
668b7f09
C
1935 requestBody:
1936 required: true
1937 content:
1938 application/json:
1939 schema:
1940 type: object
1941 properties:
1942 message:
1943 description: Message to send
1944 type: string
4302058c
RK
1945 minLength: 2
1946 maxLength: 3000
668b7f09
C
1947 required:
1948 - message
1949 responses:
1950 '200':
1951 description: successful operation
1952 '400':
1953 description: incorrect request parameters
1954 '/abuses/{abuseId}/messages/{abuseMessageId}':
1955 delete:
1956 summary: Delete an abuse message
1957 security:
1958 - OAuth2: []
1959 tags:
1960 - Abuses
1961 parameters:
1962 - $ref: '#/components/parameters/abuseId'
1963 - $ref: '#/components/parameters/abuseMessageId'
1964 responses:
1965 '204':
1966 description: successful operation
50e16ccf 1967
3e9e6f2f 1968 '/videos/{id}/blacklist':
1569a818 1969 post:
06746a8b 1970 summary: Block a video
94ff4c23 1971 security:
3e9e6f2f 1972 - OAuth2:
64b5c247
RK
1973 - admin
1974 - moderator
1569a818 1975 tags:
06746a8b 1976 - Video Blocks
1569a818 1977 parameters:
cb9d028a 1978 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1979 responses:
1980 '204':
c1843150 1981 description: successful operation
1569a818 1982 delete:
06746a8b 1983 summary: Unblock a video by its id
94ff4c23 1984 security:
3e9e6f2f 1985 - OAuth2:
64b5c247
RK
1986 - admin
1987 - moderator
1569a818 1988 tags:
06746a8b 1989 - Video Blocks
1569a818 1990 parameters:
cb9d028a 1991 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1992 responses:
1993 '204':
c1843150 1994 description: successful operation
06746a8b
RK
1995 '404':
1996 description: block not found
c360c494 1997 /videos/blacklist:
1569a818 1998 get:
06746a8b
RK
1999 tags:
2000 - Video Blocks
f4d59981 2001 summary: List video blocks
94ff4c23 2002 security:
3e9e6f2f 2003 - OAuth2:
64b5c247
RK
2004 - admin
2005 - moderator
44cb3b85 2006 parameters:
84f6e32c
RK
2007 - name: type
2008 in: query
2009 description: >
2010 list only blocks that match this type:
2011
2012 - `1`: manual block
2013
2014 - `2`: automatic block that needs review
2015 schema:
2016 type: integer
2017 enum:
2018 - 1
2019 - 2
2020 - name: search
2021 in: query
2022 description: plain search that will match with video titles, and more
2023 schema:
2024 type: string
3e9e6f2f
RK
2025 - $ref: '#/components/parameters/start'
2026 - $ref: '#/components/parameters/count'
fd5af7a2 2027 - $ref: '#/components/parameters/blacklistsSort'
1569a818
DG
2028 responses:
2029 '200':
2030 description: successful operation
3e9e6f2f
RK
2031 content:
2032 application/json:
2033 schema:
84f6e32c
RK
2034 type: object
2035 properties:
2036 total:
2037 type: integer
2038 example: 1
2039 data:
2040 type: array
2041 items:
2042 $ref: '#/components/schemas/VideoBlacklist'
67ae04a5
C
2043 /videos/{id}/captions:
2044 get:
b029d58a 2045 summary: List captions of a video
67ae04a5 2046 tags:
04b703f6 2047 - Video Captions
67ae04a5 2048 parameters:
cb9d028a 2049 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
2050 responses:
2051 '200':
2052 description: successful operation
2053 content:
2054 application/json:
2055 schema:
2056 type: object
2057 properties:
2058 total:
2059 type: integer
84f6e32c 2060 example: 1
67ae04a5
C
2061 data:
2062 type: array
2063 items:
2064 $ref: '#/components/schemas/VideoCaption'
2065 /videos/{id}/captions/{captionLanguage}:
2066 put:
2067 summary: Add or replace a video caption
64b5c247
RK
2068 security:
2069 - OAuth2:
2070 - user
67ae04a5 2071 tags:
04b703f6 2072 - Video Captions
67ae04a5 2073 parameters:
cb9d028a 2074 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
2075 - $ref: '#/components/parameters/captionLanguage'
2076 requestBody:
2077 content:
2078 multipart/form-data:
2079 schema:
2080 type: object
2081 properties:
2082 captionfile:
2083 description: The file to upload.
2084 type: string
2085 format: binary
0ad45af7
FS
2086 encoding:
2087 captionfile:
205ed5b7 2088 contentType: text/vtt, application/x-subrip, text/plain
67ae04a5
C
2089 responses:
2090 '204':
c1843150 2091 description: successful operation
06746a8b
RK
2092 '404':
2093 description: video or language not found
67ae04a5
C
2094 delete:
2095 summary: Delete a video caption
64b5c247
RK
2096 security:
2097 - OAuth2:
2098 - user
67ae04a5 2099 tags:
04b703f6 2100 - Video Captions
67ae04a5 2101 parameters:
cb9d028a 2102 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
2103 - $ref: '#/components/parameters/captionLanguage'
2104 responses:
2105 '204':
c1843150 2106 description: successful operation
06746a8b
RK
2107 '404':
2108 description: video or language or caption for that language not found
48dce1c9 2109 /video-channels:
1569a818 2110 get:
b029d58a 2111 summary: List video channels
1569a818 2112 tags:
b029d58a 2113 - Video Channels
44cb3b85 2114 parameters:
3e9e6f2f
RK
2115 - $ref: '#/components/parameters/start'
2116 - $ref: '#/components/parameters/count'
2117 - $ref: '#/components/parameters/sort'
1569a818
DG
2118 responses:
2119 '200':
2120 description: successful operation
3e9e6f2f
RK
2121 content:
2122 application/json:
2123 schema:
84f6e32c
RK
2124 type: object
2125 properties:
2126 total:
2127 type: integer
2128 example: 1
2129 data:
2130 type: array
2131 items:
2132 $ref: '#/components/schemas/VideoChannel'
1569a818 2133 post:
b029d58a 2134 summary: Create a video channel
94ff4c23 2135 security:
3e9e6f2f 2136 - OAuth2: []
1569a818 2137 tags:
b029d58a 2138 - Video Channels
1569a818
DG
2139 responses:
2140 '204':
c1843150 2141 description: successful operation
3e9e6f2f 2142 requestBody:
7d14d4d2
C
2143 content:
2144 application/json:
2145 schema:
2146 $ref: '#/components/schemas/VideoChannelCreate'
9ce3d302 2147 '/video-channels/{channelHandle}':
1569a818 2148 get:
b029d58a 2149 summary: Get a video channel
1569a818 2150 tags:
b029d58a 2151 - Video Channels
1569a818 2152 parameters:
9ce3d302 2153 - $ref: '#/components/parameters/channelHandle'
1569a818
DG
2154 responses:
2155 '200':
2156 description: successful operation
3e9e6f2f
RK
2157 content:
2158 application/json:
2159 schema:
2160 $ref: '#/components/schemas/VideoChannel'
1569a818 2161 put:
b029d58a 2162 summary: Update a video channel
94ff4c23 2163 security:
3e9e6f2f 2164 - OAuth2: []
1569a818 2165 tags:
b029d58a 2166 - Video Channels
1569a818 2167 parameters:
9ce3d302 2168 - $ref: '#/components/parameters/channelHandle'
1569a818
DG
2169 responses:
2170 '204':
c1843150 2171 description: successful operation
3e9e6f2f 2172 requestBody:
7d14d4d2
C
2173 content:
2174 application/json:
2175 schema:
2176 $ref: '#/components/schemas/VideoChannelUpdate'
1569a818 2177 delete:
b029d58a 2178 summary: Delete a video channel
94ff4c23 2179 security:
3e9e6f2f 2180 - OAuth2: []
1569a818 2181 tags:
b029d58a 2182 - Video Channels
1569a818 2183 parameters:
9ce3d302 2184 - $ref: '#/components/parameters/channelHandle'
cc918ac3
C
2185 responses:
2186 '204':
c1843150 2187 description: successful operation
9ce3d302 2188 '/video-channels/{channelHandle}/videos':
cc918ac3 2189 get:
b029d58a 2190 summary: List videos of a video channel
cc918ac3 2191 tags:
048b6946 2192 - Video
b029d58a 2193 - Video Channels
cc918ac3 2194 parameters:
9ce3d302 2195 - $ref: '#/components/parameters/channelHandle'
59c794a5
C
2196 - $ref: '#/components/parameters/categoryOneOf'
2197 - $ref: '#/components/parameters/tagsOneOf'
2198 - $ref: '#/components/parameters/tagsAllOf'
2199 - $ref: '#/components/parameters/licenceOneOf'
2200 - $ref: '#/components/parameters/languageOneOf'
2201 - $ref: '#/components/parameters/nsfw'
2202 - $ref: '#/components/parameters/filter'
2203 - $ref: '#/components/parameters/skipCount'
2204 - $ref: '#/components/parameters/start'
2205 - $ref: '#/components/parameters/count'
2206 - $ref: '#/components/parameters/videosSort'
1569a818 2207 responses:
cc918ac3 2208 '200':
1569a818 2209 description: successful operation
3e9e6f2f
RK
2210 content:
2211 application/json:
2212 schema:
048b6946 2213 $ref: '#/components/schemas/VideoListResponse'
75cba40d
C
2214 '/video-channels/{channelHandle}/avatar/pick':
2215 post:
2216 summary: Update channel avatar
2217 security:
2218 - OAuth2: []
2219 tags:
2220 - Video Channels
2221 parameters:
2222 - $ref: '#/components/parameters/channelHandle'
2223 responses:
2224 '200':
2225 description: successful operation
2226 content:
2227 application/json:
2228 schema:
2229 type: object
2230 properties:
2231 avatar:
2232 $ref: '#/components/schemas/ActorImage'
2233 '413':
2234 description: image file too large
2235 headers:
2236 X-File-Maximum-Size:
2237 schema:
2238 type: string
2239 format: Nginx size
2240 description: Maximum file size for the avatar
2241 requestBody:
2242 content:
2243 multipart/form-data:
2244 schema:
2245 type: object
2246 properties:
2247 avatarfile:
2248 description: The file to upload.
2249 type: string
2250 format: binary
2251 encoding:
2252 avatarfile:
2253 contentType: image/png, image/jpeg
2254 '/video-channels/{channelHandle}/avatar':
2255 delete:
2256 summary: Delete channel avatar
2257 security:
2258 - OAuth2: []
2259 tags:
2260 - Video Channels
2261 parameters:
2262 - $ref: '#/components/parameters/channelHandle'
2263 responses:
2264 '204':
2265 description: successful operation
2266
2267
2268 '/video-channels/{channelHandle}/banner/pick':
2269 post:
2270 summary: Update channel banner
2271 security:
2272 - OAuth2: []
2273 tags:
2274 - Video Channels
2275 parameters:
2276 - $ref: '#/components/parameters/channelHandle'
2277 responses:
2278 '200':
2279 description: successful operation
2280 content:
2281 application/json:
2282 schema:
2283 type: object
2284 properties:
2285 banner:
2286 $ref: '#/components/schemas/ActorImage'
2287 '413':
2288 description: image file too large
2289 headers:
2290 X-File-Maximum-Size:
2291 schema:
2292 type: string
2293 format: Nginx size
2294 description: Maximum file size for the banner
2295 requestBody:
2296 content:
2297 multipart/form-data:
2298 schema:
2299 type: object
2300 properties:
2301 bannerfile:
2302 description: The file to upload.
2303 type: string
2304 format: binary
2305 encoding:
2306 bannerfile:
2307 contentType: image/png, image/jpeg
2308 '/video-channels/{channelHandle}/banner':
2309 delete:
2310 summary: Delete channel banner
2311 security:
2312 - OAuth2: []
2313 tags:
2314 - Video Channels
2315 parameters:
2316 - $ref: '#/components/parameters/channelHandle'
2317 responses:
2318 '204':
2319 description: successful operation
c1843150
C
2320
2321 /video-playlists/privacies:
2322 get:
2323 summary: List available playlist privacies
2324 tags:
2325 - Video Playlists
2326 responses:
2327 '200':
2328 description: successful operation
2329 content:
2330 application/json:
2331 schema:
2332 type: array
2333 items:
2334 type: string
84f6e32c
RK
2335 examples:
2336 nightly:
2337 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
c1843150 2338
71810d0b
RK
2339 /video-playlists:
2340 get:
b029d58a 2341 summary: List video playlists
71810d0b 2342 tags:
b029d58a 2343 - Video Playlists
71810d0b
RK
2344 parameters:
2345 - $ref: '#/components/parameters/start'
2346 - $ref: '#/components/parameters/count'
2347 - $ref: '#/components/parameters/sort'
2348 responses:
2349 '200':
2350 description: successful operation
2351 content:
2352 application/json:
2353 schema:
84f6e32c
RK
2354 type: object
2355 properties:
2356 total:
2357 type: integer
2358 example: 1
2359 data:
2360 type: array
2361 items:
2362 $ref: '#/components/schemas/VideoPlaylist'
c1843150
C
2363 post:
2364 summary: Create a video playlist
2365 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
2366 security:
2367 - OAuth2: []
2368 tags:
2369 - Video Playlists
2370 responses:
2371 '200':
2372 description: successful operation
2373 content:
2374 application/json:
2375 schema:
2376 type: object
2377 properties:
2378 videoPlaylist:
2379 type: object
2380 properties:
2381 id:
06746a8b 2382 type: integer
c1843150
C
2383 uuid:
2384 type: string
2385 requestBody:
2386 content:
2387 multipart/form-data:
2388 schema:
2389 type: object
2390 properties:
2391 displayName:
2392 description: Video playlist display name
2393 type: string
bdac0584
RK
2394 minLength: 1
2395 maxLength: 120
c1843150
C
2396 thumbnailfile:
2397 description: Video playlist thumbnail file
2398 type: string
2399 format: binary
2400 privacy:
2401 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2402 description:
2403 description: Video playlist description
2404 type: string
2405 videoChannelId:
2406 description: Video channel in which the playlist will be published
06746a8b 2407 type: integer
c1843150
C
2408 required:
2409 - displayName
2c318664
RK
2410 encoding:
2411 thumbnailfile:
2412 contentType: image/jpeg
c1843150
C
2413
2414 /video-playlists/{id}:
2415 get:
2416 summary: Get a video playlist
2417 tags:
2418 - Video Playlists
2419 parameters:
2420 - $ref: '#/components/parameters/idOrUUID'
2421 responses:
2422 '200':
2423 description: successful operation
2424 content:
2425 application/json:
2426 schema:
2427 $ref: '#/components/schemas/VideoPlaylist'
2428 put:
2429 summary: Update a video playlist
2430 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2431 security:
2432 - OAuth2: []
2433 tags:
2434 - Video Playlists
2435 responses:
2436 '204':
2437 description: successful operation
2438 parameters:
2439 - $ref: '#/components/parameters/idOrUUID'
2440 requestBody:
2441 content:
2442 multipart/form-data:
2443 schema:
2444 type: object
2445 properties:
2446 displayName:
2447 description: Video playlist display name
2448 type: string
bdac0584
RK
2449 minLength: 1
2450 maxLength: 120
c1843150
C
2451 thumbnailfile:
2452 description: Video playlist thumbnail file
2453 type: string
2454 format: binary
2455 privacy:
2456 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2457 description:
2458 description: Video playlist description
2459 type: string
2460 videoChannelId:
2461 description: Video channel in which the playlist will be published
06746a8b 2462 type: integer
2c318664
RK
2463 encoding:
2464 thumbnailfile:
2465 contentType: image/jpeg
c1843150
C
2466 delete:
2467 summary: Delete a video playlist
2468 security:
2469 - OAuth2: []
2470 tags:
2471 - Video Playlists
2472 parameters:
2473 - $ref: '#/components/parameters/idOrUUID'
2474 responses:
2475 '204':
2476 description: successful operation
2477
2478 /video-playlists/{id}/videos:
2479 get:
2480 summary: 'List videos of a playlist'
2481 tags:
2482 - Videos
2483 - Video Playlists
2484 parameters:
2485 - $ref: '#/components/parameters/idOrUUID'
2486 responses:
2487 '200':
2488 description: successful operation
2489 content:
2490 application/json:
2491 schema:
2492 $ref: '#/components/schemas/VideoListResponse'
2493 post:
2494 summary: 'Add a video in a playlist'
2495 security:
2496 - OAuth2: []
2497 tags:
2498 - Videos
2499 - Video Playlists
2500 parameters:
2501 - $ref: '#/components/parameters/idOrUUID'
2502 responses:
2503 '200':
2504 description: successful operation
2505 content:
2506 application/json:
2507 schema:
2508 type: object
2509 properties:
2510 videoPlaylistElement:
2511 type: object
2512 properties:
2513 id:
06746a8b 2514 type: integer
c1843150
C
2515 requestBody:
2516 content:
2517 application/json:
2518 schema:
2519 type: object
2520 properties:
2521 videoId:
06746a8b 2522 type: integer
c1843150
C
2523 description: 'Video to add in the playlist'
2524 startTimestamp:
06746a8b 2525 type: integer
c1843150
C
2526 description: 'Start the video at this specific timestamp (in seconds)'
2527 stopTimestamp:
06746a8b 2528 type: integer
c1843150
C
2529 description: 'Stop the video at this specific timestamp (in seconds)'
2530 required:
2531 - videoId
2532
2533 /video-playlists/{id}/videos/reorder:
2534 post:
2535 summary: 'Reorder a playlist'
2536 security:
2537 - OAuth2: []
2538 tags:
2539 - Video Playlists
2540 parameters:
2541 - $ref: '#/components/parameters/idOrUUID'
2542 responses:
2543 '204':
2544 description: successful operation
2545 requestBody:
2546 content:
2547 application/json:
2548 schema:
2549 type: object
2550 properties:
2551 startPosition:
06746a8b
RK
2552 type: integer
2553 description: 'Start position of the element to reorder'
2554 minimum: 1
c1843150 2555 insertAfterPosition:
06746a8b
RK
2556 type: integer
2557 description: 'New position for the block to reorder, to add the block before the first element'
2558 minimum: 0
c1843150 2559 reorderLength:
06746a8b
RK
2560 type: integer
2561 description: 'How many element from `startPosition` to reorder'
2562 minimum: 1
c1843150
C
2563 required:
2564 - startPosition
2565 - insertAfterPosition
2566
b9e924a8 2567 /video-playlists/{id}/videos/{playlistElementId}:
c1843150
C
2568 put:
2569 summary: 'Update a playlist element'
2570 security:
2571 - OAuth2: []
2572 tags:
2573 - Video Playlists
2574 parameters:
2575 - $ref: '#/components/parameters/idOrUUID'
2576 - $ref: '#/components/parameters/playlistElementId'
2577 responses:
2578 '204':
2579 description: successful operation
2580 requestBody:
2581 content:
2582 application/json:
2583 schema:
2584 type: object
2585 properties:
2586 startTimestamp:
06746a8b 2587 type: integer
c1843150
C
2588 description: 'Start the video at this specific timestamp (in seconds)'
2589 stopTimestamp:
06746a8b 2590 type: integer
c1843150
C
2591 description: 'Stop the video at this specific timestamp (in seconds)'
2592 delete:
2593 summary: 'Delete an element from a playlist'
2594 security:
2595 - OAuth2: []
2596 tags:
2597 - Video Playlists
2598 parameters:
2599 - $ref: '#/components/parameters/idOrUUID'
2600 - $ref: '#/components/parameters/playlistElementId'
2601 responses:
2602 '204':
2603 description: successful operation
2604
0590bb46
C
2605 '/users/me/video-playlists/videos-exist':
2606 get:
2607 summary: 'Check video exists in my playlists'
2608 security:
2609 - OAuth2: []
2610 tags:
2611 - Video Playlists
2612 parameters:
2613 - name: videoIds
2614 in: query
2615 required: true
2616 description: The video ids to check
2617 schema:
2618 type: array
2619 items:
06746a8b 2620 type: integer
0590bb46
C
2621 responses:
2622 '200':
2623 description: successful operation
2624 content:
2625 application/json:
2626 schema:
2627 type: object
2628 properties:
2629 videoId:
2630 type: array
2631 items:
2632 type: object
2633 properties:
2634 playlistElementId:
06746a8b 2635 type: integer
0590bb46 2636 playlistId:
06746a8b 2637 type: integer
0590bb46 2638 startTimestamp:
06746a8b 2639 type: integer
0590bb46 2640 stopTimestamp:
06746a8b 2641 type: integer
0590bb46 2642
3e9e6f2f 2643 '/accounts/{name}/video-channels':
6b738c7a 2644 get:
b029d58a 2645 summary: List video channels of an account
6b738c7a 2646 tags:
b029d58a
C
2647 - Video Channels
2648 - Accounts
6b738c7a 2649 parameters:
3e9e6f2f 2650 - $ref: '#/components/parameters/name'
84f6e32c
RK
2651 - name: withStats
2652 in: query
2653 description: include view statistics for the last 30 days (only if authentified as the account user)
2654 schema:
2655 type: boolean
2656 - $ref: '#/components/parameters/start'
2657 - $ref: '#/components/parameters/count'
2658 - $ref: '#/components/parameters/sort'
6b738c7a
C
2659 responses:
2660 '200':
2661 description: successful operation
3e9e6f2f
RK
2662 content:
2663 application/json:
2664 schema:
8004469c
C
2665 properties:
2666 total:
2667 type: integer
2668 example: 1
2669 data:
2670 type: array
2671 items:
2672 $ref: '#/components/schemas/VideoChannel'
c100a614
YB
2673 '/accounts/{name}/ratings':
2674 get:
b029d58a 2675 summary: List ratings of an account
c100a614
YB
2676 security:
2677 - OAuth2: []
2678 tags:
b029d58a 2679 - Accounts
c100a614 2680 parameters:
cb9d028a 2681 - $ref: '#/components/parameters/name'
c100a614
YB
2682 - $ref: '#/components/parameters/start'
2683 - $ref: '#/components/parameters/count'
2684 - $ref: '#/components/parameters/sort'
2685 - name: rating
2686 in: query
2687 required: false
b3d1054e 2688 description: Optionally filter which ratings to retrieve
c100a614
YB
2689 schema:
2690 type: string
2691 enum:
2692 - like
2693 - dislike
2694 responses:
2695 '200':
2696 description: successful operation
2697 content:
2698 application/json:
2699 schema:
2700 type: array
2701 items:
2702 $ref: '#/components/schemas/VideoRating'
3e9e6f2f 2703 '/videos/{id}/comment-threads':
1569a818 2704 get:
b029d58a 2705 summary: List threads of a video
1569a818 2706 tags:
b029d58a 2707 - Video Comments
1569a818 2708 parameters:
cb9d028a 2709 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f
RK
2710 - $ref: '#/components/parameters/start'
2711 - $ref: '#/components/parameters/count'
71810d0b 2712 - $ref: '#/components/parameters/commentsSort'
1569a818
DG
2713 responses:
2714 '200':
2715 description: successful operation
3e9e6f2f
RK
2716 content:
2717 application/json:
2718 schema:
2719 $ref: '#/components/schemas/CommentThreadResponse'
1569a818 2720 post:
b029d58a 2721 summary: Create a thread
94ff4c23 2722 security:
3e9e6f2f 2723 - OAuth2: []
1569a818 2724 tags:
b029d58a 2725 - Video Comments
1569a818 2726 parameters:
cb9d028a 2727 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
2728 responses:
2729 '200':
2730 description: successful operation
3e9e6f2f
RK
2731 content:
2732 application/json:
2733 schema:
2734 $ref: '#/components/schemas/CommentThreadPostResponse'
2c318664
RK
2735 '404':
2736 description: video does not exist
98639806
C
2737 requestBody:
2738 content:
2739 application/json:
2740 schema:
2741 type: object
2742 properties:
2743 text:
2744 type: string
2745 description: 'Text comment'
2746 required:
2747 - text
2748
3e9e6f2f 2749 '/videos/{id}/comment-threads/{threadId}':
1569a818 2750 get:
b029d58a 2751 summary: Get a thread
1569a818 2752 tags:
b029d58a 2753 - Video Comments
1569a818 2754 parameters:
cb9d028a
C
2755 - $ref: '#/components/parameters/idOrUUID'
2756 - $ref: '#/components/parameters/threadId'
1569a818
DG
2757 responses:
2758 '200':
2759 description: successful operation
3e9e6f2f
RK
2760 content:
2761 application/json:
2762 schema:
2763 $ref: '#/components/schemas/VideoCommentThreadTree'
2764 '/videos/{id}/comments/{commentId}':
1569a818 2765 post:
b029d58a 2766 summary: Reply to a thread of a video
94ff4c23 2767 security:
3e9e6f2f 2768 - OAuth2: []
1569a818 2769 tags:
b029d58a 2770 - Video Comments
1569a818 2771 parameters:
cb9d028a 2772 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f 2773 - $ref: '#/components/parameters/commentId'
1569a818
DG
2774 responses:
2775 '200':
2776 description: successful operation
3e9e6f2f
RK
2777 content:
2778 application/json:
2779 schema:
2780 $ref: '#/components/schemas/CommentThreadPostResponse'
2c318664
RK
2781 '404':
2782 description: thread or video does not exist
98639806
C
2783 requestBody:
2784 content:
2785 application/json:
2786 schema:
2787 type: object
2788 properties:
2789 text:
2790 type: string
2791 description: 'Text comment'
2792 required:
2793 - text
2794
1569a818 2795 delete:
b029d58a 2796 summary: Delete a comment or a reply
94ff4c23 2797 security:
3e9e6f2f 2798 - OAuth2: []
1569a818 2799 tags:
b029d58a 2800 - Video Comments
1569a818 2801 parameters:
cb9d028a 2802 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f 2803 - $ref: '#/components/parameters/commentId'
1569a818
DG
2804 responses:
2805 '204':
c1843150 2806 description: successful operation
84f6e32c
RK
2807 '403':
2808 description: cannot remove comment of another user
2809 '404':
2810 description: comment or video does not exist
2811 '409':
2812 description: comment is already deleted
3e9e6f2f 2813 '/videos/{id}/rate':
1569a818 2814 put:
b029d58a 2815 summary: Like/dislike a video
94ff4c23 2816 security:
3e9e6f2f 2817 - OAuth2: []
1569a818 2818 tags:
b029d58a 2819 - Video Rates
1569a818 2820 parameters:
cb9d028a 2821 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
2822 responses:
2823 '204':
c1843150 2824 description: successful operation
2c318664
RK
2825 '404':
2826 description: video does not exist
fb72c193
DL
2827 /search/videos:
2828 get:
2829 tags:
2830 - Search
b029d58a 2831 summary: Search videos
fb72c193 2832 parameters:
84f6e32c
RK
2833 - name: search
2834 in: query
2835 required: true
2836 allowEmptyValue: false
2837 description: >
2838 String to search. If the user can make a remote URI search, and the string is an URI then the
2839 PeerTube instance will fetch the remote object and add it to its database. Then,
2840 you can use the REST API to fetch the complete video information and interact with it.
2841 schema:
2842 type: string
59c794a5
C
2843 - $ref: '#/components/parameters/categoryOneOf'
2844 - $ref: '#/components/parameters/tagsOneOf'
2845 - $ref: '#/components/parameters/tagsAllOf'
2846 - $ref: '#/components/parameters/licenceOneOf'
2847 - $ref: '#/components/parameters/languageOneOf'
2848 - $ref: '#/components/parameters/nsfw'
2849 - $ref: '#/components/parameters/filter'
2850 - $ref: '#/components/parameters/skipCount'
3e9e6f2f
RK
2851 - $ref: '#/components/parameters/start'
2852 - $ref: '#/components/parameters/count'
ad031145 2853 - $ref: '#/components/parameters/searchTarget'
fd5af7a2 2854 - $ref: '#/components/parameters/videosSearchSort'
ad031145
C
2855 - name: startDate
2856 in: query
ad031145
C
2857 description: Get videos that are published after this date
2858 schema:
2859 type: string
2860 format: date-time
2861 - name: endDate
2862 in: query
ad031145
C
2863 description: Get videos that are published before this date
2864 schema:
2865 type: string
2866 format: date-time
2867 - name: originallyPublishedStartDate
2868 in: query
ad031145 2869 description: Get videos that are originally published after this date
3e9e6f2f
RK
2870 schema:
2871 type: string
ad031145
C
2872 format: date-time
2873 - name: originallyPublishedEndDate
2874 in: query
ad031145
C
2875 description: Get videos that are originally published before this date
2876 schema:
2877 type: string
2878 format: date-time
2879 - name: durationMin
2880 in: query
ad031145
C
2881 description: Get videos that have this minimum duration
2882 schema:
06746a8b 2883 type: integer
ad031145
C
2884 - name: durationMax
2885 in: query
ad031145
C
2886 description: Get videos that have this maximum duration
2887 schema:
06746a8b 2888 type: integer
2c318664
RK
2889 callbacks:
2890 'searchTarget === search-index':
2891 $ref: '#/components/callbacks/searchIndex'
fb72c193
DL
2892 responses:
2893 '200':
2894 description: successful operation
3e9e6f2f
RK
2895 content:
2896 application/json:
2897 schema:
048b6946 2898 $ref: '#/components/schemas/VideoListResponse'
2c318664
RK
2899 '500':
2900 description: search index unavailable
ad031145
C
2901 /search/video-channels:
2902 get:
2903 tags:
2904 - Search
2905 summary: Search channels
2906 parameters:
ad031145
C
2907 - name: search
2908 in: query
2909 required: true
2910 description: >
2911 String to search. If the user can make a remote URI search, and the string is an URI then the
2912 PeerTube instance will fetch the remote object and add it to its database. Then,
2913 you can use the REST API to fetch the complete channel information and interact with it.
2914 schema:
2915 type: string
84f6e32c
RK
2916 - $ref: '#/components/parameters/start'
2917 - $ref: '#/components/parameters/count'
2918 - $ref: '#/components/parameters/searchTarget'
2919 - $ref: '#/components/parameters/sort'
2c318664
RK
2920 callbacks:
2921 'searchTarget === search-index':
2922 $ref: '#/components/callbacks/searchIndex'
ad031145
C
2923 responses:
2924 '200':
2925 description: successful operation
2926 content:
2927 application/json:
2928 schema:
2929 type: array
2930 items:
2931 $ref: '#/components/schemas/VideoChannel'
2c318664
RK
2932 '500':
2933 description: search index unavailable
06746a8b
RK
2934 /blocklist/accounts:
2935 get:
2936 tags:
2937 - Account Blocks
2938 summary: List account blocks
2939 security:
2940 - OAuth2:
2941 - admin
2942 parameters:
2943 - $ref: '#/components/parameters/start'
2944 - $ref: '#/components/parameters/count'
2945 - $ref: '#/components/parameters/sort'
2946 responses:
2947 '200':
2948 description: successful operation
2949 post:
2950 tags:
2951 - Account Blocks
2952 summary: Block an account
2953 security:
2954 - OAuth2:
2955 - admin
2956 requestBody:
2957 content:
2958 application/json:
2959 schema:
2960 type: object
2961 properties:
2962 accountName:
2963 type: string
84f6e32c 2964 example: chocobozzz@example.org
06746a8b
RK
2965 description: account to block, in the form `username@domain`
2966 required:
2967 - accountName
2968 responses:
2969 '200':
2970 description: successful operation
2971 '409':
2972 description: self-blocking forbidden
2973 '/blocklist/accounts/{accountName}':
2974 delete:
2975 tags:
2976 - Account Blocks
2977 summary: Unblock an account by its handle
2978 security:
2979 - OAuth2:
2980 - admin
2981 parameters:
2982 - name: accountName
2983 in: path
2984 required: true
2985 description: account to unblock, in the form `username@domain`
2986 schema:
2987 type: string
2988 responses:
2989 '201':
2990 description: successful operation
2991 '404':
2992 description: account or account block does not exist
2993 /blocklist/servers:
2994 get:
2995 tags:
2996 - Server Blocks
2997 summary: List server blocks
2998 security:
2999 - OAuth2:
3000 - admin
3001 parameters:
3002 - $ref: '#/components/parameters/start'
3003 - $ref: '#/components/parameters/count'
3004 - $ref: '#/components/parameters/sort'
3005 responses:
3006 '200':
3007 description: successful operation
3008 post:
3009 tags:
3010 - Server Blocks
3011 summary: Block a server
3012 security:
3013 - OAuth2:
3014 - admin
3015 requestBody:
3016 content:
3017 application/json:
3018 schema:
3019 type: object
3020 properties:
84f6e32c 3021 host:
06746a8b 3022 type: string
84f6e32c 3023 format: hostname
06746a8b
RK
3024 description: server domain to block
3025 required:
84f6e32c 3026 - host
06746a8b
RK
3027 responses:
3028 '200':
3029 description: successful operation
3030 '409':
3031 description: self-blocking forbidden
3032 '/blocklist/servers/{host}':
3033 delete:
3034 tags:
3035 - Server Blocks
3036 summary: Unblock a server by its domain
3037 security:
3038 - OAuth2:
3039 - admin
3040 parameters:
3041 - name: host
3042 in: path
3043 required: true
3044 description: server domain to unblock
3045 schema:
3046 type: string
84f6e32c 3047 format: hostname
06746a8b
RK
3048 responses:
3049 '201':
3050 description: successful operation
3051 '404':
3052 description: account block does not exist
04b703f6
RK
3053 /redundancy/{host}:
3054 put:
3055 tags:
3056 - Instance Redundancy
3057 summary: Update a server redundancy policy
3058 security:
3059 - OAuth2:
3060 - admin
3061 parameters:
3062 - name: host
3063 in: path
3064 required: true
3065 description: server domain to mirror
3066 schema:
3067 type: string
84f6e32c 3068 format: hostname
04b703f6
RK
3069 requestBody:
3070 content:
3071 application/json:
3072 schema:
3073 type: object
3074 properties:
3075 redundancyAllowed:
3076 type: boolean
3077 description: allow mirroring of the host's local videos
3078 required:
3079 - redundancyAllowed
3080 responses:
3081 '204':
3082 description: successful operation
3083 '404':
3084 description: server is not already known
3085 /redundancy/videos:
3086 get:
3087 tags:
3088 - Video Mirroring
3089 summary: List videos being mirrored
3090 security:
3091 - OAuth2:
3092 - admin
3093 parameters:
3094 - name: target
3095 in: query
3096 required: true
3097 description: direction of the mirror
3098 schema:
3099 type: string
3100 enum:
3101 - my-videos
3102 - remote-videos
3103 - $ref: '#/components/parameters/start'
3104 - $ref: '#/components/parameters/count'
3105 - $ref: '#/components/parameters/videoRedundanciesSort'
3106 responses:
3107 '200':
3108 description: successful operation
3109 content:
3110 application/json:
3111 schema:
3112 type: array
3113 items:
3114 $ref: '#/components/schemas/VideoRedundancy'
3115 post:
3116 tags:
3117 - Video Mirroring
3118 summary: Mirror a video
3119 security:
3120 - OAuth2:
3121 - admin
3122 requestBody:
3123 content:
3124 application/json:
3125 schema:
3126 type: object
3127 properties:
3128 videoId:
84f6e32c 3129 type: integer
04b703f6
RK
3130 required:
3131 - videoId
3132 responses:
3133 '204':
3134 description: successful operation
3135 '400':
3136 description: cannot mirror a local video
3137 '404':
3138 description: video does not exist
3139 '409':
3140 description: video is already mirrored
3141 /redundancy/videos/{redundancyId}:
3142 delete:
3143 tags:
3144 - Video Mirroring
3145 summary: Delete a mirror done on a video
3146 security:
3147 - OAuth2:
3148 - admin
3149 parameters:
3150 - name: redundancyId
3151 in: path
3152 required: true
3153 description: id of an existing redundancy on a video
3154 schema:
3155 type: string
3156 responses:
3157 '204':
3158 description: successful operation
3159 '404':
3160 description: video redundancy not found
06746a8b
RK
3161 '/feeds/video-comments.{format}':
3162 get:
3163 tags:
3164 - Feeds
3165 summary: List comments on videos
d73810be 3166 servers:
d73810be 3167 - url: 'https://peertube2.cpy.re'
f4d59981 3168 description: Live Test Server (live data - latest nightly version)
d73810be
RK
3169 - url: 'https://peertube3.cpy.re'
3170 description: Live Test Server (live data - latest RC version)
f4d59981
RK
3171 - url: 'https://peertube.cpy.re'
3172 description: Live Test Server (live data - stable version)
06746a8b
RK
3173 parameters:
3174 - name: format
3175 in: path
3176 required: true
00494d6e 3177 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
06746a8b
RK
3178 schema:
3179 type: string
3180 enum:
3181 - xml
3182 - rss
3183 - rss2
3184 - atom
3185 - atom1
3186 - json
3187 - json1
3188 - name: videoId
d73810be 3189 in: query
06746a8b
RK
3190 description: 'limit listing to a specific video'
3191 schema:
3192 type: string
00494d6e
RK
3193 - name: accountId
3194 in: query
3195 description: 'limit listing to a specific account'
3196 schema:
3197 type: string
3198 - name: accountName
3199 in: query
3200 description: 'limit listing to a specific account'
3201 schema:
3202 type: string
3203 - name: videoChannelId
3204 in: query
3205 description: 'limit listing to a specific video channel'
3206 schema:
3207 type: string
3208 - name: videoChannelName
3209 in: query
3210 description: 'limit listing to a specific video channel'
3211 schema:
3212 type: string
06746a8b
RK
3213 responses:
3214 '204':
3215 description: successful operation
3216 headers:
3217 Cache-Control:
3218 schema:
3219 type: string
3220 default: 'max-age=900' # 15 min cache
3221 content:
3222 application/xml:
3223 schema:
3224 $ref: '#/components/schemas/VideoCommentsForXML'
3225 application/rss+xml:
3226 schema:
3227 $ref: '#/components/schemas/VideoCommentsForXML'
3228 text/xml:
3229 schema:
3230 $ref: '#/components/schemas/VideoCommentsForXML'
3231 application/atom+xml:
3232 schema:
3233 $ref: '#/components/schemas/VideoCommentsForXML'
3234 application/json:
3235 schema:
3236 type: object
00494d6e
RK
3237 '400':
3238 x-summary: field inconsistencies
3239 description: >
3240 Arises when:
3241 - videoId filter is mixed with a channel filter
3242 '404':
3243 description: video, video channel or account not found
06746a8b
RK
3244 '406':
3245 description: accept header unsupported
3246 '/feeds/videos.{format}':
3247 get:
3248 tags:
3249 - Feeds
3250 summary: List videos
d73810be 3251 servers:
d73810be 3252 - url: 'https://peertube2.cpy.re'
f4d59981 3253 description: Live Test Server (live data - latest nightly version)
d73810be
RK
3254 - url: 'https://peertube3.cpy.re'
3255 description: Live Test Server (live data - latest RC version)
f4d59981
RK
3256 - url: 'https://peertube.cpy.re'
3257 description: Live Test Server (live data - stable version)
06746a8b
RK
3258 parameters:
3259 - name: format
3260 in: path
3261 required: true
00494d6e 3262 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
06746a8b
RK
3263 schema:
3264 type: string
3265 enum:
3266 - xml
3267 - rss
3268 - rss2
3269 - atom
3270 - atom1
3271 - json
3272 - json1
3273 - name: accountId
d73810be 3274 in: query
06746a8b
RK
3275 description: 'limit listing to a specific account'
3276 schema:
3277 type: string
3278 - name: accountName
d73810be 3279 in: query
06746a8b
RK
3280 description: 'limit listing to a specific account'
3281 schema:
3282 type: string
3283 - name: videoChannelId
d73810be 3284 in: query
06746a8b
RK
3285 description: 'limit listing to a specific video channel'
3286 schema:
3287 type: string
3288 - name: videoChannelName
d73810be 3289 in: query
06746a8b
RK
3290 description: 'limit listing to a specific video channel'
3291 schema:
3292 type: string
84f6e32c
RK
3293 - $ref: '#/components/parameters/sort'
3294 - $ref: '#/components/parameters/nsfw'
3295 - $ref: '#/components/parameters/filter'
06746a8b
RK
3296 responses:
3297 '204':
3298 description: successful operation
3299 headers:
3300 Cache-Control:
3301 schema:
3302 type: string
3303 default: 'max-age=900' # 15 min cache
3304 content:
3305 application/xml:
3306 schema:
3307 $ref: '#/components/schemas/VideosForXML'
84f6e32c
RK
3308 examples:
3309 nightly:
3310 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
06746a8b
RK
3311 application/rss+xml:
3312 schema:
3313 $ref: '#/components/schemas/VideosForXML'
3314 text/xml:
3315 schema:
3316 $ref: '#/components/schemas/VideosForXML'
3317 application/atom+xml:
3318 schema:
3319 $ref: '#/components/schemas/VideosForXML'
3320 application/json:
3321 schema:
3322 type: object
00494d6e
RK
3323 '404':
3324 description: video channel or account not found
06746a8b
RK
3325 '406':
3326 description: accept header unsupported
7461d440
RK
3327 /plugins:
3328 get:
3329 tags:
3330 - Plugins
3331 summary: List plugins
3332 security:
3333 - OAuth2:
3334 - admin
3335 parameters:
3336 - name: pluginType
3337 in: query
3338 schema:
3339 type: integer
3340 - name: uninstalled
3341 in: query
3342 schema:
3343 type: boolean
3344 - $ref: '#/components/parameters/start'
3345 - $ref: '#/components/parameters/count'
3346 - $ref: '#/components/parameters/sort'
3347 responses:
3348 '200':
3349 description: successful operation
3350 content:
3351 application/json:
3352 schema:
3353 $ref: '#/components/schemas/PluginResponse'
3354 /plugins/available:
3355 get:
3356 tags:
3357 - Plugins
3358 summary: List available plugins
3359 security:
3360 - OAuth2:
3361 - admin
3362 parameters:
3363 - name: search
3364 in: query
3365 schema:
3366 type: string
3367 - name: pluginType
3368 in: query
3369 schema:
3370 type: integer
3371 - name: currentPeerTubeEngine
3372 in: query
3373 schema:
3374 type: string
3375 - $ref: '#/components/parameters/start'
3376 - $ref: '#/components/parameters/count'
3377 - $ref: '#/components/parameters/sort'
3378 responses:
3379 '200':
3380 description: successful operation
3381 content:
3382 application/json:
3383 schema:
3384 $ref: '#/components/schemas/PluginResponse'
3385 '503':
3386 description: plugin index unavailable
3387 /plugins/install:
3388 post:
3389 tags:
3390 - Plugins
3391 summary: Install a plugin
3392 security:
3393 - OAuth2:
3394 - admin
3395 requestBody:
3396 content:
3397 application/json:
3398 schema:
3399 oneOf:
3400 - type: object
3401 properties:
3402 npmName:
3403 type: string
84f6e32c 3404 example: peertube-plugin-auth-ldap
7461d440
RK
3405 required:
3406 - npmName
3407 additionalProperties: false
3408 - type: object
3409 properties:
3410 path:
3411 type: string
3412 required:
3413 - path
3414 additionalProperties: false
3415 responses:
3416 '204':
3417 description: successful operation
3418 '400':
3419 description: should have either `npmName` or `path` set
3420 /plugins/update:
3421 post:
3422 tags:
3423 - Plugins
3424 summary: Update a plugin
3425 security:
3426 - OAuth2:
3427 - admin
3428 requestBody:
3429 content:
3430 application/json:
3431 schema:
3432 oneOf:
3433 - type: object
3434 properties:
3435 npmName:
3436 type: string
84f6e32c 3437 example: peertube-plugin-auth-ldap
7461d440
RK
3438 required:
3439 - npmName
3440 additionalProperties: false
3441 - type: object
3442 properties:
3443 path:
3444 type: string
3445 required:
3446 - path
3447 additionalProperties: false
3448 responses:
3449 '204':
3450 description: successful operation
3451 '400':
3452 description: should have either `npmName` or `path` set
3453 '404':
3454 description: existing plugin not found
3455 /plugins/uninstall:
3456 post:
3457 tags:
3458 - Plugins
3459 summary: Uninstall a plugin
3460 security:
3461 - OAuth2:
3462 - admin
3463 requestBody:
3464 content:
3465 application/json:
3466 schema:
3467 type: object
3468 properties:
3469 npmName:
3470 type: string
84f6e32c
RK
3471 description: name of the plugin/theme in its package.json
3472 example: peertube-plugin-auth-ldap
7461d440
RK
3473 required:
3474 - npmName
3475 responses:
3476 '204':
3477 description: successful operation
3478 '404':
3479 description: existing plugin not found
3480 /plugins/{npmName}:
3481 get:
3482 tags:
3483 - Plugins
3484 summary: Get a plugin
3485 security:
3486 - OAuth2:
3487 - admin
3488 parameters:
84f6e32c 3489 - $ref: '#/components/parameters/npmName'
7461d440
RK
3490 responses:
3491 '200':
3492 description: successful operation
3493 content:
3494 application/json:
3495 schema:
3496 $ref: '#/components/schemas/Plugin'
3497 '404':
3498 description: plugin not found
3499 /plugins/{npmName}/settings:
3500 put:
3501 tags:
3502 - Plugins
3503 summary: Set a plugin's settings
3504 security:
3505 - OAuth2:
3506 - admin
3507 parameters:
84f6e32c 3508 - $ref: '#/components/parameters/npmName'
7461d440
RK
3509 requestBody:
3510 content:
3511 application/json:
3512 schema:
3513 type: object
3514 properties:
3515 settings:
3516 type: object
3517 additionalProperties: true
3518 responses:
3519 '204':
3520 description: successful operation
3521 '404':
3522 description: plugin not found
3523 /plugins/{npmName}/public-settings:
3524 get:
3525 tags:
3526 - Plugins
3527 summary: Get a plugin's public settings
7461d440 3528 parameters:
84f6e32c 3529 - $ref: '#/components/parameters/npmName'
7461d440
RK
3530 responses:
3531 '200':
3532 description: successful operation
3533 content:
3534 application/json:
3535 schema:
3536 type: object
3537 additionalProperties: true
3538 '404':
3539 description: plugin not found
3540 /plugins/{npmName}/registered-settings:
3541 get:
3542 tags:
3543 - Plugins
3544 summary: Get a plugin's registered settings
3545 security:
3546 - OAuth2:
3547 - admin
3548 parameters:
84f6e32c 3549 - $ref: '#/components/parameters/npmName'
7461d440
RK
3550 responses:
3551 '200':
3552 description: successful operation
3553 content:
3554 application/json:
3555 schema:
3556 type: object
3557 additionalProperties: true
3558 '404':
3559 description: plugin not found
3e9e6f2f 3560servers:
8f9e8be1 3561 - url: 'https://peertube2.cpy.re/api/v1'
f4d59981 3562 description: Live Test Server (live data - latest nightly version)
6441981b 3563 - url: 'https://peertube3.cpy.re/api/v1'
b029d58a 3564 description: Live Test Server (live data - latest RC version)
f4d59981
RK
3565 - url: 'https://peertube.cpy.re/api/v1'
3566 description: Live Test Server (live data - stable version)
3e9e6f2f
RK
3567components:
3568 parameters:
3569 start:
3570 name: start
3571 in: query
3572 required: false
06746a8b 3573 description: Offset used to paginate results
3e9e6f2f 3574 schema:
06746a8b 3575 type: integer
84f6e32c 3576 minimum: 0
3e9e6f2f
RK
3577 count:
3578 name: count
3579 in: query
3580 required: false
06746a8b 3581 description: "Number of items to return"
3e9e6f2f 3582 schema:
06746a8b 3583 type: integer
84f6e32c 3584 default: 15
06746a8b
RK
3585 maximum: 100
3586 minimum: 1
3e9e6f2f
RK
3587 sort:
3588 name: sort
3589 in: query
3590 required: false
84f6e32c 3591 description: Sort column
3e9e6f2f
RK
3592 schema:
3593 type: string
84f6e32c 3594 example: -createdAt
8491293b
RK
3595 search:
3596 name: search
3597 in: query
3598 required: false
3599 description: Plain text search, applied to various parts of the model depending on endpoint
3600 schema:
3601 type: string
ad031145
C
3602 searchTarget:
3603 name: searchTarget
3604 in: query
3605 required: false
3606 description: >
3607 If the administrator enabled search index support, you can override the default search target.
3608
3609
3610 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
84f6e32c 3611 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
ad031145
C
3612 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3613 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3614 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
84f6e32c 3615 * If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch
ad031145
C
3616 the data from the origin instance API
3617 schema:
3618 type: string
3619 enum:
3620 - 'local'
3621 - 'search-index'
fd5af7a2
RK
3622 videosSort:
3623 name: sort
3624 in: query
3625 required: false
3626 description: Sort videos by criteria
3627 schema:
3628 type: string
3629 enum:
04b703f6 3630 - name
fd5af7a2
RK
3631 - -duration
3632 - -createdAt
3633 - -publishedAt
3634 - -views
3635 - -likes
3636 - -trending
923d3d5a 3637 - -hot
fd5af7a2
RK
3638 videosSearchSort:
3639 name: sort
3640 in: query
3641 required: false
3642 description: Sort videos by criteria
3643 schema:
3644 type: string
3645 enum:
04b703f6 3646 - name
fd5af7a2
RK
3647 - -duration
3648 - -createdAt
3649 - -publishedAt
3650 - -views
3651 - -likes
3652 - -match
71810d0b
RK
3653 commentsSort:
3654 name: sort
3655 in: query
3656 required: false
3657 description: Sort comments by criteria
3658 schema:
3659 type: string
3660 enum:
3661 - -createdAt
3662 - -totalReplies
fd5af7a2
RK
3663 blacklistsSort:
3664 name: sort
3665 in: query
3666 required: false
3667 description: Sort blacklists by criteria
3668 schema:
3669 type: string
3670 enum:
3671 - -id
04b703f6 3672 - name
fd5af7a2
RK
3673 - -duration
3674 - -views
3675 - -likes
3676 - -dislikes
3677 - -uuid
3678 - -createdAt
8491293b
RK
3679 usersSearch:
3680 name: search
3681 in: query
3682 required: false
3683 description: Plain text search that will match with user usernames or emails
3684 schema:
3685 type: string
3686 usersBlocked:
3687 name: blocked
3688 in: query
3689 required: false
3690 description: Filter results down to (un)banned users
3691 schema:
3692 type: boolean
fd5af7a2
RK
3693 usersSort:
3694 name: sort
3695 in: query
3696 required: false
3697 description: Sort users by criteria
3698 schema:
3699 type: string
3700 enum:
3701 - -id
3702 - -username
3703 - -createdAt
3704 abusesSort:
3705 name: sort
3706 in: query
3707 required: false
3708 description: Sort abuses by criteria
3709 schema:
3710 type: string
3711 enum:
3712 - -id
3713 - -createdAt
3714 - -state
04b703f6
RK
3715 videoRedundanciesSort:
3716 name: sort
3717 in: query
3718 required: false
3719 description: Sort abuses by criteria
3720 schema:
3721 type: string
3722 enum:
3723 - name
3e9e6f2f
RK
3724 name:
3725 name: name
3726 in: path
3727 required: true
f2eb23cd 3728 description: The username or handle of the account
3e9e6f2f
RK
3729 schema:
3730 type: string
84f6e32c 3731 example: chocobozzz | chocobozzz@example.org
3e9e6f2f
RK
3732 id:
3733 name: id
3734 in: path
3735 required: true
3736 description: The user id
3737 schema:
06746a8b 3738 type: integer
84f6e32c
RK
3739 minimum: 0
3740 example: 42
cb9d028a 3741 idOrUUID:
3e9e6f2f
RK
3742 name: id
3743 in: path
3744 required: true
c1843150 3745 description: The object id or uuid
3e9e6f2f 3746 schema:
84f6e32c
RK
3747 oneOf:
3748 - type: integer
3749 minimum: 0
3750 example: 42
3751 - type: string
3752 format: uuid
3753 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
c1843150
C
3754 playlistElementId:
3755 name: playlistElementId
3756 in: path
3757 required: true
3758 description: Playlist element id
3759 schema:
06746a8b 3760 type: integer
50e16ccf
C
3761 abuseId:
3762 name: abuseId
3763 in: path
3764 required: true
310b5219 3765 description: Abuse id
50e16ccf 3766 schema:
06746a8b 3767 type: integer
668b7f09
C
3768 abuseMessageId:
3769 name: abuseMessageId
3770 in: path
3771 required: true
3772 description: Abuse message id
3773 schema:
3774 type: integer
67ae04a5
C
3775 captionLanguage:
3776 name: captionLanguage
3777 in: path
3778 required: true
3779 description: The caption language
3780 schema:
3781 type: string
9ce3d302
C
3782 channelHandle:
3783 name: channelHandle
3e9e6f2f
RK
3784 in: path
3785 required: true
84f6e32c 3786 description: The video channel handle
3e9e6f2f
RK
3787 schema:
3788 type: string
84f6e32c 3789 example: my_username | my_username@example.com
cb9d028a
C
3790 subscriptionHandle:
3791 name: subscriptionHandle
3792 in: path
3793 required: true
84f6e32c 3794 description: The subscription handle
cb9d028a
C
3795 schema:
3796 type: string
84f6e32c 3797 example: my_username | my_username@example.com
cb9d028a 3798 threadId:
3e9e6f2f
RK
3799 name: threadId
3800 in: path
3801 required: true
cb9d028a
C
3802 description: The thread id (root comment id)
3803 schema:
06746a8b 3804 type: integer
cb9d028a
C
3805 commentId:
3806 name: commentId
3807 in: path
3808 required: true
3e9e6f2f
RK
3809 description: The comment id
3810 schema:
06746a8b 3811 type: integer
fd5af7a2
RK
3812 categoryOneOf:
3813 name: categoryOneOf
3814 in: query
3815 required: false
84f6e32c 3816 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
fd5af7a2
RK
3817 schema:
3818 oneOf:
06746a8b 3819 - type: integer
fd5af7a2
RK
3820 - type: array
3821 items:
06746a8b 3822 type: integer
2beb9895
RK
3823 style: form
3824 explode: false
fd5af7a2
RK
3825 tagsOneOf:
3826 name: tagsOneOf
3827 in: query
3828 required: false
3829 description: tag(s) of the video
3830 schema:
3831 oneOf:
3832 - type: string
3833 - type: array
3834 items:
3835 type: string
2beb9895
RK
3836 style: form
3837 explode: false
fd5af7a2
RK
3838 tagsAllOf:
3839 name: tagsAllOf
3840 in: query
3841 required: false
3842 description: tag(s) of the video, where all should be present in the video
3843 schema:
3844 oneOf:
3845 - type: string
3846 - type: array
3847 items:
3848 type: string
2beb9895
RK
3849 style: form
3850 explode: false
fd5af7a2
RK
3851 languageOneOf:
3852 name: languageOneOf
3853 in: query
3854 required: false
84f6e32c 3855 description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get)). Use `_unknown` to filter on videos that don't have a video language
fd5af7a2
RK
3856 schema:
3857 oneOf:
2beb9895 3858 - type: string
fd5af7a2
RK
3859 - type: array
3860 items:
2beb9895
RK
3861 type: string
3862 style: form
3863 explode: false
fd5af7a2
RK
3864 licenceOneOf:
3865 name: licenceOneOf
3866 in: query
3867 required: false
84f6e32c 3868 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
fd5af7a2
RK
3869 schema:
3870 oneOf:
06746a8b 3871 - type: integer
fd5af7a2
RK
3872 - type: array
3873 items:
06746a8b 3874 type: integer
2beb9895
RK
3875 style: form
3876 explode: false
59c794a5
C
3877 skipCount:
3878 name: skipCount
3879 in: query
3880 required: false
3881 description: if you don't need the `total` in the response
3882 schema:
3883 type: string
3884 enum:
3885 - 'true'
3886 - 'false'
06746a8b 3887 default: 'false'
fd5af7a2
RK
3888 nsfw:
3889 name: nsfw
3890 in: query
3891 required: false
3892 description: whether to include nsfw videos, if any
3893 schema:
3894 type: string
3895 enum:
3896 - 'true'
3897 - 'false'
3898 filter:
3899 name: filter
3900 in: query
3901 required: false
3902 description: >
0aa52e17 3903 Special filters which might require special rights:
fd5af7a2
RK
3904 * `local` - only videos local to the instance
3905 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
0aa52e17 3906 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
fd5af7a2
RK
3907 schema:
3908 type: string
3909 enum:
3910 - local
3911 - all-local
e76d5784
RK
3912 subscriptionsUris:
3913 name: uris
3914 in: query
3915 required: true
3916 description: list of uris to check if each is part of the user subscriptions
3917 schema:
3918 type: array
3919 items:
3920 type: string
84f6e32c
RK
3921 format: uri
3922 npmName:
3923 name: npmName
3924 in: path
3925 required: true
3926 description: name of the plugin/theme on npmjs.com or in its package.json
3927 schema:
3928 type: string
3929 example: peertube-plugin-auth-ldap
040d6896
RK
3930 jobType:
3931 name: jobType
3932 in: query
3933 required: false
3934 description: job type
3935 schema:
3936 type: string
3937 enum:
3938 - activitypub-follow
3939 - activitypub-http-broadcast
3940 - activitypub-http-fetcher
3941 - activitypub-http-unicast
3942 - email
3943 - video-transcoding
3944 - video-file-import
3945 - video-import
3946 - videos-views
3947 - activitypub-refresher
3948 - video-redundancy
3949 - video-live-ending
3e9e6f2f
RK
3950 securitySchemes:
3951 OAuth2:
3952 description: >
3953 In the header: *Authorization: Bearer <token\>*
3954
3955
3956 Authenticating via OAuth requires the following steps:
3957
3958
3959 - Have an account with sufficient authorization levels
3960
9817060f 3961 - [Generate](https://docs.joinpeertube.org/api-rest-getting-started) a
3e9e6f2f
RK
3962 Bearer Token
3963
3964 - Make Authenticated Requests
3965 type: oauth2
3966 flows:
3967 password:
3968 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
3969 scopes:
3970 admin: Admin scope
3971 moderator: Moderator scope
3972 user: User scope
3973 schemas:
dfcb6f50 3974 VideoConstantNumber-Category:
3e9e6f2f
RK
3975 properties:
3976 id:
06746a8b 3977 type: integer
dfcb6f50 3978 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
3e9e6f2f
RK
3979 label:
3980 type: string
dfcb6f50
RK
3981 VideoConstantNumber-Licence:
3982 properties:
3983 id:
3984 type: integer
3985 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
3986 label:
3987 type: string
3988 VideoConstantString-Language:
3e9e6f2f
RK
3989 properties:
3990 id:
3991 type: string
dfcb6f50 3992 description: language id of the video (see [/videos/languages](#tag/Video/paths/~1videos~1languages/get))
3e9e6f2f
RK
3993 label:
3994 type: string
c1843150
C
3995
3996 VideoPlaylistPrivacySet:
3997 type: integer
3998 enum:
3999 - 1
4000 - 2
4001 - 3
06746a8b 4002 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
c1843150
C
4003 VideoPlaylistPrivacyConstant:
4004 properties:
4005 id:
4006 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
4007 label:
4008 type: string
4009
4010 VideoPlaylistTypeSet:
4011 type: integer
4012 enum:
4013 - 1
4014 - 2
06746a8b 4015 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
c1843150
C
4016 VideoPlaylistTypeConstant:
4017 properties:
4018 id:
4019 $ref: '#/components/schemas/VideoPlaylistTypeSet'
4020 label:
4021 type: string
4022
ee89e8fd
C
4023 VideoPrivacySet:
4024 type: integer
3e9e6f2f 4025 enum:
ee89e8fd
C
4026 - 1
4027 - 2
4028 - 3
c1843150 4029 - 4
06746a8b 4030 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
ee89e8fd
C
4031 VideoPrivacyConstant:
4032 properties:
4033 id:
c1843150 4034 $ref: '#/components/schemas/VideoPrivacySet'
ee89e8fd
C
4035 label:
4036 type: string
50e16ccf 4037
0590bb46
C
4038 NSFWPolicy:
4039 type: string
4040 enum:
4041 - display
4042 - blur
4043 - do_not_list
4044
4045 UserRole:
06746a8b 4046 type: integer
0590bb46
C
4047 enum:
4048 - 0
4049 - 1
4050 - 2
06746a8b 4051 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
2c318664 4052 example: 2
6d989edc
C
4053 UserAdminFlags:
4054 type: integer
4055 enum:
4056 - 0
4057 - 1
4058 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4059 example: 1
0590bb46 4060
5dce26d2
C
4061 VideoStateConstant:
4062 properties:
4063 id:
4064 type: integer
4065 enum:
4066 - 1
4067 - 2
4068 - 3
06746a8b 4069 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
5dce26d2
C
4070 label:
4071 type: string
50e16ccf 4072
4f32032f 4073 AbuseStateSet:
50e16ccf
C
4074 type: integer
4075 enum:
4076 - 1
4077 - 2
4078 - 3
668b7f09 4079 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4f32032f 4080 AbuseStateConstant:
50e16ccf
C
4081 properties:
4082 id:
4f32032f 4083 $ref: '#/components/schemas/AbuseStateSet'
50e16ccf
C
4084 label:
4085 type: string
4f32032f 4086 AbusePredefinedReasons:
1ebddadd
RK
4087 type: array
4088 items:
4089 type: string
4090 enum:
4091 - violentOrAbusive
4092 - hatefulOrAbusive
4093 - spamOrMisleading
4094 - privacy
4095 - rights
4096 - serverRules
4097 - thumbnails
4098 - captions
84f6e32c 4099 example: [spamOrMisleading]
50e16ccf 4100
5dce26d2
C
4101 VideoResolutionConstant:
4102 properties:
4103 id:
4104 type: integer
b7085c71 4105 description: 'Video resolution (240, 360, 720, 1080, 1440 or 2160)'
84f6e32c 4106 example: 240
5dce26d2
C
4107 label:
4108 type: string
84f6e32c 4109 example: 240p
5dce26d2
C
4110 VideoScheduledUpdate:
4111 properties:
4112 privacy:
4113 $ref: '#/components/schemas/VideoPrivacySet'
5dce26d2
C
4114 updateAt:
4115 type: string
4116 format: date
4117 description: When to update the video
4118 required:
4119 - updateAt
c1843150 4120 AccountSummary:
5dce26d2
C
4121 properties:
4122 id:
06746a8b 4123 type: integer
5dce26d2
C
4124 name:
4125 type: string
4126 displayName:
4127 type: string
4128 url:
4129 type: string
84f6e32c 4130 format: url
5dce26d2
C
4131 host:
4132 type: string
84f6e32c 4133 format: hostname
5dce26d2
C
4134 avatar:
4135 nullable: true
c1843150 4136 allOf:
75cba40d 4137 - $ref: '#/components/schemas/ActorImage'
5dce26d2
C
4138 VideoChannelSummary:
4139 properties:
4140 id:
06746a8b 4141 type: integer
5dce26d2
C
4142 name:
4143 type: string
4144 displayName:
4145 type: string
4146 url:
4147 type: string
84f6e32c 4148 format: url
5dce26d2
C
4149 host:
4150 type: string
84f6e32c 4151 format: hostname
5dce26d2
C
4152 avatar:
4153 nullable: true
c1843150 4154 allOf:
75cba40d 4155 - $ref: '#/components/schemas/ActorImage'
5dce26d2
C
4156 PlaylistElement:
4157 properties:
4158 position:
06746a8b 4159 type: integer
5dce26d2 4160 startTimestamp:
06746a8b 4161 type: integer
5dce26d2 4162 stopTimestamp:
06746a8b 4163 type: integer
bfbd9128
C
4164 video:
4165 nullable: true
c1843150
C
4166 allOf:
4167 - $ref: '#/components/schemas/Video'
5dce26d2
C
4168 VideoFile:
4169 properties:
4170 magnetUri:
4171 type: string
4172 resolution:
4173 $ref: '#/components/schemas/VideoResolutionConstant'
4174 size:
06746a8b 4175 type: integer
5dce26d2
C
4176 description: 'Video file size in bytes'
4177 torrentUrl:
4178 type: string
e81af300 4179 description: Direct URL of the torrent file
84f6e32c 4180 format: url
0ad45af7 4181 torrentDownloadUrl:
5dce26d2 4182 type: string
e81af300 4183 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
84f6e32c 4184 format: url
5dce26d2
C
4185 fileUrl:
4186 type: string
e81af300 4187 description: Direct URL of the video
84f6e32c 4188 format: url
5dce26d2
C
4189 fileDownloadUrl:
4190 type: string
e81af300 4191 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
84f6e32c 4192 format: url
5dce26d2
C
4193 fps:
4194 type: number
63748ad0
C
4195 metadataUrl:
4196 type: string
84f6e32c 4197 format: url
5dce26d2
C
4198 VideoStreamingPlaylists:
4199 properties:
4200 id:
06746a8b 4201 type: integer
5dce26d2 4202 type:
06746a8b 4203 type: integer
5dce26d2
C
4204 enum:
4205 - 1
06746a8b 4206 description: 'Playlist type (HLS = `1`)'
5dce26d2
C
4207 playlistUrl:
4208 type: string
84f6e32c 4209 format: url
5dce26d2
C
4210 segmentsSha256Url:
4211 type: string
84f6e32c 4212 format: url
63748ad0
C
4213 files:
4214 type: array
000ca2a8 4215 description: 'Video files associated to this playlist. The difference with the root "files" property is that these files are fragmented, so they can be used in this streaming playlist (HLS etc)'
63748ad0
C
4216 items:
4217 $ref: '#/components/schemas/VideoFile'
5dce26d2
C
4218 redundancies:
4219 type: array
4220 items:
4221 type: object
4222 properties:
4223 baseUrl:
4224 type: string
84f6e32c 4225 format: url
f4d59981
RK
4226 VideoInfo:
4227 properties:
4228 id:
4229 type: integer
4230 uuid:
4231 type: string
84f6e32c
RK
4232 format: uuid
4233 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
f4d59981
RK
4234 name:
4235 type: string
bdac0584
RK
4236 minLength: 3
4237 maxLength: 120
3e9e6f2f
RK
4238 Video:
4239 properties:
4240 id:
06746a8b 4241 type: integer
84f6e32c 4242 example: 8
3e9e6f2f
RK
4243 uuid:
4244 type: string
84f6e32c
RK
4245 format: uuid
4246 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4e239e35
C
4247 isLive:
4248 type: boolean
3e9e6f2f
RK
4249 createdAt:
4250 type: string
84f6e32c 4251 format: date-time
3e9e6f2f
RK
4252 publishedAt:
4253 type: string
84f6e32c 4254 format: date-time
3e9e6f2f
RK
4255 updatedAt:
4256 type: string
84f6e32c 4257 format: date-time
5dce26d2
C
4258 originallyPublishedAt:
4259 type: string
84f6e32c 4260 format: date-time
3e9e6f2f 4261 category:
dfcb6f50 4262 $ref: '#/components/schemas/VideoConstantNumber-Category'
3e9e6f2f 4263 licence:
dfcb6f50 4264 $ref: '#/components/schemas/VideoConstantNumber-Licence'
3e9e6f2f 4265 language:
dfcb6f50 4266 $ref: '#/components/schemas/VideoConstantString-Language'
3e9e6f2f 4267 privacy:
ee89e8fd 4268 $ref: '#/components/schemas/VideoPrivacyConstant'
3e9e6f2f
RK
4269 description:
4270 type: string
4271 duration:
06746a8b 4272 type: integer
84f6e32c 4273 example: 1419
3e9e6f2f
RK
4274 isLocal:
4275 type: boolean
4276 name:
4277 type: string
84f6e32c 4278 example: What is PeerTube?
bdac0584
RK
4279 minLength: 3
4280 maxLength: 120
3e9e6f2f
RK
4281 thumbnailPath:
4282 type: string
84f6e32c 4283 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3e9e6f2f
RK
4284 previewPath:
4285 type: string
20dcfd74 4286 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3e9e6f2f
RK
4287 embedPath:
4288 type: string
84f6e32c 4289 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
3e9e6f2f 4290 views:
06746a8b 4291 type: integer
84f6e32c 4292 example: 1337
3e9e6f2f 4293 likes:
06746a8b 4294 type: integer
84f6e32c 4295 example: 42
3e9e6f2f 4296 dislikes:
06746a8b 4297 type: integer
84f6e32c 4298 example: 7
3e9e6f2f
RK
4299 nsfw:
4300 type: boolean
5dce26d2
C
4301 waitTranscoding:
4302 type: boolean
4303 nullable: true
4304 state:
4305 $ref: '#/components/schemas/VideoStateConstant'
4306 scheduledUpdate:
4307 nullable: true
c1843150
C
4308 allOf:
4309 - $ref: '#/components/schemas/VideoScheduledUpdate'
5dce26d2
C
4310 blacklisted:
4311 nullable: true
4312 type: boolean
4313 blacklistedReason:
4314 nullable: true
4315 type: string
3e9e6f2f 4316 account:
c1843150 4317 $ref: '#/components/schemas/AccountSummary'
5dce26d2
C
4318 channel:
4319 $ref: '#/components/schemas/VideoChannelSummary'
4320 userHistory:
4321 nullable: true
3e9e6f2f
RK
4322 type: object
4323 properties:
5dce26d2 4324 currentTime:
06746a8b 4325 type: integer
5dce26d2
C
4326 VideoDetails:
4327 allOf:
4328 - $ref: '#/components/schemas/Video'
4329 - type: object
4330 properties:
4331 descriptionPath:
3e9e6f2f 4332 type: string
5dce26d2 4333 support:
3e9e6f2f 4334 type: string
00494d6e 4335 description: A text tell the audience how to support the video creator
84f6e32c 4336 example: Please support my work on <insert crowdfunding plateform>! <3
5dce26d2
C
4337 channel:
4338 $ref: '#/components/schemas/VideoChannel'
4339 account:
4340 $ref: '#/components/schemas/Account'
4341 tags:
bdac0584 4342 example: [flowers, gardening]
5dce26d2 4343 type: array
bdac0584
RK
4344 minItems: 1
4345 maxItems: 5
5dce26d2
C
4346 items:
4347 type: string
bdac0584
RK
4348 minLength: 2
4349 maxLength: 30
5dce26d2
C
4350 files:
4351 type: array
000ca2a8 4352 description: 'WebTorrent/raw video files. Can be empty if WebTorrent is disabled on the server. In this case, video files will be in the "streamingPlaylists[].files" property'
5dce26d2
C
4353 items:
4354 $ref: '#/components/schemas/VideoFile'
4355 commentsEnabled:
4356 type: boolean
4357 downloadEnabled:
4358 type: boolean
4359 trackerUrls:
4360 type: array
4361 items:
4362 type: string
84f6e32c 4363 format: url
5dce26d2
C
4364 streamingPlaylists:
4365 type: array
4366 items:
4367 $ref: '#/components/schemas/VideoStreamingPlaylists'
04b703f6
RK
4368 FileRedundancyInformation:
4369 properties:
4370 id:
4371 type: integer
4372 fileUrl:
4373 type: string
84f6e32c 4374 format: url
04b703f6
RK
4375 strategy:
4376 type: string
84f6e32c
RK
4377 enum:
4378 - manual
4379 - most-views
4380 - trending
4381 - recently-added
04b703f6
RK
4382 size:
4383 type: integer
4384 createdAt:
4385 type: string
4386 format: date-time
4387 updatedAt:
4388 type: string
4389 format: date-time
4390 expiresOn:
4391 type: string
4392 format: date-time
4393 VideoRedundancy:
4394 properties:
4395 id:
4396 type: integer
4397 name:
4398 type: string
4399 url:
4400 type: string
84f6e32c 4401 format: url
04b703f6
RK
4402 uuid:
4403 type: string
84f6e32c
RK
4404 format: uuid
4405 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
04b703f6
RK
4406 redundancies:
4407 type: object
4408 properties:
4409 files:
4410 type: array
4411 items:
1e904cde 4412 $ref: '#/components/schemas/FileRedundancyInformation'
04b703f6
RK
4413 streamingPlaylists:
4414 type: array
4415 items:
1e904cde 4416 $ref: '#/components/schemas/FileRedundancyInformation'
1f82e3e8
C
4417 VideoImportStateConstant:
4418 properties:
4419 id:
4420 type: integer
4421 enum:
4422 - 1
4423 - 2
4424 - 3
06746a8b 4425 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
1f82e3e8
C
4426 label:
4427 type: string
84f6e32c 4428 example: Pending
1f82e3e8
C
4429 VideoImport:
4430 properties:
4431 id:
06746a8b 4432 type: integer
84f6e32c 4433 example: 2
1f82e3e8
C
4434 targetUrl:
4435 type: string
84f6e32c
RK
4436 format: url
4437 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
1f82e3e8
C
4438 magnetUri:
4439 type: string
84f6e32c
RK
4440 format: uri
4441 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
1f82e3e8
C
4442 torrentName:
4443 type: string
4444 state:
84f6e32c 4445 $ref: '#/components/schemas/VideoImportStateConstant'
1f82e3e8
C
4446 error:
4447 type: string
4448 createdAt:
4449 type: string
84f6e32c 4450 format: date-time
1f82e3e8
C
4451 updatedAt:
4452 type: string
84f6e32c 4453 format: date-time
1f82e3e8
C
4454 video:
4455 $ref: '#/components/schemas/Video'
668b7f09 4456 Abuse:
3e9e6f2f
RK
4457 properties:
4458 id:
06746a8b 4459 type: integer
84f6e32c 4460 example: 7
3e9e6f2f
RK
4461 reason:
4462 type: string
84f6e32c 4463 example: The video is a spam
4302058c
RK
4464 minLength: 2
4465 maxLength: 3000
1ebddadd 4466 predefinedReasons:
4f32032f 4467 $ref: '#/components/schemas/AbusePredefinedReasons'
3e9e6f2f
RK
4468 reporterAccount:
4469 $ref: '#/components/schemas/Account'
50e16ccf 4470 state:
4f32032f 4471 $ref: '#/components/schemas/AbuseStateConstant'
50e16ccf
C
4472 moderationComment:
4473 type: string
84f6e32c 4474 example: Decided to ban the server since it spams us regularly
4302058c
RK
4475 minLength: 2
4476 maxLength: 3000
3e9e6f2f 4477 video:
bdac0584 4478 $ref: '#/components/schemas/VideoInfo'
3e9e6f2f
RK
4479 createdAt:
4480 type: string
84f6e32c 4481 format: date-time
668b7f09
C
4482 AbuseMessage:
4483 properties:
4484 id:
4485 type: integer
4486 message:
4487 type: string
4302058c
RK
4488 minLength: 2
4489 maxLength: 3000
668b7f09
C
4490 byModerator:
4491 type: boolean
4492 createdAt:
4493 type: string
4494 format: date-time
4495 account:
4496 $ref: '#/components/schemas/AccountSummary'
3e9e6f2f
RK
4497 VideoBlacklist:
4498 properties:
4499 id:
06746a8b 4500 type: integer
3e9e6f2f 4501 videoId:
06746a8b 4502 type: integer
3e9e6f2f
RK
4503 createdAt:
4504 type: string
84f6e32c 4505 format: date-time
3e9e6f2f
RK
4506 updatedAt:
4507 type: string
84f6e32c 4508 format: date-time
3e9e6f2f
RK
4509 name:
4510 type: string
4302058c
RK
4511 minLength: 3
4512 maxLength: 120
3e9e6f2f
RK
4513 uuid:
4514 type: string
84f6e32c
RK
4515 format: uuid
4516 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
4517 description:
4518 type: string
4302058c
RK
4519 minLength: 3
4520 maxLength: 10000
3e9e6f2f 4521 duration:
06746a8b 4522 type: integer
3e9e6f2f 4523 views:
06746a8b 4524 type: integer
3e9e6f2f 4525 likes:
06746a8b 4526 type: integer
3e9e6f2f 4527 dislikes:
06746a8b 4528 type: integer
3e9e6f2f
RK
4529 nsfw:
4530 type: boolean
4531 VideoChannel:
4532 properties:
4533 displayName:
4534 type: string
4302058c
RK
4535 minLength: 1
4536 maxLength: 120
3e9e6f2f
RK
4537 description:
4538 type: string
4302058c
RK
4539 minLength: 3
4540 maxLength: 1000
3e9e6f2f
RK
4541 isLocal:
4542 type: boolean
4543 ownerAccount:
4544 type: object
4545 properties:
4546 id:
06746a8b 4547 type: integer
3e9e6f2f
RK
4548 uuid:
4549 type: string
84f6e32c
RK
4550 format: uuid
4551 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
71810d0b
RK
4552 VideoPlaylist:
4553 properties:
4554 id:
06746a8b 4555 type: integer
71810d0b
RK
4556 createdAt:
4557 type: string
84f6e32c 4558 format: date-time
71810d0b
RK
4559 updatedAt:
4560 type: string
84f6e32c 4561 format: date-time
71810d0b
RK
4562 description:
4563 type: string
4302058c
RK
4564 minLength: 3
4565 maxLength: 1000
71810d0b
RK
4566 uuid:
4567 type: string
84f6e32c
RK
4568 format: uuid
4569 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
71810d0b
RK
4570 displayName:
4571 type: string
4302058c
RK
4572 minLength: 1
4573 maxLength: 120
71810d0b
RK
4574 isLocal:
4575 type: boolean
4576 videoLength:
06746a8b 4577 type: integer
71810d0b
RK
4578 thumbnailPath:
4579 type: string
4580 privacy:
c1843150 4581 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
71810d0b 4582 type:
c1843150 4583 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
71810d0b 4584 ownerAccount:
c1843150
C
4585 $ref: '#/components/schemas/AccountSummary'
4586 videoChannel:
4587 $ref: '#/components/schemas/VideoChannelSummary'
3e9e6f2f
RK
4588 VideoComment:
4589 properties:
4590 id:
06746a8b 4591 type: integer
3e9e6f2f
RK
4592 url:
4593 type: string
84f6e32c 4594 format: url
3e9e6f2f
RK
4595 text:
4596 type: string
4302058c
RK
4597 minLength: 1
4598 maxLength: 10000
3e9e6f2f 4599 threadId:
06746a8b 4600 type: integer
3e9e6f2f 4601 inReplyToCommentId:
06746a8b 4602 type: integer
3e9e6f2f 4603 videoId:
06746a8b 4604 type: integer
3e9e6f2f
RK
4605 createdAt:
4606 type: string
84f6e32c 4607 format: date-time
3e9e6f2f
RK
4608 updatedAt:
4609 type: string
84f6e32c 4610 format: date-time
5b0413dd 4611 totalRepliesFromVideoAuthor:
06746a8b 4612 type: integer
3e9e6f2f 4613 totalReplies:
06746a8b 4614 type: integer
3e9e6f2f
RK
4615 account:
4616 $ref: '#/components/schemas/Account'
4617 VideoCommentThreadTree:
4618 properties:
4619 comment:
4620 $ref: '#/components/schemas/VideoComment'
4621 children:
4622 type: array
4623 items:
4624 $ref: '#/components/schemas/VideoCommentThreadTree'
67ae04a5
C
4625 VideoCaption:
4626 properties:
4627 language:
dfcb6f50 4628 $ref: '#/components/schemas/VideoConstantString-Language'
67ae04a5
C
4629 captionPath:
4630 type: string
75cba40d 4631 ActorImage:
3e9e6f2f
RK
4632 properties:
4633 path:
4634 type: string
4635 createdAt:
4636 type: string
84f6e32c 4637 format: date-time
3e9e6f2f
RK
4638 updatedAt:
4639 type: string
84f6e32c 4640 format: date-time
f4d59981
RK
4641 ActorInfo:
4642 properties:
4643 id:
4644 type: integer
84f6e32c 4645 example: 11
f4d59981
RK
4646 name:
4647 type: string
4648 displayName:
4649 type: string
4650 host:
4651 type: string
84f6e32c 4652 format: hostname
f4d59981
RK
4653 avatar:
4654 nullable: true
4655 type: object
4656 properties:
4657 path:
4658 type: string
3e9e6f2f
RK
4659 Actor:
4660 properties:
4661 id:
06746a8b 4662 type: integer
84f6e32c 4663 example: 11
3e9e6f2f
RK
4664 url:
4665 type: string
84f6e32c 4666 format: url
3e9e6f2f
RK
4667 name:
4668 type: string
4669 host:
4670 type: string
84f6e32c 4671 format: hostname
3e9e6f2f 4672 followingCount:
06746a8b 4673 type: integer
3e9e6f2f 4674 followersCount:
06746a8b 4675 type: integer
3e9e6f2f
RK
4676 createdAt:
4677 type: string
84f6e32c 4678 format: date-time
3e9e6f2f
RK
4679 updatedAt:
4680 type: string
84f6e32c 4681 format: date-time
3e9e6f2f 4682 avatar:
75cba40d 4683 $ref: '#/components/schemas/ActorImage'
3e9e6f2f
RK
4684 Account:
4685 allOf:
4686 - $ref: '#/components/schemas/Actor'
4687 - properties:
2a8ae759
FS
4688 userId:
4689 type: string
84f6e32c 4690 example: 2
3e9e6f2f
RK
4691 displayName:
4692 type: string
2a8ae759
FS
4693 description:
4694 type: string
6441981b
RK
4695 UserWatchingVideo:
4696 properties:
4697 currentTime:
06746a8b 4698 type: integer
84f6e32c
RK
4699 description: timestamp within the video, in seconds
4700 example: 5
3e9e6f2f
RK
4701 ServerConfig:
4702 properties:
2a8ae759
FS
4703 instance:
4704 type: object
4705 properties:
4706 name:
4707 type: string
4708 shortDescription:
4709 type: string
4710 defaultClientRoute:
4711 type: string
4712 isNSFW:
4713 type: boolean
4714 defaultNSFWPolicy:
4715 type: string
4716 customizations:
4717 type: object
4718 properties:
4719 javascript:
4720 type: string
4721 css:
4722 type: string
f30736c8
RK
4723 search:
4724 type: object
4725 properties:
4726 remoteUri:
4727 type: object
4728 properties:
4729 users:
4730 type: boolean
4731 anonymous:
4732 type: boolean
2a8ae759
FS
4733 plugin:
4734 type: object
4735 properties:
4736 registered:
4737 type: array
4738 items:
4739 type: string
4740 theme:
4741 type: object
4742 properties:
4743 registered:
4744 type: array
4745 items:
4746 type: string
4747 email:
4748 type: object
4749 properties:
4750 enabled:
4751 type: boolean
4752 contactForm:
4753 type: object
4754 properties:
4755 enabled:
4756 type: boolean
4757 serverVersion:
4758 type: string
4759 serverCommit:
4760 type: string
3e9e6f2f
RK
4761 signup:
4762 type: object
4763 properties:
4764 allowed:
4765 type: boolean
2a8ae759
FS
4766 allowedForCurrentIP:
4767 type: boolean
4768 requiresEmailVerification:
4769 type: boolean
3e9e6f2f
RK
4770 transcoding:
4771 type: object
4772 properties:
2a8ae759
FS
4773 hls:
4774 type: object
4775 properties:
4776 enabled:
4777 type: boolean
f30736c8
RK
4778 webtorrent:
4779 type: object
4780 properties:
4781 enabled:
4782 type: boolean
3e9e6f2f
RK
4783 enabledResolutions:
4784 type: array
4785 items:
06746a8b 4786 type: integer
2a8ae759
FS
4787 import:
4788 type: object
4789 properties:
4790 videos:
4791 type: object
4792 properties:
4793 http:
4794 type: object
4795 properties:
4796 enabled:
4797 type: boolean
4798 torrent:
4799 type: object
4800 properties:
4801 enabled:
4802 type: boolean
4803 autoBlacklist:
4804 type: object
4805 properties:
4806 videos:
4807 type: object
4808 properties:
4809 ofUsers:
4810 type: object
4811 properties:
4812 enabled:
4813 type: boolean
3e9e6f2f
RK
4814 avatar:
4815 type: object
4816 properties:
4817 file:
4818 type: object
4819 properties:
4820 size:
4821 type: object
4822 properties:
4823 max:
06746a8b 4824 type: integer
3e9e6f2f
RK
4825 extensions:
4826 type: array
4827 items:
4828 type: string
4829 video:
4830 type: object
4831 properties:
2a8ae759
FS
4832 image:
4833 type: object
4834 properties:
4835 extensions:
4836 type: array
4837 items:
4838 type: string
4839 size:
4840 type: object
4841 properties:
4842 max:
06746a8b 4843 type: integer
3e9e6f2f
RK
4844 file:
4845 type: object
4846 properties:
4847 extensions:
4848 type: array
4849 items:
4850 type: string
2a8ae759
FS
4851 videoCaption:
4852 type: object
4853 properties:
4854 file:
4855 type: object
4856 properties:
4857 size:
4858 type: object
4859 properties:
4860 max:
06746a8b 4861 type: integer
2a8ae759
FS
4862 extensions:
4863 type: array
4864 items:
4865 type: string
4866 user:
4867 type: object
4868 properties:
4869 videoQuota:
06746a8b 4870 type: integer
2a8ae759 4871 videoQuotaDaily:
06746a8b 4872 type: integer
2a8ae759
FS
4873 trending:
4874 type: object
4875 properties:
4876 videos:
4877 type: object
4878 properties:
4879 intervalDays:
06746a8b 4880 type: integer
2a8ae759 4881 tracker:
747b17c7 4882 type: object
2a8ae759
FS
4883 properties:
4884 enabled:
4885 type: boolean
f30736c8
RK
4886 followings:
4887 type: object
4888 properties:
4889 instance:
4890 type: object
4891 properties:
4892 autoFollowIndex:
4893 type: object
4894 properties:
4895 indexUrl:
4896 type: string
84f6e32c 4897 format: url
2a8ae759
FS
4898 ServerConfigAbout:
4899 properties:
4900 instance:
4901 type: object
4902 properties:
4903 name:
4904 type: string
4905 shortDescription:
4906 type: string
4907 description:
4908 type: string
4909 terms:
4910 type: string
4911 ServerConfigCustom:
4912 properties:
4913 instance:
4914 type: object
4915 properties:
4916 name:
4917 type: string
4918 shortDescription:
4919 type: string
4920 description:
4921 type: string
4922 terms:
4923 type: string
4924 defaultClientRoute:
4925 type: string
4926 isNSFW:
4927 type: boolean
4928 defaultNSFWPolicy:
4929 type: string
4930 customizations:
4931 type: object
4932 properties:
4933 javascript:
4934 type: string
4935 css:
4936 type: string
4937 theme:
4938 type: object
4939 properties:
4940 default:
4941 type: string
4942 services:
4943 type: object
4944 properties:
4945 twitter:
4946 type: object
4947 properties:
4948 username:
4949 type: string
4950 whitelisted:
4951 type: boolean
4952 cache:
4953 type: object
4954 properties:
4955 previews:
4956 type: object
4957 properties:
4958 size:
06746a8b 4959 type: integer
2a8ae759
FS
4960 captions:
4961 type: object
4962 properties:
4963 size:
06746a8b 4964 type: integer
2a8ae759
FS
4965 signup:
4966 type: object
4967 properties:
4968 enabled:
4969 type: boolean
4970 limit:
06746a8b 4971 type: integer
2a8ae759
FS
4972 requiresEmailVerification:
4973 type: boolean
4974 admin:
4975 type: object
4976 properties:
4977 email:
4978 type: string
84f6e32c 4979 format: email
2a8ae759
FS
4980 contactForm:
4981 type: object
4982 properties:
4983 enabled:
4984 type: boolean
4985 user:
4986 type: object
4987 properties:
4988 videoQuota:
06746a8b 4989 type: integer
2a8ae759 4990 videoQuotaDaily:
06746a8b 4991 type: integer
2a8ae759
FS
4992 transcoding:
4993 type: object
4994 properties:
4995 enabled:
4996 type: boolean
4997 allowAdditionalExtensions:
4998 type: boolean
4999 allowAudioFiles:
5000 type: boolean
5001 threads:
06746a8b 5002 type: integer
2a8ae759
FS
5003 resolutions:
5004 type: object
5005 properties:
5006 240p:
5007 type: boolean
5008 360p:
5009 type: boolean
5010 480p:
5011 type: boolean
5012 720p:
5013 type: boolean
5014 1080p:
5015 type: boolean
b7085c71
RK
5016 1440p:
5017 type: boolean
2a8ae759
FS
5018 2160p:
5019 type: boolean
5020 hls:
5021 type: object
5022 properties:
5023 enabled:
5024 type: boolean
5025 import:
5026 type: object
5027 properties:
5028 videos:
5029 type: object
5030 properties:
5031 http:
5032 type: object
5033 properties:
5034 enabled:
5035 type: boolean
5036 torrent:
5037 type: object
5038 properties:
5039 enabled:
5040 type: boolean
5041 autoBlacklist:
5042 type: object
5043 properties:
5044 videos:
5045 type: object
5046 properties:
5047 ofUsers:
5048 type: object
5049 properties:
5050 enabled:
5051 type: boolean
5052 followers:
5053 type: object
5054 properties:
5055 instance:
5056 type: object
5057 properties:
5058 enabled:
5059 type: boolean
5060 manualApproval:
5061 type: boolean
3e9e6f2f
RK
5062 Follow:
5063 properties:
5064 id:
06746a8b 5065 type: integer
3e9e6f2f
RK
5066 follower:
5067 $ref: '#/components/schemas/Actor'
5068 following:
5069 $ref: '#/components/schemas/Actor'
5070 score:
5071 type: number
04b703f6 5072 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
3e9e6f2f
RK
5073 state:
5074 type: string
5075 enum:
5076 - pending
5077 - accepted
5078 createdAt:
5079 type: string
84f6e32c 5080 format: date-time
3e9e6f2f
RK
5081 updatedAt:
5082 type: string
84f6e32c 5083 format: date-time
e3489df9
C
5084
5085 PredefinedAbuseReasons:
5086 description: Reason categories that help triage reports
5087 type: array
5088 items:
5089 type: string
5090 enum:
5091 - violentOrAbusive
5092 - hatefulOrAbusive
5093 - spamOrMisleading
5094 - privacy
5095 - rights
5096 - serverRules
5097 - thumbnails
5098 - captions
5099
3e9e6f2f
RK
5100 Job:
5101 properties:
5102 id:
06746a8b 5103 type: integer
84f6e32c
RK
5104 minimum: 0
5105 example: 42
3e9e6f2f
RK
5106 state:
5107 type: string
5108 enum:
84f6e32c
RK
5109 - active
5110 - completed
5111 - failed
5112 - waiting
5113 - delayed
5114 type:
3e9e6f2f
RK
5115 type: string
5116 enum:
84f6e32c
RK
5117 - activitypub-http-unicast
5118 - activitypub-http-broadcast
5119 - activitypub-http-fetcher
5120 - activitypub-follow
5121 - video-file-import
5122 - video-transcoding
5123 - email
5124 - video-import
5125 - videos-views
5126 - activitypub-refresher
5127 - video-redundancy
5128 data:
5129 type: object
5130 additionalProperties: true
5131 error:
5132 type: object
5133 additionalProperties: true
3e9e6f2f
RK
5134 createdAt:
5135 type: string
84f6e32c
RK
5136 format: date-time
5137 finishedOn:
3e9e6f2f 5138 type: string
84f6e32c
RK
5139 format: date-time
5140 processedOn:
5141 type: string
5142 format: date-time
3e9e6f2f
RK
5143 AddUserResponse:
5144 properties:
2c318664
RK
5145 user:
5146 type: object
5147 properties:
5148 id:
5149 type: integer
5150 example: 8
5151 account:
5152 type: object
5153 properties:
5154 id:
5155 type: integer
5156 example: 37
3e9e6f2f
RK
5157 VideoUploadResponse:
5158 properties:
5159 video:
5160 type: object
5161 properties:
5162 id:
06746a8b 5163 type: integer
84f6e32c 5164 example: 8
3e9e6f2f
RK
5165 uuid:
5166 type: string
84f6e32c
RK
5167 format: uuid
5168 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
5169 CommentThreadResponse:
5170 properties:
5171 total:
06746a8b 5172 type: integer
84f6e32c 5173 example: 1
3e9e6f2f
RK
5174 data:
5175 type: array
84f6e32c 5176 maxItems: 100
3e9e6f2f
RK
5177 items:
5178 $ref: '#/components/schemas/VideoComment'
5179 CommentThreadPostResponse:
5180 properties:
5181 comment:
5182 $ref: '#/components/schemas/VideoComment'
048b6946
C
5183 VideoListResponse:
5184 properties:
5185 total:
06746a8b 5186 type: integer
84f6e32c 5187 example: 1
048b6946
C
5188 data:
5189 type: array
84f6e32c 5190 maxItems: 100
048b6946
C
5191 items:
5192 $ref: '#/components/schemas/Video'
84f6e32c
RK
5193 User:
5194 properties:
5195 id:
5196 type: integer
5197 readOnly: true
5198 username:
5199 type: string
5200 description: The user username
5201 minLength: 1
5202 maxLength: 50
5203 email:
5204 type: string
5205 format: email
5206 description: The user email
6d989edc
C
5207 pluginAuth:
5208 type: string
5209 description: Auth plugin to use to authenticate the user
84f6e32c
RK
5210 theme:
5211 type: string
5212 description: Theme enabled by this user
5213 emailVerified:
5214 type: boolean
5215 description: Has the user confirmed their email address?
5216 nsfwPolicy:
5217 $ref: '#/components/schemas/NSFWPolicy'
5218 webtorrentEnabled:
5219 type: boolean
5220 description: Enable P2P in the player
5221 autoPlayVideo:
5222 type: boolean
5223 description: Automatically start playing the video on the watch page
5224 role:
5225 $ref: '#/components/schemas/UserRole'
5226 roleLabel:
5227 type: string
5228 enum:
5229 - User
5230 - Moderator
5231 - Administrator
5232 videoQuota:
5233 type: integer
5234 description: The user video quota
5235 videoQuotaDaily:
5236 type: integer
5237 description: The user daily video quota
5238 videosCount:
5239 type: integer
4f32032f 5240 abusesCount:
84f6e32c 5241 type: integer
4f32032f 5242 abusesAcceptedCount:
84f6e32c 5243 type: integer
4f32032f 5244 abusesCreatedCount:
84f6e32c
RK
5245 type: integer
5246 videoCommentsCount:
5247 type: integer
5248 noInstanceConfigWarningModal:
5249 type: boolean
5250 noWelcomeModal:
5251 type: boolean
5252 blocked:
5253 type: boolean
5254 blockedReason:
5255 type: string
5256 createdAt:
5257 type: string
5258 account:
5259 $ref: '#/components/schemas/Account'
5260 videoChannels:
5261 type: array
5262 items:
5263 $ref: '#/components/schemas/VideoChannel'
3e9e6f2f
RK
5264 AddUser:
5265 properties:
5266 username:
5267 type: string
84f6e32c 5268 description: The user username
06746a8b
RK
5269 minLength: 1
5270 maxLength: 50
3e9e6f2f
RK
5271 password:
5272 type: string
84f6e32c
RK
5273 format: password
5274 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
06746a8b
RK
5275 minLength: 6
5276 maxLength: 255
3e9e6f2f
RK
5277 email:
5278 type: string
84f6e32c
RK
5279 format: email
5280 description: The user email
3e9e6f2f 5281 videoQuota:
84f6e32c
RK
5282 type: integer
5283 description: The user video quota
fbe1bc2a 5284 videoQuotaDaily:
84f6e32c
RK
5285 type: integer
5286 description: The user daily video quota
6d989edc
C
5287 channelName:
5288 type: string
5289 description: The user default channel username
3e9e6f2f 5290 role:
0590bb46 5291 $ref: '#/components/schemas/UserRole'
6d989edc
C
5292 adminFlags:
5293 $ref: '#/components/schemas/UserAdminFlags'
3e9e6f2f
RK
5294 required:
5295 - username
5296 - password
5297 - email
5298 - videoQuota
fbe1bc2a 5299 - videoQuotaDaily
3e9e6f2f
RK
5300 - role
5301 UpdateUser:
5302 properties:
5303 id:
5304 type: string
84f6e32c 5305 description: The user id
3e9e6f2f
RK
5306 email:
5307 type: string
84f6e32c
RK
5308 format: email
5309 description: The updated email of the user
6d989edc
C
5310 emailVerified:
5311 type: boolean
5312 description: Set the email as verified
3e9e6f2f 5313 videoQuota:
84f6e32c
RK
5314 type: integer
5315 description: The updated video quota of the user
fbe1bc2a 5316 videoQuotaDaily:
84f6e32c
RK
5317 type: integer
5318 description: The updated daily video quota of the user
6d989edc
C
5319 pluginAuth:
5320 type: string
5321 nullable: true
5322 description: The auth plugin to use to authenticate the user
5323 example: 'peertube-plugin-auth-saml2'
3e9e6f2f 5324 role:
0590bb46 5325 $ref: '#/components/schemas/UserRole'
6d989edc
C
5326 adminFlags:
5327 $ref: '#/components/schemas/UserAdminFlags'
3e9e6f2f
RK
5328 required:
5329 - id
3e9e6f2f
RK
5330 UpdateMe:
5331 properties:
5332 password:
5333 type: string
84f6e32c
RK
5334 format: password
5335 description: Your new password
5336 minLength: 6
5337 maxLength: 255
3e9e6f2f
RK
5338 email:
5339 type: string
84f6e32c
RK
5340 format: email
5341 description: Your new email
3e9e6f2f
RK
5342 displayNSFW:
5343 type: string
84f6e32c
RK
5344 description: Your new displayNSFW
5345 enum:
5346 - 'true'
5347 - 'false'
5348 - both
3e9e6f2f 5349 autoPlayVideo:
84f6e32c
RK
5350 type: boolean
5351 description: Your new autoPlayVideo
3e9e6f2f
RK
5352 required:
5353 - password
5354 - email
5355 - displayNSFW
5356 - autoPlayVideo
5357 GetMeVideoRating:
5358 properties:
5359 id:
5360 type: string
84f6e32c 5361 description: Id of the video
3e9e6f2f
RK
5362 rating:
5363 type: number
84f6e32c 5364 description: Rating of the video
3e9e6f2f
RK
5365 required:
5366 - id
5367 - rating
c100a614
YB
5368 VideoRating:
5369 properties:
5370 video:
5371 $ref: '#/components/schemas/Video'
5372 rating:
5373 type: number
5374 description: 'Rating of the video'
5375 required:
5376 - video
5377 - rating
3e9e6f2f
RK
5378 RegisterUser:
5379 properties:
5380 username:
5381 type: string
84f6e32c
RK
5382 description: The username of the user
5383 minLength: 1
5384 maxLength: 50
5385 pattern: '/^[a-z0-9._]{1,50}$/'
3e9e6f2f
RK
5386 password:
5387 type: string
84f6e32c
RK
5388 format: password
5389 description: The password of the user
5390 minLength: 6
5391 maxLength: 255
3e9e6f2f
RK
5392 email:
5393 type: string
84f6e32c
RK
5394 format: email
5395 description: The email of the user
1f20622f
C
5396 displayName:
5397 type: string
84f6e32c
RK
5398 description: The user display name
5399 minLength: 1
5400 maxLength: 120
1f20622f
C
5401 channel:
5402 type: object
5403 properties:
5404 name:
5405 type: string
f2eb23cd 5406 description: The username for the default channel
84f6e32c 5407 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
1f20622f
C
5408 displayName:
5409 type: string
84f6e32c
RK
5410 description: The display name for the default channel
5411 minLength: 1
5412 maxLength: 120
3e9e6f2f
RK
5413 required:
5414 - username
5415 - password
5416 - email
4302058c
RK
5417
5418 VideoChannelCommon:
3e9e6f2f 5419 properties:
7d14d4d2
C
5420 displayName:
5421 type: string
4302058c
RK
5422 minLength: 1
5423 maxLength: 120
3e9e6f2f
RK
5424 description:
5425 type: string
4302058c
RK
5426 minLength: 3
5427 maxLength: 1000
7d14d4d2
C
5428 support:
5429 type: string
06746a8b 5430 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
00494d6e 5431 example: Please support my work on <insert crowdfunding plateform>! <3
4302058c
RK
5432 minLength: 3
5433 maxLength: 1000
5434 VideoChannelCreate:
5435 allOf:
5436 - $ref: '#/components/schemas/VideoChannelCommon'
5437 - properties:
5438 name:
5439 type: string
5440 minLength: 1
5441 maxLength: 120
7d14d4d2
C
5442 required:
5443 - name
5444 - displayName
5445 VideoChannelUpdate:
4302058c
RK
5446 allOf:
5447 - $ref: '#/components/schemas/VideoChannelCommon'
5448 - properties:
5449 bulkVideosSupportUpdate:
5450 type: boolean
5451 description: 'Update the support field for all videos of this channel'
1569a818 5452
06746a8b
RK
5453 MRSSPeerLink:
5454 type: object
5455 xml:
5456 name: 'media:peerLink'
5457 properties:
5458 href:
5459 type: string
5460 xml:
5461 attribute: true
5462 type:
5463 type: string
5464 enum:
5465 - application/x-bittorrent
5466 xml:
5467 attribute: true
5468 MRSSGroupContent:
5469 type: object
5470 xml:
5471 name: 'media:content'
5472 properties:
5473 url:
5474 type: string
84f6e32c 5475 format: url
06746a8b
RK
5476 xml:
5477 attribute: true
5478 fileSize:
5479 type: integer
5480 xml:
5481 attribute: true
5482 type:
5483 type: string
5484 xml:
5485 attribute: true
5486 framerate:
5487 type: integer
5488 xml:
5489 attribute: true
5490 duration:
5491 type: integer
5492 xml:
5493 attribute: true
5494 height:
5495 type: integer
5496 xml:
5497 attribute: true
5498 lang:
5499 type: string
5500 xml:
5501 attribute: true
5502 VideoCommentsForXML:
5503 type: array
5504 xml:
5505 wrapped: true
5506 name: 'channel'
5507 items:
5508 type: object
5509 xml:
5510 name: 'item'
5511 properties:
5512 link:
5513 type: string
84f6e32c 5514 format: url
06746a8b
RK
5515 guid:
5516 type: string
5517 pubDate:
5518 type: string
5519 format: date-time
5520 'content:encoded':
5521 type: string
5522 'dc:creator':
5523 type: string
5524 VideosForXML:
5525 type: array
5526 xml:
5527 wrapped: true
5528 name: 'channel'
5529 items:
5530 type: object
5531 xml:
5532 name: 'item'
5533 properties:
5534 link:
5535 type: string
84f6e32c 5536 format: url
06746a8b
RK
5537 description: video watch page URL
5538 guid:
5539 type: string
5540 description: video canonical URL
5541 pubDate:
5542 type: string
5543 format: date-time
5544 description: video publication date
5545 description:
5546 type: string
5547 description: video description
5548 'content:encoded':
5549 type: string
5550 description: video description
5551 'dc:creator':
5552 type: string
5553 description: publisher user name
5554 'media:category':
5555 type: integer
5556 description: video category (MRSS)
5557 'media:community':
5558 type: object
5559 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5560 properties:
5561 'media:statistics':
5562 type: object
5563 properties:
5564 views:
5565 type: integer
5566 xml:
5567 attribute: true
5568 'media:embed':
5569 type: object
5570 properties:
5571 url:
5572 type: string
84f6e32c 5573 format: url
06746a8b
RK
5574 description: video embed path, relative to the canonical URL domain (MRSS)
5575 xml:
5576 attribute: true
5577 'media:player':
5578 type: object
5579 properties:
5580 url:
5581 type: string
84f6e32c 5582 format: url
06746a8b
RK
5583 description: video watch path, relative to the canonical URL domain (MRSS)
5584 xml:
5585 attribute: true
5586 'media:thumbnail':
5587 type: object
5588 properties:
5589 url:
5590 type: string
84f6e32c 5591 format: url
06746a8b
RK
5592 xml:
5593 attribute: true
5594 height:
5595 type: integer
5596 xml:
5597 attribute: true
5598 width:
5599 type: integer
5600 xml:
5601 attribute: true
5602 'media:title':
5603 type: string
5604 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
5605 'media:description':
5606 type: string
5607 'media:rating':
5608 type: string
5609 enum:
5610 - nonadult
5611 - adult
5612 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
5613 'enclosure':
5614 type: object
5615 description: main streamable file for the video
5616 properties:
5617 url:
5618 type: string
84f6e32c 5619 format: url
06746a8b
RK
5620 xml:
5621 attribute: true
5622 type:
5623 type: string
5624 enum:
5625 - application/x-bittorrent
5626 xml:
5627 attribute: true
5628 length:
5629 type: integer
5630 xml:
5631 attribute: true
5632 'media:group':
5633 type: array
5634 description: list of streamable files for the video. see [media:peerLink](https://www.rssboard.org/media-rss#media-peerlink) and [media:content](https://www.rssboard.org/media-rss#media-content) or (MRSS)
5635 items:
5636 anyOf:
5637 - $ref: '#/components/schemas/MRSSPeerLink'
f4d59981
RK
5638 - $ref: '#/components/schemas/MRSSGroupContent'
5639 NotificationSettingValue:
5640 type: integer
5641 description: >
5642 Notification type
84f6e32c 5643
f4d59981 5644 - `0` NONE
84f6e32c 5645
f4d59981 5646 - `1` WEB
84f6e32c 5647
f4d59981
RK
5648 - `2` EMAIL
5649 enum:
5650 - 0
5651 - 1
5652 - 3
5653 Notification:
5654 properties:
5655 id:
5656 type: integer
5657 type:
5658 type: integer
5659 description: >
5660 Notification type, following the `UserNotificationType` enum:
84f6e32c 5661
f4d59981 5662 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
84f6e32c 5663
f4d59981 5664 - `2` NEW_COMMENT_ON_MY_VIDEO
84f6e32c 5665
310b5219 5666 - `3` NEW_ABUSE_FOR_MODERATORS
84f6e32c 5667
f4d59981 5668 - `4` BLACKLIST_ON_MY_VIDEO
84f6e32c 5669
f4d59981 5670 - `5` UNBLACKLIST_ON_MY_VIDEO
84f6e32c 5671
f4d59981 5672 - `6` MY_VIDEO_PUBLISHED
84f6e32c 5673
f4d59981 5674 - `7` MY_VIDEO_IMPORT_SUCCESS
84f6e32c 5675
f4d59981 5676 - `8` MY_VIDEO_IMPORT_ERROR
84f6e32c 5677
f4d59981 5678 - `9` NEW_USER_REGISTRATION
84f6e32c 5679
f4d59981 5680 - `10` NEW_FOLLOW
84f6e32c 5681
f4d59981 5682 - `11` COMMENT_MENTION
84f6e32c 5683
f4d59981 5684 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
84f6e32c 5685
f4d59981 5686 - `13` NEW_INSTANCE_FOLLOWER
84f6e32c 5687
f4d59981
RK
5688 - `14` AUTO_INSTANCE_FOLLOWING
5689 read:
5690 type: boolean
5691 video:
5692 nullable: true
5693 allOf:
5694 - $ref: '#/components/schemas/VideoInfo'
5695 - type: object
5696 properties:
5697 channel:
5698 $ref: '#/components/schemas/ActorInfo'
5699 videoImport:
5700 nullable: true
5701 type: object
5702 properties:
5703 id:
5704 type: integer
5705 video:
5706 nullable: true
5707 $ref: '#/components/schemas/VideoInfo'
5708 torrentName:
5709 type: string
5710 nullable: true
5711 magnetUri:
5712 type: string
84f6e32c 5713 format: uri
f4d59981
RK
5714 nullable: true
5715 targetUri:
5716 type: string
84f6e32c 5717 format: uri
f4d59981
RK
5718 nullable: true
5719 comment:
5720 nullable: true
5721 type: object
5722 properties:
5723 id:
5724 type: integer
5725 threadId:
5726 type: integer
5727 video:
5728 $ref: '#/components/schemas/VideoInfo'
5729 account:
5730 $ref: '#/components/schemas/ActorInfo'
5731 videoAbuse:
5732 nullable: true
5733 type: object
5734 properties:
5735 id:
5736 type: integer
5737 video:
5738 allOf:
5739 - $ref: '#/components/schemas/VideoInfo'
5740 videoBlacklist:
5741 nullable: true
5742 type: object
5743 properties:
5744 id:
5745 type: integer
5746 video:
5747 allOf:
5748 - $ref: '#/components/schemas/VideoInfo'
5749 account:
5750 nullable: true
5751 allOf:
5752 - $ref: '#/components/schemas/ActorInfo'
5753 actorFollow:
5754 type: object
5755 nullable: true
5756 properties:
5757 id:
5758 type: integer
5759 follower:
5760 $ref: '#/components/schemas/ActorInfo'
5761 state:
5762 type: string
5763 enum:
5764 - pending
5765 - accepted
5766 following:
5767 type: object
5768 properties:
5769 type:
5770 type: string
5771 enum:
5772 - account
5773 - channel
5774 - instance
5775 name:
5776 type: string
5777 displayName:
5778 type: string
5779 host:
5780 type: string
84f6e32c 5781 format: hostname
f4d59981
RK
5782 createdAt:
5783 type: string
5784 format: date-time
5785 updatedAt:
5786 type: string
5787 format: date-time
5788 NotificationListResponse:
5789 properties:
5790 total:
5791 type: integer
84f6e32c 5792 example: 1
f4d59981
RK
5793 data:
5794 type: array
84f6e32c 5795 maxItems: 100
f4d59981 5796 items:
7461d440
RK
5797 $ref: '#/components/schemas/Notification'
5798 Plugin:
5799 properties:
5800 name:
5801 type: string
84f6e32c 5802 example: peertube-plugin-auth-ldap
7461d440
RK
5803 type:
5804 type: integer
84f6e32c
RK
5805 description: >
5806 - `1`: PLUGIN
5807
5808 - `2`: THEME
7461d440
RK
5809 enum:
5810 - 1
5811 - 2
5812 latestVersion:
5813 type: string
84f6e32c 5814 example: 0.0.3
7461d440
RK
5815 version:
5816 type: string
84f6e32c 5817 example: 0.0.1
7461d440
RK
5818 enabled:
5819 type: boolean
5820 uninstalled:
5821 type: boolean
5822 peertubeEngine:
5823 type: string
84f6e32c 5824 example: 2.2.0
7461d440
RK
5825 description:
5826 type: string
5827 homepage:
5828 type: string
84f6e32c
RK
5829 format: url
5830 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7461d440
RK
5831 settings:
5832 type: object
5833 additionalProperties: true
5834 createdAt:
5835 type: string
5836 format: date-time
5837 updatedAt:
5838 type: string
5839 format: date-time
5840 PluginResponse:
5841 properties:
5842 total:
5843 type: integer
84f6e32c 5844 example: 1
7461d440
RK
5845 data:
5846 type: array
84f6e32c 5847 maxItems: 100
7461d440 5848 items:
2c318664 5849 $ref: '#/components/schemas/Plugin'
4e239e35
C
5850
5851 LiveVideoUpdate:
5852 properties:
5853 saveReplay:
5854 type: boolean
bb4ba6d9
C
5855 permanentLive:
5856 description: User can stream multiple times in a permanent live
5857 type: boolean
4e239e35
C
5858
5859 LiveVideoResponse:
5860 properties:
5861 rtmpUrl:
5862 type: string
5863 streamKey:
5864 type: string
5865 description: RTMP stream key to use to stream into this live video
5866 saveReplay:
5867 type: boolean
bb4ba6d9
C
5868 permanentLive:
5869 description: User can stream multiple times in a permanent live
5870 type: boolean
4e239e35 5871
75cba40d
C
5872
5873
2c318664
RK
5874 callbacks:
5875 searchIndex:
c00f96ce 5876 'https://search.example.org/api/v1/search/videos':
2c318664
RK
5877 post:
5878 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
5879 responses:
5880 '200':
5881 description: successful operation
5882 content:
5883 application/json:
5884 schema:
1e904cde 5885 $ref: '#/components/schemas/VideoListResponse'