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