]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/api/openapi.yaml
update FAQ urls in README (#4027)
[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
e81af300 4154 description: Direct URL of the torrent file
84f6e32c 4155 format: url
0ad45af7 4156 torrentDownloadUrl:
5dce26d2 4157 type: string
e81af300 4158 description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
84f6e32c 4159 format: url
5dce26d2
C
4160 fileUrl:
4161 type: string
e81af300 4162 description: Direct URL of the video
84f6e32c 4163 format: url
5dce26d2
C
4164 fileDownloadUrl:
4165 type: string
e81af300 4166 description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
84f6e32c 4167 format: url
5dce26d2
C
4168 fps:
4169 type: number
63748ad0
C
4170 metadataUrl:
4171 type: string
84f6e32c 4172 format: url
5dce26d2
C
4173 VideoStreamingPlaylists:
4174 properties:
4175 id:
06746a8b 4176 type: integer
5dce26d2 4177 type:
06746a8b 4178 type: integer
5dce26d2
C
4179 enum:
4180 - 1
06746a8b 4181 description: 'Playlist type (HLS = `1`)'
5dce26d2
C
4182 playlistUrl:
4183 type: string
84f6e32c 4184 format: url
5dce26d2
C
4185 segmentsSha256Url:
4186 type: string
84f6e32c 4187 format: url
63748ad0
C
4188 files:
4189 type: array
000ca2a8 4190 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
4191 items:
4192 $ref: '#/components/schemas/VideoFile'
5dce26d2
C
4193 redundancies:
4194 type: array
4195 items:
4196 type: object
4197 properties:
4198 baseUrl:
4199 type: string
84f6e32c 4200 format: url
f4d59981
RK
4201 VideoInfo:
4202 properties:
4203 id:
4204 type: integer
4205 uuid:
4206 type: string
84f6e32c
RK
4207 format: uuid
4208 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
f4d59981
RK
4209 name:
4210 type: string
3e9e6f2f
RK
4211 Video:
4212 properties:
4213 id:
06746a8b 4214 type: integer
84f6e32c 4215 example: 8
3e9e6f2f
RK
4216 uuid:
4217 type: string
84f6e32c
RK
4218 format: uuid
4219 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
4e239e35
C
4220 isLive:
4221 type: boolean
3e9e6f2f
RK
4222 createdAt:
4223 type: string
84f6e32c 4224 format: date-time
3e9e6f2f
RK
4225 publishedAt:
4226 type: string
84f6e32c 4227 format: date-time
3e9e6f2f
RK
4228 updatedAt:
4229 type: string
84f6e32c 4230 format: date-time
5dce26d2
C
4231 originallyPublishedAt:
4232 type: string
84f6e32c 4233 format: date-time
3e9e6f2f
RK
4234 category:
4235 $ref: '#/components/schemas/VideoConstantNumber'
4236 licence:
4237 $ref: '#/components/schemas/VideoConstantNumber'
4238 language:
4239 $ref: '#/components/schemas/VideoConstantString'
4240 privacy:
ee89e8fd 4241 $ref: '#/components/schemas/VideoPrivacyConstant'
3e9e6f2f
RK
4242 description:
4243 type: string
4244 duration:
06746a8b 4245 type: integer
84f6e32c 4246 example: 1419
3e9e6f2f
RK
4247 isLocal:
4248 type: boolean
4249 name:
4250 type: string
84f6e32c 4251 example: What is PeerTube?
3e9e6f2f
RK
4252 thumbnailPath:
4253 type: string
84f6e32c 4254 example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3e9e6f2f
RK
4255 previewPath:
4256 type: string
20dcfd74 4257 example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg
3e9e6f2f
RK
4258 embedPath:
4259 type: string
84f6e32c 4260 example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee
3e9e6f2f 4261 views:
06746a8b 4262 type: integer
84f6e32c 4263 example: 1337
3e9e6f2f 4264 likes:
06746a8b 4265 type: integer
84f6e32c 4266 example: 42
3e9e6f2f 4267 dislikes:
06746a8b 4268 type: integer
84f6e32c 4269 example: 7
3e9e6f2f
RK
4270 nsfw:
4271 type: boolean
5dce26d2
C
4272 waitTranscoding:
4273 type: boolean
4274 nullable: true
4275 state:
4276 $ref: '#/components/schemas/VideoStateConstant'
4277 scheduledUpdate:
4278 nullable: true
c1843150
C
4279 allOf:
4280 - $ref: '#/components/schemas/VideoScheduledUpdate'
5dce26d2
C
4281 blacklisted:
4282 nullable: true
4283 type: boolean
4284 blacklistedReason:
4285 nullable: true
4286 type: string
3e9e6f2f 4287 account:
c1843150 4288 $ref: '#/components/schemas/AccountSummary'
5dce26d2
C
4289 channel:
4290 $ref: '#/components/schemas/VideoChannelSummary'
4291 userHistory:
4292 nullable: true
3e9e6f2f
RK
4293 type: object
4294 properties:
5dce26d2 4295 currentTime:
06746a8b 4296 type: integer
5dce26d2
C
4297 VideoDetails:
4298 allOf:
4299 - $ref: '#/components/schemas/Video'
4300 - type: object
4301 properties:
4302 descriptionPath:
3e9e6f2f 4303 type: string
5dce26d2 4304 support:
3e9e6f2f 4305 type: string
00494d6e 4306 description: A text tell the audience how to support the video creator
84f6e32c 4307 example: Please support my work on <insert crowdfunding plateform>! <3
5dce26d2
C
4308 channel:
4309 $ref: '#/components/schemas/VideoChannel'
4310 account:
4311 $ref: '#/components/schemas/Account'
4312 tags:
4313 type: array
4314 items:
4315 type: string
84f6e32c 4316 example: [flowers, gardening]
5dce26d2
C
4317 files:
4318 type: array
000ca2a8 4319 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
4320 items:
4321 $ref: '#/components/schemas/VideoFile'
4322 commentsEnabled:
4323 type: boolean
4324 downloadEnabled:
4325 type: boolean
4326 trackerUrls:
4327 type: array
4328 items:
4329 type: string
84f6e32c 4330 format: url
5dce26d2
C
4331 streamingPlaylists:
4332 type: array
4333 items:
4334 $ref: '#/components/schemas/VideoStreamingPlaylists'
04b703f6
RK
4335 FileRedundancyInformation:
4336 properties:
4337 id:
4338 type: integer
4339 fileUrl:
4340 type: string
84f6e32c 4341 format: url
04b703f6
RK
4342 strategy:
4343 type: string
84f6e32c
RK
4344 enum:
4345 - manual
4346 - most-views
4347 - trending
4348 - recently-added
04b703f6
RK
4349 size:
4350 type: integer
4351 createdAt:
4352 type: string
4353 format: date-time
4354 updatedAt:
4355 type: string
4356 format: date-time
4357 expiresOn:
4358 type: string
4359 format: date-time
4360 VideoRedundancy:
4361 properties:
4362 id:
4363 type: integer
4364 name:
4365 type: string
4366 url:
4367 type: string
84f6e32c 4368 format: url
04b703f6
RK
4369 uuid:
4370 type: string
84f6e32c
RK
4371 format: uuid
4372 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
04b703f6
RK
4373 redundancies:
4374 type: object
4375 properties:
4376 files:
4377 type: array
4378 items:
1e904cde 4379 $ref: '#/components/schemas/FileRedundancyInformation'
04b703f6
RK
4380 streamingPlaylists:
4381 type: array
4382 items:
1e904cde 4383 $ref: '#/components/schemas/FileRedundancyInformation'
1f82e3e8
C
4384 VideoImportStateConstant:
4385 properties:
4386 id:
4387 type: integer
4388 enum:
4389 - 1
4390 - 2
4391 - 3
06746a8b 4392 description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)'
1f82e3e8
C
4393 label:
4394 type: string
84f6e32c 4395 example: Pending
1f82e3e8
C
4396 VideoImport:
4397 properties:
4398 id:
06746a8b 4399 type: integer
84f6e32c 4400 example: 2
1f82e3e8
C
4401 targetUrl:
4402 type: string
84f6e32c
RK
4403 format: url
4404 example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
1f82e3e8
C
4405 magnetUri:
4406 type: string
84f6e32c
RK
4407 format: uri
4408 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
4409 torrentName:
4410 type: string
4411 state:
84f6e32c 4412 $ref: '#/components/schemas/VideoImportStateConstant'
1f82e3e8
C
4413 error:
4414 type: string
4415 createdAt:
4416 type: string
84f6e32c 4417 format: date-time
1f82e3e8
C
4418 updatedAt:
4419 type: string
84f6e32c 4420 format: date-time
1f82e3e8
C
4421 video:
4422 $ref: '#/components/schemas/Video'
668b7f09 4423 Abuse:
3e9e6f2f
RK
4424 properties:
4425 id:
06746a8b 4426 type: integer
84f6e32c 4427 example: 7
3e9e6f2f
RK
4428 reason:
4429 type: string
84f6e32c 4430 example: The video is a spam
1ebddadd 4431 predefinedReasons:
4f32032f 4432 $ref: '#/components/schemas/AbusePredefinedReasons'
3e9e6f2f
RK
4433 reporterAccount:
4434 $ref: '#/components/schemas/Account'
50e16ccf 4435 state:
4f32032f 4436 $ref: '#/components/schemas/AbuseStateConstant'
50e16ccf
C
4437 moderationComment:
4438 type: string
84f6e32c 4439 example: Decided to ban the server since it spams us regularly
3e9e6f2f
RK
4440 video:
4441 type: object
4442 properties:
4443 id:
06746a8b 4444 type: integer
3e9e6f2f
RK
4445 name:
4446 type: string
4447 uuid:
4448 type: string
84f6e32c
RK
4449 format: uuid
4450 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
4451 createdAt:
4452 type: string
84f6e32c 4453 format: date-time
668b7f09
C
4454 AbuseMessage:
4455 properties:
4456 id:
4457 type: integer
4458 message:
4459 type: string
4460 byModerator:
4461 type: boolean
4462 createdAt:
4463 type: string
4464 format: date-time
4465 account:
4466 $ref: '#/components/schemas/AccountSummary'
3e9e6f2f
RK
4467 VideoBlacklist:
4468 properties:
4469 id:
06746a8b 4470 type: integer
3e9e6f2f 4471 videoId:
06746a8b 4472 type: integer
3e9e6f2f
RK
4473 createdAt:
4474 type: string
84f6e32c 4475 format: date-time
3e9e6f2f
RK
4476 updatedAt:
4477 type: string
84f6e32c 4478 format: date-time
3e9e6f2f
RK
4479 name:
4480 type: string
4481 uuid:
4482 type: string
84f6e32c
RK
4483 format: uuid
4484 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
4485 description:
4486 type: string
4487 duration:
06746a8b 4488 type: integer
3e9e6f2f 4489 views:
06746a8b 4490 type: integer
3e9e6f2f 4491 likes:
06746a8b 4492 type: integer
3e9e6f2f 4493 dislikes:
06746a8b 4494 type: integer
3e9e6f2f
RK
4495 nsfw:
4496 type: boolean
4497 VideoChannel:
4498 properties:
4499 displayName:
4500 type: string
4501 description:
4502 type: string
4503 isLocal:
4504 type: boolean
4505 ownerAccount:
4506 type: object
4507 properties:
4508 id:
06746a8b 4509 type: integer
3e9e6f2f
RK
4510 uuid:
4511 type: string
84f6e32c
RK
4512 format: uuid
4513 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
71810d0b
RK
4514 VideoPlaylist:
4515 properties:
4516 id:
06746a8b 4517 type: integer
71810d0b
RK
4518 createdAt:
4519 type: string
84f6e32c 4520 format: date-time
71810d0b
RK
4521 updatedAt:
4522 type: string
84f6e32c 4523 format: date-time
71810d0b
RK
4524 description:
4525 type: string
4526 uuid:
4527 type: string
84f6e32c
RK
4528 format: uuid
4529 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
71810d0b
RK
4530 displayName:
4531 type: string
4532 isLocal:
4533 type: boolean
4534 videoLength:
06746a8b 4535 type: integer
71810d0b
RK
4536 thumbnailPath:
4537 type: string
4538 privacy:
c1843150 4539 $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
71810d0b 4540 type:
c1843150 4541 $ref: '#/components/schemas/VideoPlaylistTypeConstant'
71810d0b 4542 ownerAccount:
c1843150
C
4543 $ref: '#/components/schemas/AccountSummary'
4544 videoChannel:
4545 $ref: '#/components/schemas/VideoChannelSummary'
3e9e6f2f
RK
4546 VideoComment:
4547 properties:
4548 id:
06746a8b 4549 type: integer
3e9e6f2f
RK
4550 url:
4551 type: string
84f6e32c 4552 format: url
3e9e6f2f
RK
4553 text:
4554 type: string
4555 threadId:
06746a8b 4556 type: integer
3e9e6f2f 4557 inReplyToCommentId:
06746a8b 4558 type: integer
3e9e6f2f 4559 videoId:
06746a8b 4560 type: integer
3e9e6f2f
RK
4561 createdAt:
4562 type: string
84f6e32c 4563 format: date-time
3e9e6f2f
RK
4564 updatedAt:
4565 type: string
84f6e32c 4566 format: date-time
5b0413dd 4567 totalRepliesFromVideoAuthor:
06746a8b 4568 type: integer
3e9e6f2f 4569 totalReplies:
06746a8b 4570 type: integer
3e9e6f2f
RK
4571 account:
4572 $ref: '#/components/schemas/Account'
4573 VideoCommentThreadTree:
4574 properties:
4575 comment:
4576 $ref: '#/components/schemas/VideoComment'
4577 children:
4578 type: array
4579 items:
4580 $ref: '#/components/schemas/VideoCommentThreadTree'
67ae04a5
C
4581 VideoCaption:
4582 properties:
4583 language:
4584 $ref: '#/components/schemas/VideoConstantString'
4585 captionPath:
4586 type: string
75cba40d 4587 ActorImage:
3e9e6f2f
RK
4588 properties:
4589 path:
4590 type: string
4591 createdAt:
4592 type: string
84f6e32c 4593 format: date-time
3e9e6f2f
RK
4594 updatedAt:
4595 type: string
84f6e32c 4596 format: date-time
f4d59981
RK
4597 ActorInfo:
4598 properties:
4599 id:
4600 type: integer
84f6e32c 4601 example: 11
f4d59981
RK
4602 name:
4603 type: string
4604 displayName:
4605 type: string
4606 host:
4607 type: string
84f6e32c 4608 format: hostname
f4d59981
RK
4609 avatar:
4610 nullable: true
4611 type: object
4612 properties:
4613 path:
4614 type: string
3e9e6f2f
RK
4615 Actor:
4616 properties:
4617 id:
06746a8b 4618 type: integer
84f6e32c 4619 example: 11
3e9e6f2f
RK
4620 url:
4621 type: string
84f6e32c 4622 format: url
3e9e6f2f
RK
4623 name:
4624 type: string
4625 host:
4626 type: string
84f6e32c 4627 format: hostname
3e9e6f2f 4628 followingCount:
06746a8b 4629 type: integer
3e9e6f2f 4630 followersCount:
06746a8b 4631 type: integer
3e9e6f2f
RK
4632 createdAt:
4633 type: string
84f6e32c 4634 format: date-time
3e9e6f2f
RK
4635 updatedAt:
4636 type: string
84f6e32c 4637 format: date-time
3e9e6f2f 4638 avatar:
75cba40d 4639 $ref: '#/components/schemas/ActorImage'
3e9e6f2f
RK
4640 Account:
4641 allOf:
4642 - $ref: '#/components/schemas/Actor'
4643 - properties:
2a8ae759
FS
4644 userId:
4645 type: string
84f6e32c 4646 example: 2
3e9e6f2f
RK
4647 displayName:
4648 type: string
2a8ae759
FS
4649 description:
4650 type: string
6441981b
RK
4651 UserWatchingVideo:
4652 properties:
4653 currentTime:
06746a8b 4654 type: integer
84f6e32c
RK
4655 description: timestamp within the video, in seconds
4656 example: 5
3e9e6f2f
RK
4657 ServerConfig:
4658 properties:
2a8ae759
FS
4659 instance:
4660 type: object
4661 properties:
4662 name:
4663 type: string
4664 shortDescription:
4665 type: string
4666 defaultClientRoute:
4667 type: string
4668 isNSFW:
4669 type: boolean
4670 defaultNSFWPolicy:
4671 type: string
4672 customizations:
4673 type: object
4674 properties:
4675 javascript:
4676 type: string
4677 css:
4678 type: string
f30736c8
RK
4679 search:
4680 type: object
4681 properties:
4682 remoteUri:
4683 type: object
4684 properties:
4685 users:
4686 type: boolean
4687 anonymous:
4688 type: boolean
2a8ae759
FS
4689 plugin:
4690 type: object
4691 properties:
4692 registered:
4693 type: array
4694 items:
4695 type: string
4696 theme:
4697 type: object
4698 properties:
4699 registered:
4700 type: array
4701 items:
4702 type: string
4703 email:
4704 type: object
4705 properties:
4706 enabled:
4707 type: boolean
4708 contactForm:
4709 type: object
4710 properties:
4711 enabled:
4712 type: boolean
4713 serverVersion:
4714 type: string
4715 serverCommit:
4716 type: string
3e9e6f2f
RK
4717 signup:
4718 type: object
4719 properties:
4720 allowed:
4721 type: boolean
2a8ae759
FS
4722 allowedForCurrentIP:
4723 type: boolean
4724 requiresEmailVerification:
4725 type: boolean
3e9e6f2f
RK
4726 transcoding:
4727 type: object
4728 properties:
2a8ae759
FS
4729 hls:
4730 type: object
4731 properties:
4732 enabled:
4733 type: boolean
f30736c8
RK
4734 webtorrent:
4735 type: object
4736 properties:
4737 enabled:
4738 type: boolean
3e9e6f2f
RK
4739 enabledResolutions:
4740 type: array
4741 items:
06746a8b 4742 type: integer
2a8ae759
FS
4743 import:
4744 type: object
4745 properties:
4746 videos:
4747 type: object
4748 properties:
4749 http:
4750 type: object
4751 properties:
4752 enabled:
4753 type: boolean
4754 torrent:
4755 type: object
4756 properties:
4757 enabled:
4758 type: boolean
4759 autoBlacklist:
4760 type: object
4761 properties:
4762 videos:
4763 type: object
4764 properties:
4765 ofUsers:
4766 type: object
4767 properties:
4768 enabled:
4769 type: boolean
3e9e6f2f
RK
4770 avatar:
4771 type: object
4772 properties:
4773 file:
4774 type: object
4775 properties:
4776 size:
4777 type: object
4778 properties:
4779 max:
06746a8b 4780 type: integer
3e9e6f2f
RK
4781 extensions:
4782 type: array
4783 items:
4784 type: string
4785 video:
4786 type: object
4787 properties:
2a8ae759
FS
4788 image:
4789 type: object
4790 properties:
4791 extensions:
4792 type: array
4793 items:
4794 type: string
4795 size:
4796 type: object
4797 properties:
4798 max:
06746a8b 4799 type: integer
3e9e6f2f
RK
4800 file:
4801 type: object
4802 properties:
4803 extensions:
4804 type: array
4805 items:
4806 type: string
2a8ae759
FS
4807 videoCaption:
4808 type: object
4809 properties:
4810 file:
4811 type: object
4812 properties:
4813 size:
4814 type: object
4815 properties:
4816 max:
06746a8b 4817 type: integer
2a8ae759
FS
4818 extensions:
4819 type: array
4820 items:
4821 type: string
4822 user:
4823 type: object
4824 properties:
4825 videoQuota:
06746a8b 4826 type: integer
2a8ae759 4827 videoQuotaDaily:
06746a8b 4828 type: integer
2a8ae759
FS
4829 trending:
4830 type: object
4831 properties:
4832 videos:
4833 type: object
4834 properties:
4835 intervalDays:
06746a8b 4836 type: integer
2a8ae759 4837 tracker:
747b17c7 4838 type: object
2a8ae759
FS
4839 properties:
4840 enabled:
4841 type: boolean
f30736c8
RK
4842 followings:
4843 type: object
4844 properties:
4845 instance:
4846 type: object
4847 properties:
4848 autoFollowIndex:
4849 type: object
4850 properties:
4851 indexUrl:
4852 type: string
84f6e32c 4853 format: url
2a8ae759
FS
4854 ServerConfigAbout:
4855 properties:
4856 instance:
4857 type: object
4858 properties:
4859 name:
4860 type: string
4861 shortDescription:
4862 type: string
4863 description:
4864 type: string
4865 terms:
4866 type: string
4867 ServerConfigCustom:
4868 properties:
4869 instance:
4870 type: object
4871 properties:
4872 name:
4873 type: string
4874 shortDescription:
4875 type: string
4876 description:
4877 type: string
4878 terms:
4879 type: string
4880 defaultClientRoute:
4881 type: string
4882 isNSFW:
4883 type: boolean
4884 defaultNSFWPolicy:
4885 type: string
4886 customizations:
4887 type: object
4888 properties:
4889 javascript:
4890 type: string
4891 css:
4892 type: string
4893 theme:
4894 type: object
4895 properties:
4896 default:
4897 type: string
4898 services:
4899 type: object
4900 properties:
4901 twitter:
4902 type: object
4903 properties:
4904 username:
4905 type: string
4906 whitelisted:
4907 type: boolean
4908 cache:
4909 type: object
4910 properties:
4911 previews:
4912 type: object
4913 properties:
4914 size:
06746a8b 4915 type: integer
2a8ae759
FS
4916 captions:
4917 type: object
4918 properties:
4919 size:
06746a8b 4920 type: integer
2a8ae759
FS
4921 signup:
4922 type: object
4923 properties:
4924 enabled:
4925 type: boolean
4926 limit:
06746a8b 4927 type: integer
2a8ae759
FS
4928 requiresEmailVerification:
4929 type: boolean
4930 admin:
4931 type: object
4932 properties:
4933 email:
4934 type: string
84f6e32c 4935 format: email
2a8ae759
FS
4936 contactForm:
4937 type: object
4938 properties:
4939 enabled:
4940 type: boolean
4941 user:
4942 type: object
4943 properties:
4944 videoQuota:
06746a8b 4945 type: integer
2a8ae759 4946 videoQuotaDaily:
06746a8b 4947 type: integer
2a8ae759
FS
4948 transcoding:
4949 type: object
4950 properties:
4951 enabled:
4952 type: boolean
4953 allowAdditionalExtensions:
4954 type: boolean
4955 allowAudioFiles:
4956 type: boolean
4957 threads:
06746a8b 4958 type: integer
2a8ae759
FS
4959 resolutions:
4960 type: object
4961 properties:
4962 240p:
4963 type: boolean
4964 360p:
4965 type: boolean
4966 480p:
4967 type: boolean
4968 720p:
4969 type: boolean
4970 1080p:
4971 type: boolean
b7085c71
RK
4972 1440p:
4973 type: boolean
2a8ae759
FS
4974 2160p:
4975 type: boolean
4976 hls:
4977 type: object
4978 properties:
4979 enabled:
4980 type: boolean
4981 import:
4982 type: object
4983 properties:
4984 videos:
4985 type: object
4986 properties:
4987 http:
4988 type: object
4989 properties:
4990 enabled:
4991 type: boolean
4992 torrent:
4993 type: object
4994 properties:
4995 enabled:
4996 type: boolean
4997 autoBlacklist:
4998 type: object
4999 properties:
5000 videos:
5001 type: object
5002 properties:
5003 ofUsers:
5004 type: object
5005 properties:
5006 enabled:
5007 type: boolean
5008 followers:
5009 type: object
5010 properties:
5011 instance:
5012 type: object
5013 properties:
5014 enabled:
5015 type: boolean
5016 manualApproval:
5017 type: boolean
3e9e6f2f
RK
5018 Follow:
5019 properties:
5020 id:
06746a8b 5021 type: integer
3e9e6f2f
RK
5022 follower:
5023 $ref: '#/components/schemas/Actor'
5024 following:
5025 $ref: '#/components/schemas/Actor'
5026 score:
5027 type: number
04b703f6 5028 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
3e9e6f2f
RK
5029 state:
5030 type: string
5031 enum:
5032 - pending
5033 - accepted
5034 createdAt:
5035 type: string
84f6e32c 5036 format: date-time
3e9e6f2f
RK
5037 updatedAt:
5038 type: string
84f6e32c 5039 format: date-time
e3489df9
C
5040
5041 PredefinedAbuseReasons:
5042 description: Reason categories that help triage reports
5043 type: array
5044 items:
5045 type: string
5046 enum:
5047 - violentOrAbusive
5048 - hatefulOrAbusive
5049 - spamOrMisleading
5050 - privacy
5051 - rights
5052 - serverRules
5053 - thumbnails
5054 - captions
5055
3e9e6f2f
RK
5056 Job:
5057 properties:
5058 id:
06746a8b 5059 type: integer
84f6e32c
RK
5060 minimum: 0
5061 example: 42
3e9e6f2f
RK
5062 state:
5063 type: string
5064 enum:
84f6e32c
RK
5065 - active
5066 - completed
5067 - failed
5068 - waiting
5069 - delayed
5070 type:
3e9e6f2f
RK
5071 type: string
5072 enum:
84f6e32c
RK
5073 - activitypub-http-unicast
5074 - activitypub-http-broadcast
5075 - activitypub-http-fetcher
5076 - activitypub-follow
5077 - video-file-import
5078 - video-transcoding
5079 - email
5080 - video-import
5081 - videos-views
5082 - activitypub-refresher
5083 - video-redundancy
5084 data:
5085 type: object
5086 additionalProperties: true
5087 error:
5088 type: object
5089 additionalProperties: true
3e9e6f2f
RK
5090 createdAt:
5091 type: string
84f6e32c
RK
5092 format: date-time
5093 finishedOn:
3e9e6f2f 5094 type: string
84f6e32c
RK
5095 format: date-time
5096 processedOn:
5097 type: string
5098 format: date-time
3e9e6f2f
RK
5099 AddUserResponse:
5100 properties:
2c318664
RK
5101 user:
5102 type: object
5103 properties:
5104 id:
5105 type: integer
5106 example: 8
5107 account:
5108 type: object
5109 properties:
5110 id:
5111 type: integer
5112 example: 37
3e9e6f2f
RK
5113 VideoUploadResponse:
5114 properties:
5115 video:
5116 type: object
5117 properties:
5118 id:
06746a8b 5119 type: integer
84f6e32c 5120 example: 8
3e9e6f2f
RK
5121 uuid:
5122 type: string
84f6e32c
RK
5123 format: uuid
5124 example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
3e9e6f2f
RK
5125 CommentThreadResponse:
5126 properties:
5127 total:
06746a8b 5128 type: integer
84f6e32c 5129 example: 1
3e9e6f2f
RK
5130 data:
5131 type: array
84f6e32c 5132 maxItems: 100
3e9e6f2f
RK
5133 items:
5134 $ref: '#/components/schemas/VideoComment'
5135 CommentThreadPostResponse:
5136 properties:
5137 comment:
5138 $ref: '#/components/schemas/VideoComment'
048b6946
C
5139 VideoListResponse:
5140 properties:
5141 total:
06746a8b 5142 type: integer
84f6e32c 5143 example: 1
048b6946
C
5144 data:
5145 type: array
84f6e32c 5146 maxItems: 100
048b6946
C
5147 items:
5148 $ref: '#/components/schemas/Video'
84f6e32c
RK
5149 User:
5150 properties:
5151 id:
5152 type: integer
5153 readOnly: true
5154 username:
5155 type: string
5156 description: The user username
5157 minLength: 1
5158 maxLength: 50
5159 email:
5160 type: string
5161 format: email
5162 description: The user email
6d989edc
C
5163 pluginAuth:
5164 type: string
5165 description: Auth plugin to use to authenticate the user
84f6e32c
RK
5166 theme:
5167 type: string
5168 description: Theme enabled by this user
5169 emailVerified:
5170 type: boolean
5171 description: Has the user confirmed their email address?
5172 nsfwPolicy:
5173 $ref: '#/components/schemas/NSFWPolicy'
5174 webtorrentEnabled:
5175 type: boolean
5176 description: Enable P2P in the player
5177 autoPlayVideo:
5178 type: boolean
5179 description: Automatically start playing the video on the watch page
5180 role:
5181 $ref: '#/components/schemas/UserRole'
5182 roleLabel:
5183 type: string
5184 enum:
5185 - User
5186 - Moderator
5187 - Administrator
5188 videoQuota:
5189 type: integer
5190 description: The user video quota
5191 videoQuotaDaily:
5192 type: integer
5193 description: The user daily video quota
5194 videosCount:
5195 type: integer
4f32032f 5196 abusesCount:
84f6e32c 5197 type: integer
4f32032f 5198 abusesAcceptedCount:
84f6e32c 5199 type: integer
4f32032f 5200 abusesCreatedCount:
84f6e32c
RK
5201 type: integer
5202 videoCommentsCount:
5203 type: integer
5204 noInstanceConfigWarningModal:
5205 type: boolean
5206 noWelcomeModal:
5207 type: boolean
5208 blocked:
5209 type: boolean
5210 blockedReason:
5211 type: string
5212 createdAt:
5213 type: string
5214 account:
5215 $ref: '#/components/schemas/Account'
5216 videoChannels:
5217 type: array
5218 items:
5219 $ref: '#/components/schemas/VideoChannel'
3e9e6f2f
RK
5220 AddUser:
5221 properties:
5222 username:
5223 type: string
84f6e32c 5224 description: The user username
06746a8b
RK
5225 minLength: 1
5226 maxLength: 50
3e9e6f2f
RK
5227 password:
5228 type: string
84f6e32c
RK
5229 format: password
5230 description: The user password. If the smtp server is configured, you can leave empty and an email will be sent
06746a8b
RK
5231 minLength: 6
5232 maxLength: 255
3e9e6f2f
RK
5233 email:
5234 type: string
84f6e32c
RK
5235 format: email
5236 description: The user email
3e9e6f2f 5237 videoQuota:
84f6e32c
RK
5238 type: integer
5239 description: The user video quota
fbe1bc2a 5240 videoQuotaDaily:
84f6e32c
RK
5241 type: integer
5242 description: The user daily video quota
6d989edc
C
5243 channelName:
5244 type: string
5245 description: The user default channel username
3e9e6f2f 5246 role:
0590bb46 5247 $ref: '#/components/schemas/UserRole'
6d989edc
C
5248 adminFlags:
5249 $ref: '#/components/schemas/UserAdminFlags'
3e9e6f2f
RK
5250 required:
5251 - username
5252 - password
5253 - email
5254 - videoQuota
fbe1bc2a 5255 - videoQuotaDaily
3e9e6f2f
RK
5256 - role
5257 UpdateUser:
5258 properties:
5259 id:
5260 type: string
84f6e32c 5261 description: The user id
3e9e6f2f
RK
5262 email:
5263 type: string
84f6e32c
RK
5264 format: email
5265 description: The updated email of the user
6d989edc
C
5266 emailVerified:
5267 type: boolean
5268 description: Set the email as verified
3e9e6f2f 5269 videoQuota:
84f6e32c
RK
5270 type: integer
5271 description: The updated video quota of the user
fbe1bc2a 5272 videoQuotaDaily:
84f6e32c
RK
5273 type: integer
5274 description: The updated daily video quota of the user
6d989edc
C
5275 pluginAuth:
5276 type: string
5277 nullable: true
5278 description: The auth plugin to use to authenticate the user
5279 example: 'peertube-plugin-auth-saml2'
3e9e6f2f 5280 role:
0590bb46 5281 $ref: '#/components/schemas/UserRole'
6d989edc
C
5282 adminFlags:
5283 $ref: '#/components/schemas/UserAdminFlags'
3e9e6f2f
RK
5284 required:
5285 - id
3e9e6f2f
RK
5286 UpdateMe:
5287 properties:
5288 password:
5289 type: string
84f6e32c
RK
5290 format: password
5291 description: Your new password
5292 minLength: 6
5293 maxLength: 255
3e9e6f2f
RK
5294 email:
5295 type: string
84f6e32c
RK
5296 format: email
5297 description: Your new email
3e9e6f2f
RK
5298 displayNSFW:
5299 type: string
84f6e32c
RK
5300 description: Your new displayNSFW
5301 enum:
5302 - 'true'
5303 - 'false'
5304 - both
3e9e6f2f 5305 autoPlayVideo:
84f6e32c
RK
5306 type: boolean
5307 description: Your new autoPlayVideo
3e9e6f2f
RK
5308 required:
5309 - password
5310 - email
5311 - displayNSFW
5312 - autoPlayVideo
5313 GetMeVideoRating:
5314 properties:
5315 id:
5316 type: string
84f6e32c 5317 description: Id of the video
3e9e6f2f
RK
5318 rating:
5319 type: number
84f6e32c 5320 description: Rating of the video
3e9e6f2f
RK
5321 required:
5322 - id
5323 - rating
c100a614
YB
5324 VideoRating:
5325 properties:
5326 video:
5327 $ref: '#/components/schemas/Video'
5328 rating:
5329 type: number
5330 description: 'Rating of the video'
5331 required:
5332 - video
5333 - rating
3e9e6f2f
RK
5334 RegisterUser:
5335 properties:
5336 username:
5337 type: string
84f6e32c
RK
5338 description: The username of the user
5339 minLength: 1
5340 maxLength: 50
5341 pattern: '/^[a-z0-9._]{1,50}$/'
3e9e6f2f
RK
5342 password:
5343 type: string
84f6e32c
RK
5344 format: password
5345 description: The password of the user
5346 minLength: 6
5347 maxLength: 255
3e9e6f2f
RK
5348 email:
5349 type: string
84f6e32c
RK
5350 format: email
5351 description: The email of the user
1f20622f
C
5352 displayName:
5353 type: string
84f6e32c
RK
5354 description: The user display name
5355 minLength: 1
5356 maxLength: 120
1f20622f
C
5357 channel:
5358 type: object
5359 properties:
5360 name:
5361 type: string
f2eb23cd 5362 description: The username for the default channel
84f6e32c 5363 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
1f20622f
C
5364 displayName:
5365 type: string
84f6e32c
RK
5366 description: The display name for the default channel
5367 minLength: 1
5368 maxLength: 120
3e9e6f2f
RK
5369 required:
5370 - username
5371 - password
5372 - email
7d14d4d2 5373 VideoChannelCreate:
3e9e6f2f
RK
5374 properties:
5375 name:
5376 type: string
7d14d4d2
C
5377 displayName:
5378 type: string
3e9e6f2f
RK
5379 description:
5380 type: string
7d14d4d2
C
5381 support:
5382 type: string
06746a8b 5383 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
00494d6e 5384 example: Please support my work on <insert crowdfunding plateform>! <3
7d14d4d2
C
5385 required:
5386 - name
5387 - displayName
5388 VideoChannelUpdate:
5389 properties:
5390 displayName:
5391 type: string
5392 description:
5393 type: string
5394 support:
5395 type: string
06746a8b 5396 description: 'A text shown by default on all videos of this channel, to tell the audience how to support it'
00494d6e 5397 example: Please support my work on <insert crowdfunding plateform>! <3
7d14d4d2
C
5398 bulkVideosSupportUpdate:
5399 type: boolean
06746a8b 5400 description: 'Update the support field for all videos of this channel'
1569a818 5401
06746a8b
RK
5402 MRSSPeerLink:
5403 type: object
5404 xml:
5405 name: 'media:peerLink'
5406 properties:
5407 href:
5408 type: string
5409 xml:
5410 attribute: true
5411 type:
5412 type: string
5413 enum:
5414 - application/x-bittorrent
5415 xml:
5416 attribute: true
5417 MRSSGroupContent:
5418 type: object
5419 xml:
5420 name: 'media:content'
5421 properties:
5422 url:
5423 type: string
84f6e32c 5424 format: url
06746a8b
RK
5425 xml:
5426 attribute: true
5427 fileSize:
5428 type: integer
5429 xml:
5430 attribute: true
5431 type:
5432 type: string
5433 xml:
5434 attribute: true
5435 framerate:
5436 type: integer
5437 xml:
5438 attribute: true
5439 duration:
5440 type: integer
5441 xml:
5442 attribute: true
5443 height:
5444 type: integer
5445 xml:
5446 attribute: true
5447 lang:
5448 type: string
5449 xml:
5450 attribute: true
5451 VideoCommentsForXML:
5452 type: array
5453 xml:
5454 wrapped: true
5455 name: 'channel'
5456 items:
5457 type: object
5458 xml:
5459 name: 'item'
5460 properties:
5461 link:
5462 type: string
84f6e32c 5463 format: url
06746a8b
RK
5464 guid:
5465 type: string
5466 pubDate:
5467 type: string
5468 format: date-time
5469 'content:encoded':
5470 type: string
5471 'dc:creator':
5472 type: string
5473 VideosForXML:
5474 type: array
5475 xml:
5476 wrapped: true
5477 name: 'channel'
5478 items:
5479 type: object
5480 xml:
5481 name: 'item'
5482 properties:
5483 link:
5484 type: string
84f6e32c 5485 format: url
06746a8b
RK
5486 description: video watch page URL
5487 guid:
5488 type: string
5489 description: video canonical URL
5490 pubDate:
5491 type: string
5492 format: date-time
5493 description: video publication date
5494 description:
5495 type: string
5496 description: video description
5497 'content:encoded':
5498 type: string
5499 description: video description
5500 'dc:creator':
5501 type: string
5502 description: publisher user name
5503 'media:category':
5504 type: integer
5505 description: video category (MRSS)
5506 'media:community':
5507 type: object
5508 description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS)
5509 properties:
5510 'media:statistics':
5511 type: object
5512 properties:
5513 views:
5514 type: integer
5515 xml:
5516 attribute: true
5517 'media:embed':
5518 type: object
5519 properties:
5520 url:
5521 type: string
84f6e32c 5522 format: url
06746a8b
RK
5523 description: video embed path, relative to the canonical URL domain (MRSS)
5524 xml:
5525 attribute: true
5526 'media:player':
5527 type: object
5528 properties:
5529 url:
5530 type: string
84f6e32c 5531 format: url
06746a8b
RK
5532 description: video watch path, relative to the canonical URL domain (MRSS)
5533 xml:
5534 attribute: true
5535 'media:thumbnail':
5536 type: object
5537 properties:
5538 url:
5539 type: string
84f6e32c 5540 format: url
06746a8b
RK
5541 xml:
5542 attribute: true
5543 height:
5544 type: integer
5545 xml:
5546 attribute: true
5547 width:
5548 type: integer
5549 xml:
5550 attribute: true
5551 'media:title':
5552 type: string
5553 description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles.
5554 'media:description':
5555 type: string
5556 'media:rating':
5557 type: string
5558 enum:
5559 - nonadult
5560 - adult
5561 description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS)
5562 'enclosure':
5563 type: object
5564 description: main streamable file for the video
5565 properties:
5566 url:
5567 type: string
84f6e32c 5568 format: url
06746a8b
RK
5569 xml:
5570 attribute: true
5571 type:
5572 type: string
5573 enum:
5574 - application/x-bittorrent
5575 xml:
5576 attribute: true
5577 length:
5578 type: integer
5579 xml:
5580 attribute: true
5581 'media:group':
5582 type: array
5583 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)
5584 items:
5585 anyOf:
5586 - $ref: '#/components/schemas/MRSSPeerLink'
f4d59981
RK
5587 - $ref: '#/components/schemas/MRSSGroupContent'
5588 NotificationSettingValue:
5589 type: integer
5590 description: >
5591 Notification type
84f6e32c 5592
f4d59981 5593 - `0` NONE
84f6e32c 5594
f4d59981 5595 - `1` WEB
84f6e32c 5596
f4d59981
RK
5597 - `2` EMAIL
5598 enum:
5599 - 0
5600 - 1
5601 - 3
5602 Notification:
5603 properties:
5604 id:
5605 type: integer
5606 type:
5607 type: integer
5608 description: >
5609 Notification type, following the `UserNotificationType` enum:
84f6e32c 5610
f4d59981 5611 - `1` NEW_VIDEO_FROM_SUBSCRIPTION
84f6e32c 5612
f4d59981 5613 - `2` NEW_COMMENT_ON_MY_VIDEO
84f6e32c 5614
310b5219 5615 - `3` NEW_ABUSE_FOR_MODERATORS
84f6e32c 5616
f4d59981 5617 - `4` BLACKLIST_ON_MY_VIDEO
84f6e32c 5618
f4d59981 5619 - `5` UNBLACKLIST_ON_MY_VIDEO
84f6e32c 5620
f4d59981 5621 - `6` MY_VIDEO_PUBLISHED
84f6e32c 5622
f4d59981 5623 - `7` MY_VIDEO_IMPORT_SUCCESS
84f6e32c 5624
f4d59981 5625 - `8` MY_VIDEO_IMPORT_ERROR
84f6e32c 5626
f4d59981 5627 - `9` NEW_USER_REGISTRATION
84f6e32c 5628
f4d59981 5629 - `10` NEW_FOLLOW
84f6e32c 5630
f4d59981 5631 - `11` COMMENT_MENTION
84f6e32c 5632
f4d59981 5633 - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS
84f6e32c 5634
f4d59981 5635 - `13` NEW_INSTANCE_FOLLOWER
84f6e32c 5636
f4d59981
RK
5637 - `14` AUTO_INSTANCE_FOLLOWING
5638 read:
5639 type: boolean
5640 video:
5641 nullable: true
5642 allOf:
5643 - $ref: '#/components/schemas/VideoInfo'
5644 - type: object
5645 properties:
5646 channel:
5647 $ref: '#/components/schemas/ActorInfo'
5648 videoImport:
5649 nullable: true
5650 type: object
5651 properties:
5652 id:
5653 type: integer
5654 video:
5655 nullable: true
5656 $ref: '#/components/schemas/VideoInfo'
5657 torrentName:
5658 type: string
5659 nullable: true
5660 magnetUri:
5661 type: string
84f6e32c 5662 format: uri
f4d59981
RK
5663 nullable: true
5664 targetUri:
5665 type: string
84f6e32c 5666 format: uri
f4d59981
RK
5667 nullable: true
5668 comment:
5669 nullable: true
5670 type: object
5671 properties:
5672 id:
5673 type: integer
5674 threadId:
5675 type: integer
5676 video:
5677 $ref: '#/components/schemas/VideoInfo'
5678 account:
5679 $ref: '#/components/schemas/ActorInfo'
5680 videoAbuse:
5681 nullable: true
5682 type: object
5683 properties:
5684 id:
5685 type: integer
5686 video:
5687 allOf:
5688 - $ref: '#/components/schemas/VideoInfo'
5689 videoBlacklist:
5690 nullable: true
5691 type: object
5692 properties:
5693 id:
5694 type: integer
5695 video:
5696 allOf:
5697 - $ref: '#/components/schemas/VideoInfo'
5698 account:
5699 nullable: true
5700 allOf:
5701 - $ref: '#/components/schemas/ActorInfo'
5702 actorFollow:
5703 type: object
5704 nullable: true
5705 properties:
5706 id:
5707 type: integer
5708 follower:
5709 $ref: '#/components/schemas/ActorInfo'
5710 state:
5711 type: string
5712 enum:
5713 - pending
5714 - accepted
5715 following:
5716 type: object
5717 properties:
5718 type:
5719 type: string
5720 enum:
5721 - account
5722 - channel
5723 - instance
5724 name:
5725 type: string
5726 displayName:
5727 type: string
5728 host:
5729 type: string
84f6e32c 5730 format: hostname
f4d59981
RK
5731 createdAt:
5732 type: string
5733 format: date-time
5734 updatedAt:
5735 type: string
5736 format: date-time
5737 NotificationListResponse:
5738 properties:
5739 total:
5740 type: integer
84f6e32c 5741 example: 1
f4d59981
RK
5742 data:
5743 type: array
84f6e32c 5744 maxItems: 100
f4d59981 5745 items:
7461d440
RK
5746 $ref: '#/components/schemas/Notification'
5747 Plugin:
5748 properties:
5749 name:
5750 type: string
84f6e32c 5751 example: peertube-plugin-auth-ldap
7461d440
RK
5752 type:
5753 type: integer
84f6e32c
RK
5754 description: >
5755 - `1`: PLUGIN
5756
5757 - `2`: THEME
7461d440
RK
5758 enum:
5759 - 1
5760 - 2
5761 latestVersion:
5762 type: string
84f6e32c 5763 example: 0.0.3
7461d440
RK
5764 version:
5765 type: string
84f6e32c 5766 example: 0.0.1
7461d440
RK
5767 enabled:
5768 type: boolean
5769 uninstalled:
5770 type: boolean
5771 peertubeEngine:
5772 type: string
84f6e32c 5773 example: 2.2.0
7461d440
RK
5774 description:
5775 type: string
5776 homepage:
5777 type: string
84f6e32c
RK
5778 format: url
5779 example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap
7461d440
RK
5780 settings:
5781 type: object
5782 additionalProperties: true
5783 createdAt:
5784 type: string
5785 format: date-time
5786 updatedAt:
5787 type: string
5788 format: date-time
5789 PluginResponse:
5790 properties:
5791 total:
5792 type: integer
84f6e32c 5793 example: 1
7461d440
RK
5794 data:
5795 type: array
84f6e32c 5796 maxItems: 100
7461d440 5797 items:
2c318664 5798 $ref: '#/components/schemas/Plugin'
4e239e35
C
5799
5800 LiveVideoUpdate:
5801 properties:
5802 saveReplay:
5803 type: boolean
bb4ba6d9
C
5804 permanentLive:
5805 description: User can stream multiple times in a permanent live
5806 type: boolean
4e239e35
C
5807
5808 LiveVideoResponse:
5809 properties:
5810 rtmpUrl:
5811 type: string
5812 streamKey:
5813 type: string
5814 description: RTMP stream key to use to stream into this live video
5815 saveReplay:
5816 type: boolean
bb4ba6d9
C
5817 permanentLive:
5818 description: User can stream multiple times in a permanent live
5819 type: boolean
4e239e35 5820
75cba40d
C
5821
5822
2c318664
RK
5823 callbacks:
5824 searchIndex:
c00f96ce 5825 'https://search.example.org/api/v1/search/videos':
2c318664
RK
5826 post:
5827 summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
5828 responses:
5829 '200':
5830 description: successful operation
5831 content:
5832 application/json:
5833 schema:
1e904cde 5834 $ref: '#/components/schemas/VideoListResponse'