]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/api/openapi.yaml
Bumped to version v1.4.1
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
CommitLineData
3e9e6f2f 1openapi: 3.0.0
1569a818 2info:
5e1c08eb 3 title: PeerTube
22af8aac 4 version: 1.4.1
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
16 The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable
17 resource URLs. It returns HTTP response codes to indicate errors. It also
18 accepts and returns JSON in the HTTP body. You can use your favorite
19 HTTP/REST library for your programming language to use PeerTube. No official
5776f78e
RK
20 SDK is currently provided, but the spec API is fully compatible with
21 [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
22 which generates a client SDK in the language of your choice.
3e9e6f2f 23
2963c343
RK
24 # Authentication
25 When you sign up for an account, you are given the possibility to generate
1fd12c7c 26 sessions, and authenticate using this session token. One session token can
2963c343 27 currently be used at a time.
5776f78e
RK
28
29 # Errors
30 The API uses standard HTTP status codes to indicate the success or failure
31 of the API call. The body of the response will be JSON in the following
32 format.
33
34 ```
35 {
36 "code": "unauthorized_request", // example inner error code
37 "error": "Token is invalid." // example exposed error message
38 }
39 ```
6441981b 40externalDocs:
512a5759 41 url: https://docs.joinpeertube.org/api-rest-reference.html
2963c343
RK
42tags:
43 - name: Accounts
3e9e6f2f 44 description: >
2963c343 45 Using some features of PeerTube require authentication, for which Accounts
3e9e6f2f 46 provide different levels of permission as well as associated user
5776f78e 47 information. Accounts also encompass remote accounts discovered across the federation.
2963c343 48 - name: Config
3e9e6f2f
RK
49 description: >
50 Each server exposes public information regarding supported videos and
51 options.
2963c343
RK
52 - name: Feeds
53 description: |
54 Feeds of videos and feeds of comments allow to see updates and get them in
55 an aggregator or script of your choice.
56 - name: Job
3e9e6f2f
RK
57 description: >
58 Jobs are long-running tasks enqueued and processed by the instance
5776f78e
RK
59 itself. No additional worker registration is currently available.
60 - name: Server Following
3e9e6f2f
RK
61 description: >
62 Managing servers which the instance interacts with is crucial to the
5776f78e 63 concept of federation in PeerTube and external video indexation. The PeerTube
1fd12c7c 64 server then deals with inter-server ActivityPub operations and propagates
2963c343
RK
65 information across its social graph by posting activities to actors' inbox
66 endpoints.
5776f78e 67 - name: Video Abuse
2963c343
RK
68 description: |
69 Video abuses deal with reports of local or remote videos alike.
70 - name: Video
71 description: |
72 Operations dealing with listing, uploading, fetching or modifying videos.
73 - name: Search
74 description: |
75 The search helps to find _videos_ from within the instance and beyond.
76 Videos from other instances federated by the instance (that is, instances
77 followed by the instance) can be found via keywords and other criteria of
78 the advanced search.
5776f78e 79 - name: Video Comment
3e9e6f2f
RK
80 description: >
81 Operations dealing with comments to a video. Comments are organized in
82 threads.
5776f78e 83 - name: Video Channel
3e9e6f2f
RK
84 description: >
85 Operations dealing with creation, modification and video listing of a
5776f78e
RK
86 user's channels.
87 - name: Video Blacklist
88 description: >
89 Operations dealing with blacklisting videos (removing them from view and
90 preventing interactions).
91 - name: Video Rate
92 description: >
93 Voting for a video.
94x-tagGroups:
95 - name: Accounts
96 tags:
97 - Accounts
98 - User
1f82e3e8 99 - My User
5776f78e
RK
100 - name: Videos
101 tags:
102 - Video
67ae04a5 103 - Video Caption
5776f78e
RK
104 - Video Channel
105 - Video Comment
5776f78e
RK
106 - Video Following
107 - Video Rate
108 - name: Moderation
109 tags:
9d0b856e 110 - Video Abuse
5776f78e 111 - Video Blacklist
65f02679 112 - name: Instance Configuration
5776f78e
RK
113 tags:
114 - Config
115 - Server Following
116 - name: Notifications
117 tags:
118 - Feeds
119 - name: Jobs
120 tags:
121 - Job
122 - name: Search
123 tags:
124 - Search
1569a818 125paths:
ad9e39fb 126 '/accounts/{name}':
1569a818
DG
127 get:
128 tags:
129 - Accounts
2963c343 130 summary: Get the account by name
1569a818 131 parameters:
3e9e6f2f
RK
132 - $ref: '#/components/parameters/name'
133 - $ref: '#/components/parameters/start'
134 - $ref: '#/components/parameters/count'
135 - $ref: '#/components/parameters/sort'
1569a818
DG
136 responses:
137 '200':
138 description: successful operation
3e9e6f2f
RK
139 content:
140 application/json:
141 schema:
142 $ref: '#/components/schemas/Account'
ad9e39fb 143 '/accounts/{name}/videos':
6b738c7a
C
144 get:
145 tags:
146 - Accounts
2963c343 147 - Video
3e9e6f2f 148 summary: 'Get videos for an account, provided the name of that account'
6b738c7a 149 parameters:
3e9e6f2f 150 - $ref: '#/components/parameters/name'
6b738c7a
C
151 responses:
152 '200':
153 description: successful operation
3e9e6f2f
RK
154 content:
155 application/json:
156 schema:
048b6946 157 $ref: '#/components/schemas/VideoListResponse'
2963c343
RK
158 x-code-samples:
159 - lang: JavaScript
160 source: |
8f9e8be1 161 fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
2963c343
RK
162 .then(function(response) {
163 return response.json()
164 }).then(function(data) {
165 console.log(data)
166 })
8f9e8be1
RK
167 - lang: Shell
168 source: |
169 # pip install httpie
170 http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
5776f78e
RK
171 - lang: Ruby
172 source: |
173 require 'uri'
174 require 'net/http'
175
176 url = URI("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
177
178 http = Net::HTTP.new(url.host, url.port)
179 http.use_ssl = true
180 http.verify_mode = OpenSSL::SSL::VERIFY_NONE
181
182 request = Net::HTTP::Post.new(url)
183 request["content-type"] = 'application/json'
184 response = http.request(request)
185 puts response.read_body
186 - lang: Python
187 source: |
188 import http.client
189
190 conn = http.client.HTTPSConnection("https://peertube2.cpy.re/api/v1")
191
192 headers = {
193 'content-type': "application/json"
194 }
195
196 conn.request("POST", "/accounts/{name}/videos", None, headers)
197
198 res = conn.getresponse()
199 data = res.read()
200
201 print(data.decode("utf-8"))
1569a818
DG
202 /accounts:
203 get:
204 tags:
205 - Accounts
2963c343 206 summary: Get all accounts
1569a818
DG
207 responses:
208 '200':
209 description: successful operation
3e9e6f2f 210 content:
8f9e8be1 211 'application/json':
3e9e6f2f
RK
212 schema:
213 type: array
214 items:
215 $ref: '#/components/schemas/Account'
1569a818
DG
216 /config:
217 get:
218 tags:
219 - Config
6441981b 220 summary: Get the public configuration of the server
1569a818
DG
221 responses:
222 '200':
223 description: successful operation
3e9e6f2f
RK
224 content:
225 application/json:
226 schema:
227 $ref: '#/components/schemas/ServerConfig'
6441981b
RK
228 /config/about:
229 get:
230 summary: Get the instance about page content
231 tags:
232 - Config
233 responses:
234 '200':
235 description: successful operation
236 /config/custom:
237 get:
238 summary: Get the runtime configuration of the server
239 tags:
240 - Config
241 security:
242 - OAuth2:
243 - admin
244 responses:
245 '200':
246 description: successful operation
247 put:
248 summary: Set the runtime configuration of the server
249 tags:
250 - Config
251 security:
252 - OAuth2:
253 - admin
254 responses:
255 '200':
256 description: successful operation
257 delete:
258 summary: Delete the runtime configuration of the server
259 tags:
260 - Config
261 security:
262 - OAuth2:
263 - admin
264 responses:
265 '200':
266 description: successful operation
3e9e6f2f 267 '/feeds/videos.{format}':
244e76a5 268 get:
3e9e6f2f
RK
269 summary: >-
270 Get the feed of videos for the server, with optional filter by account
271 name or id
244e76a5
RK
272 tags:
273 - Feeds
244e76a5
RK
274 parameters:
275 - name: format
276 in: path
277 required: true
3e9e6f2f
RK
278 description: >-
279 The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and
280 json to JSON FEED 1.0
281 schema:
282 type: string
283 enum:
284 - xml
285 - atom
286 - json
287 default: xml
244e76a5
RK
288 - name: accountId
289 in: query
290 required: false
3e9e6f2f
RK
291 description: >-
292 The id of the local account to filter to (beware, users IDs and not
293 actors IDs which will return empty feeds
294 schema:
295 type: number
244e76a5
RK
296 - name: accountName
297 in: query
298 required: false
3e9e6f2f
RK
299 description: The name of the local account to filter to
300 schema:
301 type: string
244e76a5
RK
302 responses:
303 '200':
304 description: successful operation
d216b538 305 /jobs/{state}:
1569a818 306 get:
2963c343 307 summary: Get list of jobs
94ff4c23 308 security:
3e9e6f2f
RK
309 - OAuth2:
310 - admin
1569a818
DG
311 tags:
312 - Job
44cb3b85
DG
313 parameters:
314 - name: state
315 in: path
316 required: true
3e9e6f2f
RK
317 description: The state of the job
318 schema:
319 type: string
65f02679
RK
320 enum:
321 - active
322 - completed
323 - failed
324 - waiting
325 - delayed
3e9e6f2f
RK
326 - $ref: '#/components/parameters/start'
327 - $ref: '#/components/parameters/count'
328 - $ref: '#/components/parameters/sort'
1569a818
DG
329 responses:
330 '200':
331 description: successful operation
3e9e6f2f
RK
332 content:
333 application/json:
334 schema:
335 type: array
336 items:
337 $ref: '#/components/schemas/Job'
1569a818
DG
338 '/server/following/{host}':
339 delete:
94ff4c23 340 security:
3e9e6f2f
RK
341 - OAuth2:
342 - admin
1569a818 343 tags:
5776f78e 344 - Server Following
2963c343 345 summary: Unfollow a server by hostname
1569a818
DG
346 parameters:
347 - name: host
348 in: path
349 required: true
1569a818 350 description: 'The host to unfollow '
3e9e6f2f
RK
351 schema:
352 type: string
1569a818
DG
353 responses:
354 '201':
355 description: successful operation
356 /server/followers:
357 get:
358 tags:
5776f78e 359 - Server Following
2963c343 360 summary: Get followers of the server
44cb3b85 361 parameters:
3e9e6f2f
RK
362 - $ref: '#/components/parameters/start'
363 - $ref: '#/components/parameters/count'
364 - $ref: '#/components/parameters/sort'
1569a818
DG
365 responses:
366 '200':
367 description: successful operation
3e9e6f2f
RK
368 content:
369 application/json:
370 schema:
371 type: array
372 items:
373 $ref: '#/components/schemas/Follow'
1569a818
DG
374 /server/following:
375 get:
376 tags:
5776f78e 377 - Server Following
2963c343 378 summary: Get servers followed by the server
44cb3b85 379 parameters:
3e9e6f2f
RK
380 - $ref: '#/components/parameters/start'
381 - $ref: '#/components/parameters/count'
382 - $ref: '#/components/parameters/sort'
1569a818
DG
383 responses:
384 '200':
385 description: successful operation
3e9e6f2f
RK
386 content:
387 application/json:
388 schema:
389 type: array
390 items:
391 $ref: '#/components/schemas/Follow'
1569a818 392 post:
94ff4c23 393 security:
3e9e6f2f
RK
394 - OAuth2:
395 - admin
1569a818 396 tags:
5776f78e 397 - Server Following
2963c343 398 summary: Follow a server
1569a818
DG
399 responses:
400 '204':
3e9e6f2f
RK
401 $ref: '#/paths/~1users~1me/put/responses/204'
402 requestBody:
403 content:
404 application/json:
405 schema:
406 $ref: '#/components/schemas/Follow'
1569a818
DG
407 /users:
408 post:
2963c343 409 summary: Creates user
94ff4c23 410 security:
3e9e6f2f
RK
411 - OAuth2:
412 - admin
1569a818
DG
413 tags:
414 - User
1569a818
DG
415 responses:
416 '200':
417 description: successful operation
3e9e6f2f
RK
418 content:
419 application/json:
420 schema:
421 $ref: '#/components/schemas/AddUserResponse'
422 requestBody:
423 content:
424 application/json:
425 schema:
426 $ref: '#/components/schemas/AddUser'
427 description: User to create
428 required: true
1569a818 429 get:
2963c343 430 summary: Get a list of users
94ff4c23 431 security:
3e9e6f2f 432 - OAuth2: []
1569a818
DG
433 tags:
434 - User
44cb3b85 435 parameters:
3e9e6f2f
RK
436 - $ref: '#/components/parameters/start'
437 - $ref: '#/components/parameters/count'
fd5af7a2 438 - $ref: '#/components/parameters/usersSort'
1569a818
DG
439 responses:
440 '200':
441 description: successful operation
3e9e6f2f
RK
442 content:
443 application/json:
444 schema:
445 type: array
446 items:
447 $ref: '#/components/schemas/User'
1569a818
DG
448 '/users/{id}':
449 delete:
2963c343 450 summary: Delete a user by its id
94ff4c23 451 security:
3e9e6f2f
RK
452 - OAuth2:
453 - admin
1569a818
DG
454 tags:
455 - User
1569a818 456 parameters:
3e9e6f2f 457 - $ref: '#/components/parameters/id'
1569a818
DG
458 responses:
459 '204':
3e9e6f2f 460 $ref: '#/paths/~1users~1me/put/responses/204'
1569a818 461 get:
2963c343 462 summary: Get user by its id
94ff4c23 463 security:
3e9e6f2f 464 - OAuth2: []
1569a818
DG
465 tags:
466 - User
1569a818 467 parameters:
3e9e6f2f 468 - $ref: '#/components/parameters/id'
1569a818
DG
469 responses:
470 '200':
471 description: successful operation
3e9e6f2f
RK
472 content:
473 application/json:
474 schema:
475 $ref: '#/components/schemas/User'
1569a818 476 put:
2963c343 477 summary: Update user profile by its id
94ff4c23 478 security:
3e9e6f2f 479 - OAuth2: []
1569a818
DG
480 tags:
481 - User
1569a818 482 parameters:
3e9e6f2f 483 - $ref: '#/components/parameters/id'
1569a818
DG
484 responses:
485 '204':
3e9e6f2f
RK
486 $ref: '#/paths/~1users~1me/put/responses/204'
487 requestBody:
488 content:
489 application/json:
490 schema:
491 $ref: '#/components/schemas/UpdateUser'
492 required: true
1f82e3e8
C
493 /users/register:
494 post:
495 summary: Register a user
496 tags:
497 - User
498 responses:
499 '204':
500 $ref: '#/paths/~1users~1me/put/responses/204'
501 requestBody:
502 content:
503 application/json:
504 schema:
505 $ref: '#/components/schemas/RegisterUser'
506 required: true
1569a818
DG
507 /users/me:
508 get:
2963c343 509 summary: Get current user information
94ff4c23 510 security:
e76d5784
RK
511 - OAuth2:
512 - user
1569a818 513 tags:
1f82e3e8 514 - My User
1569a818
DG
515 responses:
516 '200':
517 description: successful operation
3e9e6f2f
RK
518 content:
519 application/json:
520 schema:
521 type: array
522 items:
523 $ref: '#/components/schemas/User'
1569a818 524 put:
2963c343 525 summary: Update current user information
94ff4c23 526 security:
e76d5784
RK
527 - OAuth2:
528 - user
1569a818 529 tags:
1f82e3e8 530 - My User
1569a818
DG
531 responses:
532 '204':
37db4176 533 description: successful operation
3e9e6f2f
RK
534 requestBody:
535 content:
536 application/json:
537 schema:
538 $ref: '#/components/schemas/UpdateMe'
539 required: true
1f82e3e8
C
540 /users/me/videos/imports:
541 get:
542 summary: Get video imports of current user
543 security:
544 - OAuth2:
545 - user
546 tags:
547 - My User
548 parameters:
549 - $ref: '#/components/parameters/start'
550 - $ref: '#/components/parameters/count'
551 - $ref: '#/components/parameters/sort'
552 responses:
553 '200':
554 description: successful operation
555 content:
556 application/json:
557 schema:
558 $ref: '#/components/schemas/VideoImport'
1569a818
DG
559 /users/me/video-quota-used:
560 get:
2963c343 561 summary: Get current user used quota
94ff4c23 562 security:
e76d5784
RK
563 - OAuth2:
564 - user
1569a818 565 tags:
1f82e3e8 566 - My User
1569a818
DG
567 responses:
568 '200':
569 description: successful operation
3e9e6f2f
RK
570 content:
571 application/json:
572 schema:
573 type: number
1569a818
DG
574 '/users/me/videos/{videoId}/rating':
575 get:
3e9e6f2f 576 summary: 'Get rating of video by its id, among those of the current user'
94ff4c23 577 security:
3e9e6f2f 578 - OAuth2: []
1569a818 579 tags:
1f82e3e8 580 - My User
1569a818
DG
581 parameters:
582 - name: videoId
583 in: path
584 required: true
1569a818 585 description: 'The video id '
3e9e6f2f
RK
586 schema:
587 type: string
1569a818
DG
588 responses:
589 '200':
590 description: successful operation
3e9e6f2f
RK
591 content:
592 application/json:
593 schema:
594 $ref: '#/components/schemas/GetMeVideoRating'
1569a818
DG
595 /users/me/videos:
596 get:
2963c343 597 summary: Get videos of the current user
94ff4c23 598 security:
e76d5784
RK
599 - OAuth2:
600 - user
1569a818 601 tags:
1f82e3e8 602 - My User
44cb3b85 603 parameters:
3e9e6f2f
RK
604 - $ref: '#/components/parameters/start'
605 - $ref: '#/components/parameters/count'
606 - $ref: '#/components/parameters/sort'
1569a818
DG
607 responses:
608 '200':
609 description: successful operation
3e9e6f2f
RK
610 content:
611 application/json:
612 schema:
048b6946 613 $ref: '#/components/schemas/VideoListResponse'
e76d5784
RK
614 /users/me/subscriptions:
615 get:
616 summary: Get subscriptions of the current user
617 security:
618 - OAuth2:
619 - user
620 tags:
1f82e3e8 621 - My User
e76d5784
RK
622 parameters:
623 - $ref: '#/components/parameters/start'
624 - $ref: '#/components/parameters/count'
625 - $ref: '#/components/parameters/sort'
626 responses:
627 '200':
628 description: successful operation
629 post:
630 summary: Add subscription to the current user
631 security:
632 - OAuth2:
633 - user
634 tags:
1f82e3e8 635 - My User
e76d5784
RK
636 responses:
637 '200':
638 description: successful operation
639 /users/me/subscriptions/exist:
640 get:
641 summary: Get if subscriptions exist for the current user
642 security:
643 - OAuth2:
644 - user
645 tags:
1f82e3e8 646 - My User
e76d5784
RK
647 parameters:
648 - $ref: '#/components/parameters/subscriptionsUris'
649 responses:
650 '200':
651 description: successful operation
652 content:
653 application/json:
654 schema:
655 type: object
656 /users/me/subscriptions/videos:
657 get:
658 summary: Get videos of subscriptions of the current user
659 security:
660 - OAuth2:
661 - user
662 tags:
1f82e3e8 663 - My User
e76d5784
RK
664 parameters:
665 - $ref: '#/components/parameters/start'
666 - $ref: '#/components/parameters/count'
667 - $ref: '#/components/parameters/sort'
668 responses:
669 '200':
670 description: successful operation
671 content:
672 application/json:
673 schema:
048b6946 674 $ref: '#/components/schemas/VideoListResponse'
cb9d028a 675 '/users/me/subscriptions/{subscriptionHandle}':
e76d5784
RK
676 get:
677 summary: Get subscription of the current user for a given uri
678 security:
679 - OAuth2:
680 - user
681 tags:
1f82e3e8 682 - My User
cb9d028a
C
683 parameters:
684 - $ref: '#/components/parameters/subscriptionHandle'
e76d5784
RK
685 responses:
686 '200':
687 description: successful operation
688 content:
689 application/json:
690 schema:
691 $ref: '#/components/schemas/VideoChannel'
692 delete:
693 summary: Delete subscription of the current user for a given uri
694 security:
695 - OAuth2:
696 - user
697 tags:
1f82e3e8 698 - My User
cb9d028a
C
699 parameters:
700 - $ref: '#/components/parameters/subscriptionHandle'
e76d5784
RK
701 responses:
702 '200':
703 description: successful operation
1569a818
DG
704 /users/me/avatar/pick:
705 post:
2963c343 706 summary: Update current user avatar
94ff4c23 707 security:
3e9e6f2f 708 - OAuth2: []
1569a818 709 tags:
1f82e3e8 710 - My User
1569a818
DG
711 responses:
712 '200':
713 description: successful operation
3e9e6f2f
RK
714 content:
715 application/json:
716 schema:
717 $ref: '#/components/schemas/Avatar'
718 requestBody:
719 content:
720 multipart/form-data:
721 schema:
722 type: object
723 properties:
724 avatarfile:
725 description: The file to upload.
726 type: string
727 format: binary
728 encoding:
729 profileImage:
730 # only accept png/jpeg
731 contentType: image/png, image/jpeg
c360c494 732 /videos:
1569a818 733 get:
2963c343 734 summary: Get list of videos
1569a818
DG
735 tags:
736 - Video
44cb3b85 737 parameters:
fd5af7a2
RK
738 - $ref: '#/components/parameters/categoryOneOf'
739 - $ref: '#/components/parameters/tagsOneOf'
740 - $ref: '#/components/parameters/tagsAllOf'
741 - $ref: '#/components/parameters/licenceOneOf'
742 - $ref: '#/components/parameters/languageOneOf'
743 - $ref: '#/components/parameters/nsfw'
744 - $ref: '#/components/parameters/filter'
3e9e6f2f
RK
745 - $ref: '#/components/parameters/start'
746 - $ref: '#/components/parameters/count'
fd5af7a2 747 - $ref: '#/components/parameters/videosSort'
1569a818
DG
748 responses:
749 '200':
750 description: successful operation
3e9e6f2f
RK
751 content:
752 application/json:
753 schema:
048b6946 754 $ref: '#/components/schemas/VideoListResponse'
c360c494 755 /videos/categories:
1569a818 756 get:
094ff8e6 757 summary: Get list of video categories known by the server
1569a818
DG
758 tags:
759 - Video
1569a818
DG
760 responses:
761 '200':
762 description: successful operation
3e9e6f2f
RK
763 content:
764 application/json:
765 schema:
766 type: array
767 items:
768 type: string
c360c494 769 /videos/licences:
1569a818 770 get:
2963c343 771 summary: Get list of video licences known by the server
1569a818
DG
772 tags:
773 - Video
1569a818
DG
774 responses:
775 '200':
776 description: successful operation
3e9e6f2f
RK
777 content:
778 application/json:
779 schema:
780 type: array
781 items:
782 type: string
c360c494 783 /videos/languages:
1569a818 784 get:
2963c343 785 summary: Get list of languages known by the server
1569a818
DG
786 tags:
787 - Video
1569a818
DG
788 responses:
789 '200':
790 description: successful operation
3e9e6f2f
RK
791 content:
792 application/json:
793 schema:
794 type: array
795 items:
796 type: string
c360c494 797 /videos/privacies:
1569a818 798 get:
2963c343 799 summary: Get list of privacy policies supported by the server
1569a818
DG
800 tags:
801 - Video
1569a818
DG
802 responses:
803 '200':
804 description: successful operation
3e9e6f2f
RK
805 content:
806 application/json:
807 schema:
808 type: array
809 items:
810 type: string
811 '/videos/{id}':
1569a818 812 put:
2963c343 813 summary: Update metadata for a video by its id
94ff4c23 814 security:
3e9e6f2f 815 - OAuth2: []
1569a818
DG
816 tags:
817 - Video
1569a818 818 parameters:
cb9d028a 819 - $ref: '#/components/parameters/idOrUUID'
1569a818 820 responses:
37db4176 821 '204':
1569a818 822 description: successful operation
3e9e6f2f
RK
823 requestBody:
824 content:
825 multipart/form-data:
826 schema:
827 type: object
828 properties:
829 thumbnailfile:
830 description: Video thumbnail file
831 type: string
832 previewfile:
833 description: Video preview file
834 type: string
835 category:
836 description: Video category
837 type: string
838 licence:
839 description: Video licence
840 type: string
841 language:
842 description: Video language
843 type: string
844 description:
845 description: Video description
846 type: string
847 waitTranscoding:
848 description: Whether or not we wait transcoding before publish the video
849 type: string
850 support:
851 description: Text describing how to support the video uploader
852 type: string
853 nsfw:
854 description: Whether or not this video contains sensitive content
855 type: string
856 name:
857 description: Video name
858 type: string
859 tags:
12fed49e 860 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1fd12c7c 861 type: array
07d02f6d
FS
862 minItems: 1
863 maxItems: 5
1fd12c7c
C
864 items:
865 type: string
07d02f6d
FS
866 minLength: 2
867 maxLength: 30
3e9e6f2f
RK
868 commentsEnabled:
869 description: Enable or disable comments for this video
870 type: string
37db4176
FS
871 originallyPublishedAt:
872 description: Date when the content was originally published
873 type: string
874 format: date-time
5dce26d2
C
875 scheduleUpdate:
876 $ref: '#/components/schemas/VideoScheduledUpdate'
1569a818 877 get:
2963c343 878 summary: Get a video by its id
1569a818
DG
879 tags:
880 - Video
1569a818 881 parameters:
cb9d028a 882 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
883 responses:
884 '200':
885 description: successful operation
3e9e6f2f
RK
886 content:
887 application/json:
888 schema:
5dce26d2 889 $ref: '#/components/schemas/VideoDetails'
1569a818 890 delete:
2963c343 891 summary: Delete a video by its id
94ff4c23 892 security:
3e9e6f2f 893 - OAuth2: []
1569a818
DG
894 tags:
895 - Video
1569a818 896 parameters:
cb9d028a 897 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
898 responses:
899 '204':
3e9e6f2f
RK
900 $ref: '#/paths/~1users~1me/put/responses/204'
901 '/videos/{id}/description':
1569a818 902 get:
2963c343 903 summary: Get a video description by its id
1569a818
DG
904 tags:
905 - Video
1569a818 906 parameters:
cb9d028a 907 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
908 responses:
909 '200':
910 description: successful operation
3e9e6f2f
RK
911 content:
912 application/json:
913 schema:
914 type: string
915 '/videos/{id}/views':
1569a818 916 post:
2963c343 917 summary: Add a view to the video by its id
1569a818
DG
918 tags:
919 - Video
1569a818 920 parameters:
cb9d028a 921 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
922 responses:
923 '204':
3e9e6f2f 924 $ref: '#/paths/~1users~1me/put/responses/204'
6441981b
RK
925 '/videos/{id}/watching':
926 put:
f50ab1c2 927 summary: Set watching progress of a video by its id for a user
6441981b
RK
928 tags:
929 - Video
930 security:
931 - OAuth2: []
932 parameters:
cb9d028a 933 - $ref: '#/components/parameters/idOrUUID'
6441981b
RK
934 requestBody:
935 content:
936 application/json:
937 schema:
938 $ref: '#/components/schemas/UserWatchingVideo'
939 required: true
940 responses:
941 '204':
942 $ref: '#/paths/~1users~1me/put/responses/204'
943 /videos/ownership:
944 get:
945 summary: Get list of video ownership changes requests
946 tags:
947 - Video
948 security:
949 - OAuth2: []
6441981b
RK
950 responses:
951 '200':
952 description: successful operation
953 '/videos/ownership/{id}/accept':
954 post:
955 summary: Refuse ownership change request for video by its id
956 tags:
957 - Video
958 security:
959 - OAuth2: []
960 parameters:
cb9d028a 961 - $ref: '#/components/parameters/idOrUUID'
6441981b
RK
962 responses:
963 '204':
964 $ref: '#/paths/~1users~1me/put/responses/204'
965 '/videos/ownership/{id}/refuse':
966 post:
967 summary: Accept ownership change request for video by its id
968 tags:
969 - Video
970 security:
971 - OAuth2: []
972 parameters:
cb9d028a 973 - $ref: '#/components/parameters/idOrUUID'
6441981b
RK
974 responses:
975 '204':
976 $ref: '#/paths/~1users~1me/put/responses/204'
977 '/videos/{id}/give-ownership':
978 post:
979 summary: Request change of ownership for a video you own, by its id
980 tags:
981 - Video
982 security:
983 - OAuth2: []
984 parameters:
cb9d028a 985 - $ref: '#/components/parameters/idOrUUID'
6441981b
RK
986 requestBody:
987 required: true
988 content:
989 application/x-www-form-urlencoded:
990 schema:
991 type: object
992 properties:
993 username:
994 type: string
995 required:
996 - username
997 responses:
998 '204':
999 $ref: '#/paths/~1users~1me/put/responses/204'
1000 '400':
1001 description: 'Changing video ownership to a remote account is not supported yet'
c360c494 1002 /videos/upload:
1569a818 1003 post:
2963c343 1004 summary: Upload a video file with its metadata
94ff4c23 1005 security:
3e9e6f2f 1006 - OAuth2: []
1569a818
DG
1007 tags:
1008 - Video
1569a818
DG
1009 responses:
1010 '200':
1011 description: successful operation
3e9e6f2f
RK
1012 content:
1013 application/json:
1014 schema:
1015 $ref: '#/components/schemas/VideoUploadResponse'
1016 requestBody:
1017 content:
1018 multipart/form-data:
1019 schema:
1020 type: object
1021 properties:
1022 videofile:
1023 description: Video file
1024 type: string
1025 format: binary
1026 channelId:
1027 description: Channel id that will contain this video
1028 type: number
1029 thumbnailfile:
1030 description: Video thumbnail file
1031 type: string
1032 previewfile:
1033 description: Video preview file
1034 type: string
8f9e8be1 1035 privacy:
ee89e8fd 1036 $ref: '#/components/schemas/VideoPrivacySet'
3e9e6f2f
RK
1037 category:
1038 description: Video category
1039 type: string
1040 licence:
1041 description: Video licence
1042 type: string
1043 language:
1044 description: Video language
1045 type: string
1046 description:
1047 description: Video description
1048 type: string
1049 waitTranscoding:
1050 description: Whether or not we wait transcoding before publish the video
1051 type: string
1052 support:
1053 description: Text describing how to support the video uploader
1054 type: string
1055 nsfw:
1056 description: Whether or not this video contains sensitive content
1057 type: string
1058 name:
1059 description: Video name
1060 type: string
1061 tags:
07d02f6d 1062 description: Video tags (maximum 5 tags each between 2 and 30 characters)
1fd12c7c 1063 type: array
07d02f6d
FS
1064 minItems: 1
1065 maxItems: 5
1fd12c7c
C
1066 items:
1067 type: string
07d02f6d
FS
1068 minLength: 2
1069 maxLength: 30
3e9e6f2f
RK
1070 commentsEnabled:
1071 description: Enable or disable comments for this video
1072 type: string
f9f89092
FS
1073 originallyPublishedAt:
1074 description: Date when the content was originally published
1075 type: string
1076 format: date-time
5dce26d2
C
1077 scheduleUpdate:
1078 $ref: '#/components/schemas/VideoScheduledUpdate'
3e9e6f2f
RK
1079 required:
1080 - videofile
1081 - channelId
8f9e8be1 1082 - name
8f9e8be1
RK
1083 x-code-samples:
1084 - lang: Shell
1085 source: |
1086 ## DEPENDENCIES: httpie, jq
1087 # pip install httpie
1088 USERNAME="<your_username>"
1089 PASSWORD="<your_password>"
1090 FILE_PATH="<your_file_path>"
1091 CHANNEL_ID="<your_channel_id>"
8f9e8be1
RK
1092 NAME="<video_name>"
1093
1094 API_PATH="https://peertube2.cpy.re/api/v1"
1095 ## AUTH
1096 client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
1097 client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
1098 token=$(http -b --form POST "$API_PATH/users/token" \
1099 client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
1100 username=$USERNAME \
1101 password=$PASSWORD \
1102 | jq -r ".access_token")
1103 ## VIDEO UPLOAD
1104 http -b --form POST "$API_PATH/videos/upload" \
1105 videofile@$FILE_PATH \
1106 channelId=$CHANNEL_ID \
1107 name=$NAME \
8f9e8be1 1108 "Authorization:Bearer $token"
28c8e63e
C
1109 /videos/imports:
1110 post:
b3d1054e 1111 summary: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
28c8e63e
C
1112 security:
1113 - OAuth2: []
1114 tags:
1115 - Video
1116 responses:
1117 '200':
1118 description: successful operation
1119 content:
1120 application/json:
1121 schema:
1122 $ref: '#/components/schemas/VideoUploadResponse'
1123 requestBody:
1124 content:
1125 multipart/form-data:
1126 schema:
1127 type: object
1128 properties:
1129 torrentfile:
1130 description: Torrent File
1131 type: string
1132 format: binary
1133 targetUrl:
1134 description: HTTP target URL
1135 type: string
1136 magnetUri:
1137 description: Magnet URI
1138 type: string
1139 channelId:
1140 description: Channel id that will contain this video
1141 type: number
1142 thumbnailfile:
1143 description: Video thumbnail file
1144 type: string
1145 previewfile:
1146 description: Video preview file
1147 type: string
1148 privacy:
ee89e8fd 1149 $ref: '#/components/schemas/VideoPrivacySet'
28c8e63e
C
1150 category:
1151 description: Video category
1152 type: string
1153 licence:
1154 description: Video licence
1155 type: string
1156 language:
1157 description: Video language
1158 type: string
1159 description:
1160 description: Video description
1161 type: string
1162 waitTranscoding:
1163 description: Whether or not we wait transcoding before publish the video
1164 type: string
1165 support:
1166 description: Text describing how to support the video uploader
1167 type: string
1168 nsfw:
1169 description: Whether or not this video contains sensitive content
1170 type: string
1171 name:
1172 description: Video name
1173 type: string
1174 tags:
07d02f6d 1175 description: Video tags (maximum 5 tags each between 2 and 30 characters)
28c8e63e 1176 type: array
07d02f6d
FS
1177 minItems: 1
1178 maxItems: 5
28c8e63e
C
1179 items:
1180 type: string
07d02f6d
FS
1181 minLength: 2
1182 maxLength: 30
28c8e63e
C
1183 commentsEnabled:
1184 description: Enable or disable comments for this video
1185 type: string
5dce26d2
C
1186 scheduleUpdate:
1187 $ref: '#/components/schemas/VideoScheduledUpdate'
28c8e63e
C
1188 required:
1189 - channelId
1190 - name
c360c494 1191 /videos/abuse:
1569a818 1192 get:
2963c343 1193 summary: Get list of reported video abuses
94ff4c23 1194 security:
3e9e6f2f 1195 - OAuth2: []
1569a818 1196 tags:
5776f78e 1197 - Video Abuse
44cb3b85 1198 parameters:
3e9e6f2f
RK
1199 - $ref: '#/components/parameters/start'
1200 - $ref: '#/components/parameters/count'
fd5af7a2 1201 - $ref: '#/components/parameters/abusesSort'
1569a818
DG
1202 responses:
1203 '200':
1204 description: successful operation
3e9e6f2f
RK
1205 content:
1206 application/json:
1207 schema:
1208 type: array
1209 items:
1210 $ref: '#/components/schemas/VideoAbuse'
1211 '/videos/{id}/abuse':
1569a818 1212 post:
3e9e6f2f 1213 summary: 'Report an abuse, on a video by its id'
94ff4c23 1214 security:
3e9e6f2f 1215 - OAuth2: []
1569a818 1216 tags:
5776f78e 1217 - Video Abuse
1569a818 1218 parameters:
cb9d028a 1219 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1220 responses:
1221 '204':
3e9e6f2f
RK
1222 $ref: '#/paths/~1users~1me/put/responses/204'
1223 '/videos/{id}/blacklist':
1569a818 1224 post:
2963c343 1225 summary: Put on blacklist a video by its id
94ff4c23 1226 security:
3e9e6f2f
RK
1227 - OAuth2:
1228 - admin
1229 - moderator
1569a818 1230 tags:
5776f78e 1231 - Video Blacklist
1569a818 1232 parameters:
cb9d028a 1233 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1234 responses:
1235 '204':
3e9e6f2f 1236 $ref: '#/paths/~1users~1me/put/responses/204'
1569a818 1237 delete:
2963c343 1238 summary: Delete an entry of the blacklist of a video by its id
94ff4c23 1239 security:
3e9e6f2f
RK
1240 - OAuth2:
1241 - admin
1242 - moderator
1569a818 1243 tags:
5776f78e 1244 - Video Blacklist
1569a818 1245 parameters:
cb9d028a 1246 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1247 responses:
1248 '204':
3e9e6f2f 1249 $ref: '#/paths/~1users~1me/put/responses/204'
c360c494 1250 /videos/blacklist:
1569a818 1251 get:
2963c343 1252 summary: Get list of videos on blacklist
94ff4c23 1253 security:
3e9e6f2f
RK
1254 - OAuth2:
1255 - admin
1256 - moderator
1569a818 1257 tags:
5776f78e 1258 - Video Blacklist
44cb3b85 1259 parameters:
3e9e6f2f
RK
1260 - $ref: '#/components/parameters/start'
1261 - $ref: '#/components/parameters/count'
fd5af7a2 1262 - $ref: '#/components/parameters/blacklistsSort'
1569a818
DG
1263 responses:
1264 '200':
1265 description: successful operation
3e9e6f2f
RK
1266 content:
1267 application/json:
1268 schema:
1269 type: array
1270 items:
1271 $ref: '#/components/schemas/VideoBlacklist'
67ae04a5
C
1272 /videos/{id}/captions:
1273 get:
1274 summary: Get list of video's captions
1275 tags:
1276 - Video Caption
1277 parameters:
cb9d028a 1278 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
1279 responses:
1280 '200':
1281 description: successful operation
1282 content:
1283 application/json:
1284 schema:
1285 type: object
1286 properties:
1287 total:
1288 type: integer
1289 data:
1290 type: array
1291 items:
1292 $ref: '#/components/schemas/VideoCaption'
1293 /videos/{id}/captions/{captionLanguage}:
1294 put:
1295 summary: Add or replace a video caption
1296 tags:
1297 - Video Caption
1298 parameters:
cb9d028a 1299 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
1300 - $ref: '#/components/parameters/captionLanguage'
1301 requestBody:
1302 content:
1303 multipart/form-data:
1304 schema:
1305 type: object
1306 properties:
1307 captionfile:
1308 description: The file to upload.
1309 type: string
1310 format: binary
1311 responses:
1312 '204':
1313 $ref: '#/paths/~1users~1me/put/responses/204'
1314 delete:
1315 summary: Delete a video caption
1316 tags:
1317 - Video Caption
1318 parameters:
cb9d028a 1319 - $ref: '#/components/parameters/idOrUUID'
67ae04a5
C
1320 - $ref: '#/components/parameters/captionLanguage'
1321 responses:
1322 '204':
1323 $ref: '#/paths/~1users~1me/put/responses/204'
48dce1c9 1324 /video-channels:
1569a818 1325 get:
2963c343 1326 summary: Get list of video channels
1569a818 1327 tags:
5776f78e 1328 - Video Channel
44cb3b85 1329 parameters:
3e9e6f2f
RK
1330 - $ref: '#/components/parameters/start'
1331 - $ref: '#/components/parameters/count'
1332 - $ref: '#/components/parameters/sort'
1569a818
DG
1333 responses:
1334 '200':
1335 description: successful operation
3e9e6f2f
RK
1336 content:
1337 application/json:
1338 schema:
1339 type: array
1340 items:
1341 $ref: '#/components/schemas/VideoChannel'
1569a818 1342 post:
2963c343 1343 summary: Creates a video channel for the current user
94ff4c23 1344 security:
3e9e6f2f 1345 - OAuth2: []
1569a818 1346 tags:
5776f78e 1347 - Video Channel
1569a818
DG
1348 responses:
1349 '204':
3e9e6f2f
RK
1350 $ref: '#/paths/~1users~1me/put/responses/204'
1351 requestBody:
7d14d4d2
C
1352 content:
1353 application/json:
1354 schema:
1355 $ref: '#/components/schemas/VideoChannelCreate'
9ce3d302 1356 '/video-channels/{channelHandle}':
1569a818 1357 get:
2963c343 1358 summary: Get a video channel by its id
1569a818 1359 tags:
5776f78e 1360 - Video Channel
1569a818 1361 parameters:
9ce3d302 1362 - $ref: '#/components/parameters/channelHandle'
1569a818
DG
1363 responses:
1364 '200':
1365 description: successful operation
3e9e6f2f
RK
1366 content:
1367 application/json:
1368 schema:
1369 $ref: '#/components/schemas/VideoChannel'
1569a818 1370 put:
2963c343 1371 summary: Update a video channel by its id
94ff4c23 1372 security:
3e9e6f2f 1373 - OAuth2: []
1569a818 1374 tags:
5776f78e 1375 - Video Channel
1569a818 1376 parameters:
9ce3d302 1377 - $ref: '#/components/parameters/channelHandle'
1569a818
DG
1378 responses:
1379 '204':
3e9e6f2f
RK
1380 $ref: '#/paths/~1users~1me/put/responses/204'
1381 requestBody:
7d14d4d2
C
1382 content:
1383 application/json:
1384 schema:
1385 $ref: '#/components/schemas/VideoChannelUpdate'
1569a818 1386 delete:
2963c343 1387 summary: Delete a video channel by its id
94ff4c23 1388 security:
3e9e6f2f 1389 - OAuth2: []
1569a818 1390 tags:
5776f78e 1391 - Video Channel
1569a818 1392 parameters:
9ce3d302 1393 - $ref: '#/components/parameters/channelHandle'
cc918ac3
C
1394 responses:
1395 '204':
3e9e6f2f 1396 $ref: '#/paths/~1users~1me/put/responses/204'
9ce3d302 1397 '/video-channels/{channelHandle}/videos':
cc918ac3 1398 get:
2963c343 1399 summary: Get videos of a video channel by its id
cc918ac3 1400 tags:
048b6946 1401 - Video
5776f78e 1402 - Video Channel
cc918ac3 1403 parameters:
9ce3d302 1404 - $ref: '#/components/parameters/channelHandle'
1569a818 1405 responses:
cc918ac3 1406 '200':
1569a818 1407 description: successful operation
3e9e6f2f
RK
1408 content:
1409 application/json:
1410 schema:
048b6946 1411 $ref: '#/components/schemas/VideoListResponse'
3e9e6f2f 1412 '/accounts/{name}/video-channels':
6b738c7a 1413 get:
2963c343 1414 summary: Get video channels of an account by its name
6b738c7a 1415 tags:
5776f78e 1416 - Video Channel
6b738c7a 1417 parameters:
3e9e6f2f 1418 - $ref: '#/components/parameters/name'
6b738c7a
C
1419 responses:
1420 '200':
1421 description: successful operation
3e9e6f2f
RK
1422 content:
1423 application/json:
1424 schema:
1425 type: array
1426 items:
1427 $ref: '#/components/schemas/VideoChannel'
c100a614
YB
1428 '/accounts/{name}/ratings':
1429 get:
1430 summary: Get ratings of an account by its name
1431 security:
1432 - OAuth2: []
1433 tags:
1434 - User
1435 parameters:
cb9d028a 1436 - $ref: '#/components/parameters/name'
c100a614
YB
1437 - $ref: '#/components/parameters/start'
1438 - $ref: '#/components/parameters/count'
1439 - $ref: '#/components/parameters/sort'
1440 - name: rating
1441 in: query
1442 required: false
b3d1054e 1443 description: Optionally filter which ratings to retrieve
c100a614
YB
1444 schema:
1445 type: string
1446 enum:
1447 - like
1448 - dislike
1449 responses:
1450 '200':
1451 description: successful operation
1452 content:
1453 application/json:
1454 schema:
1455 type: array
1456 items:
1457 $ref: '#/components/schemas/VideoRating'
3e9e6f2f 1458 '/videos/{id}/comment-threads':
1569a818 1459 get:
2963c343 1460 summary: Get the comment threads of a video by its id
1569a818 1461 tags:
5776f78e 1462 - Video Comment
1569a818 1463 parameters:
cb9d028a 1464 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f
RK
1465 - $ref: '#/components/parameters/start'
1466 - $ref: '#/components/parameters/count'
1467 - $ref: '#/components/parameters/sort'
1569a818
DG
1468 responses:
1469 '200':
1470 description: successful operation
3e9e6f2f
RK
1471 content:
1472 application/json:
1473 schema:
1474 $ref: '#/components/schemas/CommentThreadResponse'
1569a818 1475 post:
3e9e6f2f 1476 summary: 'Creates a comment thread, on a video by its id'
94ff4c23 1477 security:
3e9e6f2f 1478 - OAuth2: []
1569a818 1479 tags:
5776f78e 1480 - Video Comment
1569a818 1481 parameters:
cb9d028a 1482 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1483 responses:
1484 '200':
1485 description: successful operation
3e9e6f2f
RK
1486 content:
1487 application/json:
1488 schema:
1489 $ref: '#/components/schemas/CommentThreadPostResponse'
1490 '/videos/{id}/comment-threads/{threadId}':
1569a818 1491 get:
3e9e6f2f 1492 summary: 'Get the comment thread by its id, of a video by its id'
1569a818 1493 tags:
5776f78e 1494 - Video Comment
1569a818 1495 parameters:
cb9d028a
C
1496 - $ref: '#/components/parameters/idOrUUID'
1497 - $ref: '#/components/parameters/threadId'
1569a818
DG
1498 responses:
1499 '200':
1500 description: successful operation
3e9e6f2f
RK
1501 content:
1502 application/json:
1503 schema:
1504 $ref: '#/components/schemas/VideoCommentThreadTree'
1505 '/videos/{id}/comments/{commentId}':
1569a818 1506 post:
3e9e6f2f 1507 summary: 'Creates a comment in a comment thread by its id, of a video by its id'
94ff4c23 1508 security:
3e9e6f2f 1509 - OAuth2: []
1569a818 1510 tags:
5776f78e 1511 - Video Comment
1569a818 1512 parameters:
cb9d028a 1513 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f 1514 - $ref: '#/components/parameters/commentId'
1569a818
DG
1515 responses:
1516 '200':
1517 description: successful operation
3e9e6f2f
RK
1518 content:
1519 application/json:
1520 schema:
1521 $ref: '#/components/schemas/CommentThreadPostResponse'
1569a818 1522 delete:
089caedc 1523 summary: 'Delete a comment in a comment thread by its id, of a video by its id'
94ff4c23 1524 security:
3e9e6f2f 1525 - OAuth2: []
1569a818 1526 tags:
5776f78e 1527 - Video Comment
1569a818 1528 parameters:
cb9d028a 1529 - $ref: '#/components/parameters/idOrUUID'
3e9e6f2f 1530 - $ref: '#/components/parameters/commentId'
1569a818
DG
1531 responses:
1532 '204':
3e9e6f2f
RK
1533 $ref: '#/paths/~1users~1me/put/responses/204'
1534 '/videos/{id}/rate':
1569a818 1535 put:
2963c343 1536 summary: Vote for a video by its id
94ff4c23 1537 security:
3e9e6f2f 1538 - OAuth2: []
1569a818 1539 tags:
5776f78e 1540 - Video Rate
1569a818 1541 parameters:
cb9d028a 1542 - $ref: '#/components/parameters/idOrUUID'
1569a818
DG
1543 responses:
1544 '204':
3e9e6f2f 1545 $ref: '#/paths/~1users~1me/put/responses/204'
fb72c193
DL
1546 /search/videos:
1547 get:
1548 tags:
1549 - Search
2963c343 1550 summary: Get the videos corresponding to a given query
fb72c193 1551 parameters:
3e9e6f2f
RK
1552 - $ref: '#/components/parameters/start'
1553 - $ref: '#/components/parameters/count'
fd5af7a2 1554 - $ref: '#/components/parameters/videosSearchSort'
655b5490 1555 - name: search
fb72c193
DL
1556 in: query
1557 required: true
3e9e6f2f
RK
1558 description: String to search
1559 schema:
1560 type: string
fb72c193
DL
1561 responses:
1562 '200':
1563 description: successful operation
3e9e6f2f
RK
1564 content:
1565 application/json:
1566 schema:
048b6946 1567 $ref: '#/components/schemas/VideoListResponse'
3e9e6f2f 1568servers:
6441981b
RK
1569 - url: 'https://peertube.cpy.re/api/v1'
1570 description: Live Test Server (live data - stable version)
8f9e8be1 1571 - url: 'https://peertube2.cpy.re/api/v1'
6441981b
RK
1572 description: Live Test Server (live data - bleeding edge version)
1573 - url: 'https://peertube3.cpy.re/api/v1'
1574 description: Live Test Server (live data - bleeding edge version)
3e9e6f2f
RK
1575components:
1576 parameters:
1577 start:
1578 name: start
1579 in: query
1580 required: false
1581 description: Offset
1582 schema:
1569a818 1583 type: number
3e9e6f2f
RK
1584 count:
1585 name: count
1586 in: query
1587 required: false
1588 description: Number of items
1589 schema:
1569a818 1590 type: number
3e9e6f2f
RK
1591 sort:
1592 name: sort
1593 in: query
1594 required: false
1595 description: Sort column (-createdAt for example)
1596 schema:
1597 type: string
fd5af7a2
RK
1598 videosSort:
1599 name: sort
1600 in: query
1601 required: false
1602 description: Sort videos by criteria
1603 schema:
1604 type: string
1605 enum:
1606 - -name
1607 - -duration
1608 - -createdAt
1609 - -publishedAt
1610 - -views
1611 - -likes
1612 - -trending
1613 videosSearchSort:
1614 name: sort
1615 in: query
1616 required: false
1617 description: Sort videos by criteria
1618 schema:
1619 type: string
1620 enum:
1621 - -name
1622 - -duration
1623 - -createdAt
1624 - -publishedAt
1625 - -views
1626 - -likes
1627 - -match
1628 blacklistsSort:
1629 name: sort
1630 in: query
1631 required: false
1632 description: Sort blacklists by criteria
1633 schema:
1634 type: string
1635 enum:
1636 - -id
1637 - -name
1638 - -duration
1639 - -views
1640 - -likes
1641 - -dislikes
1642 - -uuid
1643 - -createdAt
1644 usersSort:
1645 name: sort
1646 in: query
1647 required: false
1648 description: Sort users by criteria
1649 schema:
1650 type: string
1651 enum:
1652 - -id
1653 - -username
1654 - -createdAt
1655 abusesSort:
1656 name: sort
1657 in: query
1658 required: false
1659 description: Sort abuses by criteria
1660 schema:
1661 type: string
1662 enum:
1663 - -id
1664 - -createdAt
1665 - -state
3e9e6f2f
RK
1666 name:
1667 name: name
1668 in: path
1669 required: true
1670 description: >-
1671 The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
1672 example)
1673 schema:
1674 type: string
1675 id:
1676 name: id
1677 in: path
1678 required: true
1679 description: The user id
1680 schema:
1569a818 1681 type: number
cb9d028a 1682 idOrUUID:
3e9e6f2f
RK
1683 name: id
1684 in: path
1685 required: true
1686 description: The video id or uuid
1687 schema:
1688 type: string
67ae04a5
C
1689 captionLanguage:
1690 name: captionLanguage
1691 in: path
1692 required: true
1693 description: The caption language
1694 schema:
1695 type: string
9ce3d302
C
1696 channelHandle:
1697 name: channelHandle
3e9e6f2f
RK
1698 in: path
1699 required: true
9ce3d302 1700 description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
3e9e6f2f
RK
1701 schema:
1702 type: string
cb9d028a
C
1703 subscriptionHandle:
1704 name: subscriptionHandle
1705 in: path
1706 required: true
1707 description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
1708 schema:
1709 type: string
1710 threadId:
3e9e6f2f
RK
1711 name: threadId
1712 in: path
1713 required: true
cb9d028a
C
1714 description: The thread id (root comment id)
1715 schema:
1716 type: number
1717 commentId:
1718 name: commentId
1719 in: path
1720 required: true
3e9e6f2f
RK
1721 description: The comment id
1722 schema:
c360c494 1723 type: number
fd5af7a2
RK
1724 categoryOneOf:
1725 name: categoryOneOf
1726 in: query
1727 required: false
1728 description: category id of the video
1729 schema:
1730 oneOf:
1731 - type: number
1732 - type: array
1733 items:
1734 type: number
2beb9895
RK
1735 style: form
1736 explode: false
fd5af7a2
RK
1737 tagsOneOf:
1738 name: tagsOneOf
1739 in: query
1740 required: false
1741 description: tag(s) of the video
1742 schema:
1743 oneOf:
1744 - type: string
1745 - type: array
1746 items:
1747 type: string
2beb9895
RK
1748 style: form
1749 explode: false
fd5af7a2
RK
1750 tagsAllOf:
1751 name: tagsAllOf
1752 in: query
1753 required: false
1754 description: tag(s) of the video, where all should be present in the video
1755 schema:
1756 oneOf:
1757 - type: string
1758 - type: array
1759 items:
1760 type: string
2beb9895
RK
1761 style: form
1762 explode: false
fd5af7a2
RK
1763 languageOneOf:
1764 name: languageOneOf
1765 in: query
1766 required: false
1767 description: language id of the video
1768 schema:
1769 oneOf:
2beb9895 1770 - type: string
fd5af7a2
RK
1771 - type: array
1772 items:
2beb9895
RK
1773 type: string
1774 style: form
1775 explode: false
fd5af7a2
RK
1776 licenceOneOf:
1777 name: licenceOneOf
1778 in: query
1779 required: false
1780 description: licence id of the video
1781 schema:
1782 oneOf:
1783 - type: number
1784 - type: array
1785 items:
1786 type: number
2beb9895
RK
1787 style: form
1788 explode: false
fd5af7a2
RK
1789 nsfw:
1790 name: nsfw
1791 in: query
1792 required: false
1793 description: whether to include nsfw videos, if any
1794 schema:
1795 type: string
1796 enum:
1797 - 'true'
1798 - 'false'
1799 filter:
1800 name: filter
1801 in: query
1802 required: false
1803 description: >
1804 Special filters (local for instance) which might require special rights:
1805 * `local` - only videos local to the instance
1806 * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
1807 schema:
1808 type: string
1809 enum:
1810 - local
1811 - all-local
e76d5784
RK
1812 subscriptionsUris:
1813 name: uris
1814 in: query
1815 required: true
1816 description: list of uris to check if each is part of the user subscriptions
1817 schema:
1818 type: array
1819 items:
1820 type: string
3e9e6f2f
RK
1821 securitySchemes:
1822 OAuth2:
1823 description: >
1824 In the header: *Authorization: Bearer <token\>*
1825
1826
1827 Authenticating via OAuth requires the following steps:
1828
1829
1830 - Have an account with sufficient authorization levels
1831
46e9407c 1832 - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
3e9e6f2f
RK
1833 Bearer Token
1834
1835 - Make Authenticated Requests
1836 type: oauth2
1837 flows:
1838 password:
1839 tokenUrl: 'https://peertube.example.com/api/v1/users/token'
1840 scopes:
1841 admin: Admin scope
1842 moderator: Moderator scope
1843 user: User scope
1844 schemas:
1845 VideoConstantNumber:
1846 properties:
1847 id:
1848 type: number
1849 label:
1850 type: string
1851 VideoConstantString:
1852 properties:
1853 id:
1854 type: string
1855 label:
1856 type: string
ee89e8fd
C
1857 VideoPrivacySet:
1858 type: integer
3e9e6f2f 1859 enum:
ee89e8fd
C
1860 - 1
1861 - 2
1862 - 3
1863 description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3)'
1864 VideoPrivacyConstant:
1865 properties:
1866 id:
1867 type: integer
1868 enum:
1869 - 1
1870 - 2
1871 - 3
1872 label:
1873 type: string
5dce26d2
C
1874 VideoStateConstant:
1875 properties:
1876 id:
1877 type: integer
1878 enum:
1879 - 1
1880 - 2
1881 - 3
1882 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
1883 label:
1884 type: string
1885 VideoResolutionConstant:
1886 properties:
1887 id:
1888 type: integer
1889 description: 'Video resolution (240, 360, 720 ...)'
1890 label:
1891 type: string
1892 VideoScheduledUpdate:
1893 properties:
1894 privacy:
1895 $ref: '#/components/schemas/VideoPrivacySet'
1896 description: Video privacy target
1897 updateAt:
1898 type: string
1899 format: date
1900 description: When to update the video
1901 required:
1902 - updateAt
1903 VideoAccountSummary:
1904 properties:
1905 id:
1906 type: number
1907 name:
1908 type: string
1909 displayName:
1910 type: string
1911 url:
1912 type: string
1913 host:
1914 type: string
1915 avatar:
1916 nullable: true
1917 $ref: '#/components/schemas/Avatar'
1918 VideoChannelSummary:
1919 properties:
1920 id:
1921 type: number
1922 name:
1923 type: string
1924 displayName:
1925 type: string
1926 url:
1927 type: string
1928 host:
1929 type: string
1930 avatar:
1931 nullable: true
1932 $ref: '#/components/schemas/Avatar'
1933 PlaylistElement:
1934 properties:
1935 position:
1936 type: number
1937 startTimestamp:
1938 type: number
1939 stopTimestamp:
1940 type: number
bfbd9128
C
1941 video:
1942 nullable: true
1943 $ref: '#/components/schemas/Video'
5dce26d2
C
1944 VideoFile:
1945 properties:
1946 magnetUri:
1947 type: string
1948 resolution:
1949 $ref: '#/components/schemas/VideoResolutionConstant'
1950 size:
1951 type: number
1952 description: 'Video file size in bytes'
1953 torrentUrl:
1954 type: string
1955 torrentDownaloadUrl:
1956 type: string
1957 fileUrl:
1958 type: string
1959 fileDownloadUrl:
1960 type: string
1961 fps:
1962 type: number
1963 VideoStreamingPlaylists:
1964 properties:
1965 id:
1966 type: number
1967 type:
1968 type: number
1969 enum:
1970 - 1
1971 description: 'Playlist type (HLS = 1)'
1972 playlistUrl:
1973 type: string
1974 segmentsSha256Url:
1975 type: string
1976 redundancies:
1977 type: array
1978 items:
1979 type: object
1980 properties:
1981 baseUrl:
1982 type: string
3e9e6f2f
RK
1983 Video:
1984 properties:
1985 id:
1986 type: number
1987 uuid:
1988 type: string
1989 createdAt:
1990 type: string
1991 publishedAt:
1992 type: string
1993 updatedAt:
1994 type: string
5dce26d2
C
1995 originallyPublishedAt:
1996 type: string
3e9e6f2f
RK
1997 category:
1998 $ref: '#/components/schemas/VideoConstantNumber'
1999 licence:
2000 $ref: '#/components/schemas/VideoConstantNumber'
2001 language:
2002 $ref: '#/components/schemas/VideoConstantString'
2003 privacy:
ee89e8fd 2004 $ref: '#/components/schemas/VideoPrivacyConstant'
3e9e6f2f
RK
2005 description:
2006 type: string
2007 duration:
2008 type: number
2009 isLocal:
2010 type: boolean
2011 name:
2012 type: string
2013 thumbnailPath:
2014 type: string
2015 previewPath:
2016 type: string
2017 embedPath:
2018 type: string
2019 views:
2020 type: number
2021 likes:
2022 type: number
2023 dislikes:
2024 type: number
2025 nsfw:
2026 type: boolean
5dce26d2
C
2027 waitTranscoding:
2028 type: boolean
2029 nullable: true
2030 state:
2031 $ref: '#/components/schemas/VideoStateConstant'
2032 scheduledUpdate:
2033 nullable: true
2034 $ref: '#/components/schemas/VideoScheduledUpdate'
2035 blacklisted:
2036 nullable: true
2037 type: boolean
2038 blacklistedReason:
2039 nullable: true
2040 type: string
3e9e6f2f 2041 account:
5dce26d2
C
2042 $ref: '#/components/schemas/VideoAccountSummary'
2043 channel:
2044 $ref: '#/components/schemas/VideoChannelSummary'
2045 userHistory:
2046 nullable: true
3e9e6f2f
RK
2047 type: object
2048 properties:
5dce26d2
C
2049 currentTime:
2050 type: number
5dce26d2
C
2051 VideoDetails:
2052 allOf:
2053 - $ref: '#/components/schemas/Video'
2054 - type: object
2055 properties:
2056 descriptionPath:
3e9e6f2f 2057 type: string
5dce26d2 2058 support:
3e9e6f2f 2059 type: string
5dce26d2
C
2060 channel:
2061 $ref: '#/components/schemas/VideoChannel'
2062 account:
2063 $ref: '#/components/schemas/Account'
2064 tags:
2065 type: array
2066 items:
2067 type: string
2068 files:
2069 type: array
2070 items:
2071 $ref: '#/components/schemas/VideoFile'
2072 commentsEnabled:
2073 type: boolean
2074 downloadEnabled:
2075 type: boolean
2076 trackerUrls:
2077 type: array
2078 items:
2079 type: string
2080 streamingPlaylists:
2081 type: array
2082 items:
2083 $ref: '#/components/schemas/VideoStreamingPlaylists'
1f82e3e8
C
2084 VideoImportStateConstant:
2085 properties:
2086 id:
2087 type: integer
2088 enum:
2089 - 1
2090 - 2
2091 - 3
2092 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2093 label:
2094 type: string
2095 VideoImport:
2096 properties:
2097 id:
2098 type: number
2099 targetUrl:
2100 type: string
2101 magnetUri:
2102 type: string
2103 torrentName:
2104 type: string
2105 state:
2106 type: object
2107 properties:
2108 id:
2109 $ref: '#/components/schemas/VideoImportStateConstant'
2110 label:
2111 type: string
2112 error:
2113 type: string
2114 createdAt:
2115 type: string
2116 updatedAt:
2117 type: string
2118 video:
2119 $ref: '#/components/schemas/Video'
3e9e6f2f
RK
2120 VideoAbuse:
2121 properties:
2122 id:
2123 type: number
2124 reason:
2125 type: string
2126 reporterAccount:
2127 $ref: '#/components/schemas/Account'
2128 video:
2129 type: object
2130 properties:
2131 id:
2132 type: number
2133 name:
2134 type: string
2135 uuid:
2136 type: string
2137 url:
2138 type: string
2139 createdAt:
2140 type: string
2141 VideoBlacklist:
2142 properties:
2143 id:
2144 type: number
2145 videoId:
2146 type: number
2147 createdAt:
2148 type: string
2149 updatedAt:
2150 type: string
2151 name:
2152 type: string
2153 uuid:
2154 type: string
2155 description:
2156 type: string
2157 duration:
2158 type: number
2159 views:
2160 type: number
2161 likes:
2162 type: number
2163 dislikes:
2164 type: number
2165 nsfw:
2166 type: boolean
2167 VideoChannel:
2168 properties:
2169 displayName:
2170 type: string
2171 description:
2172 type: string
2173 isLocal:
2174 type: boolean
2175 ownerAccount:
2176 type: object
2177 properties:
2178 id:
2179 type: number
2180 uuid:
2181 type: string
2182 VideoComment:
2183 properties:
2184 id:
2185 type: number
2186 url:
2187 type: string
2188 text:
2189 type: string
2190 threadId:
2191 type: number
2192 inReplyToCommentId:
2193 type: number
2194 videoId:
2195 type: number
2196 createdAt:
2197 type: string
2198 updatedAt:
2199 type: string
2200 totalReplies:
2201 type: number
2202 account:
2203 $ref: '#/components/schemas/Account'
2204 VideoCommentThreadTree:
2205 properties:
2206 comment:
2207 $ref: '#/components/schemas/VideoComment'
2208 children:
2209 type: array
2210 items:
2211 $ref: '#/components/schemas/VideoCommentThreadTree'
67ae04a5
C
2212 VideoCaption:
2213 properties:
2214 language:
2215 $ref: '#/components/schemas/VideoConstantString'
2216 captionPath:
2217 type: string
3e9e6f2f
RK
2218 Avatar:
2219 properties:
2220 path:
2221 type: string
2222 createdAt:
2223 type: string
2224 updatedAt:
2225 type: string
2226 Actor:
2227 properties:
2228 id:
2229 type: number
2230 uuid:
2231 type: string
2232 url:
2233 type: string
2234 name:
2235 type: string
2236 host:
2237 type: string
2238 followingCount:
2239 type: number
2240 followersCount:
2241 type: number
2242 createdAt:
2243 type: string
2244 updatedAt:
2245 type: string
2246 avatar:
2247 $ref: '#/components/schemas/Avatar'
2248 Account:
2249 allOf:
2250 - $ref: '#/components/schemas/Actor'
2251 - properties:
2252 displayName:
2253 type: string
2254 User:
2255 properties:
2256 id:
2257 type: number
2258 username:
2259 type: string
2260 email:
2261 type: string
2262 displayNSFW:
2263 type: boolean
2264 autoPlayVideo:
2265 type: boolean
2266 role:
63d17405
C
2267 type: integer
2268 enum:
2269 - 0
2270 - 1
2271 - 2
2272 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
2273 roleLabel:
3e9e6f2f
RK
2274 type: string
2275 enum:
2276 - User
2277 - Moderator
2278 - Administrator
2279 videoQuota:
2280 type: number
ff40a4eb 2281 videoQuotaDaily:
fbe1bc2a 2282 type: number
3e9e6f2f
RK
2283 createdAt:
2284 type: string
2285 account:
2286 $ref: '#/components/schemas/Account'
2287 videoChannels:
2288 type: array
2289 items:
2290 $ref: '#/components/schemas/VideoChannel'
6441981b
RK
2291 UserWatchingVideo:
2292 properties:
2293 currentTime:
2294 type: number
3e9e6f2f
RK
2295 ServerConfig:
2296 properties:
2297 signup:
2298 type: object
2299 properties:
2300 allowed:
2301 type: boolean
2302 transcoding:
2303 type: object
2304 properties:
2305 enabledResolutions:
2306 type: array
2307 items:
2308 type: number
2309 avatar:
2310 type: object
2311 properties:
2312 file:
2313 type: object
2314 properties:
2315 size:
2316 type: object
2317 properties:
2318 max:
2319 type: number
2320 extensions:
2321 type: array
2322 items:
2323 type: string
2324 video:
2325 type: object
2326 properties:
2327 file:
2328 type: object
2329 properties:
2330 extensions:
2331 type: array
2332 items:
2333 type: string
2334 Follow:
2335 properties:
2336 id:
2337 type: number
2338 follower:
2339 $ref: '#/components/schemas/Actor'
2340 following:
2341 $ref: '#/components/schemas/Actor'
2342 score:
2343 type: number
2344 state:
2345 type: string
2346 enum:
2347 - pending
2348 - accepted
2349 createdAt:
2350 type: string
2351 updatedAt:
2352 type: string
2353 Job:
2354 properties:
2355 id:
2356 type: number
2357 state:
2358 type: string
2359 enum:
2360 - pending
2361 - processing
2362 - error
2363 - success
2364 category:
2365 type: string
2366 enum:
2367 - transcoding
2368 - activitypub-http
2369 handlerName:
2370 type: string
2371 handlerInputData:
2372 type: string
2373 createdAt:
2374 type: string
2375 updatedAt:
2376 type: string
2377 AddUserResponse:
2378 properties:
2379 id:
2380 type: number
2381 uuid:
2382 type: string
2383 VideoUploadResponse:
2384 properties:
2385 video:
2386 type: object
2387 properties:
2388 id:
2389 type: number
2390 uuid:
2391 type: string
2392 CommentThreadResponse:
2393 properties:
2394 total:
2395 type: number
2396 data:
2397 type: array
2398 items:
2399 $ref: '#/components/schemas/VideoComment'
2400 CommentThreadPostResponse:
2401 properties:
2402 comment:
2403 $ref: '#/components/schemas/VideoComment'
048b6946
C
2404 VideoListResponse:
2405 properties:
2406 total:
2407 type: number
2408 data:
2409 type: array
2410 items:
2411 $ref: '#/components/schemas/Video'
3e9e6f2f
RK
2412 AddUser:
2413 properties:
2414 username:
2415 type: string
2416 description: 'The user username '
2417 password:
2418 type: string
2419 description: 'The user password '
2420 email:
2421 type: string
2422 description: 'The user email '
2423 videoQuota:
2424 type: string
2425 description: 'The user videoQuota '
fbe1bc2a
C
2426 videoQuotaDaily:
2427 type: string
2428 description: 'The user daily video quota '
3e9e6f2f 2429 role:
0f490230 2430 type: integer
0f490230
RK
2431 enum:
2432 - 0
2433 - 1
2434 - 2
63d17405 2435 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3e9e6f2f
RK
2436 required:
2437 - username
2438 - password
2439 - email
2440 - videoQuota
fbe1bc2a 2441 - videoQuotaDaily
3e9e6f2f
RK
2442 - role
2443 UpdateUser:
2444 properties:
2445 id:
2446 type: string
2447 description: 'The user id '
2448 email:
2449 type: string
2450 description: 'The updated email of the user '
2451 videoQuota:
2452 type: string
2453 description: 'The updated videoQuota of the user '
fbe1bc2a
C
2454 videoQuotaDaily:
2455 type: string
2456 description: 'The updated daily video quota of the user '
3e9e6f2f 2457 role:
63d17405
C
2458 type: integer
2459 enum:
2460 - 0
2461 - 1
2462 - 2
2463 description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
3e9e6f2f
RK
2464 required:
2465 - id
2466 - email
2467 - videoQuota
fbe1bc2a 2468 - videoQuotaDaily
3e9e6f2f
RK
2469 - role
2470 UpdateMe:
2471 properties:
2472 password:
2473 type: string
2474 description: 'Your new password '
2475 email:
2476 type: string
2477 description: 'Your new email '
2478 displayNSFW:
2479 type: string
2480 description: 'Your new displayNSFW '
2481 autoPlayVideo:
2482 type: string
2483 description: 'Your new autoPlayVideo '
2484 required:
2485 - password
2486 - email
2487 - displayNSFW
2488 - autoPlayVideo
2489 GetMeVideoRating:
2490 properties:
2491 id:
2492 type: string
2493 description: 'Id of the video '
2494 rating:
2495 type: number
2496 description: 'Rating of the video '
2497 required:
2498 - id
2499 - rating
c100a614
YB
2500 VideoRating:
2501 properties:
2502 video:
2503 $ref: '#/components/schemas/Video'
2504 rating:
2505 type: number
2506 description: 'Rating of the video'
2507 required:
2508 - video
2509 - rating
3e9e6f2f
RK
2510 RegisterUser:
2511 properties:
2512 username:
2513 type: string
2514 description: 'The username of the user '
2515 password:
2516 type: string
2517 description: 'The password of the user '
2518 email:
2519 type: string
2520 description: 'The email of the user '
1f20622f
C
2521 displayName:
2522 type: string
2523 description: 'The user display name'
2524 channel:
2525 type: object
2526 properties:
2527 name:
2528 type: string
2529 description: 'The default channel name'
2530 displayName:
2531 type: string
2532 description: 'The default channel display name'
2533
3e9e6f2f
RK
2534 required:
2535 - username
2536 - password
2537 - email
7d14d4d2 2538 VideoChannelCreate:
3e9e6f2f
RK
2539 properties:
2540 name:
2541 type: string
7d14d4d2
C
2542 displayName:
2543 type: string
3e9e6f2f
RK
2544 description:
2545 type: string
7d14d4d2
C
2546 support:
2547 type: string
2548 required:
2549 - name
2550 - displayName
2551 VideoChannelUpdate:
2552 properties:
2553 displayName:
2554 type: string
2555 description:
2556 type: string
2557 support:
2558 type: string
2559 bulkVideosSupportUpdate:
2560 type: boolean
2561 description: 'Update all videos support field of this channel'
1569a818 2562