]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/api/openapi.yaml
Revert sass loader upgrade
[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
1229 tags:
12fed49e 1230 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1fd12c7c 1231 type: array
07d02f6d
FS
1232 minItems: 1
1233 maxItems: 5
1fd12c7c
C
1234 items:
1235 type: string
07d02f6d
FS
1236 minLength: 2
1237 maxLength: 30
3e9e6f2f
RK
1238 commentsEnabled:
1239 description: Enable or disable comments for this video
84f6e32c 1240 type: boolean
37db4176
FS
1241 originallyPublishedAt:
1242 description: Date when the content was originally published
1243 type: string
1244 format: date-time
5dce26d2
C
1245 scheduleUpdate:
1246 $ref: '#/components/schemas/VideoScheduledUpdate'
0ad45af7
FS
1247 encoding:
1248 thumbnailfile:
1249 contentType: image/jpeg
1250 previewfile:
1251 contentType: image/jpeg
1569a818 1252 get:
b029d58a 1253 summary: Get a video
1569a818
DG
1254 tags:
1255 - Video
1569a818 1256 parameters:
cb9d028a 1257 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1258 responses:
1259 '200':
1260 description: successful operation
3e9e6f2f
RK
1261 content:
1262 application/json:
1263 schema:
5dce26d2 1264 $ref: '#/components/schemas/VideoDetails'
1569a818 1265 delete:
b029d58a 1266 summary: Delete a video
94ff4c23 1267 security:
3e9e6f2f 1268 - OAuth2: []
1569a818
DG
1269 tags:
1270 - Video
1569a818 1271 parameters:
cb9d028a 1272 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1273 responses:
1274 '204':
c1843150 1275 description: successful operation
3e9e6f2f 1276 '/videos/{id}/description':
1569a818 1277 get:
b029d58a 1278 summary: Get complete video description
1569a818
DG
1279 tags:
1280 - Video
1569a818 1281 parameters:
cb9d028a 1282 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1283 responses:
1284 '200':
1285 description: successful operation
3e9e6f2f
RK
1286 content:
1287 application/json:
1288 schema:
1289 type: string
1290 '/videos/{id}/views':
1569a818 1291 post:
b029d58a 1292 summary: Add a view to a video
1569a818
DG
1293 tags:
1294 - Video
1569a818 1295 parameters:
cb9d028a 1296 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1297 responses:
1298 '204':
c1843150 1299 description: successful operation
6441981b
RK
1300 '/videos/{id}/watching':
1301 put:
b029d58a 1302 summary: Set watching progress of a video
6441981b
RK
1303 tags:
1304 - Video
1305 security:
1306 - OAuth2: []
1307 parameters:
cb9d028a 1308 - $ref: '#/components/parameters/idOrUUID'
6441981b
RK
1309 requestBody:
1310 content:
1311 application/json:
1312 schema:
1313 $ref: '#/components/schemas/UserWatchingVideo'
1314 required: true
1315 responses:
1316 '204':
c1843150 1317 description: successful operation
c360c494 1318 /videos/upload:
1569a818 1319 post:
b029d58a 1320 summary: Upload a video
94ff4c23 1321 security:
3e9e6f2f 1322 - OAuth2: []
1569a818
DG
1323 tags:
1324 - Video
1569a818
DG
1325 responses:
1326 '200':
1327 description: successful operation
3e9e6f2f
RK
1328 content:
1329 application/json:
1330 schema:
1331 $ref: '#/components/schemas/VideoUploadResponse'
f2eb23cd
RK
1332 '400':
1333 description: invalid file field, schedule date or parameter
06bcfbd9 1334 '403':
f2eb23cd 1335 description: video didn't pass upload filter
06bcfbd9 1336 '408':
84f6e32c 1337 description: upload has timed out
d4132d3f 1338 '413':
f2eb23cd 1339 description: video file too large, due to quota or max body size limit set by the reverse-proxy
d4132d3f
RK
1340 headers:
1341 X-File-Maximum-Size:
1342 schema:
1343 type: string
1344 format: Nginx size
1345 description: Maximum file size for the video
f2eb23cd
RK
1346 '415':
1347 description: video type unsupported
06bcfbd9 1348 '422':
f2eb23cd 1349 description: video unreadable
3e9e6f2f
RK
1350 requestBody:
1351 content:
1352 multipart/form-data:
1353 schema:
1354 type: object
1355 properties:
1356 videofile:
1357 description: Video file
1358 type: string
1359 format: binary
1360 channelId:
1361 description: Channel id that will contain this video
06746a8b 1362 type: integer
3e9e6f2f
RK
1363 thumbnailfile:
1364 description: Video thumbnail file
1365 type: string
0ad45af7 1366 format: binary
3e9e6f2f
RK
1367 previewfile:
1368 description: Video preview file
1369 type: string
0ad45af7 1370 format: binary
8f9e8be1 1371 privacy:
ee89e8fd 1372 $ref: '#/components/schemas/VideoPrivacySet'
3e9e6f2f
RK
1373 category:
1374 description: Video category
84f6e32c
RK
1375 type: integer
1376 example: 4
3e9e6f2f
RK
1377 licence:
1378 description: Video licence
84f6e32c
RK
1379 type: integer
1380 example: 2
8726cd49
C
1381 language:
1382 description: Video language
1383 type: string
3e9e6f2f
RK
1384 description:
1385 description: Video description
1386 type: string
1387 waitTranscoding:
1388 description: Whether or not we wait transcoding before publish the video
cd372e84 1389 type: boolean
3e9e6f2f 1390 support:
00494d6e
RK
1391 description: A text tell the audience how to support the video creator
1392 example: Please support my work on <insert crowdfunding plateform>! <3
3e9e6f2f
RK
1393 type: string
1394 nsfw:
1395 description: Whether or not this video contains sensitive content
84f6e32c 1396 type: boolean
3e9e6f2f
RK
1397 name:
1398 description: Video name
1399 type: string
1400 tags:
07d02f6d 1401 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1fd12c7c 1402 type: array
07d02f6d
FS
1403 minItems: 1
1404 maxItems: 5
06746a8b 1405 uniqueItems: true
1fd12c7c
C
1406 items:
1407 type: string
07d02f6d
FS
1408 minLength: 2
1409 maxLength: 30
3e9e6f2f
RK
1410 commentsEnabled:
1411 description: Enable or disable comments for this video
84f6e32c 1412 type: boolean
cd372e84
A
1413 downloadEnabled:
1414 description: Enable or disable downloading for this video
1415 type: boolean
f9f89092
FS
1416 originallyPublishedAt:
1417 description: Date when the content was originally published
1418 type: string
1419 format: date-time
5dce26d2
C
1420 scheduleUpdate:
1421 $ref: '#/components/schemas/VideoScheduledUpdate'
3e9e6f2f
RK
1422 required:
1423 - videofile
1424 - channelId
8f9e8be1 1425 - name
0ad45af7
FS
1426 encoding:
1427 videofile:
1428 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1429 thumbnailfile:
1430 contentType: image/jpeg
1431 previewfile:
1432 contentType: image/jpeg
8f9e8be1
RK
1433 x-code-samples:
1434 - lang: Shell
1435 source: |
0579dee3 1436 ## DEPENDENCIES: jq
8f9e8be1
RK
1437 USERNAME="<your_username>"
1438 PASSWORD="<your_password>"
1439 FILE_PATH="<your_file_path>"
1440 CHANNEL_ID="<your_channel_id>"
8f9e8be1
RK
1441 NAME="<video_name>"
1442
1443 API_PATH="https://peertube2.cpy.re/api/v1"
1444 ## AUTH
0579dee3
JK
1445 client_id=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1446 client_secret=$(curl -s "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1447 token=$(curl -s "$API_PATH/users/token" \
1448 --data client_id="$client_id" \
1449 --data client_secret="$client_secret" \
1450 --data grant_type=password \
1451 --data response_type=code \
1452 --data username="$USERNAME" \
1453 --data password="$PASSWORD" \
8f9e8be1
RK
1454 | jq -r ".access_token")
1455 ## VIDEO UPLOAD
0579dee3
JK
1456 curl -s "$API_PATH/videos/upload" \
1457 -H "Authorization: Bearer $token" \
1458 --max-time 600 \
1459 --form videofile=@"$FILE_PATH" \
1460 --form channelId=$CHANNEL_ID \
1461 --form name="$NAME"
28c8e63e
C
1462 /videos/imports:
1463 post:
b029d58a
C
1464 summary: Import a video
1465 description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
28c8e63e
C
1466 security:
1467 - OAuth2: []
1468 tags:
1469 - Video
28c8e63e
C
1470 requestBody:
1471 content:
1472 multipart/form-data:
1473 schema:
1474 type: object
1475 properties:
1476 torrentfile:
1477 description: Torrent File
1478 type: string
1479 format: binary
1480 targetUrl:
1481 description: HTTP target URL
1482 type: string
1483 magnetUri:
1484 description: Magnet URI
1485 type: string
1486 channelId:
1487 description: Channel id that will contain this video
06746a8b 1488 type: integer
28c8e63e
C
1489 thumbnailfile:
1490 description: Video thumbnail file
1491 type: string
0ad45af7 1492 format: binary
28c8e63e
C
1493 previewfile:
1494 description: Video preview file
1495 type: string
0ad45af7 1496 format: binary
28c8e63e 1497 privacy:
ee89e8fd 1498 $ref: '#/components/schemas/VideoPrivacySet'
28c8e63e
C
1499 category:
1500 description: Video category
8726cd49
C
1501 type: integer
1502 example: 4
28c8e63e
C
1503 licence:
1504 description: Video licence
8726cd49
C
1505 type: integer
1506 example: 2
28c8e63e
C
1507 language:
1508 description: Video language
1509 type: string
1510 description:
1511 description: Video description
1512 type: string
1513 waitTranscoding:
1514 description: Whether or not we wait transcoding before publish the video
cd372e84 1515 type: boolean
28c8e63e 1516 support:
00494d6e
RK
1517 description: A text tell the audience how to support the video creator
1518 example: Please support my work on <insert crowdfunding plateform>! <3
28c8e63e
C
1519 type: string
1520 nsfw:
1521 description: Whether or not this video contains sensitive content
cd372e84 1522 type: boolean
28c8e63e
C
1523 name:
1524 description: Video name
1525 type: string
1526 tags:
07d02f6d 1527 description: Video tags (maximum 5 tags each between 2 and 30 characters)
28c8e63e 1528 type: array
07d02f6d
FS
1529 minItems: 1
1530 maxItems: 5
28c8e63e
C
1531 items:
1532 type: string
07d02f6d
FS
1533 minLength: 2
1534 maxLength: 30
28c8e63e
C
1535 commentsEnabled:
1536 description: Enable or disable comments for this video
cd372e84
A
1537 type: boolean
1538 downloadEnabled:
1539 description: Enable or disable downloading for this video
1540 type: boolean
5dce26d2
C
1541 scheduleUpdate:
1542 $ref: '#/components/schemas/VideoScheduledUpdate'
28c8e63e
C
1543 required:
1544 - channelId
1545 - name
0ad45af7
FS
1546 encoding:
1547 torrentfile:
1548 contentType: application/x-bittorrent
1549 thumbnailfile:
1550 contentType: image/jpeg
1551 previewfile:
1552 contentType: image/jpeg
06746a8b
RK
1553 responses:
1554 '200':
1555 description: successful operation
1556 content:
1557 application/json:
1558 schema:
1559 $ref: '#/components/schemas/VideoUploadResponse'
06746a8b
RK
1560 '400':
1561 description: '`magnetUri` or `targetUrl` or a torrent file missing'
f2eb23cd
RK
1562 '403':
1563 description: video didn't pass pre-import filter
1564 '409':
1565 description: HTTP or Torrent/magnetURI import not enabled
668b7f09 1566
4e239e35
C
1567 /videos/live:
1568 post:
1569 summary: Create a live
1570 security:
1571 - OAuth2: []
1572 tags:
1573 - Live Videos
1574 - Video
1575 responses:
1576 '200':
1577 description: successful operation
1578 content:
1579 application/json:
1580 schema:
1581 $ref: '#/components/schemas/VideoUploadResponse'
1582 '403':
1583 description: Live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded
1584 requestBody:
1585 content:
1586 multipart/form-data:
1587 schema:
1588 type: object
1589 properties:
1590 channelId:
1591 description: Channel id that will contain this live video
1592 type: integer
1593 saveReplay:
1594 type: boolean
bb4ba6d9
C
1595 permanentLive:
1596 description: User can stream multiple times in a permanent live
1597 type: boolean
4e239e35
C
1598 thumbnailfile:
1599 description: Live video/replay thumbnail file
1600 type: string
1601 format: binary
1602 previewfile:
1603 description: Live video/replay preview file
1604 type: string
1605 format: binary
1606 privacy:
1607 $ref: '#/components/schemas/VideoPrivacySet'
1608 category:
1609 description: Live video/replay category
1610 type: string
1611 licence:
1612 description: Live video/replay licence
1613 type: string
1614 language:
1615 description: Live video/replay language
1616 type: string
1617 description:
1618 description: Live video/replay description
1619 type: string
1620 support:
1621 description: A text tell the audience how to support the creator
1622 example: Please support my work on <insert crowdfunding plateform>! <3
1623 type: string
1624 nsfw:
1625 description: Whether or not this live video/replay contains sensitive content
1626 type: boolean
1627 name:
1628 description: Live video/replay name
1629 type: string
1630 tags:
1631 description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters)
1632 type: array
1633 minItems: 1
1634 maxItems: 5
1635 items:
1636 type: string
1637 minLength: 2
1638 maxLength: 30
1639 commentsEnabled:
1640 description: Enable or disable comments for this live video/replay
1641 type: boolean
1642 downloadEnabled:
1643 description: Enable or disable downloading for the replay of this live
1644 type: boolean
1645 required:
1646 - channelId
1647 - name
1648 encoding:
1649 thumbnailfile:
1650 contentType: image/jpeg
1651 previewfile:
1652 contentType: image/jpeg
1653
1654 /videos/live/{id}:
1655 get:
1656 summary: Get a live information
1657 security:
1658 - OAuth2: []
1659 tags:
1660 - Live Videos
1661 - Video
1662 parameters:
1663 - $ref: '#/components/parameters/idOrUUID'
1664 responses:
1665 '200':
1666 description: successful operation
1667 content:
1668 application/json:
1669 schema:
1670 $ref: '#/components/schemas/LiveVideoResponse'
1671 put:
1672 summary: Update a live information
1673 security:
1674 - OAuth2: []
1675 tags:
1676 - Live Videos
1677 - Video
1678 parameters:
1679 - $ref: '#/components/parameters/idOrUUID'
1680 requestBody:
1681 content:
1682 application/json:
1683 schema:
1684 $ref: '#/components/schemas/LiveVideoUpdate'
1685 responses:
1686 '204':
1687 description: Successful operation
1688 '400':
1689 description: Bad parameters or trying to update a live that has already started
1690 '403':
1691 description: Trying to save replay of the live but saving replay is not enabled on the instance
1692
668b7f09
C
1693 /users/me/abuses:
1694 get:
1695 summary: List my abuses
1696 security:
1697 - OAuth2: []
1698 tags:
1699 - Abuses
1700 - My User
1701 parameters:
1702 - name: id
1703 in: query
1704 description: only list the report with this id
1705 schema:
1706 type: integer
1707 - name: state
1708 in: query
1709 schema:
1710 $ref: '#/components/schemas/AbuseStateSet'
1711 - $ref: '#/components/parameters/start'
1712 - $ref: '#/components/parameters/count'
1713 - $ref: '#/components/parameters/abusesSort'
1714 responses:
1715 '200':
1716 description: successful operation
1717 content:
1718 application/json:
1719 schema:
1720 type: array
1721 items:
1722 $ref: '#/components/schemas/Abuse'
1723
e3489df9 1724 /abuses:
1569a818 1725 get:
310b5219 1726 summary: List abuses
94ff4c23 1727 security:
b029d58a 1728 - OAuth2:
06746a8b
RK
1729 - admin
1730 - moderator
1569a818 1731 tags:
310b5219 1732 - Abuses
44cb3b85 1733 parameters:
84f6e32c
RK
1734 - name: id
1735 in: query
1736 description: only list the report with this id
1737 schema:
1738 type: integer
1739 - name: predefinedReason
1740 in: query
1741 description: predefined reason the listed reports should contain
1742 schema:
e3489df9 1743 $ref: '#/components/schemas/PredefinedAbuseReasons'
84f6e32c
RK
1744 - name: search
1745 in: query
1746 description: plain search that will match with video titles, reporter names and more
1747 schema:
1748 type: string
1749 - name: state
1750 in: query
84f6e32c 1751 schema:
668b7f09 1752 $ref: '#/components/schemas/AbuseStateSet'
84f6e32c
RK
1753 - name: searchReporter
1754 in: query
1755 description: only list reports of a specific reporter
1756 schema:
1757 type: string
1758 - name: searchReportee
1759 description: only list reports of a specific reportee
1760 in: query
1761 schema:
1762 type: string
1763 - name: searchVideo
1764 in: query
1765 description: only list reports of a specific video
1766 schema:
1767 type: string
1768 - name: searchVideoChannel
1769 in: query
1770 description: only list reports of a specific video channel
1771 schema:
1772 type: string
17b07dc5
C
1773 - name: videoIs
1774 in: query
1775 description: only list blacklisted or deleted videos
1776 schema:
1777 type: string
1778 enum:
1779 - 'deleted'
1780 - 'blacklisted'
1781 - name: filter
1782 in: query
1783 description: only list account, comment or video reports
1784 schema:
1785 type: string
1786 enum:
1787 - 'video'
1788 - 'comment'
1789 - 'account'
3e9e6f2f
RK
1790 - $ref: '#/components/parameters/start'
1791 - $ref: '#/components/parameters/count'
fd5af7a2 1792 - $ref: '#/components/parameters/abusesSort'
1569a818
DG
1793 responses:
1794 '200':
1795 description: successful operation
3e9e6f2f
RK
1796 content:
1797 application/json:
1798 schema:
1799 type: array
1800 items:
668b7f09 1801 $ref: '#/components/schemas/Abuse'
e3489df9 1802
1569a818 1803 post:
b029d58a 1804 summary: Report an abuse
94ff4c23 1805 security:
3e9e6f2f 1806 - OAuth2: []
1569a818 1807 tags:
310b5219 1808 - Abuses
50e16ccf 1809 requestBody:
1ebddadd 1810 required: true
50e16ccf
C
1811 content:
1812 application/json:
1813 schema:
1814 type: object
1815 properties:
1816 reason:
1817 description: Reason why the user reports this video
1818 type: string
84f6e32c 1819 minLength: 4
1ebddadd 1820 predefinedReasons:
e3489df9
C
1821 $ref: '#/components/schemas/PredefinedAbuseReasons'
1822
1823 video:
1824 type: object
1825 properties:
1826 id:
1827 description: Video id to report
1828 type: number
1829 startAt:
1830 type: integer
1831 description: Timestamp in the video that marks the beginning of the report
1832 minimum: 0
1833 endAt:
1834 type: integer
1835 description: Timestamp in the video that marks the ending of the report
1836 minimum: 0
1837 comment:
1838 type: object
1839 properties:
1840 id:
1841 description: Comment id to report
1842 type: number
1843 account:
1844 type: object
1845 properties:
1846 id:
1847 description: Account id to report
1848 type: number
1ebddadd
RK
1849 required:
1850 - reason
50e16ccf
C
1851 responses:
1852 '204':
1853 description: successful operation
84f6e32c
RK
1854 '400':
1855 description: incorrect request parameters
e3489df9 1856 '/abuses/{abuseId}':
50e16ccf
C
1857 put:
1858 summary: Update an abuse
1859 security:
1860 - OAuth2:
1861 - admin
1862 - moderator
1863 tags:
310b5219 1864 - Abuses
50e16ccf 1865 parameters:
50e16ccf
C
1866 - $ref: '#/components/parameters/abuseId'
1867 requestBody:
1868 content:
1869 application/json:
1870 schema:
1871 type: object
1872 properties:
1873 state:
4f32032f 1874 $ref: '#/components/schemas/AbuseStateSet'
50e16ccf
C
1875 moderationComment:
1876 type: string
84f6e32c
RK
1877 description: Update the report comment visible only to the moderation team
1878 responses:
1879 '204':
1880 description: successful operation
1881 '404':
310b5219 1882 description: abuse not found
50e16ccf 1883 delete:
84f6e32c 1884 tags:
310b5219 1885 - Abuses
50e16ccf
C
1886 summary: Delete an abuse
1887 security:
1888 - OAuth2:
64b5c247
RK
1889 - admin
1890 - moderator
84f6e32c 1891 parameters:
84f6e32c 1892 - $ref: '#/components/parameters/abuseId'
50e16ccf
C
1893 responses:
1894 '204':
1895 description: successful operation
06746a8b
RK
1896 '404':
1897 description: block not found
668b7f09
C
1898 '/abuses/{abuseId}/messages':
1899 get:
1900 summary: List messages of an abuse
1901 security:
1902 - OAuth2: []
1903 tags:
1904 - Abuses
1905 parameters:
1906 - $ref: '#/components/parameters/abuseId'
1907 responses:
1908 '200':
1909 description: successful operation
1910 content:
1911 application/json:
1912 schema:
1913 type: array
1914 items:
1915 $ref: '#/components/schemas/AbuseMessage'
1916
1917 post:
1918 summary: Add message to an abuse
1919 security:
1920 - OAuth2: []
1921 tags:
1922 - Abuses
fcc4466e
C
1923 parameters:
1924 - $ref: '#/components/parameters/abuseId'
668b7f09
C
1925 requestBody:
1926 required: true
1927 content:
1928 application/json:
1929 schema:
1930 type: object
1931 properties:
1932 message:
1933 description: Message to send
1934 type: string
1935 required:
1936 - message
1937 responses:
1938 '200':
1939 description: successful operation
1940 '400':
1941 description: incorrect request parameters
1942 '/abuses/{abuseId}/messages/{abuseMessageId}':
1943 delete:
1944 summary: Delete an abuse message
1945 security:
1946 - OAuth2: []
1947 tags:
1948 - Abuses
1949 parameters:
1950 - $ref: '#/components/parameters/abuseId'
1951 - $ref: '#/components/parameters/abuseMessageId'
1952 responses:
1953 '204':
1954 description: successful operation
50e16ccf 1955
3e9e6f2f 1956 '/videos/{id}/blacklist':
1569a818 1957 post:
06746a8b 1958 summary: Block a video
94ff4c23 1959 security:
3e9e6f2f 1960 - OAuth2:
64b5c247
RK
1961 - admin
1962 - moderator
1569a818 1963 tags:
06746a8b 1964 - Video Blocks
1569a818 1965 parameters:
cb9d028a 1966 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1967 responses:
1968 '204':
c1843150 1969 description: successful operation
1569a818 1970 delete:
06746a8b 1971 summary: Unblock a video by its id
94ff4c23 1972 security:
3e9e6f2f 1973 - OAuth2:
64b5c247
RK
1974 - admin
1975 - moderator
1569a818 1976 tags:
06746a8b 1977 - Video Blocks
1569a818 1978 parameters:
cb9d028a 1979 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1980 responses:
1981 '204':
c1843150 1982 description: successful operation
06746a8b
RK
1983 '404':
1984 description: block not found
c360c494 1985 /videos/blacklist:
1569a818 1986 get:
06746a8b
RK
1987 tags:
1988 - Video Blocks
f4d59981 1989 summary: List video blocks
94ff4c23 1990 security:
3e9e6f2f 1991 - OAuth2:
64b5c247
RK
1992 - admin
1993 - moderator
44cb3b85 1994 parameters:
84f6e32c
RK
1995 - name: type
1996 in: query
1997 description: >
1998 list only blocks that match this type:
1999
2000 - `1`: manual block
2001
2002 - `2`: automatic block that needs review
2003 schema:
2004 type: integer
2005 enum:
2006 - 1
2007 - 2
2008 - name: search
2009 in: query
2010 description: plain search that will match with video titles, and more
2011 schema:
2012 type: string
3e9e6f2f
RK
2013 - $ref: '#/components/parameters/start'
2014 - $ref: '#/components/parameters/count'
fd5af7a2 2015 - $ref: '#/components/parameters/blacklistsSort'
1569a818
DG
2016 responses:
2017 '200':
2018 description: successful operation
3e9e6f2f
RK
2019 content:
2020 application/json:
2021 schema:
84f6e32c
RK
2022 type: object
2023 properties:
2024 total:
2025 type: integer
2026 example: 1
2027 data:
2028 type: array
2029 items:
2030 $ref: '#/components/schemas/VideoBlacklist'
67ae04a5
C
2031 /videos/{id}/captions:
2032 get:
b029d58a 2033 summary: List captions of a video
67ae04a5 2034 tags:
04b703f6 2035 - Video Captions
67ae04a5 2036 parameters:
cb9d028a 2037 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
2038 responses:
2039 '200':
2040 description: successful operation
2041 content:
2042 application/json:
2043 schema:
2044 type: object
2045 properties:
2046 total:
2047 type: integer
84f6e32c 2048 example: 1
67ae04a5
C
2049 data:
2050 type: array
2051 items:
2052 $ref: '#/components/schemas/VideoCaption'
2053 /videos/{id}/captions/{captionLanguage}:
2054 put:
2055 summary: Add or replace a video caption
64b5c247
RK
2056 security:
2057 - OAuth2:
2058 - user
67ae04a5 2059 tags:
04b703f6 2060 - Video Captions
67ae04a5 2061 parameters:
cb9d028a 2062 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
2063 - $ref: '#/components/parameters/captionLanguage'
2064 requestBody:
2065 content:
2066 multipart/form-data:
2067 schema:
2068 type: object
2069 properties:
2070 captionfile:
2071 description: The file to upload.
2072 type: string
2073 format: binary
0ad45af7
FS
2074 encoding:
2075 captionfile:
205ed5b7 2076 contentType: text/vtt, application/x-subrip, text/plain
67ae04a5
C
2077 responses:
2078 '204':
c1843150 2079 description: successful operation
06746a8b
RK
2080 '404':
2081 description: video or language not found
67ae04a5
C
2082 delete:
2083 summary: Delete a video caption
64b5c247
RK
2084 security:
2085 - OAuth2:
2086 - user
67ae04a5 2087 tags:
04b703f6 2088 - Video Captions
67ae04a5 2089 parameters:
cb9d028a 2090 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
2091 - $ref: '#/components/parameters/captionLanguage'
2092 responses:
2093 '204':
c1843150 2094 description: successful operation
06746a8b
RK
2095 '404':
2096 description: video or language or caption for that language not found
48dce1c9 2097 /video-channels:
1569a818 2098 get:
b029d58a 2099 summary: List video channels
1569a818 2100 tags:
b029d58a 2101 - Video Channels
44cb3b85 2102 parameters:
3e9e6f2f
RK
2103 - $ref: '#/components/parameters/start'
2104 - $ref: '#/components/parameters/count'
2105 - $ref: '#/components/parameters/sort'
1569a818
DG
2106 responses:
2107 '200':
2108 description: successful operation
3e9e6f2f
RK
2109 content:
2110 application/json:
2111 schema:
84f6e32c
RK
2112 type: object
2113 properties:
2114 total:
2115 type: integer
2116 example: 1
2117 data:
2118 type: array
2119 items:
2120 $ref: '#/components/schemas/VideoChannel'
1569a818 2121 post:
b029d58a 2122 summary: Create a video channel
94ff4c23 2123 security:
3e9e6f2f 2124 - OAuth2: []
1569a818 2125 tags:
b029d58a 2126 - Video Channels
1569a818
DG
2127 responses:
2128 '204':
c1843150 2129 description: successful operation
3e9e6f2f 2130 requestBody:
7d14d4d2
C
2131 content:
2132 application/json:
2133 schema:
2134 $ref: '#/components/schemas/VideoChannelCreate'
9ce3d302 2135 '/video-channels/{channelHandle}':
1569a818 2136 get:
b029d58a 2137 summary: Get a video channel
1569a818 2138 tags:
b029d58a 2139 - Video Channels
1569a818 2140 parameters:
9ce3d302 2141 - $ref: '#/components/parameters/channelHandle'
1569a818
DG
2142 responses:
2143 '200':
2144 description: successful operation
3e9e6f2f
RK
2145 content:
2146 application/json:
2147 schema:
2148 $ref: '#/components/schemas/VideoChannel'
1569a818 2149 put:
b029d58a 2150 summary: Update a video channel
94ff4c23 2151 security:
3e9e6f2f 2152 - OAuth2: []
1569a818 2153 tags:
b029d58a 2154 - Video Channels
1569a818 2155 parameters:
9ce3d302 2156 - $ref: '#/components/parameters/channelHandle'
1569a818
DG
2157 responses:
2158 '204':
c1843150 2159 description: successful operation
3e9e6f2f 2160 requestBody:
7d14d4d2
C
2161 content:
2162 application/json:
2163 schema:
2164 $ref: '#/components/schemas/VideoChannelUpdate'
1569a818 2165 delete:
b029d58a 2166 summary: Delete a video channel
94ff4c23 2167 security:
3e9e6f2f 2168 - OAuth2: []
1569a818 2169 tags:
b029d58a 2170 - Video Channels
1569a818 2171 parameters:
9ce3d302 2172 - $ref: '#/components/parameters/channelHandle'
cc918ac3
C
2173 responses:
2174 '204':
c1843150 2175 description: successful operation
9ce3d302 2176 '/video-channels/{channelHandle}/videos':
cc918ac3 2177 get:
b029d58a 2178 summary: List videos of a video channel
cc918ac3 2179 tags:
048b6946 2180 - Video
b029d58a 2181 - Video Channels
cc918ac3 2182 parameters:
9ce3d302 2183 - $ref: '#/components/parameters/channelHandle'
59c794a5
C
2184 - $ref: '#/components/parameters/categoryOneOf'
2185 - $ref: '#/components/parameters/tagsOneOf'
2186 - $ref: '#/components/parameters/tagsAllOf'
2187 - $ref: '#/components/parameters/licenceOneOf'
2188 - $ref: '#/components/parameters/languageOneOf'
2189 - $ref: '#/components/parameters/nsfw'
2190 - $ref: '#/components/parameters/filter'
2191 - $ref: '#/components/parameters/skipCount'
2192 - $ref: '#/components/parameters/start'
2193 - $ref: '#/components/parameters/count'
2194 - $ref: '#/components/parameters/videosSort'
1569a818 2195 responses:
cc918ac3 2196 '200':
1569a818 2197 description: successful operation
3e9e6f2f
RK
2198 content:
2199 application/json:
2200 schema:
048b6946 2201 $ref: '#/components/schemas/VideoListResponse'
75cba40d
C
2202 '/video-channels/{channelHandle}/avatar/pick':
2203 post:
2204 summary: Update channel avatar
2205 security:
2206 - OAuth2: []
2207 tags:
2208 - Video Channels
2209 parameters:
2210 - $ref: '#/components/parameters/channelHandle'
2211 responses:
2212 '200':
2213 description: successful operation
2214 content:
2215 application/json:
2216 schema:
2217 type: object
2218 properties:
2219 avatar:
2220 $ref: '#/components/schemas/ActorImage'
2221 '413':
2222 description: image file too large
2223 headers:
2224 X-File-Maximum-Size:
2225 schema:
2226 type: string
2227 format: Nginx size
2228 description: Maximum file size for the avatar
2229 requestBody:
2230 content:
2231 multipart/form-data:
2232 schema:
2233 type: object
2234 properties:
2235 avatarfile:
2236 description: The file to upload.
2237 type: string
2238 format: binary
2239 encoding:
2240 avatarfile:
2241 contentType: image/png, image/jpeg
2242 '/video-channels/{channelHandle}/avatar':
2243 delete:
2244 summary: Delete channel avatar
2245 security:
2246 - OAuth2: []
2247 tags:
2248 - Video Channels
2249 parameters:
2250 - $ref: '#/components/parameters/channelHandle'
2251 responses:
2252 '204':
2253 description: successful operation
2254
2255
2256 '/video-channels/{channelHandle}/banner/pick':
2257 post:
2258 summary: Update channel banner
2259 security:
2260 - OAuth2: []
2261 tags:
2262 - Video Channels
2263 parameters:
2264 - $ref: '#/components/parameters/channelHandle'
2265 responses:
2266 '200':
2267 description: successful operation
2268 content:
2269 application/json:
2270 schema:
2271 type: object
2272 properties:
2273 banner:
2274 $ref: '#/components/schemas/ActorImage'
2275 '413':
2276 description: image file too large
2277 headers:
2278 X-File-Maximum-Size:
2279 schema:
2280 type: string
2281 format: Nginx size
2282 description: Maximum file size for the banner
2283 requestBody:
2284 content:
2285 multipart/form-data:
2286 schema:
2287 type: object
2288 properties:
2289 bannerfile:
2290 description: The file to upload.
2291 type: string
2292 format: binary
2293 encoding:
2294 bannerfile:
2295 contentType: image/png, image/jpeg
2296 '/video-channels/{channelHandle}/banner':
2297 delete:
2298 summary: Delete channel banner
2299 security:
2300 - OAuth2: []
2301 tags:
2302 - Video Channels
2303 parameters:
2304 - $ref: '#/components/parameters/channelHandle'
2305 responses:
2306 '204':
2307 description: successful operation
c1843150
C
2308
2309 /video-playlists/privacies:
2310 get:
2311 summary: List available playlist privacies
2312 tags:
2313 - Video Playlists
2314 responses:
2315 '200':
2316 description: successful operation
2317 content:
2318 application/json:
2319 schema:
2320 type: array
2321 items:
2322 type: string
84f6e32c
RK
2323 examples:
2324 nightly:
2325 externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies
c1843150 2326
71810d0b
RK
2327 /video-playlists:
2328 get:
b029d58a 2329 summary: List video playlists
71810d0b 2330 tags:
b029d58a 2331 - Video Playlists
71810d0b
RK
2332 parameters:
2333 - $ref: '#/components/parameters/start'
2334 - $ref: '#/components/parameters/count'
2335 - $ref: '#/components/parameters/sort'
2336 responses:
2337 '200':
2338 description: successful operation
2339 content:
2340 application/json:
2341 schema:
84f6e32c
RK
2342 type: object
2343 properties:
2344 total:
2345 type: integer
2346 example: 1
2347 data:
2348 type: array
2349 items:
2350 $ref: '#/components/schemas/VideoPlaylist'
c1843150
C
2351 post:
2352 summary: Create a video playlist
2353 description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
2354 security:
2355 - OAuth2: []
2356 tags:
2357 - Video Playlists
2358 responses:
2359 '200':
2360 description: successful operation
2361 content:
2362 application/json:
2363 schema:
2364 type: object
2365 properties:
2366 videoPlaylist:
2367 type: object
2368 properties:
2369 id:
06746a8b 2370 type: integer
c1843150
C
2371 uuid:
2372 type: string
2373 requestBody:
2374 content:
2375 multipart/form-data:
2376 schema:
2377 type: object
2378 properties:
2379 displayName:
2380 description: Video playlist display name
2381 type: string
2382 thumbnailfile:
2383 description: Video playlist thumbnail file
2384 type: string
2385 format: binary
2386 privacy:
2387 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2388 description:
2389 description: Video playlist description
2390 type: string
2391 videoChannelId:
2392 description: Video channel in which the playlist will be published
06746a8b 2393 type: integer
c1843150
C
2394 required:
2395 - displayName
2c318664
RK
2396 encoding:
2397 thumbnailfile:
2398 contentType: image/jpeg
c1843150
C
2399
2400 /video-playlists/{id}:
2401 get:
2402 summary: Get a video playlist
2403 tags:
2404 - Video Playlists
2405 parameters:
2406 - $ref: '#/components/parameters/idOrUUID'
2407 responses:
2408 '200':
2409 description: successful operation
2410 content:
2411 application/json:
2412 schema:
2413 $ref: '#/components/schemas/VideoPlaylist'
2414 put:
2415 summary: Update a video playlist
2416 description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
2417 security:
2418 - OAuth2: []
2419 tags:
2420 - Video Playlists
2421 responses:
2422 '204':
2423 description: successful operation
2424 parameters:
2425 - $ref: '#/components/parameters/idOrUUID'
2426 requestBody:
2427 content:
2428 multipart/form-data:
2429 schema:
2430 type: object
2431 properties:
2432 displayName:
2433 description: Video playlist display name
2434 type: string
2435 thumbnailfile:
2436 description: Video playlist thumbnail file
2437 type: string
2438 format: binary
2439 privacy:
2440 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
2441 description:
2442 description: Video playlist description
2443 type: string
2444 videoChannelId:
2445 description: Video channel in which the playlist will be published
06746a8b 2446 type: integer
2c318664
RK
2447 encoding:
2448 thumbnailfile:
2449 contentType: image/jpeg
c1843150
C
2450 delete:
2451 summary: Delete a video playlist
2452 security:
2453 - OAuth2: []
2454 tags:
2455 - Video Playlists
2456 parameters:
2457 - $ref: '#/components/parameters/idOrUUID'
2458 responses:
2459 '204':
2460 description: successful operation
2461
2462 /video-playlists/{id}/videos:
2463 get:
2464 summary: 'List videos of a playlist'
2465 tags:
2466 - Videos
2467 - Video Playlists
2468 parameters:
2469 - $ref: '#/components/parameters/idOrUUID'
2470 responses:
2471 '200':
2472 description: successful operation
2473 content:
2474 application/json:
2475 schema:
2476 $ref: '#/components/schemas/VideoListResponse'
2477 post:
2478 summary: 'Add a video in a playlist'
2479 security:
2480 - OAuth2: []
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 type: object
2493 properties:
2494 videoPlaylistElement:
2495 type: object
2496 properties:
2497 id:
06746a8b 2498 type: integer
c1843150
C
2499 requestBody:
2500 content:
2501 application/json:
2502 schema:
2503 type: object
2504 properties:
2505 videoId:
06746a8b 2506 type: integer
c1843150
C
2507 description: 'Video to add in the playlist'
2508 startTimestamp:
06746a8b 2509 type: integer
c1843150
C
2510 description: 'Start the video at this specific timestamp (in seconds)'
2511 stopTimestamp:
06746a8b 2512 type: integer
c1843150
C
2513 description: 'Stop the video at this specific timestamp (in seconds)'
2514 required:
2515 - videoId
2516
2517 /video-playlists/{id}/videos/reorder:
2518 post:
2519 summary: 'Reorder a playlist'
2520 security:
2521 - OAuth2: []
2522 tags:
2523 - Video Playlists
2524 parameters:
2525 - $ref: '#/components/parameters/idOrUUID'
2526 responses:
2527 '204':
2528 description: successful operation
2529 requestBody:
2530 content:
2531 application/json:
2532 schema:
2533 type: object
2534 properties:
2535 startPosition:
06746a8b
RK
2536 type: integer
2537 description: 'Start position of the element to reorder'
2538 minimum: 1
c1843150 2539 insertAfterPosition:
06746a8b
RK
2540 type: integer
2541 description: 'New position for the block to reorder, to add the block before the first element'
2542 minimum: 0
c1843150 2543 reorderLength:
06746a8b
RK
2544 type: integer
2545 description: 'How many element from `startPosition` to reorder'
2546 minimum: 1
c1843150
C
2547 required:
2548 - startPosition
2549 - insertAfterPosition
2550
b9e924a8 2551 /video-playlists/{id}/videos/{playlistElementId}:
c1843150
C
2552 put:
2553 summary: 'Update a playlist element'
2554 security:
2555 - OAuth2: []
2556 tags:
2557 - Video Playlists
2558 parameters:
2559 - $ref: '#/components/parameters/idOrUUID'
2560 - $ref: '#/components/parameters/playlistElementId'
2561 responses:
2562 '204':
2563 description: successful operation
2564 requestBody:
2565 content:
2566 application/json:
2567 schema:
2568 type: object
2569 properties:
2570 startTimestamp:
06746a8b 2571 type: integer
c1843150
C
2572 description: 'Start the video at this specific timestamp (in seconds)'
2573 stopTimestamp:
06746a8b 2574 type: integer
c1843150
C
2575 description: 'Stop the video at this specific timestamp (in seconds)'
2576 delete:
2577 summary: 'Delete an element from a playlist'
2578 security:
2579 - OAuth2: []
2580 tags:
2581 - Video Playlists
2582 parameters:
2583 - $ref: '#/components/parameters/idOrUUID'
2584 - $ref: '#/components/parameters/playlistElementId'
2585 responses:
2586 '204':
2587 description: successful operation
2588
0590bb46
C
2589 '/users/me/video-playlists/videos-exist':
2590 get:
2591 summary: 'Check video exists in my playlists'
2592 security:
2593 - OAuth2: []
2594 tags:
2595 - Video Playlists
2596 parameters:
2597 - name: videoIds
2598 in: query
2599 required: true
2600 description: The video ids to check
2601 schema:
2602 type: array
2603 items:
06746a8b 2604 type: integer
0590bb46
C
2605 responses:
2606 '200':
2607 description: successful operation
2608 content:
2609 application/json:
2610 schema:
2611 type: object
2612 properties:
2613 videoId:
2614 type: array
2615 items:
2616 type: object
2617 properties:
2618 playlistElementId:
06746a8b 2619 type: integer
0590bb46 2620 playlistId:
06746a8b 2621 type: integer
0590bb46 2622 startTimestamp:
06746a8b 2623 type: integer
0590bb46 2624 stopTimestamp:
06746a8b 2625 type: integer
0590bb46 2626
3e9e6f2f 2627 '/accounts/{name}/video-channels':
6b738c7a 2628 get:
b029d58a 2629 summary: List video channels of an account
6b738c7a 2630 tags:
b029d58a
C
2631 - Video Channels
2632 - Accounts
6b738c7a 2633 parameters:
3e9e6f2f 2634 - $ref: '#/components/parameters/name'
84f6e32c
RK
2635 - name: withStats
2636 in: query
2637 description: include view statistics for the last 30 days (only if authentified as the account user)
2638 schema:
2639 type: boolean
2640 - $ref: '#/components/parameters/start'
2641 - $ref: '#/components/parameters/count'
2642 - $ref: '#/components/parameters/sort'
6b738c7a
C
2643 responses:
2644 '200':
2645 description: successful operation
3e9e6f2f
RK
2646 content:
2647 application/json:
2648 schema:
8004469c
C
2649 properties:
2650 total:
2651 type: integer
2652 example: 1
2653 data:
2654 type: array
2655 items:
2656 $ref: '#/components/schemas/VideoChannel'
c100a614
YB
2657 '/accounts/{name}/ratings':
2658 get:
b029d58a 2659 summary: List ratings of an account
c100a614
YB
2660 security:
2661 - OAuth2: []
2662 tags:
b029d58a 2663 - Accounts
c100a614 2664 parameters:
cb9d028a 2665 - $ref: '#/components/parameters/name'
c100a614
YB
2666 - $ref: '#/components/parameters/start'
2667 - $ref: '#/components/parameters/count'
2668 - $ref: '#/components/parameters/sort'
2669 - name: rating
2670 in: query
2671 required: false
b3d1054e 2672 description: Optionally filter which ratings to retrieve
c100a614
YB
2673 schema:
2674 type: string
2675 enum:
2676 - like
2677 - dislike
2678 responses:
2679 '200':
2680 description: successful operation
2681 content:
2682 application/json:
2683 schema:
2684 type: array
2685 items:
2686 $ref: '#/components/schemas/VideoRating'
3e9e6f2f 2687 '/videos/{id}/comment-threads':
1569a818 2688 get:
b029d58a 2689 summary: List threads of a video
1569a818 2690 tags:
b029d58a 2691 - Video Comments
1569a818 2692 parameters:
cb9d028a 2693 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f
RK
2694 - $ref: '#/components/parameters/start'
2695 - $ref: '#/components/parameters/count'
71810d0b 2696 - $ref: '#/components/parameters/commentsSort'
1569a818
DG
2697 responses:
2698 '200':
2699 description: successful operation
3e9e6f2f
RK
2700 content:
2701 application/json:
2702 schema:
2703 $ref: '#/components/schemas/CommentThreadResponse'
1569a818 2704 post:
b029d58a 2705 summary: Create a thread
94ff4c23 2706 security:
3e9e6f2f 2707 - OAuth2: []
1569a818 2708 tags:
b029d58a 2709 - Video Comments
1569a818 2710 parameters:
cb9d028a 2711 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
2712 responses:
2713 '200':
2714 description: successful operation
3e9e6f2f
RK
2715 content:
2716 application/json:
2717 schema:
2718 $ref: '#/components/schemas/CommentThreadPostResponse'
2c318664
RK
2719 '404':
2720 description: video does not exist
98639806
C
2721 requestBody:
2722 content:
2723 application/json:
2724 schema:
2725 type: object
2726 properties:
2727 text:
2728 type: string
2729 description: 'Text comment'
2730 required:
2731 - text
2732
3e9e6f2f 2733 '/videos/{id}/comment-threads/{threadId}':
1569a818 2734 get:
b029d58a 2735 summary: Get a thread
1569a818 2736 tags:
b029d58a 2737 - Video Comments
1569a818 2738 parameters:
cb9d028a
C
2739 - $ref: '#/components/parameters/idOrUUID'
2740 - $ref: '#/components/parameters/threadId'
1569a818
DG
2741 responses:
2742 '200':
2743 description: successful operation
3e9e6f2f
RK
2744 content:
2745 application/json:
2746 schema:
2747 $ref: '#/components/schemas/VideoCommentThreadTree'
2748 '/videos/{id}/comments/{commentId}':
1569a818 2749 post:
b029d58a 2750 summary: Reply to a thread of a video
94ff4c23 2751 security:
3e9e6f2f 2752 - OAuth2: []
1569a818 2753 tags:
b029d58a 2754 - Video Comments
1569a818 2755 parameters:
cb9d028a 2756 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f 2757 - $ref: '#/components/parameters/commentId'
1569a818
DG
2758 responses:
2759 '200':
2760 description: successful operation
3e9e6f2f
RK
2761 content:
2762 application/json:
2763 schema:
2764 $ref: '#/components/schemas/CommentThreadPostResponse'
2c318664
RK
2765 '404':
2766 description: thread or video does not exist
98639806
C
2767 requestBody:
2768 content:
2769 application/json:
2770 schema:
2771 type: object
2772 properties:
2773 text:
2774 type: string
2775 description: 'Text comment'
2776 required:
2777 - text
2778
1569a818 2779 delete:
b029d58a 2780 summary: Delete a comment or a reply
94ff4c23 2781 security:
3e9e6f2f 2782 - OAuth2: []
1569a818 2783 tags:
b029d58a 2784 - Video Comments
1569a818 2785 parameters:
cb9d028a 2786 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f 2787 - $ref: '#/components/parameters/commentId'
1569a818
DG
2788 responses:
2789 '204':
c1843150 2790 description: successful operation
84f6e32c
RK
2791 '403':
2792 description: cannot remove comment of another user
2793 '404':
2794 description: comment or video does not exist
2795 '409':
2796 description: comment is already deleted
3e9e6f2f 2797 '/videos/{id}/rate':
1569a818 2798 put:
b029d58a 2799 summary: Like/dislike a video
94ff4c23 2800 security:
3e9e6f2f 2801 - OAuth2: []
1569a818 2802 tags:
b029d58a 2803 - Video Rates
1569a818 2804 parameters:
cb9d028a 2805 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
2806 responses:
2807 '204':
c1843150 2808 description: successful operation
2c318664
RK
2809 '404':
2810 description: video does not exist
fb72c193
DL
2811 /search/videos:
2812 get:
2813 tags:
2814 - Search
b029d58a 2815 summary: Search videos
fb72c193 2816 parameters:
84f6e32c
RK
2817 - name: search
2818 in: query
2819 required: true
2820 allowEmptyValue: false
2821 description: >
2822 String to search. If the user can make a remote URI search, and the string is an URI then the
2823 PeerTube instance will fetch the remote object and add it to its database. Then,
2824 you can use the REST API to fetch the complete video information and interact with it.
2825 schema:
2826 type: string
59c794a5
C
2827 - $ref: '#/components/parameters/categoryOneOf'
2828 - $ref: '#/components/parameters/tagsOneOf'
2829 - $ref: '#/components/parameters/tagsAllOf'
2830 - $ref: '#/components/parameters/licenceOneOf'
2831 - $ref: '#/components/parameters/languageOneOf'
2832 - $ref: '#/components/parameters/nsfw'
2833 - $ref: '#/components/parameters/filter'
2834 - $ref: '#/components/parameters/skipCount'
3e9e6f2f
RK
2835 - $ref: '#/components/parameters/start'
2836 - $ref: '#/components/parameters/count'
ad031145 2837 - $ref: '#/components/parameters/searchTarget'
fd5af7a2 2838 - $ref: '#/components/parameters/videosSearchSort'
ad031145
C
2839 - name: startDate
2840 in: query
ad031145
C
2841 description: Get videos that are published after this date
2842 schema:
2843 type: string
2844 format: date-time
2845 - name: endDate
2846 in: query
ad031145
C
2847 description: Get videos that are published before this date
2848 schema:
2849 type: string
2850 format: date-time
2851 - name: originallyPublishedStartDate
2852 in: query
ad031145 2853 description: Get videos that are originally published after this date
3e9e6f2f
RK
2854 schema:
2855 type: string
ad031145
C
2856 format: date-time
2857 - name: originallyPublishedEndDate
2858 in: query
ad031145
C
2859 description: Get videos that are originally published before this date
2860 schema:
2861 type: string
2862 format: date-time
2863 - name: durationMin
2864 in: query
ad031145
C
2865 description: Get videos that have this minimum duration
2866 schema:
06746a8b 2867 type: integer
ad031145
C
2868 - name: durationMax
2869 in: query
ad031145
C
2870 description: Get videos that have this maximum duration
2871 schema:
06746a8b 2872 type: integer
2c318664
RK
2873 callbacks:
2874 'searchTarget === search-index':
2875 $ref: '#/components/callbacks/searchIndex'
fb72c193
DL
2876 responses:
2877 '200':
2878 description: successful operation
3e9e6f2f
RK
2879 content:
2880 application/json:
2881 schema:
048b6946 2882 $ref: '#/components/schemas/VideoListResponse'
2c318664
RK
2883 '500':
2884 description: search index unavailable
ad031145
C
2885 /search/video-channels:
2886 get:
2887 tags:
2888 - Search
2889 summary: Search channels
2890 parameters:
ad031145
C
2891 - name: search
2892 in: query
2893 required: true
2894 description: >
2895 String to search. If the user can make a remote URI search, and the string is an URI then the
2896 PeerTube instance will fetch the remote object and add it to its database. Then,
2897 you can use the REST API to fetch the complete channel information and interact with it.
2898 schema:
2899 type: string
84f6e32c
RK
2900 - $ref: '#/components/parameters/start'
2901 - $ref: '#/components/parameters/count'
2902 - $ref: '#/components/parameters/searchTarget'
2903 - $ref: '#/components/parameters/sort'
2c318664
RK
2904 callbacks:
2905 'searchTarget === search-index':
2906 $ref: '#/components/callbacks/searchIndex'
ad031145
C
2907 responses:
2908 '200':
2909 description: successful operation
2910 content:
2911 application/json:
2912 schema:
2913 type: array
2914 items:
2915 $ref: '#/components/schemas/VideoChannel'
2c318664
RK
2916 '500':
2917 description: search index unavailable
06746a8b
RK
2918 /blocklist/accounts:
2919 get:
2920 tags:
2921 - Account Blocks
2922 summary: List account blocks
2923 security:
2924 - OAuth2:
2925 - admin
2926 parameters:
2927 - $ref: '#/components/parameters/start'
2928 - $ref: '#/components/parameters/count'
2929 - $ref: '#/components/parameters/sort'
2930 responses:
2931 '200':
2932 description: successful operation
2933 post:
2934 tags:
2935 - Account Blocks
2936 summary: Block an account
2937 security:
2938 - OAuth2:
2939 - admin
2940 requestBody:
2941 content:
2942 application/json:
2943 schema:
2944 type: object
2945 properties:
2946 accountName:
2947 type: string
84f6e32c 2948 example: chocobozzz@example.org
06746a8b
RK
2949 description: account to block, in the form `username@domain`
2950 required:
2951 - accountName
2952 responses:
2953 '200':
2954 description: successful operation
2955 '409':
2956 description: self-blocking forbidden
2957 '/blocklist/accounts/{accountName}':
2958 delete:
2959 tags:
2960 - Account Blocks
2961 summary: Unblock an account by its handle
2962 security:
2963 - OAuth2:
2964 - admin
2965 parameters:
2966 - name: accountName
2967 in: path
2968 required: true
2969 description: account to unblock, in the form `username@domain`
2970 schema:
2971 type: string
2972 responses:
2973 '201':
2974 description: successful operation
2975 '404':
2976 description: account or account block does not exist
2977 /blocklist/servers:
2978 get:
2979 tags:
2980 - Server Blocks
2981 summary: List server blocks
2982 security:
2983 - OAuth2:
2984 - admin
2985 parameters:
2986 - $ref: '#/components/parameters/start'
2987 - $ref: '#/components/parameters/count'
2988 - $ref: '#/components/parameters/sort'
2989 responses:
2990 '200':
2991 description: successful operation
2992 post:
2993 tags:
2994 - Server Blocks
2995 summary: Block a server
2996 security:
2997 - OAuth2:
2998 - admin
2999 requestBody:
3000 content:
3001 application/json:
3002 schema:
3003 type: object
3004 properties:
84f6e32c 3005 host:
06746a8b 3006 type: string
84f6e32c 3007 format: hostname
06746a8b
RK
3008 description: server domain to block
3009 required:
84f6e32c 3010 - host
06746a8b
RK
3011 responses:
3012 '200':
3013 description: successful operation
3014 '409':
3015 description: self-blocking forbidden
3016 '/blocklist/servers/{host}':
3017 delete:
3018 tags:
3019 - Server Blocks
3020 summary: Unblock a server by its domain
3021 security:
3022 - OAuth2:
3023 - admin
3024 parameters:
3025 - name: host
3026 in: path
3027 required: true
3028 description: server domain to unblock
3029 schema:
3030 type: string
84f6e32c 3031 format: hostname
06746a8b
RK
3032 responses:
3033 '201':
3034 description: successful operation
3035 '404':
3036 description: account block does not exist
04b703f6
RK
3037 /redundancy/{host}:
3038 put:
3039 tags:
3040 - Instance Redundancy
3041 summary: Update a server redundancy policy
3042 security:
3043 - OAuth2:
3044 - admin
3045 parameters:
3046 - name: host
3047 in: path
3048 required: true
3049 description: server domain to mirror
3050 schema:
3051 type: string
84f6e32c 3052 format: hostname
04b703f6
RK
3053 requestBody:
3054 content:
3055 application/json:
3056 schema:
3057 type: object
3058 properties:
3059 redundancyAllowed:
3060 type: boolean
3061 description: allow mirroring of the host's local videos
3062 required:
3063 - redundancyAllowed
3064 responses:
3065 '204':
3066 description: successful operation
3067 '404':
3068 description: server is not already known
3069 /redundancy/videos:
3070 get:
3071 tags:
3072 - Video Mirroring
3073 summary: List videos being mirrored
3074 security:
3075 - OAuth2:
3076 - admin
3077 parameters:
3078 - name: target
3079 in: query
3080 required: true
3081 description: direction of the mirror
3082 schema:
3083 type: string
3084 enum:
3085 - my-videos
3086 - remote-videos
3087 - $ref: '#/components/parameters/start'
3088 - $ref: '#/components/parameters/count'
3089 - $ref: '#/components/parameters/videoRedundanciesSort'
3090 responses:
3091 '200':
3092 description: successful operation
3093 content:
3094 application/json:
3095 schema:
3096 type: array
3097 items:
3098 $ref: '#/components/schemas/VideoRedundancy'
3099 post:
3100 tags:
3101 - Video Mirroring
3102 summary: Mirror a video
3103 security:
3104 - OAuth2:
3105 - admin
3106 requestBody:
3107 content:
3108 application/json:
3109 schema:
3110 type: object
3111 properties:
3112 videoId:
84f6e32c 3113 type: integer
04b703f6
RK
3114 required:
3115 - videoId
3116 responses:
3117 '204':
3118 description: successful operation
3119 '400':
3120 description: cannot mirror a local video
3121 '404':
3122 description: video does not exist
3123 '409':
3124 description: video is already mirrored
3125 /redundancy/videos/{redundancyId}:
3126 delete:
3127 tags:
3128 - Video Mirroring
3129 summary: Delete a mirror done on a video
3130 security:
3131 - OAuth2:
3132 - admin
3133 parameters:
3134 - name: redundancyId
3135 in: path
3136 required: true
3137 description: id of an existing redundancy on a video
3138 schema:
3139 type: string
3140 responses:
3141 '204':
3142 description: successful operation
3143 '404':
3144 description: video redundancy not found
06746a8b
RK
3145 '/feeds/video-comments.{format}':
3146 get:
3147 tags:
3148 - Feeds
3149 summary: List comments on videos
d73810be 3150 servers:
d73810be 3151 - url: 'https://peertube2.cpy.re'
f4d59981 3152 description: Live Test Server (live data - latest nightly version)
d73810be
RK
3153 - url: 'https://peertube3.cpy.re'
3154 description: Live Test Server (live data - latest RC version)
f4d59981
RK
3155 - url: 'https://peertube.cpy.re'
3156 description: Live Test Server (live data - stable version)
06746a8b
RK
3157 parameters:
3158 - name: format
3159 in: path
3160 required: true
00494d6e 3161 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
06746a8b
RK
3162 schema:
3163 type: string
3164 enum:
3165 - xml
3166 - rss
3167 - rss2
3168 - atom
3169 - atom1
3170 - json
3171 - json1
3172 - name: videoId
d73810be 3173 in: query
06746a8b
RK
3174 description: 'limit listing to a specific video'
3175 schema:
3176 type: string
00494d6e
RK
3177 - name: accountId
3178 in: query
3179 description: 'limit listing to a specific account'
3180 schema:
3181 type: string
3182 - name: accountName
3183 in: query
3184 description: 'limit listing to a specific account'
3185 schema:
3186 type: string
3187 - name: videoChannelId
3188 in: query
3189 description: 'limit listing to a specific video channel'
3190 schema:
3191 type: string
3192 - name: videoChannelName
3193 in: query
3194 description: 'limit listing to a specific video channel'
3195 schema:
3196 type: string
06746a8b
RK
3197 responses:
3198 '204':
3199 description: successful operation
3200 headers:
3201 Cache-Control:
3202 schema:
3203 type: string
3204 default: 'max-age=900' # 15 min cache
3205 content:
3206 application/xml:
3207 schema:
3208 $ref: '#/components/schemas/VideoCommentsForXML'
3209 application/rss+xml:
3210 schema:
3211 $ref: '#/components/schemas/VideoCommentsForXML'
3212 text/xml:
3213 schema:
3214 $ref: '#/components/schemas/VideoCommentsForXML'
3215 application/atom+xml:
3216 schema:
3217 $ref: '#/components/schemas/VideoCommentsForXML'
3218 application/json:
3219 schema:
3220 type: object
00494d6e
RK
3221 '400':
3222 x-summary: field inconsistencies
3223 description: >
3224 Arises when:
3225 - videoId filter is mixed with a channel filter
3226 '404':
3227 description: video, video channel or account not found
06746a8b
RK
3228 '406':
3229 description: accept header unsupported
3230 '/feeds/videos.{format}':
3231 get:
3232 tags:
3233 - Feeds
3234 summary: List videos
d73810be 3235 servers:
d73810be 3236 - url: 'https://peertube2.cpy.re'
f4d59981 3237 description: Live Test Server (live data - latest nightly version)
d73810be
RK
3238 - url: 'https://peertube3.cpy.re'
3239 description: Live Test Server (live data - latest RC version)
f4d59981
RK
3240 - url: 'https://peertube.cpy.re'
3241 description: Live Test Server (live data - stable version)
06746a8b
RK
3242 parameters:
3243 - name: format
3244 in: path
3245 required: true
00494d6e 3246 description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
06746a8b
RK
3247 schema:
3248 type: string
3249 enum:
3250 - xml
3251 - rss
3252 - rss2
3253 - atom
3254 - atom1
3255 - json
3256 - json1
3257 - name: accountId
d73810be 3258 in: query
06746a8b
RK
3259 description: 'limit listing to a specific account'
3260 schema:
3261 type: string
3262 - name: accountName
d73810be 3263 in: query
06746a8b
RK
3264 description: 'limit listing to a specific account'
3265 schema:
3266 type: string
3267 - name: videoChannelId
d73810be 3268 in: query
06746a8b
RK
3269 description: 'limit listing to a specific video channel'
3270 schema:
3271 type: string
3272 - name: videoChannelName
d73810be 3273 in: query
06746a8b
RK
3274 description: 'limit listing to a specific video channel'
3275 schema:
3276 type: string
84f6e32c
RK
3277 - $ref: '#/components/parameters/sort'
3278 - $ref: '#/components/parameters/nsfw'
3279 - $ref: '#/components/parameters/filter'
06746a8b
RK
3280 responses:
3281 '204':
3282 description: successful operation
3283 headers:
3284 Cache-Control:
3285 schema:
3286 type: string
3287 default: 'max-age=900' # 15 min cache
3288 content:
3289 application/xml:
3290 schema:
3291 $ref: '#/components/schemas/VideosForXML'
84f6e32c
RK
3292 examples:
3293 nightly:
3294 externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local
06746a8b
RK
3295 application/rss+xml:
3296 schema:
3297 $ref: '#/components/schemas/VideosForXML'
3298 text/xml:
3299 schema:
3300 $ref: '#/components/schemas/VideosForXML'
3301 application/atom+xml:
3302 schema:
3303 $ref: '#/components/schemas/VideosForXML'
3304 application/json:
3305 schema:
3306 type: object
00494d6e
RK
3307 '404':
3308 description: video channel or account not found
06746a8b
RK
3309 '406':
3310 description: accept header unsupported
7461d440
RK
3311 /plugins:
3312 get:
3313 tags:
3314 - Plugins
3315 summary: List plugins
3316 security:
3317 - OAuth2:
3318 - admin
3319 parameters:
3320 - name: pluginType
3321 in: query
3322 schema:
3323 type: integer
3324 - name: uninstalled
3325 in: query
3326 schema:
3327 type: boolean
3328 - $ref: '#/components/parameters/start'
3329 - $ref: '#/components/parameters/count'
3330 - $ref: '#/components/parameters/sort'
3331 responses:
3332 '200':
3333 description: successful operation
3334 content:
3335 application/json:
3336 schema:
3337 $ref: '#/components/schemas/PluginResponse'
3338 /plugins/available:
3339 get:
3340 tags:
3341 - Plugins
3342 summary: List available plugins
3343 security:
3344 - OAuth2:
3345 - admin
3346 parameters:
3347 - name: search
3348 in: query
3349 schema:
3350 type: string
3351 - name: pluginType
3352 in: query
3353 schema:
3354 type: integer
3355 - name: currentPeerTubeEngine
3356 in: query
3357 schema:
3358 type: string
3359 - $ref: '#/components/parameters/start'
3360 - $ref: '#/components/parameters/count'
3361 - $ref: '#/components/parameters/sort'
3362 responses:
3363 '200':
3364 description: successful operation
3365 content:
3366 application/json:
3367 schema:
3368 $ref: '#/components/schemas/PluginResponse'
3369 '503':
3370 description: plugin index unavailable
3371 /plugins/install:
3372 post:
3373 tags:
3374 - Plugins
3375 summary: Install a plugin
3376 security:
3377 - OAuth2:
3378 - admin
3379 requestBody:
3380 content:
3381 application/json:
3382 schema:
3383 oneOf:
3384 - type: object
3385 properties:
3386 npmName:
3387 type: string
84f6e32c 3388 example: peertube-plugin-auth-ldap
7461d440
RK
3389 required:
3390 - npmName
3391 additionalProperties: false
3392 - type: object
3393 properties:
3394 path:
3395 type: string
3396 required:
3397 - path
3398 additionalProperties: false
3399 responses:
3400 '204':
3401 description: successful operation
3402 '400':
3403 description: should have either `npmName` or `path` set
3404 /plugins/update:
3405 post:
3406 tags:
3407 - Plugins
3408 summary: Update a plugin
3409 security:
3410 - OAuth2:
3411 - admin
3412 requestBody:
3413 content:
3414 application/json:
3415 schema:
3416 oneOf:
3417 - type: object
3418 properties:
3419 npmName:
3420 type: string
84f6e32c 3421 example: peertube-plugin-auth-ldap
7461d440
RK
3422 required:
3423 - npmName
3424 additionalProperties: false
3425 - type: object
3426 properties:
3427 path:
3428 type: string
3429 required:
3430 - path
3431 additionalProperties: false
3432 responses:
3433 '204':
3434 description: successful operation
3435 '400':
3436 description: should have either `npmName` or `path` set
3437 '404':
3438 description: existing plugin not found
3439 /plugins/uninstall:
3440 post:
3441 tags:
3442 - Plugins
3443 summary: Uninstall a plugin
3444 security:
3445 - OAuth2:
3446 - admin
3447 requestBody:
3448 content:
3449 application/json:
3450 schema:
3451 type: object
3452 properties:
3453 npmName:
3454 type: string
84f6e32c
RK
3455 description: name of the plugin/theme in its package.json
3456 example: peertube-plugin-auth-ldap
7461d440
RK
3457 required:
3458 - npmName
3459 responses:
3460 '204':
3461 description: successful operation
3462 '404':
3463 description: existing plugin not found
3464 /plugins/{npmName}:
3465 get:
3466 tags:
3467 - Plugins
3468 summary: Get a plugin
3469 security:
3470 - OAuth2:
3471 - admin
3472 parameters:
84f6e32c 3473 - $ref: '#/components/parameters/npmName'
7461d440
RK
3474 responses:
3475 '200':
3476 description: successful operation
3477 content:
3478 application/json:
3479 schema:
3480 $ref: '#/components/schemas/Plugin'
3481 '404':
3482 description: plugin not found
3483 /plugins/{npmName}/settings:
3484 put:
3485 tags:
3486 - Plugins
3487 summary: Set a plugin's settings
3488 security:
3489 - OAuth2:
3490 - admin
3491 parameters:
84f6e32c 3492 - $ref: '#/components/parameters/npmName'
7461d440
RK
3493 requestBody:
3494 content:
3495 application/json:
3496 schema:
3497 type: object
3498 properties:
3499 settings:
3500 type: object
3501 additionalProperties: true
3502 responses:
3503 '204':
3504 description: successful operation
3505 '404':
3506 description: plugin not found
3507 /plugins/{npmName}/public-settings:
3508 get:
3509 tags:
3510 - Plugins
3511 summary: Get a plugin's public settings
7461d440 3512 parameters:
84f6e32c 3513 - $ref: '#/components/parameters/npmName'
7461d440
RK
3514 responses:
3515 '200':
3516 description: successful operation
3517 content:
3518 application/json:
3519 schema:
3520 type: object
3521 additionalProperties: true
3522 '404':
3523 description: plugin not found
3524 /plugins/{npmName}/registered-settings:
3525 get:
3526 tags:
3527 - Plugins
3528 summary: Get a plugin's registered settings
3529 security:
3530 - OAuth2:
3531 - admin
3532 parameters:
84f6e32c 3533 - $ref: '#/components/parameters/npmName'
7461d440
RK
3534 responses:
3535 '200':
3536 description: successful operation
3537 content:
3538 application/json:
3539 schema:
3540 type: object
3541 additionalProperties: true
3542 '404':
3543 description: plugin not found
3e9e6f2f 3544servers:
8f9e8be1 3545 - url: 'https://peertube2.cpy.re/api/v1'
f4d59981 3546 description: Live Test Server (live data - latest nightly version)
6441981b 3547 - url: 'https://peertube3.cpy.re/api/v1'
b029d58a 3548 description: Live Test Server (live data - latest RC version)
f4d59981
RK
3549 - url: 'https://peertube.cpy.re/api/v1'
3550 description: Live Test Server (live data - stable version)
3e9e6f2f
RK
3551components:
3552 parameters:
3553 start:
3554 name: start
3555 in: query
3556 required: false
06746a8b 3557 description: Offset used to paginate results
3e9e6f2f 3558 schema:
06746a8b 3559 type: integer
84f6e32c 3560 minimum: 0
3e9e6f2f
RK
3561 count:
3562 name: count
3563 in: query
3564 required: false
06746a8b 3565 description: "Number of items to return"
3e9e6f2f 3566 schema:
06746a8b 3567 type: integer
84f6e32c 3568 default: 15
06746a8b
RK
3569 maximum: 100
3570 minimum: 1
3e9e6f2f
RK
3571 sort:
3572 name: sort
3573 in: query
3574 required: false
84f6e32c 3575 description: Sort column
3e9e6f2f
RK
3576 schema:
3577 type: string
84f6e32c 3578 example: -createdAt
8491293b
RK
3579 search:
3580 name: search
3581 in: query
3582 required: false
3583 description: Plain text search, applied to various parts of the model depending on endpoint
3584 schema:
3585 type: string
ad031145
C
3586 searchTarget:
3587 name: searchTarget
3588 in: query
3589 required: false
3590 description: >
3591 If the administrator enabled search index support, you can override the default search target.
3592
3593
3594 **Warning**: If you choose to make an index search, PeerTube will get results from a third party service.
84f6e32c 3595 It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
ad031145
C
3596 * If the current user has the ability to make a remote URI search (this information is available in the config endpoint),
3597 then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database.
3598 After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
84f6e32c 3599 * 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
3600 the data from the origin instance API
3601 schema:
3602 type: string
3603 enum:
3604 - 'local'
3605 - 'search-index'
fd5af7a2
RK
3606 videosSort:
3607 name: sort
3608 in: query
3609 required: false
3610 description: Sort videos by criteria
3611 schema:
3612 type: string
3613 enum:
04b703f6 3614 - name
fd5af7a2
RK
3615 - -duration
3616 - -createdAt
3617 - -publishedAt
3618 - -views
3619 - -likes
3620 - -trending
923d3d5a 3621 - -hot
fd5af7a2
RK
3622 videosSearchSort:
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 - -match
71810d0b
RK
3637 commentsSort:
3638 name: sort
3639 in: query
3640 required: false
3641 description: Sort comments by criteria
3642 schema:
3643 type: string
3644 enum:
3645 - -createdAt
3646 - -totalReplies
fd5af7a2
RK
3647 blacklistsSort:
3648 name: sort
3649 in: query
3650 required: false
3651 description: Sort blacklists by criteria
3652 schema:
3653 type: string
3654 enum:
3655 - -id
04b703f6 3656 - name
fd5af7a2
RK
3657 - -duration
3658 - -views
3659 - -likes
3660 - -dislikes
3661 - -uuid
3662 - -createdAt
8491293b
RK
3663 usersSearch:
3664 name: search
3665 in: query
3666 required: false
3667 description: Plain text search that will match with user usernames or emails
3668 schema:
3669 type: string
3670 usersBlocked:
3671 name: blocked
3672 in: query
3673 required: false
3674 description: Filter results down to (un)banned users
3675 schema:
3676 type: boolean
fd5af7a2
RK
3677 usersSort:
3678 name: sort
3679 in: query
3680 required: false
3681 description: Sort users by criteria
3682 schema:
3683 type: string
3684 enum:
3685 - -id
3686 - -username
3687 - -createdAt
3688 abusesSort:
3689 name: sort
3690 in: query
3691 required: false
3692 description: Sort abuses by criteria
3693 schema:
3694 type: string
3695 enum:
3696 - -id
3697 - -createdAt
3698 - -state
04b703f6
RK
3699 videoRedundanciesSort:
3700 name: sort
3701 in: query
3702 required: false
3703 description: Sort abuses by criteria
3704 schema:
3705 type: string
3706 enum:
3707 - name
3e9e6f2f
RK
3708 name:
3709 name: name
3710 in: path
3711 required: true
f2eb23cd 3712 description: The username or handle of the account
3e9e6f2f
RK
3713 schema:
3714 type: string
84f6e32c 3715 example: chocobozzz | chocobozzz@example.org
3e9e6f2f
RK
3716 id:
3717 name: id
3718 in: path
3719 required: true
3720 description: The user id
3721 schema:
06746a8b 3722 type: integer
84f6e32c
RK
3723 minimum: 0
3724 example: 42
cb9d028a 3725 idOrUUID:
3e9e6f2f
RK
3726 name: id
3727 in: path
3728 required: true
c1843150 3729 description: The object id or uuid
3e9e6f2f 3730 schema:
84f6e32c
RK
3731 oneOf:
3732 - type: integer
3733 minimum: 0
3734 example: 42
3735 - type: string
3736 format: uuid
3737 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
c1843150
C
3738 playlistElementId:
3739 name: playlistElementId
3740 in: path
3741 required: true
3742 description: Playlist element id
3743 schema:
06746a8b 3744 type: integer
50e16ccf
C
3745 abuseId:
3746 name: abuseId
3747 in: path
3748 required: true
310b5219 3749 description: Abuse id
50e16ccf 3750 schema:
06746a8b 3751 type: integer
668b7f09
C
3752 abuseMessageId:
3753 name: abuseMessageId
3754 in: path
3755 required: true
3756 description: Abuse message id
3757 schema:
3758 type: integer
67ae04a5
C
3759 captionLanguage:
3760 name: captionLanguage
3761 in: path
3762 required: true
3763 description: The caption language
3764 schema:
3765 type: string
9ce3d302
C
3766 channelHandle:
3767 name: channelHandle
3e9e6f2f
RK
3768 in: path
3769 required: true
84f6e32c 3770 description: The video channel handle
3e9e6f2f
RK
3771 schema:
3772 type: string
84f6e32c 3773 example: my_username | my_username@example.com
cb9d028a
C
3774 subscriptionHandle:
3775 name: subscriptionHandle
3776 in: path
3777 required: true
84f6e32c 3778 description: The subscription handle
cb9d028a
C
3779 schema:
3780 type: string
84f6e32c 3781 example: my_username | my_username@example.com
cb9d028a 3782 threadId:
3e9e6f2f
RK
3783 name: threadId
3784 in: path
3785 required: true
cb9d028a
C
3786 description: The thread id (root comment id)
3787 schema:
06746a8b 3788 type: integer
cb9d028a
C
3789 commentId:
3790 name: commentId
3791 in: path
3792 required: true
3e9e6f2f
RK
3793 description: The comment id
3794 schema:
06746a8b 3795 type: integer
fd5af7a2
RK
3796 categoryOneOf:
3797 name: categoryOneOf
3798 in: query
3799 required: false
84f6e32c 3800 description: category id of the video (see [/videos/categories](#tag/Video/paths/~1videos~1categories/get))
fd5af7a2
RK
3801 schema:
3802 oneOf:
06746a8b 3803 - type: integer
fd5af7a2
RK
3804 - type: array
3805 items:
06746a8b 3806 type: integer
2beb9895
RK
3807 style: form
3808 explode: false
fd5af7a2
RK
3809 tagsOneOf:
3810 name: tagsOneOf
3811 in: query
3812 required: false
3813 description: tag(s) of the video
3814 schema:
3815 oneOf:
3816 - type: string
3817 - type: array
3818 items:
3819 type: string
2beb9895
RK
3820 style: form
3821 explode: false
fd5af7a2
RK
3822 tagsAllOf:
3823 name: tagsAllOf
3824 in: query
3825 required: false
3826 description: tag(s) of the video, where all should be present in the video
3827 schema:
3828 oneOf:
3829 - type: string
3830 - type: array
3831 items:
3832 type: string
2beb9895
RK
3833 style: form
3834 explode: false
fd5af7a2
RK
3835 languageOneOf:
3836 name: languageOneOf
3837 in: query
3838 required: false
84f6e32c 3839 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
3840 schema:
3841 oneOf:
2beb9895 3842 - type: string
fd5af7a2
RK
3843 - type: array
3844 items:
2beb9895
RK
3845 type: string
3846 style: form
3847 explode: false
fd5af7a2
RK
3848 licenceOneOf:
3849 name: licenceOneOf
3850 in: query
3851 required: false
84f6e32c 3852 description: licence id of the video (see [/videos/licences](#tag/Video/paths/~1videos~1licences/get))
fd5af7a2
RK
3853 schema:
3854 oneOf:
06746a8b 3855 - type: integer
fd5af7a2
RK
3856 - type: array
3857 items:
06746a8b 3858 type: integer
2beb9895
RK
3859 style: form
3860 explode: false
59c794a5
C
3861 skipCount:
3862 name: skipCount
3863 in: query
3864 required: false
3865 description: if you don't need the `total` in the response
3866 schema:
3867 type: string
3868 enum:
3869 - 'true'
3870 - 'false'
06746a8b 3871 default: 'false'
fd5af7a2
RK
3872 nsfw:
3873 name: nsfw
3874 in: query
3875 required: false
3876 description: whether to include nsfw videos, if any
3877 schema:
3878 type: string
3879 enum:
3880 - 'true'
3881 - 'false'
3882 filter:
3883 name: filter
3884 in: query
3885 required: false
3886 description: >
0aa52e17 3887 Special filters which might require special rights:
fd5af7a2
RK
3888 * `local` - only videos local to the instance
3889 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
0aa52e17 3890 * `all` - all videos, showing private and unlisted videos (requires Admin privileges)
fd5af7a2
RK
3891 schema:
3892 type: string
3893 enum:
3894 - local
3895 - all-local
e76d5784
RK
3896 subscriptionsUris:
3897 name: uris
3898 in: query
3899 required: true
3900 description: list of uris to check if each is part of the user subscriptions
3901 schema:
3902 type: array
3903 items:
3904 type: string
84f6e32c
RK
3905 format: uri
3906 npmName:
3907 name: npmName
3908 in: path
3909 required: true
3910 description: name of the plugin/theme on npmjs.com or in its package.json
3911 schema:
3912 type: string
3913 example: peertube-plugin-auth-ldap
040d6896
RK
3914 jobType:
3915 name: jobType
3916 in: query
3917 required: false
3918 description: job type
3919 schema:
3920 type: string
3921 enum:
3922 - activitypub-follow
3923 - activitypub-http-broadcast
3924 - activitypub-http-fetcher
3925 - activitypub-http-unicast
3926 - email
3927 - video-transcoding
3928 - video-file-import
3929 - video-import
3930 - videos-views
3931 - activitypub-refresher
3932 - video-redundancy
3933 - video-live-ending
3e9e6f2f
RK
3934 securitySchemes:
3935 OAuth2:
3936 description: >
3937 In the header: *Authorization: Bearer <token\>*
3938
3939
3940 Authenticating via OAuth requires the following steps:
3941
3942
3943 - Have an account with sufficient authorization levels
3944
9817060f 3945 - [Generate](https://docs.joinpeertube.org/api-rest-getting-started) a
3e9e6f2f
RK
3946 Bearer Token
3947
3948 - Make Authenticated Requests
3949 type: oauth2
3950 flows:
3951 password:
3952 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
3953 scopes:
3954 admin: Admin scope
3955 moderator: Moderator scope
3956 user: User scope
3957 schemas:
3958 VideoConstantNumber:
3959 properties:
3960 id:
06746a8b 3961 type: integer
3e9e6f2f
RK
3962 label:
3963 type: string
3964 VideoConstantString:
3965 properties:
3966 id:
3967 type: string
3968 label:
3969 type: string
c1843150
C
3970
3971 VideoPlaylistPrivacySet:
3972 type: integer
3973 enum:
3974 - 1
3975 - 2
3976 - 3
06746a8b 3977 description: 'The video playlist privacy (Public = `1`, Unlisted = `2`, Private = `3`)'
c1843150
C
3978 VideoPlaylistPrivacyConstant:
3979 properties:
3980 id:
3981 $ref: '#/components/schemas/VideoPlaylistPrivacySet'
3982 label:
3983 type: string
3984
3985 VideoPlaylistTypeSet:
3986 type: integer
3987 enum:
3988 - 1
3989 - 2
06746a8b 3990 description: 'The video playlist type (Regular = `1`, Watch Later = `2`)'
c1843150
C
3991 VideoPlaylistTypeConstant:
3992 properties:
3993 id:
3994 $ref: '#/components/schemas/VideoPlaylistTypeSet'
3995 label:
3996 type: string
3997
ee89e8fd
C
3998 VideoPrivacySet:
3999 type: integer
3e9e6f2f 4000 enum:
ee89e8fd
C
4001 - 1
4002 - 2
4003 - 3
c1843150 4004 - 4
06746a8b 4005 description: 'The video privacy (Public = `1`, Unlisted = `2`, Private = `3`, Internal = `4`)'
ee89e8fd
C
4006 VideoPrivacyConstant:
4007 properties:
4008 id:
c1843150 4009 $ref: '#/components/schemas/VideoPrivacySet'
ee89e8fd
C
4010 label:
4011 type: string
50e16ccf 4012
0590bb46
C
4013 NSFWPolicy:
4014 type: string
4015 enum:
4016 - display
4017 - blur
4018 - do_not_list
4019
4020 UserRole:
06746a8b 4021 type: integer
0590bb46
C
4022 enum:
4023 - 0
4024 - 1
4025 - 2
06746a8b 4026 description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)'
2c318664 4027 example: 2
6d989edc
C
4028 UserAdminFlags:
4029 type: integer
4030 enum:
4031 - 0
4032 - 1
4033 description: 'Admin flags for the user (None = `0`, Bypass video blacklist = `1`)'
4034 example: 1
0590bb46 4035
5dce26d2
C
4036 VideoStateConstant:
4037 properties:
4038 id:
4039 type: integer
4040 enum:
4041 - 1
4042 - 2
4043 - 3
06746a8b 4044 description: 'The video state (Published = `1`, to transcode = `2`, to import = `3`)'
5dce26d2
C
4045 label:
4046 type: string
50e16ccf 4047
4f32032f 4048 AbuseStateSet:
50e16ccf
C
4049 type: integer
4050 enum:
4051 - 1
4052 - 2
4053 - 3
668b7f09 4054 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
4f32032f 4055 AbuseStateConstant:
50e16ccf
C
4056 properties:
4057 id:
4f32032f 4058 $ref: '#/components/schemas/AbuseStateSet'
50e16ccf
C
4059 label:
4060 type: string
4f32032f 4061 AbusePredefinedReasons:
1ebddadd
RK
4062 type: array
4063 items:
4064 type: string
4065 enum:
4066 - violentOrAbusive
4067 - hatefulOrAbusive
4068 - spamOrMisleading
4069 - privacy
4070 - rights
4071 - serverRules
4072 - thumbnails
4073 - captions
84f6e32c 4074 example: [spamOrMisleading]
50e16ccf 4075
5dce26d2
C
4076 VideoResolutionConstant:
4077 properties:
4078 id:
4079 type: integer
b7085c71 4080 description: 'Video resolution (240, 360, 720, 1080, 1440 or 2160)'
84f6e32c 4081 example: 240
5dce26d2
C
4082 label:
4083 type: string
84f6e32c 4084 example: 240p
5dce26d2
C
4085 VideoScheduledUpdate:
4086 properties:
4087 privacy:
4088 $ref: '#/components/schemas/VideoPrivacySet'
5dce26d2
C
4089 updateAt:
4090 type: string
4091 format: date
4092 description: When to update the video
4093 required:
4094 - updateAt
c1843150 4095 AccountSummary:
5dce26d2
C
4096 properties:
4097 id:
06746a8b 4098 type: integer
5dce26d2
C
4099 name:
4100 type: string
4101 displayName:
4102 type: string
4103 url:
4104 type: string
84f6e32c 4105 format: url
5dce26d2
C
4106 host:
4107 type: string
84f6e32c 4108 format: hostname
5dce26d2
C
4109 avatar:
4110 nullable: true
c1843150 4111 allOf:
75cba40d 4112 - $ref: '#/components/schemas/ActorImage'
5dce26d2
C
4113 VideoChannelSummary:
4114 properties:
4115 id:
06746a8b 4116 type: integer
5dce26d2
C
4117 name:
4118 type: string
4119 displayName:
4120 type: string
4121 url:
4122 type: string
84f6e32c 4123 format: url
5dce26d2
C
4124 host:
4125 type: string
84f6e32c 4126 format: hostname
5dce26d2
C
4127 avatar:
4128 nullable: true
c1843150 4129 allOf:
75cba40d 4130 - $ref: '#/components/schemas/ActorImage'
5dce26d2
C
4131 PlaylistElement:
4132 properties:
4133 position:
06746a8b 4134 type: integer
5dce26d2 4135 startTimestamp:
06746a8b 4136 type: integer
5dce26d2 4137 stopTimestamp:
06746a8b 4138 type: integer
bfbd9128
C
4139 video:
4140 nullable: true
c1843150
C
4141 allOf:
4142 - $ref: '#/components/schemas/Video'
5dce26d2
C
4143 VideoFile:
4144 properties:
4145 magnetUri:
4146 type: string
4147 resolution:
4148 $ref: '#/components/schemas/VideoResolutionConstant'
4149 size:
06746a8b 4150 type: integer
5dce26d2
C
4151 description: 'Video file size in bytes'
4152 torrentUrl:
4153 type: string
84f6e32c 4154 format: url
0ad45af7 4155 torrentDownloadUrl:
5dce26d2 4156 type: string
84f6e32c 4157 format: url
5dce26d2
C
4158 fileUrl:
4159 type: string
84f6e32c 4160 format: url
5dce26d2
C
4161 fileDownloadUrl:
4162 type: string
84f6e32c 4163 format: url
5dce26d2
C
4164 fps:
4165 type: number
63748ad0
C
4166 metadataUrl:
4167 type: string
84f6e32c 4168 format: url
5dce26d2
C
4169 VideoStreamingPlaylists:
4170 properties:
4171 id:
06746a8b 4172 type: integer
5dce26d2 4173 type:
06746a8b 4174 type: integer
5dce26d2
C
4175 enum:
4176 - 1
06746a8b 4177 description: 'Playlist type (HLS = `1`)'
5dce26d2
C
4178 playlistUrl:
4179 type: string
84f6e32c 4180 format: url
5dce26d2
C
4181 segmentsSha256Url:
4182 type: string
84f6e32c 4183 format: url
63748ad0
C
4184 files:
4185 type: array
000ca2a8 4186 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
4187 items:
4188 $ref: '#/components/schemas/VideoFile'
5dce26d2
C
4189 redundancies:
4190 type: array
4191 items:
4192 type: object
4193 properties:
4194 baseUrl:
4195 type: string
84f6e32c 4196 format: url
f4d59981
RK
4197 VideoInfo:
4198 properties:
4199 id:
4200 type: integer
4201 uuid:
4202 type: string
84f6e32c
RK
4203 format: uuid
4204 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
f4d59981
RK
4205 name:
4206 type: string
3e9e6f2f
RK
4207 Video:
4208 properties:
4209 id:
06746a8b 4210 type: integer
84f6e32c 4211 example: 8
3e9e6f2f
RK
4212 uuid:
4213 type: string
84f6e32c
RK
4214 format: uuid
4215 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4e239e35
C
4216 isLive:
4217 type: boolean
3e9e6f2f
RK
4218 createdAt:
4219 type: string
84f6e32c 4220 format: date-time
3e9e6f2f
RK
4221 publishedAt:
4222 type: string
84f6e32c 4223 format: date-time
3e9e6f2f
RK
4224 updatedAt:
4225 type: string
84f6e32c 4226 format: date-time
5dce26d2
C
4227 originallyPublishedAt:
4228 type: string
84f6e32c 4229 format: date-time
3e9e6f2f
RK
4230 category:
4231 $ref: '#/components/schemas/VideoConstantNumber'
4232 licence:
4233 $ref: '#/components/schemas/VideoConstantNumber'
4234 language:
4235 $ref: '#/components/schemas/VideoConstantString'
4236 privacy:
ee89e8fd 4237 $ref: '#/components/schemas/VideoPrivacyConstant'
3e9e6f2f
RK
4238 description:
4239 type: string
4240 duration:
06746a8b 4241 type: integer
84f6e32c 4242 example: 1419
3e9e6f2f
RK
4243 isLocal:
4244 type: boolean
4245 name:
4246 type: string
84f6e32c 4247 example: What is PeerTube?
3e9e6f2f
RK
4248 thumbnailPath:
4249 type: string
84f6e32c 4250 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3e9e6f2f
RK
4251 previewPath:
4252 type: string
20dcfd74 4253 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3e9e6f2f
RK
4254 embedPath:
4255 type: string
84f6e32c 4256 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
3e9e6f2f 4257 views:
06746a8b 4258 type: integer
84f6e32c 4259 example: 1337
3e9e6f2f 4260 likes:
06746a8b 4261 type: integer
84f6e32c 4262 example: 42
3e9e6f2f 4263 dislikes:
06746a8b 4264 type: integer
84f6e32c 4265 example: 7
3e9e6f2f
RK
4266 nsfw:
4267 type: boolean
5dce26d2
C
4268 waitTranscoding:
4269 type: boolean
4270 nullable: true
4271 state:
4272 $ref: '#/components/schemas/VideoStateConstant'
4273 scheduledUpdate:
4274 nullable: true
c1843150
C
4275 allOf:
4276 - $ref: '#/components/schemas/VideoScheduledUpdate'
5dce26d2
C
4277 blacklisted:
4278 nullable: true
4279 type: boolean
4280 blacklistedReason:
4281 nullable: true
4282 type: string
3e9e6f2f 4283 account:
c1843150 4284 $ref: '#/components/schemas/AccountSummary'
5dce26d2
C
4285 channel:
4286 $ref: '#/components/schemas/VideoChannelSummary'
4287 userHistory:
4288 nullable: true
3e9e6f2f
RK
4289 type: object
4290 properties:
5dce26d2 4291 currentTime:
06746a8b 4292 type: integer
5dce26d2
C
4293 VideoDetails:
4294 allOf:
4295 - $ref: '#/components/schemas/Video'
4296 - type: object
4297 properties:
4298 descriptionPath:
3e9e6f2f 4299 type: string
5dce26d2 4300 support:
3e9e6f2f 4301 type: string
00494d6e 4302 description: A text tell the audience how to support the video creator
84f6e32c 4303 example: Please support my work on <insert crowdfunding plateform>! <3
5dce26d2
C
4304 channel:
4305 $ref: '#/components/schemas/VideoChannel'
4306 account:
4307 $ref: '#/components/schemas/Account'
4308 tags:
4309 type: array
4310 items:
4311 type: string
84f6e32c 4312 example: [flowers, gardening]
5dce26d2
C
4313 files:
4314 type: array
000ca2a8 4315 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
4316 items:
4317 $ref: '#/components/schemas/VideoFile'
4318 commentsEnabled:
4319 type: boolean
4320 downloadEnabled:
4321 type: boolean
4322 trackerUrls:
4323 type: array
4324 items:
4325 type: string
84f6e32c 4326 format: url
5dce26d2
C
4327 streamingPlaylists:
4328 type: array
4329 items:
4330 $ref: '#/components/schemas/VideoStreamingPlaylists'
04b703f6
RK
4331 FileRedundancyInformation:
4332 properties:
4333 id:
4334 type: integer
4335 fileUrl:
4336 type: string
84f6e32c 4337 format: url
04b703f6
RK
4338 strategy:
4339 type: string
84f6e32c
RK
4340 enum:
4341 - manual
4342 - most-views
4343 - trending
4344 - recently-added
04b703f6
RK
4345 size:
4346 type: integer
4347 createdAt:
4348 type: string
4349 format: date-time
4350 updatedAt:
4351 type: string
4352 format: date-time
4353 expiresOn:
4354 type: string
4355 format: date-time
4356 VideoRedundancy:
4357 properties:
4358 id:
4359 type: integer
4360 name:
4361 type: string
4362 url:
4363 type: string
84f6e32c 4364 format: url
04b703f6
RK
4365 uuid:
4366 type: string
84f6e32c
RK
4367 format: uuid
4368 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
04b703f6
RK
4369 redundancies:
4370 type: object
4371 properties:
4372 files:
4373 type: array
4374 items:
1e904cde 4375 $ref: '#/components/schemas/FileRedundancyInformation'
04b703f6
RK
4376 streamingPlaylists:
4377 type: array
4378 items:
1e904cde 4379 $ref: '#/components/schemas/FileRedundancyInformation'
1f82e3e8
C
4380 VideoImportStateConstant:
4381 properties:
4382 id:
4383 type: integer
4384 enum:
4385 - 1
4386 - 2
4387 - 3
06746a8b 4388 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
1f82e3e8
C
4389 label:
4390 type: string
84f6e32c 4391 example: Pending
1f82e3e8
C
4392 VideoImport:
4393 properties:
4394 id:
06746a8b 4395 type: integer
84f6e32c 4396 example: 2
1f82e3e8
C
4397 targetUrl:
4398 type: string
84f6e32c
RK
4399 format: url
4400 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
1f82e3e8
C
4401 magnetUri:
4402 type: string
84f6e32c
RK
4403 format: uri
4404 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
4405 torrentName:
4406 type: string
4407 state:
84f6e32c 4408 $ref: '#/components/schemas/VideoImportStateConstant'
1f82e3e8
C
4409 error:
4410 type: string
4411 createdAt:
4412 type: string
84f6e32c 4413 format: date-time
1f82e3e8
C
4414 updatedAt:
4415 type: string
84f6e32c 4416 format: date-time
1f82e3e8
C
4417 video:
4418 $ref: '#/components/schemas/Video'
668b7f09 4419 Abuse:
3e9e6f2f
RK
4420 properties:
4421 id:
06746a8b 4422 type: integer
84f6e32c 4423 example: 7
3e9e6f2f
RK
4424 reason:
4425 type: string
84f6e32c 4426 example: The video is a spam
1ebddadd 4427 predefinedReasons:
4f32032f 4428 $ref: '#/components/schemas/AbusePredefinedReasons'
3e9e6f2f
RK
4429 reporterAccount:
4430 $ref: '#/components/schemas/Account'
50e16ccf 4431 state:
4f32032f 4432 $ref: '#/components/schemas/AbuseStateConstant'
50e16ccf
C
4433 moderationComment:
4434 type: string
84f6e32c 4435 example: Decided to ban the server since it spams us regularly
3e9e6f2f
RK
4436 video:
4437 type: object
4438 properties:
4439 id:
06746a8b 4440 type: integer
3e9e6f2f
RK
4441 name:
4442 type: string
4443 uuid:
4444 type: string
84f6e32c
RK
4445 format: uuid
4446 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
4447 createdAt:
4448 type: string
84f6e32c 4449 format: date-time
668b7f09
C
4450 AbuseMessage:
4451 properties:
4452 id:
4453 type: integer
4454 message:
4455 type: string
4456 byModerator:
4457 type: boolean
4458 createdAt:
4459 type: string
4460 format: date-time
4461 account:
4462 $ref: '#/components/schemas/AccountSummary'
3e9e6f2f
RK
4463 VideoBlacklist:
4464 properties:
4465 id:
06746a8b 4466 type: integer
3e9e6f2f 4467 videoId:
06746a8b 4468 type: integer
3e9e6f2f
RK
4469 createdAt:
4470 type: string
84f6e32c 4471 format: date-time
3e9e6f2f
RK
4472 updatedAt:
4473 type: string
84f6e32c 4474 format: date-time
3e9e6f2f
RK
4475 name:
4476 type: string
4477 uuid:
4478 type: string
84f6e32c
RK
4479 format: uuid
4480 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
4481 description:
4482 type: string
4483 duration:
06746a8b 4484 type: integer
3e9e6f2f 4485 views:
06746a8b 4486 type: integer
3e9e6f2f 4487 likes:
06746a8b 4488 type: integer
3e9e6f2f 4489 dislikes:
06746a8b 4490 type: integer
3e9e6f2f
RK
4491 nsfw:
4492 type: boolean
4493 VideoChannel:
4494 properties:
4495 displayName:
4496 type: string
4497 description:
4498 type: string
4499 isLocal:
4500 type: boolean
4501 ownerAccount:
4502 type: object
4503 properties:
4504 id:
06746a8b 4505 type: integer
3e9e6f2f
RK
4506 uuid:
4507 type: string
84f6e32c
RK
4508 format: uuid
4509 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
71810d0b
RK
4510 VideoPlaylist:
4511 properties:
4512 id:
06746a8b 4513 type: integer
71810d0b
RK
4514 createdAt:
4515 type: string
84f6e32c 4516 format: date-time
71810d0b
RK
4517 updatedAt:
4518 type: string
84f6e32c 4519 format: date-time
71810d0b
RK
4520 description:
4521 type: string
4522 uuid:
4523 type: string
84f6e32c
RK
4524 format: uuid
4525 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
71810d0b
RK
4526 displayName:
4527 type: string
4528 isLocal:
4529 type: boolean
4530 videoLength:
06746a8b 4531 type: integer
71810d0b
RK
4532 thumbnailPath:
4533 type: string
4534 privacy:
c1843150 4535 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
71810d0b 4536 type:
c1843150 4537 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
71810d0b 4538 ownerAccount:
c1843150
C
4539 $ref: '#/components/schemas/AccountSummary'
4540 videoChannel:
4541 $ref: '#/components/schemas/VideoChannelSummary'
3e9e6f2f
RK
4542 VideoComment:
4543 properties:
4544 id:
06746a8b 4545 type: integer
3e9e6f2f
RK
4546 url:
4547 type: string
84f6e32c 4548 format: url
3e9e6f2f
RK
4549 text:
4550 type: string
4551 threadId:
06746a8b 4552 type: integer
3e9e6f2f 4553 inReplyToCommentId:
06746a8b 4554 type: integer
3e9e6f2f 4555 videoId:
06746a8b 4556 type: integer
3e9e6f2f
RK
4557 createdAt:
4558 type: string
84f6e32c 4559 format: date-time
3e9e6f2f
RK
4560 updatedAt:
4561 type: string
84f6e32c 4562 format: date-time
5b0413dd 4563 totalRepliesFromVideoAuthor:
06746a8b 4564 type: integer
3e9e6f2f 4565 totalReplies:
06746a8b 4566 type: integer
3e9e6f2f
RK
4567 account:
4568 $ref: '#/components/schemas/Account'
4569 VideoCommentThreadTree:
4570 properties:
4571 comment:
4572 $ref: '#/components/schemas/VideoComment'
4573 children:
4574 type: array
4575 items:
4576 $ref: '#/components/schemas/VideoCommentThreadTree'
67ae04a5
C
4577 VideoCaption:
4578 properties:
4579 language:
4580 $ref: '#/components/schemas/VideoConstantString'
4581 captionPath:
4582 type: string
75cba40d 4583 ActorImage:
3e9e6f2f
RK
4584 properties:
4585 path:
4586 type: string
4587 createdAt:
4588 type: string
84f6e32c 4589 format: date-time
3e9e6f2f
RK
4590 updatedAt:
4591 type: string
84f6e32c 4592 format: date-time
f4d59981
RK
4593 ActorInfo:
4594 properties:
4595 id:
4596 type: integer
84f6e32c 4597 example: 11
f4d59981
RK
4598 name:
4599 type: string
4600 displayName:
4601 type: string
4602 host:
4603 type: string
84f6e32c 4604 format: hostname
f4d59981
RK
4605 avatar:
4606 nullable: true
4607 type: object
4608 properties:
4609 path:
4610 type: string
3e9e6f2f
RK
4611 Actor:
4612 properties:
4613 id:
06746a8b 4614 type: integer
84f6e32c 4615 example: 11
3e9e6f2f
RK
4616 url:
4617 type: string
84f6e32c 4618 format: url
3e9e6f2f
RK
4619 name:
4620 type: string
4621 host:
4622 type: string
84f6e32c 4623 format: hostname
3e9e6f2f 4624 followingCount:
06746a8b 4625 type: integer
3e9e6f2f 4626 followersCount:
06746a8b 4627 type: integer
3e9e6f2f
RK
4628 createdAt:
4629 type: string
84f6e32c 4630 format: date-time
3e9e6f2f
RK
4631 updatedAt:
4632 type: string
84f6e32c 4633 format: date-time
3e9e6f2f 4634 avatar:
75cba40d 4635 $ref: '#/components/schemas/ActorImage'
3e9e6f2f
RK
4636 Account:
4637 allOf:
4638 - $ref: '#/components/schemas/Actor'
4639 - properties:
2a8ae759
FS
4640 userId:
4641 type: string
84f6e32c 4642 example: 2
3e9e6f2f
RK
4643 displayName:
4644 type: string
2a8ae759
FS
4645 description:
4646 type: string
6441981b
RK
4647 UserWatchingVideo:
4648 properties:
4649 currentTime:
06746a8b 4650 type: integer
84f6e32c
RK
4651 description: timestamp within the video, in seconds
4652 example: 5
3e9e6f2f
RK
4653 ServerConfig:
4654 properties:
2a8ae759
FS
4655 instance:
4656 type: object
4657 properties:
4658 name:
4659 type: string
4660 shortDescription:
4661 type: string
4662 defaultClientRoute:
4663 type: string
4664 isNSFW:
4665 type: boolean
4666 defaultNSFWPolicy:
4667 type: string
4668 customizations:
4669 type: object
4670 properties:
4671 javascript:
4672 type: string
4673 css:
4674 type: string
f30736c8
RK
4675 search:
4676 type: object
4677 properties:
4678 remoteUri:
4679 type: object
4680 properties:
4681 users:
4682 type: boolean
4683 anonymous:
4684 type: boolean
2a8ae759
FS
4685 plugin:
4686 type: object
4687 properties:
4688 registered:
4689 type: array
4690 items:
4691 type: string
4692 theme:
4693 type: object
4694 properties:
4695 registered:
4696 type: array
4697 items:
4698 type: string
4699 email:
4700 type: object
4701 properties:
4702 enabled:
4703 type: boolean
4704 contactForm:
4705 type: object
4706 properties:
4707 enabled:
4708 type: boolean
4709 serverVersion:
4710 type: string
4711 serverCommit:
4712 type: string
3e9e6f2f
RK
4713 signup:
4714 type: object
4715 properties:
4716 allowed:
4717 type: boolean
2a8ae759
FS
4718 allowedForCurrentIP:
4719 type: boolean
4720 requiresEmailVerification:
4721 type: boolean
3e9e6f2f
RK
4722 transcoding:
4723 type: object
4724 properties:
2a8ae759
FS
4725 hls:
4726 type: object
4727 properties:
4728 enabled:
4729 type: boolean
f30736c8
RK
4730 webtorrent:
4731 type: object
4732 properties:
4733 enabled:
4734 type: boolean
3e9e6f2f
RK
4735 enabledResolutions:
4736 type: array
4737 items:
06746a8b 4738 type: integer
2a8ae759
FS
4739 import:
4740 type: object
4741 properties:
4742 videos:
4743 type: object
4744 properties:
4745 http:
4746 type: object
4747 properties:
4748 enabled:
4749 type: boolean
4750 torrent:
4751 type: object
4752 properties:
4753 enabled:
4754 type: boolean
4755 autoBlacklist:
4756 type: object
4757 properties:
4758 videos:
4759 type: object
4760 properties:
4761 ofUsers:
4762 type: object
4763 properties:
4764 enabled:
4765 type: boolean
3e9e6f2f
RK
4766 avatar:
4767 type: object
4768 properties:
4769 file:
4770 type: object
4771 properties:
4772 size:
4773 type: object
4774 properties:
4775 max:
06746a8b 4776 type: integer
3e9e6f2f
RK
4777 extensions:
4778 type: array
4779 items:
4780 type: string
4781 video:
4782 type: object
4783 properties:
2a8ae759
FS
4784 image:
4785 type: object
4786 properties:
4787 extensions:
4788 type: array
4789 items:
4790 type: string
4791 size:
4792 type: object
4793 properties:
4794 max:
06746a8b 4795 type: integer
3e9e6f2f
RK
4796 file:
4797 type: object
4798 properties:
4799 extensions:
4800 type: array
4801 items:
4802 type: string
2a8ae759
FS
4803 videoCaption:
4804 type: object
4805 properties:
4806 file:
4807 type: object
4808 properties:
4809 size:
4810 type: object
4811 properties:
4812 max:
06746a8b 4813 type: integer
2a8ae759
FS
4814 extensions:
4815 type: array
4816 items:
4817 type: string
4818 user:
4819 type: object
4820 properties:
4821 videoQuota:
06746a8b 4822 type: integer
2a8ae759 4823 videoQuotaDaily:
06746a8b 4824 type: integer
2a8ae759
FS
4825 trending:
4826 type: object
4827 properties:
4828 videos:
4829 type: object
4830 properties:
4831 intervalDays:
06746a8b 4832 type: integer
2a8ae759 4833 tracker:
747b17c7 4834 type: object
2a8ae759
FS
4835 properties:
4836 enabled:
4837 type: boolean
f30736c8
RK
4838 followings:
4839 type: object
4840 properties:
4841 instance:
4842 type: object
4843 properties:
4844 autoFollowIndex:
4845 type: object
4846 properties:
4847 indexUrl:
4848 type: string
84f6e32c 4849 format: url
2a8ae759
FS
4850 ServerConfigAbout:
4851 properties:
4852 instance:
4853 type: object
4854 properties:
4855 name:
4856 type: string
4857 shortDescription:
4858 type: string
4859 description:
4860 type: string
4861 terms:
4862 type: string
4863 ServerConfigCustom:
4864 properties:
4865 instance:
4866 type: object
4867 properties:
4868 name:
4869 type: string
4870 shortDescription:
4871 type: string
4872 description:
4873 type: string
4874 terms:
4875 type: string
4876 defaultClientRoute:
4877 type: string
4878 isNSFW:
4879 type: boolean
4880 defaultNSFWPolicy:
4881 type: string
4882 customizations:
4883 type: object
4884 properties:
4885 javascript:
4886 type: string
4887 css:
4888 type: string
4889 theme:
4890 type: object
4891 properties:
4892 default:
4893 type: string
4894 services:
4895 type: object
4896 properties:
4897 twitter:
4898 type: object
4899 properties:
4900 username:
4901 type: string
4902 whitelisted:
4903 type: boolean
4904 cache:
4905 type: object
4906 properties:
4907 previews:
4908 type: object
4909 properties:
4910 size:
06746a8b 4911 type: integer
2a8ae759
FS
4912 captions:
4913 type: object
4914 properties:
4915 size:
06746a8b 4916 type: integer
2a8ae759
FS
4917 signup:
4918 type: object
4919 properties:
4920 enabled:
4921 type: boolean
4922 limit:
06746a8b 4923 type: integer
2a8ae759
FS
4924 requiresEmailVerification:
4925 type: boolean
4926 admin:
4927 type: object
4928 properties:
4929 email:
4930 type: string
84f6e32c 4931 format: email
2a8ae759
FS
4932 contactForm:
4933 type: object
4934 properties:
4935 enabled:
4936 type: boolean
4937 user:
4938 type: object
4939 properties:
4940 videoQuota:
06746a8b 4941 type: integer
2a8ae759 4942 videoQuotaDaily:
06746a8b 4943 type: integer
2a8ae759
FS
4944 transcoding:
4945 type: object
4946 properties:
4947 enabled:
4948 type: boolean
4949 allowAdditionalExtensions:
4950 type: boolean
4951 allowAudioFiles:
4952 type: boolean
4953 threads:
06746a8b 4954 type: integer
2a8ae759
FS
4955 resolutions:
4956 type: object
4957 properties:
4958 240p:
4959 type: boolean
4960 360p:
4961 type: boolean
4962 480p:
4963 type: boolean
4964 720p:
4965 type: boolean
4966 1080p:
4967 type: boolean
b7085c71
RK
4968 1440p:
4969 type: boolean
2a8ae759
FS
4970 2160p:
4971 type: boolean
4972 hls:
4973 type: object
4974 properties:
4975 enabled:
4976 type: boolean
4977 import:
4978 type: object
4979 properties:
4980 videos:
4981 type: object
4982 properties:
4983 http:
4984 type: object
4985 properties:
4986 enabled:
4987 type: boolean
4988 torrent:
4989 type: object
4990 properties:
4991 enabled:
4992 type: boolean
4993 autoBlacklist:
4994 type: object
4995 properties:
4996 videos:
4997 type: object
4998 properties:
4999 ofUsers:
5000 type: object
5001 properties:
5002 enabled:
5003 type: boolean
5004 followers:
5005 type: object
5006 properties:
5007 instance:
5008 type: object
5009 properties:
5010 enabled:
5011 type: boolean
5012 manualApproval:
5013 type: boolean
3e9e6f2f
RK
5014 Follow:
5015 properties:
5016 id:
06746a8b 5017 type: integer
3e9e6f2f
RK
5018 follower:
5019 $ref: '#/components/schemas/Actor'
5020 following:
5021 $ref: '#/components/schemas/Actor'
5022 score:
5023 type: number
04b703f6 5024 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
3e9e6f2f
RK
5025 state:
5026 type: string
5027 enum:
5028 - pending
5029 - accepted
5030 createdAt:
5031 type: string
84f6e32c 5032 format: date-time
3e9e6f2f
RK
5033 updatedAt:
5034 type: string
84f6e32c 5035 format: date-time
e3489df9
C
5036
5037 PredefinedAbuseReasons:
5038 description: Reason categories that help triage reports
5039 type: array
5040 items:
5041 type: string
5042 enum:
5043 - violentOrAbusive
5044 - hatefulOrAbusive
5045 - spamOrMisleading
5046 - privacy
5047 - rights
5048 - serverRules
5049 - thumbnails
5050 - captions
5051
3e9e6f2f
RK
5052 Job:
5053 properties:
5054 id:
06746a8b 5055 type: integer
84f6e32c
RK
5056 minimum: 0
5057 example: 42
3e9e6f2f
RK
5058 state:
5059 type: string
5060 enum:
84f6e32c
RK
5061 - active
5062 - completed
5063 - failed
5064 - waiting
5065 - delayed
5066 type:
3e9e6f2f
RK
5067 type: string
5068 enum:
84f6e32c
RK
5069 - activitypub-http-unicast
5070 - activitypub-http-broadcast
5071 - activitypub-http-fetcher
5072 - activitypub-follow
5073 - video-file-import
5074 - video-transcoding
5075 - email
5076 - video-import
5077 - videos-views
5078 - activitypub-refresher
5079 - video-redundancy
5080 data:
5081 type: object
5082 additionalProperties: true
5083 error:
5084 type: object
5085 additionalProperties: true
3e9e6f2f
RK
5086 createdAt:
5087 type: string
84f6e32c
RK
5088 format: date-time
5089 finishedOn:
3e9e6f2f 5090 type: string
84f6e32c
RK
5091 format: date-time
5092 processedOn:
5093 type: string
5094 format: date-time
3e9e6f2f
RK
5095 AddUserResponse:
5096 properties:
2c318664
RK
5097 user:
5098 type: object
5099 properties:
5100 id:
5101 type: integer
5102 example: 8
5103 account:
5104 type: object
5105 properties:
5106 id:
5107 type: integer
5108 example: 37
3e9e6f2f
RK
5109 VideoUploadResponse:
5110 properties:
5111 video:
5112 type: object
5113 properties:
5114 id:
06746a8b 5115 type: integer
84f6e32c 5116 example: 8
3e9e6f2f
RK
5117 uuid:
5118 type: string
84f6e32c
RK
5119 format: uuid
5120 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
5121 CommentThreadResponse:
5122 properties:
5123 total:
06746a8b 5124 type: integer
84f6e32c 5125 example: 1
3e9e6f2f
RK
5126 data:
5127 type: array
84f6e32c 5128 maxItems: 100
3e9e6f2f
RK
5129 items:
5130 $ref: '#/components/schemas/VideoComment'
5131 CommentThreadPostResponse:
5132 properties:
5133 comment:
5134 $ref: '#/components/schemas/VideoComment'
048b6946
C
5135 VideoListResponse:
5136 properties:
5137 total:
06746a8b 5138 type: integer
84f6e32c 5139 example: 1
048b6946
C
5140 data:
5141 type: array
84f6e32c 5142 maxItems: 100
048b6946
C
5143 items:
5144 $ref: '#/components/schemas/Video'
84f6e32c
RK
5145 User:
5146 properties:
5147 id:
5148 type: integer
5149 readOnly: true
5150 username:
5151 type: string
5152 description: The user username
5153 minLength: 1
5154 maxLength: 50
5155 email:
5156 type: string
5157 format: email
5158 description: The user email
6d989edc
C
5159 pluginAuth:
5160 type: string
5161 description: Auth plugin to use to authenticate the user
84f6e32c
RK
5162 theme:
5163 type: string
5164 description: Theme enabled by this user
5165 emailVerified:
5166 type: boolean
5167 description: Has the user confirmed their email address?
5168 nsfwPolicy:
5169 $ref: '#/components/schemas/NSFWPolicy'
5170 webtorrentEnabled:
5171 type: boolean
5172 description: Enable P2P in the player
5173 autoPlayVideo:
5174 type: boolean
5175 description: Automatically start playing the video on the watch page
5176 role:
5177 $ref: '#/components/schemas/UserRole'
5178 roleLabel:
5179 type: string
5180 enum:
5181 - User
5182 - Moderator
5183 - Administrator
5184 videoQuota:
5185 type: integer
5186 description: The user video quota
5187 videoQuotaDaily:
5188 type: integer
5189 description: The user daily video quota
5190 videosCount:
5191 type: integer
4f32032f 5192 abusesCount:
84f6e32c 5193 type: integer
4f32032f 5194 abusesAcceptedCount:
84f6e32c 5195 type: integer
4f32032f 5196 abusesCreatedCount:
84f6e32c
RK
5197 type: integer
5198 videoCommentsCount:
5199 type: integer
5200 noInstanceConfigWarningModal:
5201 type: boolean
5202 noWelcomeModal:
5203 type: boolean
5204 blocked:
5205 type: boolean
5206 blockedReason:
5207 type: string
5208 createdAt:
5209 type: string
5210 account:
5211 $ref: '#/components/schemas/Account'
5212 videoChannels:
5213 type: array
5214 items:
5215 $ref: '#/components/schemas/VideoChannel'
3e9e6f2f
RK
5216 AddUser:
5217 properties:
5218 username:
5219 type: string
84f6e32c 5220 description: The user username
06746a8b
RK
5221 minLength: 1
5222 maxLength: 50
3e9e6f2f
RK
5223 password:
5224 type: string
84f6e32c
RK
5225 format: password
5226 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
06746a8b
RK
5227 minLength: 6
5228 maxLength: 255
3e9e6f2f
RK
5229 email:
5230 type: string
84f6e32c
RK
5231 format: email
5232 description: The user email
3e9e6f2f 5233 videoQuota:
84f6e32c
RK
5234 type: integer
5235 description: The user video quota
fbe1bc2a 5236 videoQuotaDaily:
84f6e32c
RK
5237 type: integer
5238 description: The user daily video quota
6d989edc
C
5239 channelName:
5240 type: string
5241 description: The user default channel username
3e9e6f2f 5242 role:
0590bb46 5243 $ref: '#/components/schemas/UserRole'
6d989edc
C
5244 adminFlags:
5245 $ref: '#/components/schemas/UserAdminFlags'
3e9e6f2f
RK
5246 required:
5247 - username
5248 - password
5249 - email
5250 - videoQuota
fbe1bc2a 5251 - videoQuotaDaily
3e9e6f2f
RK
5252 - role
5253 UpdateUser:
5254 properties:
5255 id:
5256 type: string
84f6e32c 5257 description: The user id
3e9e6f2f
RK
5258 email:
5259 type: string
84f6e32c
RK
5260 format: email
5261 description: The updated email of the user
6d989edc
C
5262 emailVerified:
5263 type: boolean
5264 description: Set the email as verified
3e9e6f2f 5265 videoQuota:
84f6e32c
RK
5266 type: integer
5267 description: The updated video quota of the user
fbe1bc2a 5268 videoQuotaDaily:
84f6e32c
RK
5269 type: integer
5270 description: The updated daily video quota of the user
6d989edc
C
5271 pluginAuth:
5272 type: string
5273 nullable: true
5274 description: The auth plugin to use to authenticate the user
5275 example: 'peertube-plugin-auth-saml2'
3e9e6f2f 5276 role:
0590bb46 5277 $ref: '#/components/schemas/UserRole'
6d989edc
C
5278 adminFlags:
5279 $ref: '#/components/schemas/UserAdminFlags'
3e9e6f2f
RK
5280 required:
5281 - id
3e9e6f2f
RK
5282 UpdateMe:
5283 properties:
5284 password:
5285 type: string
84f6e32c
RK
5286 format: password
5287 description: Your new password
5288 minLength: 6
5289 maxLength: 255
3e9e6f2f
RK
5290 email:
5291 type: string
84f6e32c
RK
5292 format: email
5293 description: Your new email
3e9e6f2f
RK
5294 displayNSFW:
5295 type: string
84f6e32c
RK
5296 description: Your new displayNSFW
5297 enum:
5298 - 'true'
5299 - 'false'
5300 - both
3e9e6f2f 5301 autoPlayVideo:
84f6e32c
RK
5302 type: boolean
5303 description: Your new autoPlayVideo
3e9e6f2f
RK
5304 required:
5305 - password
5306 - email
5307 - displayNSFW
5308 - autoPlayVideo
5309 GetMeVideoRating:
5310 properties:
5311 id:
5312 type: string
84f6e32c 5313 description: Id of the video
3e9e6f2f
RK
5314 rating:
5315 type: number
84f6e32c 5316 description: Rating of the video
3e9e6f2f
RK
5317 required:
5318 - id
5319 - rating
c100a614
YB
5320 VideoRating:
5321 properties:
5322 video:
5323 $ref: '#/components/schemas/Video'
5324 rating:
5325 type: number
5326 description: 'Rating of the video'
5327 required:
5328 - video
5329 - rating
3e9e6f2f
RK
5330 RegisterUser:
5331 properties:
5332 username:
5333 type: string
84f6e32c
RK
5334 description: The username of the user
5335 minLength: 1
5336 maxLength: 50
5337 pattern: '/^[a-z0-9._]{1,50}$/'
3e9e6f2f
RK
5338 password:
5339 type: string
84f6e32c
RK
5340 format: password
5341 description: The password of the user
5342 minLength: 6
5343 maxLength: 255
3e9e6f2f
RK
5344 email:
5345 type: string
84f6e32c
RK
5346 format: email
5347 description: The email of the user
1f20622f
C
5348 displayName:
5349 type: string
84f6e32c
RK
5350 description: The user display name
5351 minLength: 1
5352 maxLength: 120
1f20622f
C
5353 channel:
5354 type: object
5355 properties:
5356 name:
5357 type: string
f2eb23cd 5358 description: The username for the default channel
84f6e32c 5359 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
1f20622f
C
5360 displayName:
5361 type: string
84f6e32c
RK
5362 description: The display name for the default channel
5363 minLength: 1
5364 maxLength: 120
3e9e6f2f
RK
5365 required:
5366 - username
5367 - password
5368 - email
7d14d4d2 5369 VideoChannelCreate:
3e9e6f2f
RK
5370 properties:
5371 name:
5372 type: string
7d14d4d2
C
5373 displayName:
5374 type: string
3e9e6f2f
RK
5375 description:
5376 type: string
7d14d4d2
C
5377 support:
5378 type: string
06746a8b 5379 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
00494d6e 5380 example: Please support my work on <insert crowdfunding plateform>! <3
7d14d4d2
C
5381 required:
5382 - name
5383 - displayName
5384 VideoChannelUpdate:
5385 properties:
5386 displayName:
5387 type: string
5388 description:
5389 type: string
5390 support:
5391 type: string
06746a8b 5392 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
00494d6e 5393 example: Please support my work on <insert crowdfunding plateform>! <3
7d14d4d2
C
5394 bulkVideosSupportUpdate:
5395 type: boolean
06746a8b 5396 description: 'Update the support field for all videos of this channel'
1569a818 5397
06746a8b
RK
5398 MRSSPeerLink:
5399 type: object
5400 xml:
5401 name: 'media:peerLink'
5402 properties:
5403 href:
5404 type: string
5405 xml:
5406 attribute: true
5407 type:
5408 type: string
5409 enum:
5410 - application/x-bittorrent
5411 xml:
5412 attribute: true
5413 MRSSGroupContent:
5414 type: object
5415 xml:
5416 name: 'media:content'
5417 properties:
5418 url:
5419 type: string
84f6e32c 5420 format: url
06746a8b
RK
5421 xml:
5422 attribute: true
5423 fileSize:
5424 type: integer
5425 xml:
5426 attribute: true
5427 type:
5428 type: string
5429 xml:
5430 attribute: true
5431 framerate:
5432 type: integer
5433 xml:
5434 attribute: true
5435 duration:
5436 type: integer
5437 xml:
5438 attribute: true
5439 height:
5440 type: integer
5441 xml:
5442 attribute: true
5443 lang:
5444 type: string
5445 xml:
5446 attribute: true
5447 VideoCommentsForXML:
5448 type: array
5449 xml:
5450 wrapped: true
5451 name: 'channel'
5452 items:
5453 type: object
5454 xml:
5455 name: 'item'
5456 properties:
5457 link:
5458 type: string
84f6e32c 5459 format: url
06746a8b
RK
5460 guid:
5461 type: string
5462 pubDate:
5463 type: string
5464 format: date-time
5465 'content:encoded':
5466 type: string
5467 'dc:creator':
5468 type: string
5469 VideosForXML:
5470 type: array
5471 xml:
5472 wrapped: true
5473 name: 'channel'
5474 items:
5475 type: object
5476 xml:
5477 name: 'item'
5478 properties:
5479 link:
5480 type: string
84f6e32c 5481 format: url
06746a8b
RK
5482 description: video watch page URL
5483 guid:
5484 type: string
5485 description: video canonical URL
5486 pubDate:
5487 type: string
5488 format: date-time
5489 description: video publication date
5490 description:
5491 type: string
5492 description: video description
5493 'content:encoded':
5494 type: string
5495 description: video description
5496 'dc:creator':
5497 type: string
5498 description: publisher user name
5499 'media:category':
5500 type: integer
5501 description: video category (MRSS)
5502 'media:community':
5503 type: object
5504 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5505 properties:
5506 'media:statistics':
5507 type: object
5508 properties:
5509 views:
5510 type: integer
5511 xml:
5512 attribute: true
5513 'media:embed':
5514 type: object
5515 properties:
5516 url:
5517 type: string
84f6e32c 5518 format: url
06746a8b
RK
5519 description: video embed path, relative to the canonical URL domain (MRSS)
5520 xml:
5521 attribute: true
5522 'media:player':
5523 type: object
5524 properties:
5525 url:
5526 type: string
84f6e32c 5527 format: url
06746a8b
RK
5528 description: video watch path, relative to the canonical URL domain (MRSS)
5529 xml:
5530 attribute: true
5531 'media:thumbnail':
5532 type: object
5533 properties:
5534 url:
5535 type: string
84f6e32c 5536 format: url
06746a8b
RK
5537 xml:
5538 attribute: true
5539 height:
5540 type: integer
5541 xml:
5542 attribute: true
5543 width:
5544 type: integer
5545 xml:
5546 attribute: true
5547 'media:title':
5548 type: string
5549 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
5550 'media:description':
5551 type: string
5552 'media:rating':
5553 type: string
5554 enum:
5555 - nonadult
5556 - adult
5557 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
5558 'enclosure':
5559 type: object
5560 description: main streamable file for the video
5561 properties:
5562 url:
5563 type: string
84f6e32c 5564 format: url
06746a8b
RK
5565 xml:
5566 attribute: true
5567 type:
5568 type: string
5569 enum:
5570 - application/x-bittorrent
5571 xml:
5572 attribute: true
5573 length:
5574 type: integer
5575 xml:
5576 attribute: true
5577 'media:group':
5578 type: array
5579 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)
5580 items:
5581 anyOf:
5582 - $ref: '#/components/schemas/MRSSPeerLink'
f4d59981
RK
5583 - $ref: '#/components/schemas/MRSSGroupContent'
5584 NotificationSettingValue:
5585 type: integer
5586 description: >
5587 Notification type
84f6e32c 5588
f4d59981 5589 - `0` NONE
84f6e32c 5590
f4d59981 5591 - `1` WEB
84f6e32c 5592
f4d59981
RK
5593 - `2` EMAIL
5594 enum:
5595 - 0
5596 - 1
5597 - 3
5598 Notification:
5599 properties:
5600 id:
5601 type: integer
5602 type:
5603 type: integer
5604 description: >
5605 Notification type, following the `UserNotificationType` enum:
84f6e32c 5606
f4d59981 5607 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
84f6e32c 5608
f4d59981 5609 - `2` NEW_COMMENT_ON_MY_VIDEO
84f6e32c 5610
310b5219 5611 - `3` NEW_ABUSE_FOR_MODERATORS
84f6e32c 5612
f4d59981 5613 - `4` BLACKLIST_ON_MY_VIDEO
84f6e32c 5614
f4d59981 5615 - `5` UNBLACKLIST_ON_MY_VIDEO
84f6e32c 5616
f4d59981 5617 - `6` MY_VIDEO_PUBLISHED
84f6e32c 5618
f4d59981 5619 - `7` MY_VIDEO_IMPORT_SUCCESS
84f6e32c 5620
f4d59981 5621 - `8` MY_VIDEO_IMPORT_ERROR
84f6e32c 5622
f4d59981 5623 - `9` NEW_USER_REGISTRATION
84f6e32c 5624
f4d59981 5625 - `10` NEW_FOLLOW
84f6e32c 5626
f4d59981 5627 - `11` COMMENT_MENTION
84f6e32c 5628
f4d59981 5629 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
84f6e32c 5630
f4d59981 5631 - `13` NEW_INSTANCE_FOLLOWER
84f6e32c 5632
f4d59981
RK
5633 - `14` AUTO_INSTANCE_FOLLOWING
5634 read:
5635 type: boolean
5636 video:
5637 nullable: true
5638 allOf:
5639 - $ref: '#/components/schemas/VideoInfo'
5640 - type: object
5641 properties:
5642 channel:
5643 $ref: '#/components/schemas/ActorInfo'
5644 videoImport:
5645 nullable: true
5646 type: object
5647 properties:
5648 id:
5649 type: integer
5650 video:
5651 nullable: true
5652 $ref: '#/components/schemas/VideoInfo'
5653 torrentName:
5654 type: string
5655 nullable: true
5656 magnetUri:
5657 type: string
84f6e32c 5658 format: uri
f4d59981
RK
5659 nullable: true
5660 targetUri:
5661 type: string
84f6e32c 5662 format: uri
f4d59981
RK
5663 nullable: true
5664 comment:
5665 nullable: true
5666 type: object
5667 properties:
5668 id:
5669 type: integer
5670 threadId:
5671 type: integer
5672 video:
5673 $ref: '#/components/schemas/VideoInfo'
5674 account:
5675 $ref: '#/components/schemas/ActorInfo'
5676 videoAbuse:
5677 nullable: true
5678 type: object
5679 properties:
5680 id:
5681 type: integer
5682 video:
5683 allOf:
5684 - $ref: '#/components/schemas/VideoInfo'
5685 videoBlacklist:
5686 nullable: true
5687 type: object
5688 properties:
5689 id:
5690 type: integer
5691 video:
5692 allOf:
5693 - $ref: '#/components/schemas/VideoInfo'
5694 account:
5695 nullable: true
5696 allOf:
5697 - $ref: '#/components/schemas/ActorInfo'
5698 actorFollow:
5699 type: object
5700 nullable: true
5701 properties:
5702 id:
5703 type: integer
5704 follower:
5705 $ref: '#/components/schemas/ActorInfo'
5706 state:
5707 type: string
5708 enum:
5709 - pending
5710 - accepted
5711 following:
5712 type: object
5713 properties:
5714 type:
5715 type: string
5716 enum:
5717 - account
5718 - channel
5719 - instance
5720 name:
5721 type: string
5722 displayName:
5723 type: string
5724 host:
5725 type: string
84f6e32c 5726 format: hostname
f4d59981
RK
5727 createdAt:
5728 type: string
5729 format: date-time
5730 updatedAt:
5731 type: string
5732 format: date-time
5733 NotificationListResponse:
5734 properties:
5735 total:
5736 type: integer
84f6e32c 5737 example: 1
f4d59981
RK
5738 data:
5739 type: array
84f6e32c 5740 maxItems: 100
f4d59981 5741 items:
7461d440
RK
5742 $ref: '#/components/schemas/Notification'
5743 Plugin:
5744 properties:
5745 name:
5746 type: string
84f6e32c 5747 example: peertube-plugin-auth-ldap
7461d440
RK
5748 type:
5749 type: integer
84f6e32c
RK
5750 description: >
5751 - `1`: PLUGIN
5752
5753 - `2`: THEME
7461d440
RK
5754 enum:
5755 - 1
5756 - 2
5757 latestVersion:
5758 type: string
84f6e32c 5759 example: 0.0.3
7461d440
RK
5760 version:
5761 type: string
84f6e32c 5762 example: 0.0.1
7461d440
RK
5763 enabled:
5764 type: boolean
5765 uninstalled:
5766 type: boolean
5767 peertubeEngine:
5768 type: string
84f6e32c 5769 example: 2.2.0
7461d440
RK
5770 description:
5771 type: string
5772 homepage:
5773 type: string
84f6e32c
RK
5774 format: url
5775 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7461d440
RK
5776 settings:
5777 type: object
5778 additionalProperties: true
5779 createdAt:
5780 type: string
5781 format: date-time
5782 updatedAt:
5783 type: string
5784 format: date-time
5785 PluginResponse:
5786 properties:
5787 total:
5788 type: integer
84f6e32c 5789 example: 1
7461d440
RK
5790 data:
5791 type: array
84f6e32c 5792 maxItems: 100
7461d440 5793 items:
2c318664 5794 $ref: '#/components/schemas/Plugin'
4e239e35
C
5795
5796 LiveVideoUpdate:
5797 properties:
5798 saveReplay:
5799 type: boolean
bb4ba6d9
C
5800 permanentLive:
5801 description: User can stream multiple times in a permanent live
5802 type: boolean
4e239e35
C
5803
5804 LiveVideoResponse:
5805 properties:
5806 rtmpUrl:
5807 type: string
5808 streamKey:
5809 type: string
5810 description: RTMP stream key to use to stream into this live video
5811 saveReplay:
5812 type: boolean
bb4ba6d9
C
5813 permanentLive:
5814 description: User can stream multiple times in a permanent live
5815 type: boolean
4e239e35 5816
75cba40d
C
5817
5818
2c318664
RK
5819 callbacks:
5820 searchIndex:
c00f96ce 5821 'https://search.example.org/api/v1/search/videos':
2c318664
RK
5822 post:
5823 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
5824 responses:
5825 '200':
5826 description: successful operation
5827 content:
5828 application/json:
5829 schema:
1e904cde 5830 $ref: '#/components/schemas/VideoListResponse'