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