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