]>
Commit | Line | Data |
---|---|---|
3e9e6f2f | 1 | openapi: 3.0.0 |
1569a818 | 2 | info: |
5e1c08eb | 3 | title: PeerTube |
3e5716dd | 4 | version: 5.1.0 |
2963c343 RK |
5 | contact: |
6 | name: PeerTube Community | |
e2464d22 | 7 | url: https://joinpeertube.org |
2963c343 RK |
8 | license: |
9 | name: AGPLv3.0 | |
e2464d22 | 10 | url: https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE |
2963c343 | 11 | x-logo: |
e2464d22 | 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 | 24 | See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few |
e2adb8cb | 25 | examples of using the PeerTube API. |
b029d58a | 26 | |
2963c343 | 27 | # Authentication |
002df381 | 28 | |
3c5e02f3 | 29 | When you sign up for an account on a PeerTube instance, you are given the possibility |
e2464d22 RK |
30 | to generate sessions on it, and authenticate there using an access token. Only __one |
31 | access 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 | 40 | The API uses standard HTTP status codes to indicate the success or failure |
76148b27 | 41 | of the API call, completed by a [RFC7807-compliant](https://tools.ietf.org/html/rfc7807) response body. |
5776f78e RK |
42 | |
43 | ``` | |
b036eb05 | 44 | HTTP 1.1 404 Not Found |
76148b27 | 45 | Content-Type: application/problem+json; charset=utf-8 |
b036eb05 | 46 | |
5776f78e | 47 | { |
76148b27 | 48 | "detail": "Video not found", |
1cfbdd30 | 49 | "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo", |
76148b27 RK |
50 | "status": 404, |
51 | "title": "Not Found", | |
52 | "type": "about:blank" | |
de3876b8 RK |
53 | } |
54 | ``` | |
55 | ||
81628e50 RK |
56 | We provide error `type` values for [a growing number of cases](https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/server/server-error-code.enum.ts), |
57 | but it is still optional. Types are used to disambiguate errors that bear the same status code | |
58 | and are non-obvious: | |
59 | ||
60 | ``` | |
61 | HTTP 1.1 403 Forbidden | |
62 | Content-Type: application/problem+json; charset=utf-8 | |
63 | ||
64 | { | |
65 | "detail": "Cannot get this video regarding follow constraints", | |
66 | "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo", | |
67 | "status": 403, | |
68 | "title": "Forbidden", | |
69 | "type": "https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/does_not_respect_follow_constraints" | |
70 | } | |
71 | ``` | |
72 | ||
73 | Here a 403 error could otherwise mean that the video is private or blocklisted. | |
b036eb05 RK |
74 | |
75 | ### Validation errors | |
76 | ||
77 | Each parameter is evaluated on its own against a set of rules before the route validator | |
76148b27 | 78 | proceeds with potential testing involving parameter combinations. Errors coming from validation |
81628e50 | 79 | errors appear earlier and benefit from a more detailed error description: |
9a320a06 | 80 | |
de3876b8 | 81 | ``` |
b036eb05 | 82 | HTTP 1.1 400 Bad Request |
76148b27 | 83 | Content-Type: application/problem+json; charset=utf-8 |
b036eb05 | 84 | |
de3876b8 | 85 | { |
76148b27 | 86 | "detail": "Incorrect request parameters: id", |
1cfbdd30 | 87 | "docs": "https://docs.joinpeertube.org/api-rest-reference.html#operation/getVideo", |
76148b27 RK |
88 | "instance": "/api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180", |
89 | "invalid-params": { | |
3f71c4c0 | 90 | "id": { |
76148b27 RK |
91 | "location": "params", |
92 | "msg": "Invalid value", | |
de3876b8 | 93 | "param": "id", |
76148b27 | 94 | "value": "9c9de5e8-0a1e-484a-b099-e80766180" |
de3876b8 | 95 | } |
76148b27 RK |
96 | }, |
97 | "status": 400, | |
98 | "title": "Bad Request", | |
99 | "type": "about:blank" | |
5776f78e RK |
100 | } |
101 | ``` | |
3c5e02f3 | 102 | |
b036eb05 | 103 | Where `id` is the name of the field concerned by the error, within the route definition. |
76148b27 RK |
104 | `invalid-params.<field>.location` can be either 'params', 'body', 'header', 'query' or 'cookies', and |
105 | `invalid-params.<field>.value` reports the value that didn't pass validation whose `invalid-params.<field>.msg` | |
b036eb05 RK |
106 | is about. |
107 | ||
81628e50 RK |
108 | ### Deprecated error fields |
109 | ||
110 | Some fields could be included with previous versions. They are still included but their use is deprecated: | |
111 | - `error`: superseded by `detail` | |
112 | - `code`: superseded by `type` (which is now an URI) | |
113 | ||
3c5e02f3 RK |
114 | # Rate limits |
115 | ||
30b40713 | 116 | We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators: |
3c5e02f3 | 117 | |
0ae3ebb0 RK |
118 | | Endpoint (prefix: `/api/v1`) | Calls | Time frame | |
119 | |------------------------------|---------------|--------------| | |
120 | | `/*` | 50 | 10 seconds | | |
121 | | `POST /users/token` | 15 | 5 minutes | | |
122 | | `POST /users/register` | 2<sup>*</sup> | 5 minutes | | |
123 | | `POST /users/ask-send-verify-email` | 3 | 5 minutes | | |
3c5e02f3 | 124 | |
bf3c3fea | 125 | Depending on the endpoint, <sup>*</sup>failed requests are not taken into account. A service |
3c5e02f3 RK |
126 | limit is announced by a `429 Too Many Requests` status code. |
127 | ||
52fe9526 RK |
128 | You can get details about the current state of your rate limit by reading the |
129 | following headers: | |
3c5e02f3 RK |
130 | |
131 | | Header | Description | | |
132 | |-------------------------|------------------------------------------------------------| | |
9a320a06 RK |
133 | | `X-RateLimit-Limit` | Number of max requests allowed in the current time period | |
134 | | `X-RateLimit-Remaining` | Number of remaining requests in the current time period | | |
135 | | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp | | |
136 | | `Retry-After` | Seconds to delay after the first `429` is received | | |
0ae3ebb0 RK |
137 | |
138 | # CORS | |
139 | ||
140 | This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/), | |
141 | allowing cross-domain communication from the browser for some routes: | |
85a60d8b | 142 | |
e2464d22 RK |
143 | | Endpoint | |
144 | |------------------------- ---| | |
145 | | `/api/*` | | |
146 | | `/download/*` | | |
147 | | `/lazy-static/*` | | |
e2464d22 | 148 | | `/.well-known/webfinger` | |
0ae3ebb0 RK |
149 | |
150 | In addition, all routes serving ActivityPub are CORS-enabled for all origins. | |
6441981b | 151 | externalDocs: |
512a5759 | 152 | url: https://docs.joinpeertube.org/api-rest-reference.html |
2963c343 | 153 | tags: |
e2464d22 RK |
154 | - name: Register |
155 | description: | | |
156 | As a visitor, you can use this API to open an account (if registrations are open on | |
85a60d8b | 157 | that PeerTube instance). As an admin, you should use the dedicated [User creation |
e2adb8cb | 158 | API](#operation/addUser) instead. |
e2464d22 RK |
159 | - name: Session |
160 | x-displayName: Login/Logout | |
161 | description: | | |
162 | Sessions deal with access tokens over time. Only __one session token can currently be used at a time__. | |
2963c343 | 163 | - name: Accounts |
3e9e6f2f | 164 | description: > |
1e904cde | 165 | Accounts encompass remote accounts discovered across the federation, |
84f6e32c RK |
166 | and correspond to the main Actor, along with video channels a user can create, which |
167 | are also Actors. | |
168 | ||
169 | When a comment is posted, it is done with your Account's Actor. | |
170 | - name: Users | |
171 | description: > | |
172 | Using some features of PeerTube require authentication, for which User | |
3e9e6f2f | 173 | provide different levels of permission as well as associated user |
84f6e32c RK |
174 | information. Each user has a corresponding local Account for federation. |
175 | - name: My User | |
176 | description: > | |
177 | Operations related to your own User, when logged-in. | |
178 | - name: My Subscriptions | |
179 | description: > | |
180 | Operations related to your subscriptions to video channels, their | |
181 | new videos, and how to keep up to date with their latest publications! | |
3520d385 A |
182 | - name: My History |
183 | description: > | |
bb4ba6d9 | 184 | Operations related to your watch history. |
84f6e32c RK |
185 | - name: My Notifications |
186 | description: > | |
187 | Notifications following new videos, follows or reports. They allow you | |
188 | to keep track of the interactions and overall important information that | |
189 | concerns you. You MAY set per-notification type delivery preference, to | |
190 | receive the info either by mail, by in-browser notification or both. | |
2963c343 | 191 | - name: Config |
3e9e6f2f RK |
192 | description: > |
193 | Each server exposes public information regarding supported videos and | |
194 | options. | |
2963c343 | 195 | - name: Job |
3e9e6f2f RK |
196 | description: > |
197 | Jobs are long-running tasks enqueued and processed by the instance | |
5776f78e | 198 | itself. No additional worker registration is currently available. |
b029d58a | 199 | - name: Instance Follows |
3e9e6f2f RK |
200 | description: > |
201 | Managing servers which the instance interacts with is crucial to the | |
5776f78e | 202 | concept of federation in PeerTube and external video indexation. The PeerTube |
1fd12c7c | 203 | server then deals with inter-server ActivityPub operations and propagates |
2963c343 RK |
204 | information across its social graph by posting activities to actors' inbox |
205 | endpoints. | |
84f6e32c | 206 | externalDocs: |
9817060f | 207 | url: https://docs.joinpeertube.org/admin-following-instances?id=instances-follows |
04b703f6 RK |
208 | - name: Instance Redundancy |
209 | description: > | |
210 | Redundancy is part of the inter-server solidarity that PeerTube fosters. | |
211 | Manage the list of instances you wish to help by seeding their videos according | |
212 | to the policy of video selection of your choice. Note that you have a similar functionality | |
f6d6e7f8 | 213 | to mirror individual videos, see [video mirroring](#tag/Video-Mirroring). |
84f6e32c | 214 | externalDocs: |
9817060f | 215 | url: https://docs.joinpeertube.org/admin-following-instances?id=instances-redundancy |
7461d440 RK |
216 | - name: Plugins |
217 | description: > | |
84f6e32c RK |
218 | Managing plugins installed from a local path or from NPM, or search for new ones. |
219 | externalDocs: | |
9817060f | 220 | url: https://docs.joinpeertube.org/api-plugins |
310b5219 | 221 | - name: Abuses |
2963c343 | 222 | description: | |
310b5219 | 223 | Abuses deal with reports of local or remote videos/comments/accounts alike. |
2963c343 RK |
224 | - name: Video |
225 | description: | | |
226 | Operations dealing with listing, uploading, fetching or modifying videos. | |
f6d6e7f8 | 227 | - name: Video Upload |
228 | description: | | |
229 | Operations dealing with adding video or audio. PeerTube supports two upload modes, and three import modes. | |
230 | ||
231 | ### Upload | |
232 | ||
40cfb36b RK |
233 | - [_legacy_](#operation/uploadLegacy), where the video file is sent in a single request |
234 | - [_resumable_](#operation/uploadResumableInit), where the video file is sent in chunks | |
f6d6e7f8 | 235 | |
236 | You can upload videos more reliably by using the resumable variant. Its protocol lets | |
237 | you resume an upload operation after a network interruption or other transmission failure, | |
238 | saving time and bandwidth in the event of network failures. | |
239 | ||
240 | Favor using resumable uploads in any of the following cases: | |
241 | - You are transferring large files | |
242 | - The likelihood of a network interruption is high | |
243 | - Uploads are originating from a device with a low-bandwidth or unstable Internet connection, | |
244 | such as a mobile device | |
245 | ||
246 | ### Import | |
247 | ||
248 | - _URL_-based: where the URL points to any service supported by [youtube-dl](https://ytdl-org.github.io/youtube-dl/) | |
7a4fd56c | 249 | - _magnet_-based: where the URI resolves to a BitTorrent resource containing a single supported video file |
250 | - _torrent_-based: where the metainfo file resolves to a BitTorrent resource containing a single supported video file | |
f6d6e7f8 | 251 | |
252 | The import function is practical when the desired video/audio is available online. It makes PeerTube | |
253 | download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have. | |
419b520c C |
254 | - name: Video Imports |
255 | description: Operations dealing with listing, adding and removing video imports. | |
2a491182 F |
256 | - name: Channels Sync |
257 | description: Operations dealing with synchronizing PeerTube user's channel with channels of other platforms | |
f6d6e7f8 | 258 | - name: Video Captions |
259 | description: Operations dealing with listing, adding and removing closed captions of a video. | |
260 | - name: Video Channels | |
261 | description: Operations dealing with the creation, modification and listing of videos within a channel. | |
262 | - name: Video Comments | |
263 | description: > | |
264 | Operations dealing with comments to a video. Comments are organized in threads: adding a | |
265 | comment in response to the video starts a thread, adding a reply to a comment adds it to | |
266 | its root comment thread. | |
267 | - name: Video Blocks | |
268 | description: Operations dealing with blocking videos (removing them from view and preventing interactions). | |
269 | - name: Video Rates | |
270 | description: Like/dislike a video. | |
271 | - name: Video Playlists | |
272 | description: Operations dealing with playlists of videos. Playlists are bound to users and/or channels. | |
ad5db104 C |
273 | - name: Video Files |
274 | description: Operations on video files | |
275 | - name: Video Transcoding | |
276 | description: Video transcoding related operations | |
cf158e7e C |
277 | - name: Video stats |
278 | description: Video statistics | |
3545e72c C |
279 | - name: Video Feeds |
280 | description: Server syndication feeds of videos | |
2963c343 RK |
281 | - name: Search |
282 | description: | | |
ad031145 | 283 | The search helps to find _videos_ or _channels_ from within the instance and beyond. |
2963c343 RK |
284 | Videos from other instances federated by the instance (that is, instances |
285 | followed by the instance) can be found via keywords and other criteria of | |
286 | the advanced search. | |
ad031145 C |
287 | |
288 | Administrators can also enable the use of a remote search system, indexing | |
289 | videos and channels not could be not federated by the instance. | |
2539932e C |
290 | - name: Homepage |
291 | description: Get and update the custom homepage | |
f6d6e7f8 | 292 | - name: Video Mirroring |
293 | description: | | |
294 | PeerTube instances can mirror videos from one another, and help distribute some videos. | |
295 | ||
b8375da9 | 296 | For importing videos as your own, refer to [video imports](#operation/importVideo). |
b44b5a83 C |
297 | - name: Stats |
298 | description: | | |
299 | Statistics | |
300 | ||
5776f78e | 301 | x-tagGroups: |
3545e72c C |
302 | - name: Static endpoints |
303 | tags: | |
304 | - Static Video Files | |
305 | - name: Feeds | |
306 | tags: | |
307 | - Video Feeds | |
e2464d22 RK |
308 | - name: Auth |
309 | tags: | |
310 | - Register | |
311 | - Session | |
5776f78e RK |
312 | - name: Accounts |
313 | tags: | |
314 | - Accounts | |
b029d58a | 315 | - Users |
1f82e3e8 | 316 | - My User |
b029d58a | 317 | - My Subscriptions |
f4d59981 | 318 | - My Notifications |
3520d385 | 319 | - My History |
5776f78e RK |
320 | - name: Videos |
321 | tags: | |
322 | - Video | |
f6d6e7f8 | 323 | - Video Upload |
419b520c | 324 | - Video Imports |
04b703f6 | 325 | - Video Captions |
b029d58a C |
326 | - Video Channels |
327 | - Video Comments | |
b029d58a C |
328 | - Video Rates |
329 | - Video Playlists | |
cf158e7e | 330 | - Video Stats |
b029d58a | 331 | - Video Ownership Change |
04b703f6 | 332 | - Video Mirroring |
ad5db104 C |
333 | - Video Files |
334 | - Video Transcoding | |
4e239e35 | 335 | - Live Videos |
2a491182 | 336 | - Channels Sync |
b029d58a C |
337 | - name: Search |
338 | tags: | |
339 | - Search | |
5776f78e RK |
340 | - name: Moderation |
341 | tags: | |
310b5219 | 342 | - Abuses |
1ebddadd | 343 | - Video Blocks |
06746a8b RK |
344 | - Account Blocks |
345 | - Server Blocks | |
42b40636 | 346 | - name: Instance |
5776f78e RK |
347 | tags: |
348 | - Config | |
42b40636 | 349 | - Homepage |
b029d58a | 350 | - Instance Follows |
04b703f6 | 351 | - Instance Redundancy |
7461d440 | 352 | - Plugins |
b44b5a83 | 353 | - Stats |
42b40636 | 354 | - Logs |
5776f78e | 355 | - Job |
1569a818 | 356 | paths: |
3545e72c | 357 | '/static/webseed/{filename}': |
1569a818 DG |
358 | get: |
359 | tags: | |
3545e72c C |
360 | - Static Video Files |
361 | summary: Get public WebTorrent video file | |
1569a818 | 362 | parameters: |
3545e72c | 363 | - $ref: '#/components/parameters/staticFilename' |
1569a818 DG |
364 | responses: |
365 | '200': | |
366 | description: successful operation | |
06746a8b | 367 | '404': |
3545e72c C |
368 | description: not found |
369 | '/static/webseed/private/{filename}': | |
6b738c7a C |
370 | get: |
371 | tags: | |
3545e72c C |
372 | - Static Video Files |
373 | summary: Get private WebTorrent video file | |
6b738c7a | 374 | parameters: |
3545e72c C |
375 | - $ref: '#/components/parameters/staticFilename' |
376 | - $ref: '#/components/parameters/videoFileToken' | |
377 | security: | |
378 | - OAuth2: [] | |
6b738c7a C |
379 | responses: |
380 | '200': | |
381 | description: successful operation | |
3545e72c C |
382 | '403': |
383 | description: invalid auth | |
384 | '404': | |
385 | description: not found | |
3f71c4c0 | 386 | |
3545e72c | 387 | '/static/streaming-playlists/hls/{filename}': |
906f46d0 C |
388 | get: |
389 | tags: | |
3545e72c C |
390 | - Static Video Files |
391 | summary: Get public HLS video file | |
392 | parameters: | |
393 | - $ref: '#/components/parameters/staticFilename' | |
906f46d0 C |
394 | security: |
395 | - OAuth2: [] | |
906f46d0 C |
396 | responses: |
397 | '200': | |
398 | description: successful operation | |
3545e72c C |
399 | '403': |
400 | description: invalid auth | |
401 | '404': | |
402 | description: not found | |
403 | '/static/streaming-playlists/hls/private/{filename}': | |
1569a818 DG |
404 | get: |
405 | tags: | |
3545e72c C |
406 | - Static Video Files |
407 | summary: Get private HLS video file | |
2a8ae759 | 408 | parameters: |
3545e72c C |
409 | - $ref: '#/components/parameters/staticFilename' |
410 | - $ref: '#/components/parameters/videoFileToken' | |
71e3e879 | 411 | - $ref: '#/components/parameters/reinjectVideoFileToken' |
3545e72c C |
412 | security: |
413 | - OAuth2: [] | |
1569a818 DG |
414 | responses: |
415 | '200': | |
416 | description: successful operation | |
3545e72c C |
417 | '403': |
418 | description: invalid auth | |
419 | '404': | |
420 | description: not found | |
3f71c4c0 | 421 | |
3545e72c C |
422 | |
423 | '/feeds/video-comments.{format}': | |
1569a818 DG |
424 | get: |
425 | tags: | |
3545e72c C |
426 | - Video Feeds |
427 | summary: List comments on videos | |
428 | operationId: getSyndicatedComments | |
429 | parameters: | |
430 | - name: format | |
431 | in: path | |
432 | required: true | |
433 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' | |
434 | schema: | |
435 | type: string | |
436 | enum: | |
437 | - xml | |
438 | - rss | |
439 | - rss2 | |
440 | - atom | |
441 | - atom1 | |
442 | - json | |
443 | - json1 | |
444 | - name: videoId | |
445 | in: query | |
446 | description: 'limit listing to a specific video' | |
447 | schema: | |
448 | type: string | |
449 | - name: accountId | |
450 | in: query | |
451 | description: 'limit listing to a specific account' | |
452 | schema: | |
453 | type: string | |
454 | - name: accountName | |
455 | in: query | |
456 | description: 'limit listing to a specific account' | |
457 | schema: | |
458 | type: string | |
459 | - name: videoChannelId | |
460 | in: query | |
461 | description: 'limit listing to a specific video channel' | |
462 | schema: | |
463 | type: string | |
464 | - name: videoChannelName | |
465 | in: query | |
466 | description: 'limit listing to a specific video channel' | |
467 | schema: | |
468 | type: string | |
1569a818 | 469 | responses: |
3545e72c | 470 | '204': |
1569a818 | 471 | description: successful operation |
3545e72c C |
472 | headers: |
473 | Cache-Control: | |
474 | schema: | |
475 | type: string | |
476 | default: 'max-age=900' # 15 min cache | |
3e9e6f2f | 477 | content: |
3545e72c | 478 | application/xml: |
3e9e6f2f | 479 | schema: |
3545e72c | 480 | $ref: '#/components/schemas/VideoCommentsForXML' |
40cfb36b RK |
481 | examples: |
482 | nightly: | |
3545e72c C |
483 | externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local |
484 | application/rss+xml: | |
2a8ae759 | 485 | schema: |
3545e72c | 486 | $ref: '#/components/schemas/VideoCommentsForXML' |
40cfb36b RK |
487 | examples: |
488 | nightly: | |
3545e72c C |
489 | externalValue: https://peertube2.cpy.re/feeds/video-comments.rss?filter=local |
490 | text/xml: | |
491 | schema: | |
492 | $ref: '#/components/schemas/VideoCommentsForXML' | |
493 | examples: | |
494 | nightly: | |
495 | externalValue: https://peertube2.cpy.re/feeds/video-comments.xml?filter=local | |
496 | application/atom+xml: | |
497 | schema: | |
498 | $ref: '#/components/schemas/VideoCommentsForXML' | |
499 | examples: | |
500 | nightly: | |
501 | externalValue: https://peertube2.cpy.re/feeds/video-comments.atom?filter=local | |
2a8ae759 FS |
502 | application/json: |
503 | schema: | |
3545e72c C |
504 | type: object |
505 | examples: | |
506 | nightly: | |
507 | externalValue: https://peertube2.cpy.re/feeds/video-comments.json?filter=local | |
84f6e32c RK |
508 | '400': |
509 | x-summary: field inconsistencies | |
510 | description: > | |
511 | Arises when: | |
3545e72c C |
512 | - videoId filter is mixed with a channel filter |
513 | '404': | |
514 | description: video, video channel or account not found | |
515 | '406': | |
516 | description: accept header unsupported | |
3f71c4c0 | 517 | |
3545e72c | 518 | '/feeds/videos.{format}': |
2539932e | 519 | get: |
2539932e | 520 | tags: |
3545e72c C |
521 | - Video Feeds |
522 | summary: List videos | |
523 | operationId: getSyndicatedVideos | |
524 | parameters: | |
525 | - name: format | |
526 | in: path | |
527 | required: true | |
528 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' | |
529 | schema: | |
530 | type: string | |
531 | enum: | |
532 | - xml | |
533 | - rss | |
534 | - rss2 | |
535 | - atom | |
536 | - atom1 | |
537 | - json | |
538 | - json1 | |
539 | - name: accountId | |
540 | in: query | |
541 | description: 'limit listing to a specific account' | |
542 | schema: | |
543 | type: string | |
544 | - name: accountName | |
545 | in: query | |
546 | description: 'limit listing to a specific account' | |
547 | schema: | |
548 | type: string | |
549 | - name: videoChannelId | |
550 | in: query | |
551 | description: 'limit listing to a specific video channel' | |
552 | schema: | |
553 | type: string | |
554 | - name: videoChannelName | |
555 | in: query | |
556 | description: 'limit listing to a specific video channel' | |
557 | schema: | |
558 | type: string | |
559 | - $ref: '#/components/parameters/sort' | |
560 | - $ref: '#/components/parameters/nsfw' | |
561 | - $ref: '#/components/parameters/isLocal' | |
562 | - $ref: '#/components/parameters/include' | |
563 | - $ref: '#/components/parameters/privacyOneOf' | |
564 | - $ref: '#/components/parameters/hasHLSFiles' | |
565 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
566 | responses: | |
567 | '204': | |
568 | description: successful operation | |
569 | headers: | |
570 | Cache-Control: | |
571 | schema: | |
572 | type: string | |
573 | default: 'max-age=900' # 15 min cache | |
574 | content: | |
575 | application/xml: | |
576 | schema: | |
577 | $ref: '#/components/schemas/VideosForXML' | |
578 | examples: | |
579 | nightly: | |
580 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | |
581 | application/rss+xml: | |
582 | schema: | |
583 | $ref: '#/components/schemas/VideosForXML' | |
584 | examples: | |
585 | nightly: | |
586 | externalValue: https://peertube2.cpy.re/feeds/videos.rss?filter=local | |
587 | text/xml: | |
588 | schema: | |
589 | $ref: '#/components/schemas/VideosForXML' | |
590 | examples: | |
591 | nightly: | |
592 | externalValue: https://peertube2.cpy.re/feeds/videos.xml?filter=local | |
593 | application/atom+xml: | |
594 | schema: | |
595 | $ref: '#/components/schemas/VideosForXML' | |
596 | examples: | |
597 | nightly: | |
598 | externalValue: https://peertube2.cpy.re/feeds/videos.atom?filter=local | |
599 | application/json: | |
600 | schema: | |
601 | type: object | |
602 | examples: | |
603 | nightly: | |
604 | externalValue: https://peertube2.cpy.re/feeds/videos.json?filter=local | |
605 | '404': | |
606 | description: video channel or account not found | |
607 | '406': | |
608 | description: accept header unsupported | |
609 | ||
610 | '/feeds/subscriptions.{format}': | |
611 | get: | |
612 | tags: | |
613 | - Video Feeds | |
614 | summary: List videos of subscriptions tied to a token | |
615 | operationId: getSyndicatedSubscriptionVideos | |
616 | parameters: | |
617 | - name: format | |
618 | in: path | |
619 | required: true | |
620 | description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' | |
621 | schema: | |
622 | type: string | |
623 | enum: | |
624 | - xml | |
625 | - rss | |
626 | - rss2 | |
627 | - atom | |
628 | - atom1 | |
629 | - json | |
630 | - json1 | |
631 | - name: accountId | |
632 | in: query | |
633 | description: limit listing to a specific account | |
634 | schema: | |
635 | type: string | |
636 | required: true | |
637 | - name: token | |
638 | in: query | |
639 | description: private token allowing access | |
640 | schema: | |
641 | type: string | |
642 | required: true | |
643 | - $ref: '#/components/parameters/sort' | |
644 | - $ref: '#/components/parameters/nsfw' | |
645 | - $ref: '#/components/parameters/isLocal' | |
646 | - $ref: '#/components/parameters/include' | |
647 | - $ref: '#/components/parameters/privacyOneOf' | |
648 | - $ref: '#/components/parameters/hasHLSFiles' | |
649 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
650 | responses: | |
651 | '204': | |
652 | description: successful operation | |
653 | headers: | |
654 | Cache-Control: | |
655 | schema: | |
656 | type: string | |
657 | default: 'max-age=900' # 15 min cache | |
658 | content: | |
659 | application/xml: | |
660 | schema: | |
661 | $ref: '#/components/schemas/VideosForXML' | |
662 | application/rss+xml: | |
663 | schema: | |
664 | $ref: '#/components/schemas/VideosForXML' | |
665 | text/xml: | |
666 | schema: | |
667 | $ref: '#/components/schemas/VideosForXML' | |
668 | application/atom+xml: | |
669 | schema: | |
670 | $ref: '#/components/schemas/VideosForXML' | |
671 | application/json: | |
672 | schema: | |
673 | type: object | |
674 | '406': | |
675 | description: accept header unsupported | |
676 | ||
677 | '/api/v1/accounts/{name}': | |
678 | get: | |
679 | tags: | |
680 | - Accounts | |
681 | summary: Get an account | |
682 | operationId: getAccount | |
683 | parameters: | |
684 | - $ref: '#/components/parameters/name' | |
685 | responses: | |
686 | '200': | |
687 | description: successful operation | |
688 | content: | |
689 | application/json: | |
690 | schema: | |
691 | $ref: '#/components/schemas/Account' | |
692 | '404': | |
693 | description: account not found | |
694 | ||
695 | '/api/v1/accounts/{name}/videos': | |
696 | get: | |
697 | tags: | |
698 | - Accounts | |
699 | - Video | |
700 | summary: 'List videos of an account' | |
701 | operationId: getAccountVideos | |
702 | parameters: | |
703 | - $ref: '#/components/parameters/name' | |
704 | - $ref: '#/components/parameters/categoryOneOf' | |
705 | - $ref: '#/components/parameters/isLive' | |
706 | - $ref: '#/components/parameters/tagsOneOf' | |
707 | - $ref: '#/components/parameters/tagsAllOf' | |
708 | - $ref: '#/components/parameters/licenceOneOf' | |
709 | - $ref: '#/components/parameters/languageOneOf' | |
710 | - $ref: '#/components/parameters/nsfw' | |
711 | - $ref: '#/components/parameters/isLocal' | |
712 | - $ref: '#/components/parameters/include' | |
713 | - $ref: '#/components/parameters/privacyOneOf' | |
714 | - $ref: '#/components/parameters/hasHLSFiles' | |
715 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
716 | - $ref: '#/components/parameters/skipCount' | |
717 | - $ref: '#/components/parameters/start' | |
718 | - $ref: '#/components/parameters/count' | |
719 | - $ref: '#/components/parameters/videosSort' | |
720 | responses: | |
721 | '200': | |
722 | description: successful operation | |
723 | content: | |
724 | application/json: | |
725 | schema: | |
726 | $ref: '#/components/schemas/VideoListResponse' | |
727 | x-codeSamples: | |
728 | - lang: JavaScript | |
729 | source: | | |
730 | fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos') | |
731 | .then(function(response) { | |
732 | return response.json() | |
733 | }).then(function(data) { | |
734 | console.log(data) | |
735 | }) | |
736 | - lang: Shell | |
737 | source: | | |
738 | ## DEPENDENCIES: jq | |
739 | curl -s https://peertube2.cpy.re/api/v1/accounts/{name}/videos | jq | |
740 | - lang: Ruby | |
741 | source: | | |
742 | require 'net/http' | |
743 | require 'json' | |
744 | ||
745 | uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos") | |
746 | ||
747 | http = Net::HTTP.new(uri.host, uri.port) | |
748 | http.use_ssl = true | |
749 | ||
750 | response = http.get(uri.request_uri) | |
751 | ||
752 | puts JSON.parse(response.read_body) | |
753 | - lang: Python | |
754 | source: | | |
755 | import requests | |
756 | ||
757 | r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos") | |
758 | json = r.json() | |
759 | ||
760 | print(json) | |
761 | ||
762 | '/api/v1/accounts/{name}/followers': | |
763 | get: | |
764 | tags: | |
765 | - Accounts | |
766 | summary: 'List followers of an account' | |
767 | security: | |
768 | - OAuth2: [] | |
769 | operationId: getAccountFollowers | |
770 | parameters: | |
771 | - $ref: '#/components/parameters/name' | |
772 | - $ref: '#/components/parameters/start' | |
773 | - $ref: '#/components/parameters/count' | |
774 | - $ref: '#/components/parameters/followersSort' | |
775 | - $ref: '#/components/parameters/search' | |
776 | responses: | |
777 | '200': | |
778 | description: successful operation | |
779 | content: | |
780 | application/json: | |
781 | schema: | |
782 | type: object | |
783 | properties: | |
784 | total: | |
785 | type: integer | |
786 | example: 1 | |
787 | data: | |
788 | type: array | |
789 | items: | |
790 | $ref: '#/components/schemas/Follow' | |
791 | ||
792 | /api/v1/accounts: | |
793 | get: | |
794 | tags: | |
795 | - Accounts | |
796 | summary: List accounts | |
797 | operationId: getAccounts | |
798 | parameters: | |
799 | - $ref: '#/components/parameters/start' | |
800 | - $ref: '#/components/parameters/count' | |
801 | - $ref: '#/components/parameters/sort' | |
802 | responses: | |
803 | '200': | |
804 | description: successful operation | |
805 | content: | |
806 | 'application/json': | |
807 | schema: | |
808 | type: array | |
809 | items: | |
810 | $ref: '#/components/schemas/Account' | |
811 | ||
812 | /api/v1/config: | |
813 | get: | |
814 | tags: | |
815 | - Config | |
816 | summary: Get instance public configuration | |
817 | operationId: getConfig | |
818 | responses: | |
819 | '200': | |
820 | description: successful operation | |
821 | content: | |
822 | application/json: | |
823 | schema: | |
824 | $ref: '#/components/schemas/ServerConfig' | |
825 | examples: | |
826 | nightly: | |
827 | externalValue: https://peertube2.cpy.re/api/v1/config | |
828 | ||
829 | /api/v1/config/about: | |
830 | get: | |
831 | summary: Get instance "About" information | |
832 | operationId: getAbout | |
833 | tags: | |
834 | - Config | |
835 | responses: | |
836 | '200': | |
837 | description: successful operation | |
838 | content: | |
839 | application/json: | |
840 | schema: | |
841 | $ref: '#/components/schemas/ServerConfigAbout' | |
842 | examples: | |
843 | nightly: | |
844 | externalValue: https://peertube2.cpy.re/api/v1/config/about | |
845 | ||
846 | /api/v1/config/custom: | |
847 | get: | |
848 | summary: Get instance runtime configuration | |
849 | operationId: getCustomConfig | |
850 | tags: | |
851 | - Config | |
852 | security: | |
853 | - OAuth2: | |
854 | - admin | |
855 | responses: | |
856 | '200': | |
857 | description: successful operation | |
858 | content: | |
859 | application/json: | |
860 | schema: | |
861 | $ref: '#/components/schemas/ServerConfigCustom' | |
862 | put: | |
863 | summary: Set instance runtime configuration | |
864 | operationId: putCustomConfig | |
865 | tags: | |
866 | - Config | |
867 | security: | |
868 | - OAuth2: | |
869 | - admin | |
870 | responses: | |
871 | '200': | |
872 | description: successful operation | |
873 | '400': | |
874 | x-summary: field inconsistencies | |
875 | description: > | |
876 | Arises when: | |
877 | - the emailer is disabled and the instance is open to registrations | |
878 | - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled | |
879 | delete: | |
880 | summary: Delete instance runtime configuration | |
881 | operationId: delCustomConfig | |
882 | tags: | |
883 | - Config | |
884 | security: | |
885 | - OAuth2: | |
886 | - admin | |
887 | responses: | |
888 | '200': | |
889 | description: successful operation | |
890 | ||
891 | /api/v1/custom-pages/homepage/instance: | |
892 | get: | |
893 | summary: Get instance custom homepage | |
894 | tags: | |
895 | - Homepage | |
2539932e C |
896 | responses: |
897 | '404': | |
898 | description: No homepage set | |
899 | '200': | |
900 | description: successful operation | |
901 | content: | |
902 | application/json: | |
903 | schema: | |
904 | $ref: '#/components/schemas/CustomHomepage' | |
905 | put: | |
906 | summary: Set instance custom homepage | |
907 | tags: | |
908 | - Homepage | |
909 | security: | |
910 | - OAuth2: | |
911 | - admin | |
912 | requestBody: | |
913 | content: | |
914 | application/json: | |
915 | schema: | |
916 | type: object | |
917 | properties: | |
918 | content: | |
919 | type: string | |
920 | description: content of the homepage, that will be injected in the client | |
921 | responses: | |
922 | '204': | |
923 | description: successful operation | |
924 | ||
3545e72c | 925 | /api/v1/jobs/pause: |
419b520c C |
926 | post: |
927 | summary: Pause job queue | |
928 | security: | |
929 | - OAuth2: | |
930 | - admin | |
931 | tags: | |
932 | - Job | |
933 | responses: | |
934 | '204': | |
935 | description: successful operation | |
936 | ||
3545e72c | 937 | /api/v1/jobs/resume: |
419b520c C |
938 | post: |
939 | summary: Resume job queue | |
940 | security: | |
941 | - OAuth2: | |
942 | - admin | |
943 | tags: | |
944 | - Job | |
945 | responses: | |
946 | '204': | |
947 | description: successful operation | |
948 | ||
3545e72c | 949 | /api/v1/jobs/{state}: |
1569a818 | 950 | get: |
b029d58a | 951 | summary: List instance jobs |
3f71c4c0 | 952 | operationId: getJobs |
94ff4c23 | 953 | security: |
3e9e6f2f | 954 | - OAuth2: |
64b5c247 | 955 | - admin |
1569a818 DG |
956 | tags: |
957 | - Job | |
44cb3b85 DG |
958 | parameters: |
959 | - name: state | |
960 | in: path | |
961 | required: true | |
040d6896 | 962 | description: The state of the job ('' for for no filter) |
3e9e6f2f RK |
963 | schema: |
964 | type: string | |
65f02679 | 965 | enum: |
040d6896 | 966 | - '' |
65f02679 RK |
967 | - active |
968 | - completed | |
969 | - failed | |
970 | - waiting | |
971 | - delayed | |
040d6896 | 972 | - $ref: '#/components/parameters/jobType' |
3e9e6f2f RK |
973 | - $ref: '#/components/parameters/start' |
974 | - $ref: '#/components/parameters/count' | |
975 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
976 | responses: |
977 | '200': | |
978 | description: successful operation | |
3e9e6f2f RK |
979 | content: |
980 | application/json: | |
981 | schema: | |
84f6e32c RK |
982 | type: object |
983 | properties: | |
984 | total: | |
985 | type: integer | |
986 | example: 1 | |
987 | data: | |
988 | type: array | |
989 | maxItems: 100 | |
990 | items: | |
991 | $ref: '#/components/schemas/Job' | |
06dc7a1b | 992 | |
3545e72c | 993 | /api/v1/server/followers: |
06dc7a1b RK |
994 | get: |
995 | tags: | |
996 | - Instance Follows | |
997 | summary: List instances following the server | |
998 | parameters: | |
999 | - $ref: '#/components/parameters/followState' | |
1000 | - $ref: '#/components/parameters/actorType' | |
1001 | - $ref: '#/components/parameters/start' | |
1002 | - $ref: '#/components/parameters/count' | |
1003 | - $ref: '#/components/parameters/sort' | |
1004 | responses: | |
1005 | '200': | |
1006 | description: successful operation | |
1007 | content: | |
1008 | application/json: | |
1009 | schema: | |
1010 | type: object | |
1011 | properties: | |
1012 | total: | |
1013 | type: integer | |
1014 | example: 1 | |
1015 | data: | |
1016 | type: array | |
1017 | items: | |
1018 | $ref: '#/components/schemas/Follow' | |
3f71c4c0 | 1019 | |
3545e72c | 1020 | '/api/v1/server/followers/{nameWithHost}': |
1569a818 | 1021 | delete: |
06dc7a1b | 1022 | summary: Remove or reject a follower to your server |
94ff4c23 | 1023 | security: |
3e9e6f2f | 1024 | - OAuth2: |
06746a8b | 1025 | - admin |
1569a818 | 1026 | tags: |
b029d58a | 1027 | - Instance Follows |
1569a818 | 1028 | parameters: |
06dc7a1b | 1029 | - name: nameWithHost |
1569a818 DG |
1030 | in: path |
1031 | required: true | |
06dc7a1b | 1032 | description: The remote actor handle to remove from your followers |
3e9e6f2f RK |
1033 | schema: |
1034 | type: string | |
06dc7a1b | 1035 | format: email |
1569a818 | 1036 | responses: |
06dc7a1b | 1037 | '204': |
1569a818 | 1038 | description: successful operation |
06dc7a1b RK |
1039 | '404': |
1040 | description: follower not found | |
3f71c4c0 | 1041 | |
3545e72c | 1042 | '/api/v1/server/followers/{nameWithHost}/reject': |
06dc7a1b RK |
1043 | post: |
1044 | summary: Reject a pending follower to your server | |
1045 | security: | |
1046 | - OAuth2: | |
1047 | - admin | |
1569a818 | 1048 | tags: |
b029d58a | 1049 | - Instance Follows |
44cb3b85 | 1050 | parameters: |
06dc7a1b RK |
1051 | - name: nameWithHost |
1052 | in: path | |
1053 | required: true | |
1054 | description: The remote actor handle to remove from your followers | |
1055 | schema: | |
1056 | type: string | |
1057 | format: email | |
1569a818 | 1058 | responses: |
06dc7a1b | 1059 | '204': |
1569a818 | 1060 | description: successful operation |
06dc7a1b RK |
1061 | '404': |
1062 | description: follower not found | |
3f71c4c0 | 1063 | |
3545e72c | 1064 | '/api/v1/server/followers/{nameWithHost}/accept': |
06dc7a1b RK |
1065 | post: |
1066 | summary: Accept a pending follower to your server | |
1067 | security: | |
1068 | - OAuth2: | |
1069 | - admin | |
1070 | tags: | |
1071 | - Instance Follows | |
1072 | parameters: | |
1073 | - name: nameWithHost | |
1074 | in: path | |
1075 | required: true | |
1076 | description: The remote actor handle to remove from your followers | |
1077 | schema: | |
1078 | type: string | |
1079 | format: email | |
1080 | responses: | |
1081 | '204': | |
1082 | description: successful operation | |
1083 | '404': | |
1084 | description: follower not found | |
1085 | ||
3545e72c | 1086 | /api/v1/server/following: |
1569a818 DG |
1087 | get: |
1088 | tags: | |
b029d58a | 1089 | - Instance Follows |
f4d59981 | 1090 | summary: List instances followed by the server |
44cb3b85 | 1091 | parameters: |
06dc7a1b RK |
1092 | - $ref: '#/components/parameters/followState' |
1093 | - $ref: '#/components/parameters/actorType' | |
3e9e6f2f RK |
1094 | - $ref: '#/components/parameters/start' |
1095 | - $ref: '#/components/parameters/count' | |
1096 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
1097 | responses: |
1098 | '200': | |
1099 | description: successful operation | |
3e9e6f2f RK |
1100 | content: |
1101 | application/json: | |
1102 | schema: | |
06dc7a1b RK |
1103 | type: object |
1104 | properties: | |
1105 | total: | |
1106 | type: integer | |
1107 | example: 1 | |
1108 | data: | |
1109 | type: array | |
1110 | items: | |
1111 | $ref: '#/components/schemas/Follow' | |
1569a818 | 1112 | post: |
94ff4c23 | 1113 | security: |
3e9e6f2f | 1114 | - OAuth2: |
64b5c247 | 1115 | - admin |
1569a818 | 1116 | tags: |
b029d58a | 1117 | - Instance Follows |
4d029ef8 | 1118 | summary: Follow a list of actors (PeerTube instance, channel or account) |
1569a818 DG |
1119 | responses: |
1120 | '204': | |
c1843150 | 1121 | description: successful operation |
f4d59981 RK |
1122 | '500': |
1123 | description: cannot follow a non-HTTPS server | |
3e9e6f2f RK |
1124 | requestBody: |
1125 | content: | |
1126 | application/json: | |
1127 | schema: | |
f4d59981 RK |
1128 | type: object |
1129 | properties: | |
1130 | hosts: | |
1131 | type: array | |
1132 | items: | |
1133 | type: string | |
84f6e32c | 1134 | format: hostname |
f4d59981 | 1135 | uniqueItems: true |
4d029ef8 C |
1136 | handles: |
1137 | type: array | |
1138 | items: | |
1139 | type: string | |
1140 | uniqueItems: true | |
3f71c4c0 | 1141 | |
3545e72c | 1142 | '/api/v1/server/following/{hostOrHandle}': |
06dc7a1b | 1143 | delete: |
4d029ef8 | 1144 | summary: Unfollow an actor (PeerTube instance, channel or account) |
06dc7a1b RK |
1145 | security: |
1146 | - OAuth2: | |
1147 | - admin | |
1148 | tags: | |
1149 | - Instance Follows | |
1150 | parameters: | |
4d029ef8 | 1151 | - name: hostOrHandle |
06dc7a1b RK |
1152 | in: path |
1153 | required: true | |
4d029ef8 | 1154 | description: The hostOrHandle to unfollow |
06dc7a1b RK |
1155 | schema: |
1156 | type: string | |
06dc7a1b RK |
1157 | responses: |
1158 | '204': | |
1159 | description: successful operation | |
1160 | '404': | |
4d029ef8 | 1161 | description: host or handle not found |
06dc7a1b | 1162 | |
3545e72c | 1163 | /api/v1/users: |
1569a818 | 1164 | post: |
b029d58a | 1165 | summary: Create a user |
e2adb8cb | 1166 | operationId: addUser |
94ff4c23 | 1167 | security: |
3e9e6f2f | 1168 | - OAuth2: |
64b5c247 | 1169 | - admin |
1569a818 | 1170 | tags: |
b029d58a | 1171 | - Users |
1569a818 | 1172 | responses: |
1e904cde | 1173 | '200': |
2c318664 | 1174 | description: user created |
3e9e6f2f RK |
1175 | content: |
1176 | application/json: | |
1177 | schema: | |
1178 | $ref: '#/components/schemas/AddUserResponse' | |
2c318664 RK |
1179 | links: |
1180 | # GET /users/{id} | |
e2adb8cb RK |
1181 | GetUser: |
1182 | operationId: getUser | |
2c318664 RK |
1183 | parameters: |
1184 | id: '$response.body#/user/id' | |
1185 | # PUT /users/{id} | |
e2adb8cb RK |
1186 | PutUser: |
1187 | operationId: putUser | |
2c318664 RK |
1188 | parameters: |
1189 | id: '$response.body#/user/id' | |
1190 | # DELETE /users/{id} | |
e2adb8cb RK |
1191 | DelUser: |
1192 | operationId: delUser | |
2c318664 RK |
1193 | parameters: |
1194 | id: '$response.body#/user/id' | |
1195 | '403': | |
1196 | description: insufficient authority to create an admin or moderator | |
3e9e6f2f RK |
1197 | requestBody: |
1198 | content: | |
1199 | application/json: | |
1200 | schema: | |
1201 | $ref: '#/components/schemas/AddUser' | |
b8375da9 RK |
1202 | description: | |
1203 | If the smtp server is configured, you can leave the password empty and an email will be sent | |
1204 | asking the user to set it first. | |
3e9e6f2f | 1205 | required: true |
1569a818 | 1206 | get: |
b029d58a | 1207 | summary: List users |
3f71c4c0 | 1208 | operationId: getUsers |
94ff4c23 | 1209 | security: |
8491293b RK |
1210 | - OAuth2: |
1211 | - admin | |
1569a818 | 1212 | tags: |
b029d58a | 1213 | - Users |
44cb3b85 | 1214 | parameters: |
8491293b RK |
1215 | - $ref: '#/components/parameters/usersSearch' |
1216 | - $ref: '#/components/parameters/usersBlocked' | |
3e9e6f2f RK |
1217 | - $ref: '#/components/parameters/start' |
1218 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1219 | - $ref: '#/components/parameters/usersSort' |
1569a818 DG |
1220 | responses: |
1221 | '200': | |
1222 | description: successful operation | |
3e9e6f2f RK |
1223 | content: |
1224 | application/json: | |
1225 | schema: | |
1226 | type: array | |
1227 | items: | |
1228 | $ref: '#/components/schemas/User' | |
3f71c4c0 | 1229 | |
3545e72c | 1230 | '/api/v1/users/{id}': |
2c318664 RK |
1231 | parameters: |
1232 | - $ref: '#/components/parameters/id' | |
1569a818 | 1233 | delete: |
b029d58a | 1234 | summary: Delete a user |
94ff4c23 | 1235 | security: |
3e9e6f2f | 1236 | - OAuth2: |
64b5c247 | 1237 | - admin |
1569a818 | 1238 | tags: |
b029d58a | 1239 | - Users |
e2adb8cb | 1240 | operationId: delUser |
1569a818 DG |
1241 | responses: |
1242 | '204': | |
c1843150 | 1243 | description: successful operation |
1569a818 | 1244 | get: |
b029d58a | 1245 | summary: Get a user |
94ff4c23 | 1246 | security: |
3e9e6f2f | 1247 | - OAuth2: [] |
1569a818 | 1248 | tags: |
b029d58a | 1249 | - Users |
e2adb8cb | 1250 | operationId: getUser |
fd5586b3 RK |
1251 | parameters: |
1252 | - name: withStats | |
1253 | in: query | |
1254 | description: include statistics about the user (only available as a moderator/admin) | |
1255 | schema: | |
1256 | type: boolean | |
1569a818 DG |
1257 | responses: |
1258 | '200': | |
fd5586b3 RK |
1259 | x-summary: successful operation |
1260 | description: | | |
1261 | As an admin/moderator, you can request a response augmented with statistics about the user's | |
1262 | moderation relations and videos usage, by using the `withStats` parameter. | |
3e9e6f2f RK |
1263 | content: |
1264 | application/json: | |
1265 | schema: | |
fd5586b3 RK |
1266 | oneOf: |
1267 | - $ref: '#/components/schemas/User' | |
1268 | - $ref: '#/components/schemas/UserWithStats' | |
1569a818 | 1269 | put: |
b029d58a | 1270 | summary: Update a user |
94ff4c23 | 1271 | security: |
3e9e6f2f | 1272 | - OAuth2: [] |
1569a818 | 1273 | tags: |
b029d58a | 1274 | - Users |
e2adb8cb | 1275 | operationId: putUser |
1569a818 DG |
1276 | responses: |
1277 | '204': | |
c1843150 | 1278 | description: successful operation |
3e9e6f2f RK |
1279 | requestBody: |
1280 | content: | |
1281 | application/json: | |
1282 | schema: | |
1283 | $ref: '#/components/schemas/UpdateUser' | |
1284 | required: true | |
e2464d22 | 1285 | |
3545e72c | 1286 | /api/v1/oauth-clients/local: |
e2464d22 RK |
1287 | get: |
1288 | summary: Login prerequisite | |
3f71c4c0 | 1289 | description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken). |
e2464d22 RK |
1290 | operationId: getOAuthClient |
1291 | tags: | |
1292 | - Session | |
1293 | responses: | |
1294 | '200': | |
1295 | description: successful operation | |
1296 | content: | |
1297 | application/json: | |
1298 | schema: | |
1299 | $ref: '#/components/schemas/OAuthClient' | |
1300 | links: | |
1301 | UseOAuthClientToLogin: | |
1302 | operationId: getOAuthToken | |
1303 | parameters: | |
1304 | client_id: '$response.body#/client_id' | |
1305 | client_secret: '$response.body#/client_secret' | |
3cf8874f RK |
1306 | x-codeSamples: |
1307 | - lang: Shell | |
1308 | source: | | |
1309 | API="https://peertube2.cpy.re/api/v1" | |
1310 | ||
1311 | ## AUTH | |
1312 | curl -s "$API/oauth-clients/local" | |
3f71c4c0 | 1313 | |
3545e72c | 1314 | /api/v1/users/token: |
e2464d22 RK |
1315 | post: |
1316 | summary: Login | |
1317 | operationId: getOAuthToken | |
1318 | description: With your [client id and secret](#operation/getOAuthClient), you can retrieve an access and refresh tokens. | |
1319 | tags: | |
1320 | - Session | |
1321 | requestBody: | |
1322 | content: | |
1323 | application/x-www-form-urlencoded: | |
1324 | schema: | |
1325 | oneOf: | |
1326 | - $ref: '#/components/schemas/OAuthToken-password' | |
1327 | - $ref: '#/components/schemas/OAuthToken-refresh_token' | |
1328 | discriminator: | |
1329 | propertyName: grant_type | |
1330 | mapping: | |
1331 | password: '#/components/schemas/OAuthToken-password' | |
1332 | refresh_token: '#/components/schemas/OAuthToken-refresh_token' | |
1333 | responses: | |
1334 | '200': | |
1335 | description: successful operation | |
1336 | content: | |
1337 | application/json: | |
1338 | schema: | |
1339 | type: object | |
1340 | properties: | |
1341 | token_type: | |
1342 | type: string | |
1343 | example: Bearer | |
1344 | access_token: | |
1345 | type: string | |
1346 | example: 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0 | |
1347 | description: valid for 1 day | |
1348 | refresh_token: | |
1349 | type: string | |
1350 | example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7 | |
1351 | description: valid for 2 weeks | |
1352 | expires_in: | |
1353 | type: integer | |
1354 | minimum: 0 | |
1355 | example: 14399 | |
1356 | refresh_token_expires_in: | |
1357 | type: integer | |
1358 | minimum: 0 | |
1359 | example: 1209600 | |
81628e50 RK |
1360 | '400': |
1361 | x-summary: client or credentials are invalid | |
1362 | description: | | |
1363 | Disambiguate via `type`: | |
1364 | - `invalid_client` for an unmatched `client_id` | |
1365 | - `invalid_grant` for unmatched credentials | |
a31e9b18 RK |
1366 | '401': |
1367 | x-summary: token expired | |
1368 | description: | | |
1369 | Disambiguate via `type`: | |
1370 | - default value for a regular authentication failure | |
1371 | - `invalid_token` for an expired token | |
3cf8874f RK |
1372 | x-codeSamples: |
1373 | - lang: Shell | |
1374 | source: | | |
1375 | ## DEPENDENCIES: jq | |
1376 | API="https://peertube2.cpy.re/api/v1" | |
1377 | USERNAME="<your_username>" | |
1378 | PASSWORD="<your_password>" | |
1379 | ||
1380 | ## AUTH | |
1381 | client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id") | |
1382 | client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret") | |
1383 | curl -s "$API/users/token" \ | |
1384 | --data client_id="$client_id" \ | |
1385 | --data client_secret="$client_secret" \ | |
1386 | --data grant_type=password \ | |
1387 | --data username="$USERNAME" \ | |
1388 | --data password="$PASSWORD" \ | |
1389 | | jq -r ".access_token" | |
3f71c4c0 | 1390 | |
3545e72c | 1391 | /api/v1/users/revoke-token: |
e2464d22 RK |
1392 | post: |
1393 | summary: Logout | |
1394 | description: Revokes your access token and its associated refresh token, destroying your current session. | |
1395 | operationId: revokeOAuthToken | |
1396 | tags: | |
1397 | - Session | |
1398 | security: | |
1399 | - OAuth2: [] | |
1400 | responses: | |
1401 | '200': | |
1402 | description: successful operation | |
1403 | ||
3e5716dd | 1404 | /api/v1/users/ask-send-verify-email: |
1f82e3e8 | 1405 | post: |
3e5716dd C |
1406 | summary: Resend user verification link |
1407 | operationId: resendEmailToVerifyUser | |
1f82e3e8 | 1408 | tags: |
b029d58a | 1409 | - Users |
e2464d22 | 1410 | - Register |
3e5716dd C |
1411 | requestBody: |
1412 | content: | |
1413 | application/json: | |
1414 | schema: | |
1415 | type: object | |
1416 | properties: | |
1417 | email: | |
1418 | type: string | |
1419 | description: User email | |
1f82e3e8 C |
1420 | responses: |
1421 | '204': | |
c1843150 | 1422 | description: successful operation |
3e5716dd C |
1423 | |
1424 | /api/v1/users/registrations/ask-send-verify-email: | |
1425 | post: | |
1426 | summary: Resend verification link to registration email | |
1427 | operationId: resendEmailToVerifyRegistration | |
1428 | tags: | |
1429 | - Register | |
1f82e3e8 C |
1430 | requestBody: |
1431 | content: | |
1432 | application/json: | |
1433 | schema: | |
3e5716dd C |
1434 | type: object |
1435 | properties: | |
1436 | email: | |
1437 | type: string | |
1438 | description: Registration email | |
1439 | responses: | |
1440 | '204': | |
1441 | description: successful operation | |
3f71c4c0 | 1442 | |
3545e72c | 1443 | /api/v1/users/{id}/verify-email: |
e2464d22 RK |
1444 | post: |
1445 | summary: Verify a user | |
3f71c4c0 | 1446 | operationId: verifyUser |
e2464d22 RK |
1447 | description: | |
1448 | Following a user registration, the new user will receive an email asking to click a link | |
85a60d8b | 1449 | containing a secret. |
3e5716dd | 1450 | This endpoint can also be used to verify a new email set in the user account. |
e2464d22 RK |
1451 | tags: |
1452 | - Users | |
1453 | - Register | |
1454 | parameters: | |
1455 | - $ref: '#/components/parameters/id' | |
1456 | requestBody: | |
1457 | content: | |
1458 | application/json: | |
1459 | schema: | |
1460 | type: object | |
1461 | properties: | |
1462 | verificationString: | |
1463 | type: string | |
1464 | format: url | |
1465 | isPendingEmail: | |
1466 | type: boolean | |
1467 | required: | |
1468 | - verificationString | |
1469 | responses: | |
1470 | '204': | |
1471 | description: successful operation | |
1472 | '403': | |
1473 | description: invalid verification string | |
1474 | '404': | |
1475 | description: user not found | |
3f71c4c0 | 1476 | |
3e5716dd C |
1477 | /api/v1/users/registrations/{registrationId}/verify-email: |
1478 | post: | |
1479 | summary: Verify a registration email | |
1480 | operationId: verifyRegistrationEmail | |
1481 | description: | | |
1482 | Following a user registration request, the user will receive an email asking to click a link | |
1483 | containing a secret. | |
1484 | tags: | |
1485 | - Register | |
1486 | parameters: | |
1487 | - $ref: '#/components/parameters/registrationId' | |
1488 | requestBody: | |
1489 | content: | |
1490 | application/json: | |
1491 | schema: | |
1492 | type: object | |
1493 | properties: | |
1494 | verificationString: | |
1495 | type: string | |
1496 | format: url | |
1497 | required: | |
1498 | - verificationString | |
1499 | responses: | |
1500 | '204': | |
1501 | description: successful operation | |
1502 | '403': | |
1503 | description: invalid verification string | |
1504 | '404': | |
1505 | description: registration not found | |
1506 | ||
3545e72c | 1507 | /api/v1/users/{id}/two-factor/request: |
a69ea130 C |
1508 | post: |
1509 | summary: Request two factor auth | |
1510 | operationId: requestTwoFactor | |
1511 | description: Request two factor authentication for a user | |
1512 | tags: | |
1513 | - Users | |
1514 | parameters: | |
1515 | - $ref: '#/components/parameters/id' | |
1516 | requestBody: | |
1517 | content: | |
1518 | application/json: | |
1519 | schema: | |
1520 | type: object | |
1521 | properties: | |
1522 | currentPassword: | |
1523 | type: string | |
1524 | description: Password of the currently authenticated user | |
1525 | responses: | |
1526 | '200': | |
1527 | description: successful operation | |
1528 | content: | |
1529 | application/json: | |
1530 | schema: | |
1531 | type: array | |
1532 | items: | |
1533 | $ref: '#/components/schemas/RequestTwoFactorResponse' | |
1534 | '403': | |
1535 | description: invalid password | |
1536 | '404': | |
1537 | description: user not found | |
1538 | ||
3545e72c | 1539 | /api/v1/users/{id}/two-factor/confirm-request: |
a69ea130 C |
1540 | post: |
1541 | summary: Confirm two factor auth | |
1542 | operationId: confirmTwoFactorRequest | |
1543 | description: Confirm a two factor authentication request | |
1544 | tags: | |
1545 | - Users | |
1546 | parameters: | |
1547 | - $ref: '#/components/parameters/id' | |
1548 | requestBody: | |
1549 | content: | |
1550 | application/json: | |
1551 | schema: | |
1552 | type: object | |
1553 | properties: | |
1554 | requestToken: | |
1555 | type: string | |
1556 | description: Token to identify the two factor request | |
1557 | otpToken: | |
1558 | type: string | |
1559 | description: OTP token generated by the app | |
1560 | required: | |
1561 | - requestToken | |
1562 | - otpToken | |
1563 | responses: | |
1564 | '204': | |
1565 | description: successful operation | |
1566 | '403': | |
1567 | description: invalid request token or OTP token | |
1568 | '404': | |
1569 | description: user not found | |
1570 | ||
3545e72c | 1571 | /api/v1/users/{id}/two-factor/disable: |
a69ea130 C |
1572 | post: |
1573 | summary: Disable two factor auth | |
1574 | operationId: disableTwoFactor | |
1575 | description: Disable two factor authentication of a user | |
1576 | tags: | |
1577 | - Users | |
1578 | parameters: | |
1579 | - $ref: '#/components/parameters/id' | |
1580 | requestBody: | |
1581 | content: | |
1582 | application/json: | |
1583 | schema: | |
1584 | type: object | |
1585 | properties: | |
1586 | currentPassword: | |
1587 | type: string | |
1588 | description: Password of the currently authenticated user | |
1589 | responses: | |
1590 | '204': | |
1591 | description: successful operation | |
1592 | '403': | |
1593 | description: invalid password | |
1594 | '404': | |
1595 | description: user not found | |
1596 | ||
3545e72c | 1597 | /api/v1/users/me: |
1569a818 | 1598 | get: |
b029d58a | 1599 | summary: Get my user information |
3f71c4c0 | 1600 | operationId: getUserInfo |
94ff4c23 | 1601 | security: |
e76d5784 RK |
1602 | - OAuth2: |
1603 | - user | |
1569a818 | 1604 | tags: |
1f82e3e8 | 1605 | - My User |
1569a818 DG |
1606 | responses: |
1607 | '200': | |
1608 | description: successful operation | |
3e9e6f2f RK |
1609 | content: |
1610 | application/json: | |
1611 | schema: | |
1612 | type: array | |
1613 | items: | |
1614 | $ref: '#/components/schemas/User' | |
1569a818 | 1615 | put: |
b029d58a | 1616 | summary: Update my user information |
3f71c4c0 | 1617 | operationId: putUserInfo |
94ff4c23 | 1618 | security: |
e76d5784 RK |
1619 | - OAuth2: |
1620 | - user | |
1569a818 | 1621 | tags: |
1f82e3e8 | 1622 | - My User |
1569a818 DG |
1623 | responses: |
1624 | '204': | |
37db4176 | 1625 | description: successful operation |
3e9e6f2f RK |
1626 | requestBody: |
1627 | content: | |
1628 | application/json: | |
1629 | schema: | |
1630 | $ref: '#/components/schemas/UpdateMe' | |
1631 | required: true | |
3f71c4c0 | 1632 | |
3545e72c | 1633 | /api/v1/users/me/videos/imports: |
1f82e3e8 | 1634 | get: |
b029d58a | 1635 | summary: Get video imports of my user |
1f82e3e8 C |
1636 | security: |
1637 | - OAuth2: | |
64b5c247 | 1638 | - user |
1f82e3e8 | 1639 | tags: |
b029d58a | 1640 | - Videos |
1f82e3e8 C |
1641 | - My User |
1642 | parameters: | |
1643 | - $ref: '#/components/parameters/start' | |
1644 | - $ref: '#/components/parameters/count' | |
1645 | - $ref: '#/components/parameters/sort' | |
a3b472a1 C |
1646 | - |
1647 | name: targetUrl | |
1648 | in: query | |
1649 | required: false | |
1650 | description: Filter on import target URL | |
1651 | schema: | |
1652 | type: string | |
1653 | - | |
1654 | name: videoChannelSyncId | |
1655 | in: query | |
1656 | required: false | |
1657 | description: Filter on imports created by a specific channel synchronization | |
1658 | schema: | |
1659 | type: number | |
87cd9397 C |
1660 | - |
1661 | name: search | |
1662 | in: query | |
1663 | required: false | |
1664 | description: Search in video names | |
1665 | schema: | |
1666 | type: string | |
1f82e3e8 C |
1667 | responses: |
1668 | '200': | |
1669 | description: successful operation | |
1670 | content: | |
1671 | application/json: | |
1672 | schema: | |
5844dde3 | 1673 | $ref: '#/components/schemas/VideoImportsList' |
3f71c4c0 | 1674 | |
3545e72c | 1675 | /api/v1/users/me/video-quota-used: |
1569a818 | 1676 | get: |
b029d58a | 1677 | summary: Get my user used quota |
94ff4c23 | 1678 | security: |
e76d5784 RK |
1679 | - OAuth2: |
1680 | - user | |
1569a818 | 1681 | tags: |
1f82e3e8 | 1682 | - My User |
1569a818 DG |
1683 | responses: |
1684 | '200': | |
1685 | description: successful operation | |
3e9e6f2f RK |
1686 | content: |
1687 | application/json: | |
1688 | schema: | |
30b40713 RK |
1689 | type: object |
1690 | properties: | |
1691 | videoQuotaUsed: | |
1692 | type: number | |
b8375da9 | 1693 | description: The user video quota used so far in bytes |
30b40713 RK |
1694 | example: 16810141515 |
1695 | videoQuotaUsedDaily: | |
1696 | type: number | |
b8375da9 | 1697 | description: The user video quota used today in bytes |
30b40713 | 1698 | example: 1681014151 |
3f71c4c0 | 1699 | |
3545e72c | 1700 | '/api/v1/users/me/videos/{videoId}/rating': |
1569a818 | 1701 | get: |
50e16ccf | 1702 | summary: Get rate of my user for a video |
94ff4c23 | 1703 | security: |
3e9e6f2f | 1704 | - OAuth2: [] |
1569a818 | 1705 | tags: |
1f82e3e8 | 1706 | - My User |
b029d58a | 1707 | - Video Rates |
1569a818 DG |
1708 | parameters: |
1709 | - name: videoId | |
1710 | in: path | |
1711 | required: true | |
b8375da9 | 1712 | description: The video id |
3e9e6f2f | 1713 | schema: |
b8375da9 | 1714 | $ref: '#/components/schemas/Video/properties/id' |
1569a818 DG |
1715 | responses: |
1716 | '200': | |
1717 | description: successful operation | |
3e9e6f2f RK |
1718 | content: |
1719 | application/json: | |
1720 | schema: | |
1721 | $ref: '#/components/schemas/GetMeVideoRating' | |
3f71c4c0 | 1722 | |
3545e72c | 1723 | /api/v1/users/me/videos: |
1569a818 | 1724 | get: |
b029d58a | 1725 | summary: Get videos of my user |
94ff4c23 | 1726 | security: |
e76d5784 RK |
1727 | - OAuth2: |
1728 | - user | |
1569a818 | 1729 | tags: |
1f82e3e8 | 1730 | - My User |
b029d58a | 1731 | - Videos |
44cb3b85 | 1732 | parameters: |
3e9e6f2f RK |
1733 | - $ref: '#/components/parameters/start' |
1734 | - $ref: '#/components/parameters/count' | |
1735 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
1736 | responses: |
1737 | '200': | |
1738 | description: successful operation | |
3e9e6f2f RK |
1739 | content: |
1740 | application/json: | |
1741 | schema: | |
048b6946 | 1742 | $ref: '#/components/schemas/VideoListResponse' |
3f71c4c0 | 1743 | |
3545e72c | 1744 | /api/v1/users/me/subscriptions: |
e76d5784 | 1745 | get: |
b029d58a | 1746 | summary: Get my user subscriptions |
e76d5784 RK |
1747 | security: |
1748 | - OAuth2: | |
64b5c247 | 1749 | - user |
e76d5784 | 1750 | tags: |
b029d58a | 1751 | - My Subscriptions |
e76d5784 RK |
1752 | parameters: |
1753 | - $ref: '#/components/parameters/start' | |
1754 | - $ref: '#/components/parameters/count' | |
1755 | - $ref: '#/components/parameters/sort' | |
1756 | responses: | |
1757 | '200': | |
1758 | description: successful operation | |
045bcd0d RK |
1759 | content: |
1760 | application/json: | |
1761 | schema: | |
1762 | $ref: '#/components/schemas/VideoChannelList' | |
e76d5784 | 1763 | post: |
2c318664 RK |
1764 | tags: |
1765 | - My Subscriptions | |
b029d58a | 1766 | summary: Add subscription to my user |
e76d5784 RK |
1767 | security: |
1768 | - OAuth2: | |
64b5c247 | 1769 | - user |
2c318664 RK |
1770 | requestBody: |
1771 | content: | |
1772 | application/json: | |
1773 | schema: | |
1774 | type: object | |
1775 | properties: | |
1776 | uri: | |
1777 | type: string | |
1778 | format: uri | |
1779 | description: uri of the video channels to subscribe to | |
1780 | required: | |
1781 | - uri | |
1782 | examples: | |
1783 | default: | |
1784 | value: | |
1785 | uri: 008a0e54-375d-49d0-8379-143202e24152@video.lqdn.fr | |
e76d5784 RK |
1786 | responses: |
1787 | '200': | |
1788 | description: successful operation | |
3f71c4c0 | 1789 | |
3545e72c | 1790 | /api/v1/users/me/subscriptions/exist: |
e76d5784 | 1791 | get: |
b029d58a | 1792 | summary: Get if subscriptions exist for my user |
e76d5784 RK |
1793 | security: |
1794 | - OAuth2: | |
64b5c247 | 1795 | - user |
e76d5784 | 1796 | tags: |
b029d58a | 1797 | - My Subscriptions |
e76d5784 RK |
1798 | parameters: |
1799 | - $ref: '#/components/parameters/subscriptionsUris' | |
1800 | responses: | |
1801 | '200': | |
1802 | description: successful operation | |
1803 | content: | |
1804 | application/json: | |
1805 | schema: | |
1806 | type: object | |
3f71c4c0 | 1807 | |
3545e72c | 1808 | /api/v1/users/me/subscriptions/videos: |
e76d5784 | 1809 | get: |
b029d58a | 1810 | summary: List videos of subscriptions of my user |
e76d5784 RK |
1811 | security: |
1812 | - OAuth2: | |
1813 | - user | |
1814 | tags: | |
b029d58a C |
1815 | - My Subscriptions |
1816 | - Videos | |
e76d5784 | 1817 | parameters: |
59c794a5 | 1818 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 1819 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
1820 | - $ref: '#/components/parameters/tagsOneOf' |
1821 | - $ref: '#/components/parameters/tagsAllOf' | |
1822 | - $ref: '#/components/parameters/licenceOneOf' | |
1823 | - $ref: '#/components/parameters/languageOneOf' | |
1824 | - $ref: '#/components/parameters/nsfw' | |
2760b454 C |
1825 | - $ref: '#/components/parameters/isLocal' |
1826 | - $ref: '#/components/parameters/include' | |
527a52ac | 1827 | - $ref: '#/components/parameters/privacyOneOf' |
d324756e C |
1828 | - $ref: '#/components/parameters/hasHLSFiles' |
1829 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
59c794a5 | 1830 | - $ref: '#/components/parameters/skipCount' |
e76d5784 RK |
1831 | - $ref: '#/components/parameters/start' |
1832 | - $ref: '#/components/parameters/count' | |
59c794a5 | 1833 | - $ref: '#/components/parameters/videosSort' |
e76d5784 RK |
1834 | responses: |
1835 | '200': | |
1836 | description: successful operation | |
1837 | content: | |
1838 | application/json: | |
1839 | schema: | |
048b6946 | 1840 | $ref: '#/components/schemas/VideoListResponse' |
3f71c4c0 | 1841 | |
3545e72c | 1842 | '/api/v1/users/me/subscriptions/{subscriptionHandle}': |
e76d5784 | 1843 | get: |
b029d58a | 1844 | summary: Get subscription of my user |
e76d5784 RK |
1845 | security: |
1846 | - OAuth2: | |
64b5c247 | 1847 | - user |
e76d5784 | 1848 | tags: |
b029d58a | 1849 | - My Subscriptions |
cb9d028a C |
1850 | parameters: |
1851 | - $ref: '#/components/parameters/subscriptionHandle' | |
e76d5784 RK |
1852 | responses: |
1853 | '200': | |
1854 | description: successful operation | |
1855 | content: | |
1856 | application/json: | |
1857 | schema: | |
1858 | $ref: '#/components/schemas/VideoChannel' | |
1859 | delete: | |
b029d58a | 1860 | summary: Delete subscription of my user |
e76d5784 RK |
1861 | security: |
1862 | - OAuth2: | |
64b5c247 | 1863 | - user |
e76d5784 | 1864 | tags: |
b029d58a | 1865 | - My Subscriptions |
cb9d028a C |
1866 | parameters: |
1867 | - $ref: '#/components/parameters/subscriptionHandle' | |
e76d5784 RK |
1868 | responses: |
1869 | '200': | |
1870 | description: successful operation | |
3f71c4c0 | 1871 | |
3545e72c | 1872 | /api/v1/users/me/notifications: |
f4d59981 RK |
1873 | get: |
1874 | summary: List my notifications | |
1875 | security: | |
1876 | - OAuth2: [] | |
1877 | tags: | |
1878 | - My Notifications | |
1879 | parameters: | |
1880 | - name: unread | |
1881 | in: query | |
1882 | description: only list unread notifications | |
1883 | schema: | |
1884 | type: boolean | |
1885 | - $ref: '#/components/parameters/start' | |
1886 | - $ref: '#/components/parameters/count' | |
1887 | - $ref: '#/components/parameters/sort' | |
1888 | responses: | |
1889 | '200': | |
1890 | description: successful operation | |
1891 | content: | |
1892 | application/json: | |
1893 | schema: | |
1894 | $ref: '#/components/schemas/NotificationListResponse' | |
3f71c4c0 | 1895 | |
3545e72c | 1896 | /api/v1/users/me/notifications/read: |
f4d59981 RK |
1897 | post: |
1898 | summary: Mark notifications as read by their id | |
1899 | security: | |
1900 | - OAuth2: [] | |
1901 | tags: | |
1902 | - My Notifications | |
1903 | requestBody: | |
1904 | content: | |
2c318664 | 1905 | application/json: |
f4d59981 RK |
1906 | schema: |
1907 | type: object | |
1908 | properties: | |
1909 | ids: | |
1910 | type: array | |
1911 | description: ids of the notifications to mark as read | |
1912 | items: | |
1913 | type: integer | |
1914 | required: | |
1915 | - ids | |
1916 | responses: | |
1917 | '204': | |
1918 | description: successful operation | |
3f71c4c0 | 1919 | |
3545e72c | 1920 | /api/v1/users/me/notifications/read-all: |
f4d59981 RK |
1921 | post: |
1922 | summary: Mark all my notification as read | |
1923 | security: | |
1924 | - OAuth2: [] | |
1925 | tags: | |
1926 | - My Notifications | |
1927 | responses: | |
1928 | '204': | |
1929 | description: successful operation | |
3f71c4c0 | 1930 | |
3545e72c | 1931 | /api/v1/users/me/notification-settings: |
f4d59981 RK |
1932 | put: |
1933 | summary: Update my notification settings | |
1934 | security: | |
1935 | - OAuth2: [] | |
1936 | tags: | |
1937 | - My Notifications | |
1938 | requestBody: | |
1939 | content: | |
2c318664 | 1940 | application/json: |
f4d59981 RK |
1941 | schema: |
1942 | type: object | |
1943 | properties: | |
1944 | newVideoFromSubscription: | |
1945 | $ref: '#/components/schemas/NotificationSettingValue' | |
1946 | newCommentOnMyVideo: | |
1947 | $ref: '#/components/schemas/NotificationSettingValue' | |
4f32032f | 1948 | abuseAsModerator: |
f4d59981 RK |
1949 | $ref: '#/components/schemas/NotificationSettingValue' |
1950 | videoAutoBlacklistAsModerator: | |
1951 | $ref: '#/components/schemas/NotificationSettingValue' | |
1952 | blacklistOnMyVideo: | |
1953 | $ref: '#/components/schemas/NotificationSettingValue' | |
1954 | myVideoPublished: | |
1955 | $ref: '#/components/schemas/NotificationSettingValue' | |
1956 | myVideoImportFinished: | |
1957 | $ref: '#/components/schemas/NotificationSettingValue' | |
1958 | newFollow: | |
1959 | $ref: '#/components/schemas/NotificationSettingValue' | |
1960 | newUserRegistration: | |
1961 | $ref: '#/components/schemas/NotificationSettingValue' | |
1962 | commentMention: | |
1963 | $ref: '#/components/schemas/NotificationSettingValue' | |
1964 | newInstanceFollower: | |
1965 | $ref: '#/components/schemas/NotificationSettingValue' | |
1966 | autoInstanceFollowing: | |
1967 | $ref: '#/components/schemas/NotificationSettingValue' | |
1968 | responses: | |
1969 | '204': | |
1970 | description: successful operation | |
3f71c4c0 | 1971 | |
3545e72c | 1972 | /api/v1/users/me/history/videos: |
3520d385 A |
1973 | get: |
1974 | summary: List watched videos history | |
1975 | security: | |
1976 | - OAuth2: [] | |
1977 | tags: | |
1978 | - My History | |
1979 | parameters: | |
1980 | - $ref: '#/components/parameters/start' | |
1981 | - $ref: '#/components/parameters/count' | |
d8b34ee5 | 1982 | - $ref: '#/components/parameters/search' |
3520d385 A |
1983 | responses: |
1984 | '200': | |
1985 | description: successful operation | |
1986 | content: | |
1987 | application/json: | |
1988 | schema: | |
1989 | $ref: '#/components/schemas/VideoListResponse' | |
3f71c4c0 | 1990 | |
3545e72c | 1991 | /api/v1/users/me/history/videos/{videoId}: |
7177b46c C |
1992 | delete: |
1993 | summary: Delete history element | |
1994 | security: | |
1995 | - OAuth2: [] | |
1996 | tags: | |
1997 | - My History | |
1998 | parameters: | |
1999 | - name: videoId | |
2000 | in: path | |
2001 | required: true | |
2002 | schema: | |
2003 | $ref: '#/components/schemas/Video/properties/id' | |
2004 | responses: | |
2005 | '204': | |
2006 | description: successful operation | |
2007 | ||
3545e72c | 2008 | /api/v1/users/me/history/videos/remove: |
3520d385 A |
2009 | post: |
2010 | summary: Clear video history | |
2011 | security: | |
2012 | - OAuth2: [] | |
2013 | tags: | |
2014 | - My History | |
2015 | requestBody: | |
2016 | content: | |
2017 | multipart/form-data: | |
2018 | schema: | |
2019 | type: object | |
2020 | properties: | |
2021 | beforeDate: | |
2022 | description: history before this date will be deleted | |
2023 | type: string | |
2024 | format: date-time | |
2025 | responses: | |
2026 | '204': | |
2027 | description: successful operation | |
3f71c4c0 | 2028 | |
3545e72c | 2029 | /api/v1/users/me/avatar/pick: |
1569a818 | 2030 | post: |
b029d58a | 2031 | summary: Update my user avatar |
94ff4c23 | 2032 | security: |
3e9e6f2f | 2033 | - OAuth2: [] |
1569a818 | 2034 | tags: |
1f82e3e8 | 2035 | - My User |
1569a818 DG |
2036 | responses: |
2037 | '200': | |
2038 | description: successful operation | |
3e9e6f2f RK |
2039 | content: |
2040 | application/json: | |
2041 | schema: | |
75cba40d C |
2042 | type: object |
2043 | properties: | |
d0800f76 | 2044 | avatars: |
2045 | type: array | |
2046 | items: | |
2047 | $ref: '#/components/schemas/ActorImage' | |
d4132d3f RK |
2048 | '413': |
2049 | description: image file too large | |
2050 | headers: | |
2051 | X-File-Maximum-Size: | |
2052 | schema: | |
2053 | type: string | |
2054 | format: Nginx size | |
2055 | description: Maximum file size for the avatar | |
3e9e6f2f RK |
2056 | requestBody: |
2057 | content: | |
2058 | multipart/form-data: | |
2059 | schema: | |
2060 | type: object | |
2061 | properties: | |
2062 | avatarfile: | |
b8375da9 | 2063 | description: The file to upload |
3e9e6f2f RK |
2064 | type: string |
2065 | format: binary | |
2066 | encoding: | |
0ad45af7 | 2067 | avatarfile: |
3e9e6f2f | 2068 | contentType: image/png, image/jpeg |
3f71c4c0 | 2069 | |
3545e72c | 2070 | /api/v1/users/me/avatar: |
75cba40d C |
2071 | delete: |
2072 | summary: Delete my avatar | |
2073 | security: | |
2074 | - OAuth2: [] | |
2075 | tags: | |
2076 | - My User | |
2077 | responses: | |
2078 | '204': | |
2079 | description: successful operation | |
2080 | ||
3e5716dd C |
2081 | /api/v1/users/register: |
2082 | post: | |
2083 | summary: Register a user | |
2084 | operationId: registerUser | |
2085 | description: Signup has to be enabled and signup approval is not required | |
2086 | tags: | |
2087 | - Register | |
2088 | responses: | |
2089 | '204': | |
2090 | description: successful operation | |
2091 | '400': | |
2092 | description: request error | |
2093 | '403': | |
2094 | description: user registration is not enabled, user limit is reached, registration is not allowed for the ip, requires approval or blocked by a plugin | |
2095 | '409': | |
2096 | description: 'a user with this username, channel name or email already exists' | |
2097 | requestBody: | |
2098 | content: | |
2099 | application/json: | |
2100 | schema: | |
2101 | $ref: '#/components/schemas/RegisterUser' | |
2102 | required: true | |
2103 | ||
2104 | /api/v1/users/registrations/request: | |
2105 | post: | |
2106 | summary: Request registration | |
2107 | description: Signup has to be enabled and require approval on the instance | |
2108 | operationId: requestRegistration | |
2109 | tags: | |
2110 | - Register | |
2111 | responses: | |
2112 | '200': | |
2113 | description: successful operation | |
2114 | content: | |
2115 | application/json: | |
2116 | schema: | |
2117 | $ref: '#/components/schemas/UserRegistration' | |
2118 | '400': | |
2119 | description: request error or signup approval is not enabled on the instance | |
2120 | '403': | |
2121 | description: user registration is not enabled, user limit is reached, registration is not allowed for the ip or blocked by a plugin | |
2122 | '409': | |
2123 | description: 'a user or registration with this username, channel name or email already exists' | |
2124 | requestBody: | |
2125 | content: | |
2126 | application/json: | |
2127 | schema: | |
2128 | $ref: '#/components/schemas/UserRegistrationRequest' | |
2129 | ||
2130 | /api/v1/users/registrations/{registrationId}/accept: | |
2131 | post: | |
2132 | security: | |
2133 | - OAuth2: | |
2134 | - admin | |
2135 | - moderator | |
2136 | summary: Accept registration | |
2137 | operationId: acceptRegistration | |
2138 | tags: | |
2139 | - Register | |
2140 | parameters: | |
2141 | - $ref: '#/components/parameters/registrationId' | |
2142 | requestBody: | |
2143 | content: | |
2144 | application/json: | |
2145 | schema: | |
2146 | $ref: '#/components/schemas/UserRegistrationAcceptOrReject' | |
2147 | responses: | |
2148 | '204': | |
2149 | description: successful operation | |
2150 | ||
2151 | /api/v1/users/registrations/{registrationId}/reject: | |
2152 | post: | |
2153 | security: | |
2154 | - OAuth2: | |
2155 | - admin | |
2156 | - moderator | |
2157 | summary: Reject registration | |
2158 | operationId: rejectRegistration | |
2159 | tags: | |
2160 | - Register | |
2161 | parameters: | |
2162 | - $ref: '#/components/parameters/registrationId' | |
2163 | requestBody: | |
2164 | content: | |
2165 | application/json: | |
2166 | schema: | |
2167 | $ref: '#/components/schemas/UserRegistrationAcceptOrReject' | |
2168 | responses: | |
2169 | '204': | |
2170 | description: successful operation | |
2171 | ||
2172 | /api/v1/users/registrations/{registrationId}: | |
2173 | delete: | |
2174 | security: | |
2175 | - OAuth2: | |
2176 | - admin | |
2177 | - moderator | |
2178 | summary: Delete registration | |
2179 | description: 'Delete the registration entry. It will not remove the user associated with this registration (if any)' | |
2180 | operationId: deleteRegistration | |
2181 | tags: | |
2182 | - Register | |
2183 | parameters: | |
2184 | - $ref: '#/components/parameters/registrationId' | |
2185 | responses: | |
2186 | '204': | |
2187 | description: successful operation | |
2188 | ||
2189 | /api/v1/users/registrations: | |
2190 | get: | |
2191 | security: | |
2192 | - OAuth2: | |
2193 | - admin | |
2194 | - moderator | |
2195 | summary: List registrations | |
2196 | operationId: listRegistrations | |
2197 | tags: | |
2198 | - Register | |
2199 | parameters: | |
2200 | - $ref: '#/components/parameters/start' | |
2201 | - $ref: '#/components/parameters/count' | |
2202 | - name: search | |
2203 | in: query | |
2204 | required: false | |
2205 | schema: | |
2206 | type: string | |
2207 | - name: sort | |
2208 | in: query | |
2209 | required: false | |
2210 | schema: | |
2211 | type: string | |
2212 | enum: | |
2213 | - -createdAt | |
2214 | - createdAt | |
2215 | - state | |
2216 | - -state | |
2217 | responses: | |
2218 | '204': | |
2219 | description: successful operation | |
2220 | ||
3545e72c | 2221 | /api/v1/videos/ownership: |
b029d58a C |
2222 | get: |
2223 | summary: List video ownership changes | |
2224 | tags: | |
2225 | - Video Ownership Change | |
2226 | security: | |
2227 | - OAuth2: [] | |
2228 | responses: | |
2229 | '200': | |
2230 | description: successful operation | |
3f71c4c0 | 2231 | |
3545e72c | 2232 | '/api/v1/videos/ownership/{id}/accept': |
b029d58a C |
2233 | post: |
2234 | summary: Accept ownership change request | |
2235 | tags: | |
2236 | - Video Ownership Change | |
2237 | security: | |
2238 | - OAuth2: [] | |
2239 | parameters: | |
2240 | - $ref: '#/components/parameters/idOrUUID' | |
2241 | responses: | |
2242 | '204': | |
c1843150 | 2243 | description: successful operation |
06746a8b RK |
2244 | '403': |
2245 | description: cannot terminate an ownership change of another user | |
2246 | '404': | |
b25fdc73 | 2247 | description: video ownership change not found |
3f71c4c0 | 2248 | |
3545e72c | 2249 | '/api/v1/videos/ownership/{id}/refuse': |
b029d58a C |
2250 | post: |
2251 | summary: Refuse ownership change request | |
2252 | tags: | |
2253 | - Video Ownership Change | |
2254 | security: | |
2255 | - OAuth2: [] | |
2256 | parameters: | |
2257 | - $ref: '#/components/parameters/idOrUUID' | |
2258 | responses: | |
2259 | '204': | |
c1843150 | 2260 | description: successful operation |
06746a8b RK |
2261 | '403': |
2262 | description: cannot terminate an ownership change of another user | |
2263 | '404': | |
b25fdc73 | 2264 | description: video ownership change not found |
3f71c4c0 | 2265 | |
3545e72c | 2266 | '/api/v1/videos/{id}/give-ownership': |
b029d58a C |
2267 | post: |
2268 | summary: Request ownership change | |
2269 | tags: | |
2270 | - Video Ownership Change | |
2271 | security: | |
2272 | - OAuth2: [] | |
2273 | parameters: | |
2274 | - $ref: '#/components/parameters/idOrUUID' | |
2275 | requestBody: | |
2276 | required: true | |
2277 | content: | |
2278 | application/x-www-form-urlencoded: | |
2279 | schema: | |
2280 | type: object | |
2281 | properties: | |
2282 | username: | |
2283 | type: string | |
2284 | required: | |
2285 | - username | |
2286 | responses: | |
2287 | '204': | |
c1843150 | 2288 | description: successful operation |
b029d58a | 2289 | '400': |
06746a8b RK |
2290 | description: changing video ownership to a remote account is not supported yet |
2291 | '404': | |
2292 | description: video not found | |
3f71c4c0 | 2293 | |
3545e72c C |
2294 | '/api/v1/videos/{id}/token': |
2295 | post: | |
2296 | summary: Request video token | |
2297 | operationId: requestVideoToken | |
2298 | description: Request special tokens that expire quickly to use them in some context (like accessing private static files) | |
2299 | tags: | |
2300 | - Video | |
2301 | security: | |
2302 | - OAuth2: [] | |
2303 | parameters: | |
2304 | - $ref: '#/components/parameters/idOrUUID' | |
2305 | responses: | |
2306 | '200': | |
2307 | description: successful operation | |
2308 | content: | |
2309 | application/json: | |
2310 | schema: | |
2311 | $ref: '#/components/schemas/VideoTokenResponse' | |
2312 | '400': | |
2313 | description: incorrect parameters | |
2314 | '404': | |
2315 | description: video not found | |
2316 | ||
2317 | /api/v1/videos/{id}/studio/edit: | |
f9079a78 C |
2318 | post: |
2319 | summary: Create a studio task | |
2320 | tags: | |
2321 | - Video Transcoding | |
2322 | - Video | |
2323 | description: Create a task to edit a video (cut, add intro/outro etc) | |
2324 | security: | |
2325 | - OAuth2: [] | |
2326 | parameters: | |
2327 | - $ref: '#/components/parameters/idOrUUID' | |
2328 | requestBody: | |
2329 | required: true | |
2330 | content: | |
2331 | application/x-www-form-urlencoded: | |
2332 | schema: | |
2333 | $ref: '#/components/schemas/VideoStudioCreateTask' | |
2334 | responses: | |
2335 | '204': | |
2336 | description: successful operation | |
2337 | '400': | |
2338 | description: incorrect parameters | |
2339 | '404': | |
2340 | description: video not found | |
2341 | ||
3545e72c | 2342 | /api/v1/videos: |
1569a818 | 2343 | get: |
b029d58a | 2344 | summary: List videos |
e2adb8cb | 2345 | operationId: getVideos |
1569a818 DG |
2346 | tags: |
2347 | - Video | |
44cb3b85 | 2348 | parameters: |
fd5af7a2 | 2349 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 2350 | - $ref: '#/components/parameters/isLive' |
fd5af7a2 RK |
2351 | - $ref: '#/components/parameters/tagsOneOf' |
2352 | - $ref: '#/components/parameters/tagsAllOf' | |
2353 | - $ref: '#/components/parameters/licenceOneOf' | |
2354 | - $ref: '#/components/parameters/languageOneOf' | |
2355 | - $ref: '#/components/parameters/nsfw' | |
2760b454 C |
2356 | - $ref: '#/components/parameters/isLocal' |
2357 | - $ref: '#/components/parameters/include' | |
527a52ac | 2358 | - $ref: '#/components/parameters/privacyOneOf' |
d324756e C |
2359 | - $ref: '#/components/parameters/hasHLSFiles' |
2360 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
59c794a5 | 2361 | - $ref: '#/components/parameters/skipCount' |
3e9e6f2f RK |
2362 | - $ref: '#/components/parameters/start' |
2363 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 2364 | - $ref: '#/components/parameters/videosSort' |
1569a818 DG |
2365 | responses: |
2366 | '200': | |
2367 | description: successful operation | |
3e9e6f2f RK |
2368 | content: |
2369 | application/json: | |
2370 | schema: | |
048b6946 | 2371 | $ref: '#/components/schemas/VideoListResponse' |
3f71c4c0 | 2372 | |
3545e72c | 2373 | /api/v1/videos/categories: |
1569a818 | 2374 | get: |
b029d58a | 2375 | summary: List available video categories |
40cfb36b | 2376 | operationId: getCategories |
1569a818 DG |
2377 | tags: |
2378 | - Video | |
1569a818 DG |
2379 | responses: |
2380 | '200': | |
2381 | description: successful operation | |
3e9e6f2f RK |
2382 | content: |
2383 | application/json: | |
2384 | schema: | |
2385 | type: array | |
2386 | items: | |
2387 | type: string | |
84f6e32c RK |
2388 | examples: |
2389 | nightly: | |
2390 | externalValue: https://peertube2.cpy.re/api/v1/videos/categories | |
3f71c4c0 | 2391 | |
3545e72c | 2392 | /api/v1/videos/licences: |
1569a818 | 2393 | get: |
b029d58a | 2394 | summary: List available video licences |
40cfb36b | 2395 | operationId: getLicences |
1569a818 DG |
2396 | tags: |
2397 | - Video | |
1569a818 DG |
2398 | responses: |
2399 | '200': | |
2400 | description: successful operation | |
3e9e6f2f RK |
2401 | content: |
2402 | application/json: | |
2403 | schema: | |
2404 | type: array | |
2405 | items: | |
2406 | type: string | |
84f6e32c RK |
2407 | examples: |
2408 | nightly: | |
2409 | externalValue: https://peertube2.cpy.re/api/v1/videos/licences | |
3f71c4c0 | 2410 | |
3545e72c | 2411 | /api/v1/videos/languages: |
1569a818 | 2412 | get: |
b029d58a | 2413 | summary: List available video languages |
40cfb36b | 2414 | operationId: getLanguages |
1569a818 DG |
2415 | tags: |
2416 | - Video | |
1569a818 DG |
2417 | responses: |
2418 | '200': | |
2419 | description: successful operation | |
3e9e6f2f RK |
2420 | content: |
2421 | application/json: | |
2422 | schema: | |
2423 | type: array | |
2424 | items: | |
2425 | type: string | |
84f6e32c RK |
2426 | examples: |
2427 | nightly: | |
2428 | externalValue: https://peertube2.cpy.re/api/v1/videos/languages | |
3f71c4c0 | 2429 | |
3545e72c | 2430 | /api/v1/videos/privacies: |
1569a818 | 2431 | get: |
40cfb36b RK |
2432 | summary: List available video privacy policies |
2433 | operationId: getPrivacyPolicies | |
1569a818 DG |
2434 | tags: |
2435 | - Video | |
1569a818 DG |
2436 | responses: |
2437 | '200': | |
2438 | description: successful operation | |
3e9e6f2f RK |
2439 | content: |
2440 | application/json: | |
2441 | schema: | |
2442 | type: array | |
2443 | items: | |
2444 | type: string | |
84f6e32c RK |
2445 | examples: |
2446 | nightly: | |
2447 | externalValue: https://peertube2.cpy.re/api/v1/videos/privacies | |
3f71c4c0 | 2448 | |
3545e72c | 2449 | '/api/v1/videos/{id}': |
1569a818 | 2450 | put: |
b029d58a | 2451 | summary: Update a video |
3f71c4c0 | 2452 | operationId: putVideo |
94ff4c23 | 2453 | security: |
3e9e6f2f | 2454 | - OAuth2: [] |
1569a818 DG |
2455 | tags: |
2456 | - Video | |
1569a818 | 2457 | parameters: |
cb9d028a | 2458 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 | 2459 | responses: |
37db4176 | 2460 | '204': |
1569a818 | 2461 | description: successful operation |
3e9e6f2f RK |
2462 | requestBody: |
2463 | content: | |
2464 | multipart/form-data: | |
2465 | schema: | |
2466 | type: object | |
2467 | properties: | |
2468 | thumbnailfile: | |
2469 | description: Video thumbnail file | |
2470 | type: string | |
0ad45af7 | 2471 | format: binary |
3e9e6f2f RK |
2472 | previewfile: |
2473 | description: Video preview file | |
2474 | type: string | |
0ad45af7 | 2475 | format: binary |
3e9e6f2f | 2476 | category: |
40cfb36b | 2477 | $ref: '#/components/schemas/VideoCategorySet' |
3e9e6f2f | 2478 | licence: |
40cfb36b | 2479 | $ref: '#/components/schemas/VideoLicenceSet' |
3e9e6f2f | 2480 | language: |
40cfb36b | 2481 | $ref: '#/components/schemas/VideoLanguageSet' |
c1843150 C |
2482 | privacy: |
2483 | $ref: '#/components/schemas/VideoPrivacySet' | |
3e9e6f2f RK |
2484 | description: |
2485 | description: Video description | |
2486 | type: string | |
2487 | waitTranscoding: | |
2488 | description: Whether or not we wait transcoding before publish the video | |
2489 | type: string | |
2490 | support: | |
00494d6e | 2491 | description: A text tell the audience how to support the video creator |
9a320a06 | 2492 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
3e9e6f2f RK |
2493 | type: string |
2494 | nsfw: | |
2495 | description: Whether or not this video contains sensitive content | |
84f6e32c | 2496 | type: boolean |
3e9e6f2f RK |
2497 | name: |
2498 | description: Video name | |
2499 | type: string | |
bdac0584 RK |
2500 | minLength: 3 |
2501 | maxLength: 120 | |
3e9e6f2f | 2502 | tags: |
12fed49e | 2503 | description: Video tags (maximum 5 tags each between 2 and 30 characters) |
1fd12c7c | 2504 | type: array |
07d02f6d FS |
2505 | minItems: 1 |
2506 | maxItems: 5 | |
1fd12c7c C |
2507 | items: |
2508 | type: string | |
07d02f6d FS |
2509 | minLength: 2 |
2510 | maxLength: 30 | |
3e9e6f2f RK |
2511 | commentsEnabled: |
2512 | description: Enable or disable comments for this video | |
84f6e32c | 2513 | type: boolean |
2370d9cc | 2514 | downloadEnabled: |
2515 | description: Enable or disable downloading for this video | |
2516 | type: boolean | |
37db4176 FS |
2517 | originallyPublishedAt: |
2518 | description: Date when the content was originally published | |
2519 | type: string | |
2520 | format: date-time | |
5dce26d2 C |
2521 | scheduleUpdate: |
2522 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
0ad45af7 FS |
2523 | encoding: |
2524 | thumbnailfile: | |
2525 | contentType: image/jpeg | |
2526 | previewfile: | |
2527 | contentType: image/jpeg | |
1569a818 | 2528 | get: |
b029d58a | 2529 | summary: Get a video |
3f71c4c0 | 2530 | operationId: getVideo |
1569a818 DG |
2531 | tags: |
2532 | - Video | |
1569a818 | 2533 | parameters: |
cb9d028a | 2534 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2535 | responses: |
2536 | '200': | |
2537 | description: successful operation | |
3e9e6f2f RK |
2538 | content: |
2539 | application/json: | |
2540 | schema: | |
5dce26d2 | 2541 | $ref: '#/components/schemas/VideoDetails' |
1569a818 | 2542 | delete: |
b029d58a | 2543 | summary: Delete a video |
3f71c4c0 | 2544 | operationId: delVideo |
94ff4c23 | 2545 | security: |
3e9e6f2f | 2546 | - OAuth2: [] |
1569a818 DG |
2547 | tags: |
2548 | - Video | |
1569a818 | 2549 | parameters: |
cb9d028a | 2550 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2551 | responses: |
2552 | '204': | |
c1843150 | 2553 | description: successful operation |
3f71c4c0 | 2554 | |
3545e72c | 2555 | '/api/v1/videos/{id}/description': |
1569a818 | 2556 | get: |
b029d58a | 2557 | summary: Get complete video description |
3f71c4c0 | 2558 | operationId: getVideoDesc |
1569a818 DG |
2559 | tags: |
2560 | - Video | |
1569a818 | 2561 | parameters: |
cb9d028a | 2562 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
2563 | responses: |
2564 | '200': | |
2565 | description: successful operation | |
3e9e6f2f RK |
2566 | content: |
2567 | application/json: | |
2568 | schema: | |
b8375da9 | 2569 | nullable: true |
3e9e6f2f | 2570 | type: string |
b8375da9 RK |
2571 | minLength: 3 |
2572 | maxLength: 10000 | |
2573 | example: | | |
2574 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)** | |
3f71c4c0 | 2575 | |
3545e72c | 2576 | '/api/v1/videos/{id}/source': |
2e401e85 | 2577 | post: |
2578 | summary: Get video source file metadata | |
2579 | operationId: getVideoSource | |
2580 | tags: | |
2581 | - Video | |
2582 | parameters: | |
2583 | - $ref: '#/components/parameters/idOrUUID' | |
2584 | responses: | |
2585 | '200': | |
2586 | description: successful operation | |
2587 | content: | |
2588 | application/json: | |
2589 | schema: | |
2590 | $ref: '#/components/schemas/VideoSource' | |
2591 | ||
3545e72c | 2592 | '/api/v1/videos/{id}/views': |
1569a818 | 2593 | post: |
cf158e7e C |
2594 | summary: Notify user is watching a video |
2595 | description: Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time. | |
c756bae0 | 2596 | operationId: addView |
1569a818 DG |
2597 | tags: |
2598 | - Video | |
1569a818 | 2599 | parameters: |
cb9d028a | 2600 | - $ref: '#/components/parameters/idOrUUID' |
cf158e7e C |
2601 | requestBody: |
2602 | content: | |
2603 | application/json: | |
2604 | schema: | |
2605 | $ref: '#/components/schemas/UserViewingVideo' | |
2606 | required: true | |
1569a818 DG |
2607 | responses: |
2608 | '204': | |
c1843150 | 2609 | description: successful operation |
3f71c4c0 | 2610 | |
3545e72c | 2611 | '/api/v1/videos/{id}/watching': |
6441981b | 2612 | put: |
b029d58a | 2613 | summary: Set watching progress of a video |
cf158e7e C |
2614 | deprecated: true |
2615 | description: This endpoint has been deprecated. Use `/videos/{id}/views` instead | |
6441981b RK |
2616 | tags: |
2617 | - Video | |
2618 | security: | |
2619 | - OAuth2: [] | |
2620 | parameters: | |
cb9d028a | 2621 | - $ref: '#/components/parameters/idOrUUID' |
6441981b RK |
2622 | requestBody: |
2623 | content: | |
2624 | application/json: | |
2625 | schema: | |
cf158e7e | 2626 | $ref: '#/components/schemas/UserViewingVideo' |
6441981b RK |
2627 | required: true |
2628 | responses: | |
2629 | '204': | |
c1843150 | 2630 | description: successful operation |
3f71c4c0 | 2631 | |
3545e72c | 2632 | '/api/v1/videos/{id}/stats/overall': |
cf158e7e C |
2633 | get: |
2634 | summary: Get overall stats of a video | |
2635 | tags: | |
2636 | - Video Stats | |
2637 | security: | |
2638 | - OAuth2: [] | |
2639 | parameters: | |
2640 | - $ref: '#/components/parameters/idOrUUID' | |
49f0468d C |
2641 | - name: startDate |
2642 | in: query | |
2643 | description: Filter stats by start date | |
2644 | schema: | |
2645 | type: string | |
2646 | format: date-time | |
2647 | - name: endDate | |
2648 | in: query | |
2649 | description: Filter stats by end date | |
2650 | schema: | |
2651 | type: string | |
2652 | format: date-time | |
cf158e7e C |
2653 | responses: |
2654 | '200': | |
2655 | description: successful operation | |
2656 | content: | |
2657 | application/json: | |
2658 | schema: | |
2659 | $ref: '#/components/schemas/VideoStatsOverall' | |
2660 | ||
3545e72c | 2661 | '/api/v1/videos/{id}/stats/retention': |
cf158e7e C |
2662 | get: |
2663 | summary: Get retention stats of a video | |
2664 | tags: | |
2665 | - Video Stats | |
2666 | security: | |
2667 | - OAuth2: [] | |
2668 | parameters: | |
2669 | - $ref: '#/components/parameters/idOrUUID' | |
2670 | responses: | |
2671 | '200': | |
2672 | description: successful operation | |
2673 | content: | |
2674 | application/json: | |
2675 | schema: | |
2676 | $ref: '#/components/schemas/VideoStatsRetention' | |
2677 | ||
3545e72c | 2678 | '/api/v1/videos/{id}/stats/timeseries/{metric}': |
cf158e7e C |
2679 | get: |
2680 | summary: Get timeserie stats of a video | |
2681 | tags: | |
2682 | - Video Stats | |
2683 | security: | |
2684 | - OAuth2: [] | |
2685 | parameters: | |
2686 | - $ref: '#/components/parameters/idOrUUID' | |
2687 | - | |
2688 | name: metric | |
2689 | in: path | |
2690 | required: true | |
2691 | description: The metric to get | |
2692 | schema: | |
2693 | type: string | |
2694 | enum: | |
2695 | - 'viewers' | |
2696 | - 'aggregateWatchTime' | |
49f0468d C |
2697 | - name: startDate |
2698 | in: query | |
2699 | description: Filter stats by start date | |
2700 | schema: | |
2701 | type: string | |
2702 | format: date-time | |
2703 | - name: endDate | |
2704 | in: query | |
2705 | description: Filter stats by end date | |
2706 | schema: | |
2707 | type: string | |
2708 | format: date-time | |
cf158e7e C |
2709 | responses: |
2710 | '200': | |
2711 | description: successful operation | |
2712 | content: | |
2713 | application/json: | |
2714 | schema: | |
2715 | $ref: '#/components/schemas/VideoStatsTimeserie' | |
2716 | ||
3545e72c | 2717 | /api/v1/videos/upload: |
1569a818 | 2718 | post: |
b029d58a | 2719 | summary: Upload a video |
f6d6e7f8 | 2720 | description: Uses a single request to upload a video. |
40cfb36b | 2721 | operationId: uploadLegacy |
94ff4c23 | 2722 | security: |
3e9e6f2f | 2723 | - OAuth2: [] |
1569a818 DG |
2724 | tags: |
2725 | - Video | |
f6d6e7f8 | 2726 | - Video Upload |
1569a818 DG |
2727 | responses: |
2728 | '200': | |
2729 | description: successful operation | |
3e9e6f2f RK |
2730 | content: |
2731 | application/json: | |
2732 | schema: | |
2733 | $ref: '#/components/schemas/VideoUploadResponse' | |
06bcfbd9 | 2734 | '403': |
f2eb23cd | 2735 | description: video didn't pass upload filter |
06bcfbd9 | 2736 | '408': |
84f6e32c | 2737 | description: upload has timed out |
d4132d3f | 2738 | '413': |
c756bae0 RK |
2739 | x-summary: video file too large, due to quota or max body size limit set by the reverse-proxy |
2740 | description: | | |
2741 | If the response has no body, it means the reverse-proxy didn't let it through. Otherwise disambiguate via `type`: | |
7a4fd56c | 2742 | - `quota_reached` for quota limits whether daily or global |
d4132d3f RK |
2743 | headers: |
2744 | X-File-Maximum-Size: | |
2745 | schema: | |
2746 | type: string | |
2747 | format: Nginx size | |
2748 | description: Maximum file size for the video | |
f2eb23cd RK |
2749 | '415': |
2750 | description: video type unsupported | |
06bcfbd9 | 2751 | '422': |
f2eb23cd | 2752 | description: video unreadable |
3e9e6f2f RK |
2753 | requestBody: |
2754 | content: | |
2755 | multipart/form-data: | |
2756 | schema: | |
f6d6e7f8 | 2757 | $ref: '#/components/schemas/VideoUploadRequestLegacy' |
0ad45af7 FS |
2758 | encoding: |
2759 | videofile: | |
2760 | contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream | |
2761 | thumbnailfile: | |
2762 | contentType: image/jpeg | |
2763 | previewfile: | |
2764 | contentType: image/jpeg | |
40cfb36b | 2765 | x-codeSamples: |
8f9e8be1 RK |
2766 | - lang: Shell |
2767 | source: | | |
0579dee3 | 2768 | ## DEPENDENCIES: jq |
8f9e8be1 RK |
2769 | USERNAME="<your_username>" |
2770 | PASSWORD="<your_password>" | |
2771 | FILE_PATH="<your_file_path>" | |
2772 | CHANNEL_ID="<your_channel_id>" | |
8f9e8be1 | 2773 | NAME="<video_name>" |
3cf8874f | 2774 | API="https://peertube2.cpy.re/api/v1" |
8f9e8be1 | 2775 | |
8f9e8be1 | 2776 | ## AUTH |
3cf8874f RK |
2777 | client_id=$(curl -s "$API/oauth-clients/local" | jq -r ".client_id") |
2778 | client_secret=$(curl -s "$API/oauth-clients/local" | jq -r ".client_secret") | |
2779 | token=$(curl -s "$API/users/token" \ | |
0579dee3 JK |
2780 | --data client_id="$client_id" \ |
2781 | --data client_secret="$client_secret" \ | |
2782 | --data grant_type=password \ | |
0579dee3 JK |
2783 | --data username="$USERNAME" \ |
2784 | --data password="$PASSWORD" \ | |
8f9e8be1 | 2785 | | jq -r ".access_token") |
3cf8874f | 2786 | |
8f9e8be1 | 2787 | ## VIDEO UPLOAD |
3cf8874f | 2788 | curl -s "$API/videos/upload" \ |
0579dee3 JK |
2789 | -H "Authorization: Bearer $token" \ |
2790 | --max-time 600 \ | |
2791 | --form videofile=@"$FILE_PATH" \ | |
2792 | --form channelId=$CHANNEL_ID \ | |
2793 | --form name="$NAME" | |
3f71c4c0 | 2794 | |
3545e72c | 2795 | /api/v1/videos/upload-resumable: |
f6d6e7f8 | 2796 | post: |
2797 | summary: Initialize the resumable upload of a video | |
2798 | description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to initialize the upload of a video | |
40cfb36b | 2799 | operationId: uploadResumableInit |
f6d6e7f8 | 2800 | security: |
2801 | - OAuth2: [] | |
2802 | tags: | |
2803 | - Video | |
2804 | - Video Upload | |
2805 | parameters: | |
2806 | - name: X-Upload-Content-Length | |
2807 | in: header | |
2808 | schema: | |
2809 | type: number | |
2810 | example: 2469036 | |
2811 | required: true | |
2812 | description: Number of bytes that will be uploaded in subsequent requests. Set this value to the size of the file you are uploading. | |
2813 | - name: X-Upload-Content-Type | |
2814 | in: header | |
2815 | schema: | |
2816 | type: string | |
2817 | format: mimetype | |
2818 | example: video/mp4 | |
2819 | required: true | |
2820 | description: MIME type of the file that you are uploading. Depending on your instance settings, acceptable values might vary. | |
2821 | requestBody: | |
2822 | content: | |
2823 | application/json: | |
2824 | schema: | |
2825 | $ref: '#/components/schemas/VideoUploadRequestResumable' | |
2826 | responses: | |
2827 | '200': | |
2828 | description: file already exists, send a [`resume`](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) request instead | |
2829 | '201': | |
2830 | description: created | |
2831 | headers: | |
2832 | Location: | |
2833 | schema: | |
2834 | type: string | |
2835 | format: url | |
2836 | example: /api/v1/videos/upload-resumable?upload_id=471e97554f21dec3b8bb5d4602939c51 | |
2837 | Content-Length: | |
2838 | schema: | |
2839 | type: number | |
2840 | example: 0 | |
f6d6e7f8 | 2841 | '413': |
c756bae0 RK |
2842 | x-summary: video file too large, due to quota, absolute max file size or concurrent partial upload limit |
2843 | description: | | |
2844 | Disambiguate via `type`: | |
2845 | - `max_file_size_reached` for the absolute file size limit | |
2846 | - `quota_reached` for quota limits whether daily or global | |
f6d6e7f8 | 2847 | '415': |
2848 | description: video type unsupported | |
2849 | put: | |
2850 | summary: Send chunk for the resumable upload of a video | |
2851 | description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to continue, pause or resume the upload of a video | |
40cfb36b | 2852 | operationId: uploadResumable |
f6d6e7f8 | 2853 | security: |
2854 | - OAuth2: [] | |
2855 | tags: | |
2856 | - Video | |
2857 | - Video Upload | |
2858 | parameters: | |
2859 | - name: upload_id | |
c215e627 | 2860 | in: query |
f6d6e7f8 | 2861 | required: true |
2862 | description: | | |
b4a4bcd2 | 2863 | Created session id to proceed with. If you didn't send chunks in the last hour, it is |
f6d6e7f8 | 2864 | not valid anymore and you need to initialize a new upload. |
2865 | schema: | |
2866 | type: string | |
2867 | - name: Content-Range | |
2868 | in: header | |
2869 | schema: | |
2870 | type: string | |
2871 | example: bytes 0-262143/2469036 | |
2872 | required: true | |
2873 | description: | | |
2874 | Specifies the bytes in the file that the request is uploading. | |
2875 | ||
2876 | For example, a value of `bytes 0-262143/1000000` shows that the request is sending the first | |
2877 | 262144 bytes (256 x 1024) in a 2,469,036 byte file. | |
2878 | - name: Content-Length | |
2879 | in: header | |
2880 | schema: | |
2881 | type: number | |
2882 | example: 262144 | |
2883 | required: true | |
2884 | description: | | |
2885 | Size of the chunk that the request is sending. | |
2886 | ||
f6d6e7f8 | 2887 | Remember that larger chunks are more efficient. PeerTube's web client uses chunks varying from |
2888 | 1048576 bytes (~1MB) and increases or reduces size depending on connection health. | |
2889 | requestBody: | |
2890 | content: | |
2891 | application/octet-stream: | |
2892 | schema: | |
2893 | type: string | |
2894 | format: binary | |
2895 | responses: | |
2896 | '200': | |
2897 | description: last chunk received | |
2898 | headers: | |
2899 | Content-Length: | |
2900 | schema: | |
2901 | type: number | |
2902 | content: | |
2903 | application/json: | |
2904 | schema: | |
2905 | $ref: '#/components/schemas/VideoUploadResponse' | |
2906 | '308': | |
2907 | description: resume incomplete | |
2908 | headers: | |
2909 | Range: | |
2910 | schema: | |
2911 | type: string | |
2912 | example: bytes=0-262143 | |
2913 | Content-Length: | |
2914 | schema: | |
2915 | type: number | |
2916 | example: 0 | |
2917 | '403': | |
2918 | description: video didn't pass upload filter | |
c756bae0 RK |
2919 | '404': |
2920 | description: upload not found | |
2921 | '409': | |
2922 | description: chunk doesn't match range | |
f6d6e7f8 | 2923 | '422': |
2924 | description: video unreadable | |
c756bae0 RK |
2925 | '429': |
2926 | description: too many concurrent requests | |
276250f0 RK |
2927 | '503': |
2928 | description: upload is already being processed | |
2929 | headers: | |
2930 | 'Retry-After': | |
2931 | schema: | |
2932 | type: number | |
2933 | example: 300 | |
f6d6e7f8 | 2934 | delete: |
2935 | summary: Cancel the resumable upload of a video, deleting any data uploaded so far | |
2936 | description: Uses [a resumable protocol](https://github.com/kukhariev/node-uploadx/blob/master/proto.md) to cancel the upload of a video | |
40cfb36b | 2937 | operationId: uploadResumableCancel |
f6d6e7f8 | 2938 | security: |
2939 | - OAuth2: [] | |
2940 | tags: | |
2941 | - Video | |
2942 | - Video Upload | |
2943 | parameters: | |
2944 | - name: upload_id | |
c215e627 | 2945 | in: query |
f6d6e7f8 | 2946 | required: true |
2947 | description: | | |
2948 | Created session id to proceed with. If you didn't send chunks in the last 12 hours, it is | |
2949 | not valid anymore and the upload session has already been deleted with its data ;-) | |
2950 | schema: | |
2951 | type: string | |
2952 | - name: Content-Length | |
2953 | in: header | |
2954 | required: true | |
2955 | schema: | |
2956 | type: number | |
2957 | example: 0 | |
2958 | responses: | |
2959 | '204': | |
2960 | description: upload cancelled | |
2961 | headers: | |
2962 | Content-Length: | |
2963 | schema: | |
2964 | type: number | |
2965 | example: 0 | |
c756bae0 RK |
2966 | '404': |
2967 | description: upload not found | |
3f71c4c0 | 2968 | |
3545e72c | 2969 | /api/v1/videos/imports: |
28c8e63e | 2970 | post: |
b029d58a C |
2971 | summary: Import a video |
2972 | description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator) | |
40cfb36b | 2973 | operationId: importVideo |
28c8e63e C |
2974 | security: |
2975 | - OAuth2: [] | |
2976 | tags: | |
419b520c | 2977 | - Video Imports |
f6d6e7f8 | 2978 | - Video Upload |
28c8e63e C |
2979 | requestBody: |
2980 | content: | |
2981 | multipart/form-data: | |
2982 | schema: | |
ac2a5b54 | 2983 | $ref: '#/components/schemas/VideoCreateImport' |
0ad45af7 FS |
2984 | encoding: |
2985 | torrentfile: | |
2986 | contentType: application/x-bittorrent | |
2987 | thumbnailfile: | |
2988 | contentType: image/jpeg | |
2989 | previewfile: | |
2990 | contentType: image/jpeg | |
06746a8b RK |
2991 | responses: |
2992 | '200': | |
2993 | description: successful operation | |
2994 | content: | |
2995 | application/json: | |
2996 | schema: | |
2997 | $ref: '#/components/schemas/VideoUploadResponse' | |
06746a8b RK |
2998 | '400': |
2999 | description: '`magnetUri` or `targetUrl` or a torrent file missing' | |
f2eb23cd RK |
3000 | '403': |
3001 | description: video didn't pass pre-import filter | |
3002 | '409': | |
3003 | description: HTTP or Torrent/magnetURI import not enabled | |
668b7f09 | 3004 | |
3545e72c | 3005 | /api/v1/videos/imports/{id}/cancel: |
419b520c C |
3006 | post: |
3007 | summary: Cancel video import | |
3008 | description: Cancel a pending video import | |
3009 | security: | |
3010 | - OAuth2: [] | |
3011 | tags: | |
3012 | - Video Imports | |
3013 | parameters: | |
3014 | - $ref: '#/components/parameters/id' | |
3015 | responses: | |
3016 | '204': | |
3017 | description: successful operation | |
3018 | ||
3545e72c | 3019 | /api/v1/videos/imports/{id}: |
419b520c C |
3020 | delete: |
3021 | summary: Delete video import | |
3022 | description: Delete ended video import | |
3023 | security: | |
3024 | - OAuth2: [] | |
3025 | tags: | |
3026 | - Video Imports | |
3027 | parameters: | |
3028 | - $ref: '#/components/parameters/id' | |
3029 | responses: | |
3030 | '204': | |
3031 | description: successful operation | |
3032 | ||
3545e72c | 3033 | /api/v1/videos/live: |
4e239e35 C |
3034 | post: |
3035 | summary: Create a live | |
e2adb8cb | 3036 | operationId: addLive |
4e239e35 C |
3037 | security: |
3038 | - OAuth2: [] | |
3039 | tags: | |
3040 | - Live Videos | |
3041 | - Video | |
3042 | responses: | |
3043 | '200': | |
3044 | description: successful operation | |
3045 | content: | |
3046 | application/json: | |
3047 | schema: | |
3048 | $ref: '#/components/schemas/VideoUploadResponse' | |
c756bae0 RK |
3049 | '400': |
3050 | x-summary: validation error, or conflicting `saveReplay` and `permanentLive` parameter set | |
3051 | description: | | |
3052 | Disambiguate via `type`: | |
3053 | - default type for a validation error | |
3054 | - `live_conflicting_permanent_and_save_replay` for conflicting parameters set | |
4e239e35 | 3055 | '403': |
c756bae0 RK |
3056 | x-summary: live is not enabled, allow replay is not enabled, or max instance/user live videos limit is exceeded |
3057 | description: | | |
3058 | Disambiguate via `type`: | |
3059 | - `live_not_enabled` for a disabled live feature | |
3060 | - `live_not_allowing_replay` for a disabled replay feature | |
3061 | - `max_instance_lives_limit_reached` for the absolute concurrent live limit | |
3062 | - `max_user_lives_limit_reached` for the user concurrent live limit | |
4e239e35 C |
3063 | requestBody: |
3064 | content: | |
3065 | multipart/form-data: | |
3066 | schema: | |
3067 | type: object | |
3068 | properties: | |
3069 | channelId: | |
3070 | description: Channel id that will contain this live video | |
3071 | type: integer | |
3072 | saveReplay: | |
3073 | type: boolean | |
bb4ba6d9 C |
3074 | permanentLive: |
3075 | description: User can stream multiple times in a permanent live | |
3076 | type: boolean | |
f443a746 C |
3077 | latencyMode: |
3078 | description: User can select live latency mode if enabled by the instance | |
3079 | $ref: '#/components/schemas/LiveVideoLatencyMode' | |
4e239e35 C |
3080 | thumbnailfile: |
3081 | description: Live video/replay thumbnail file | |
3082 | type: string | |
3083 | format: binary | |
3084 | previewfile: | |
3085 | description: Live video/replay preview file | |
3086 | type: string | |
3087 | format: binary | |
3088 | privacy: | |
3089 | $ref: '#/components/schemas/VideoPrivacySet' | |
3090 | category: | |
40cfb36b | 3091 | $ref: '#/components/schemas/VideoCategorySet' |
4e239e35 | 3092 | licence: |
40cfb36b | 3093 | $ref: '#/components/schemas/VideoLicenceSet' |
4e239e35 | 3094 | language: |
40cfb36b | 3095 | $ref: '#/components/schemas/VideoLanguageSet' |
4e239e35 C |
3096 | description: |
3097 | description: Live video/replay description | |
3098 | type: string | |
3099 | support: | |
3100 | description: A text tell the audience how to support the creator | |
9a320a06 | 3101 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
4e239e35 C |
3102 | type: string |
3103 | nsfw: | |
3104 | description: Whether or not this live video/replay contains sensitive content | |
3105 | type: boolean | |
3106 | name: | |
3107 | description: Live video/replay name | |
3108 | type: string | |
bdac0584 RK |
3109 | minLength: 3 |
3110 | maxLength: 120 | |
4e239e35 C |
3111 | tags: |
3112 | description: Live video/replay tags (maximum 5 tags each between 2 and 30 characters) | |
3113 | type: array | |
3114 | minItems: 1 | |
3115 | maxItems: 5 | |
3116 | items: | |
3117 | type: string | |
3118 | minLength: 2 | |
3119 | maxLength: 30 | |
3120 | commentsEnabled: | |
3121 | description: Enable or disable comments for this live video/replay | |
3122 | type: boolean | |
3123 | downloadEnabled: | |
2370d9cc | 3124 | description: Enable or disable downloading for the replay of this live video |
4e239e35 C |
3125 | type: boolean |
3126 | required: | |
3127 | - channelId | |
3128 | - name | |
3129 | encoding: | |
3130 | thumbnailfile: | |
3131 | contentType: image/jpeg | |
3132 | previewfile: | |
3133 | contentType: image/jpeg | |
3134 | ||
3545e72c | 3135 | /api/v1/videos/live/{id}: |
4e239e35 | 3136 | get: |
f6d6e7f8 | 3137 | summary: Get information about a live |
40cfb36b | 3138 | operationId: getLiveId |
4e239e35 C |
3139 | security: |
3140 | - OAuth2: [] | |
3141 | tags: | |
3142 | - Live Videos | |
3143 | - Video | |
3144 | parameters: | |
3145 | - $ref: '#/components/parameters/idOrUUID' | |
3146 | responses: | |
3147 | '200': | |
3148 | description: successful operation | |
3149 | content: | |
3150 | application/json: | |
3151 | schema: | |
3152 | $ref: '#/components/schemas/LiveVideoResponse' | |
3153 | put: | |
f6d6e7f8 | 3154 | summary: Update information about a live |
40cfb36b | 3155 | operationId: updateLiveId |
4e239e35 C |
3156 | security: |
3157 | - OAuth2: [] | |
3158 | tags: | |
3159 | - Live Videos | |
3160 | - Video | |
3161 | parameters: | |
3162 | - $ref: '#/components/parameters/idOrUUID' | |
3163 | requestBody: | |
3164 | content: | |
3165 | application/json: | |
3166 | schema: | |
3167 | $ref: '#/components/schemas/LiveVideoUpdate' | |
3168 | responses: | |
3169 | '204': | |
b8375da9 | 3170 | description: successful operation |
4e239e35 | 3171 | '400': |
b8375da9 | 3172 | description: bad parameters or trying to update a live that has already started |
4e239e35 | 3173 | '403': |
b8375da9 | 3174 | description: trying to save replay of the live but saving replay is not enabled on the instance |
3545e72c | 3175 | /api/v1/videos/live/{id}/sessions: |
26e3e98f C |
3176 | get: |
3177 | summary: List live sessions | |
3178 | description: List all sessions created in a particular live | |
3179 | security: | |
3180 | - OAuth2: [] | |
3181 | tags: | |
3182 | - Live Videos | |
3183 | parameters: | |
3184 | - $ref: '#/components/parameters/idOrUUID' | |
3185 | responses: | |
3186 | '200': | |
3187 | description: successful operation | |
3188 | content: | |
3189 | application/json: | |
3190 | schema: | |
3191 | type: object | |
3192 | properties: | |
3193 | total: | |
3194 | type: integer | |
3195 | example: 1 | |
3196 | data: | |
3197 | type: array | |
3198 | items: | |
3199 | $ref: '#/components/schemas/LiveVideoSessionResponse' | |
3545e72c | 3200 | /api/v1/videos/{id}/live-session: |
26e3e98f C |
3201 | get: |
3202 | summary: Get live session of a replay | |
3203 | description: If the video is a replay of a live, you can find the associated live session using this endpoint | |
3204 | security: | |
3205 | - OAuth2: [] | |
3206 | tags: | |
3207 | - Live Videos | |
3208 | parameters: | |
3209 | - $ref: '#/components/parameters/idOrUUID' | |
3210 | responses: | |
3211 | '200': | |
3212 | description: successful operation | |
3213 | content: | |
3214 | application/json: | |
3215 | schema: | |
3216 | $ref: '#/components/schemas/LiveVideoSessionResponse' | |
4e239e35 | 3217 | |
3545e72c | 3218 | /api/v1/users/me/abuses: |
668b7f09 C |
3219 | get: |
3220 | summary: List my abuses | |
985ece57 | 3221 | operationId: getMyAbuses |
668b7f09 C |
3222 | security: |
3223 | - OAuth2: [] | |
3224 | tags: | |
3225 | - Abuses | |
3226 | - My User | |
3227 | parameters: | |
3228 | - name: id | |
3229 | in: query | |
3230 | description: only list the report with this id | |
3231 | schema: | |
3232 | type: integer | |
3233 | - name: state | |
3234 | in: query | |
3235 | schema: | |
3236 | $ref: '#/components/schemas/AbuseStateSet' | |
985ece57 | 3237 | - $ref: '#/components/parameters/abusesSort' |
668b7f09 C |
3238 | - $ref: '#/components/parameters/start' |
3239 | - $ref: '#/components/parameters/count' | |
668b7f09 C |
3240 | responses: |
3241 | '200': | |
3242 | description: successful operation | |
3243 | content: | |
3244 | application/json: | |
3245 | schema: | |
985ece57 RK |
3246 | type: object |
3247 | properties: | |
3248 | total: | |
3249 | type: integer | |
3250 | example: 1 | |
3251 | data: | |
3252 | type: array | |
3253 | items: | |
3254 | $ref: '#/components/schemas/Abuse' | |
668b7f09 | 3255 | |
3545e72c | 3256 | /api/v1/abuses: |
1569a818 | 3257 | get: |
310b5219 | 3258 | summary: List abuses |
985ece57 | 3259 | operationId: getAbuses |
94ff4c23 | 3260 | security: |
b029d58a | 3261 | - OAuth2: |
06746a8b RK |
3262 | - admin |
3263 | - moderator | |
1569a818 | 3264 | tags: |
310b5219 | 3265 | - Abuses |
44cb3b85 | 3266 | parameters: |
84f6e32c RK |
3267 | - name: id |
3268 | in: query | |
3269 | description: only list the report with this id | |
3270 | schema: | |
3271 | type: integer | |
3272 | - name: predefinedReason | |
3273 | in: query | |
3274 | description: predefined reason the listed reports should contain | |
3275 | schema: | |
e3489df9 | 3276 | $ref: '#/components/schemas/PredefinedAbuseReasons' |
84f6e32c RK |
3277 | - name: search |
3278 | in: query | |
3279 | description: plain search that will match with video titles, reporter names and more | |
3280 | schema: | |
3281 | type: string | |
3282 | - name: state | |
3283 | in: query | |
84f6e32c | 3284 | schema: |
668b7f09 | 3285 | $ref: '#/components/schemas/AbuseStateSet' |
84f6e32c RK |
3286 | - name: searchReporter |
3287 | in: query | |
3288 | description: only list reports of a specific reporter | |
3289 | schema: | |
3290 | type: string | |
3291 | - name: searchReportee | |
3292 | description: only list reports of a specific reportee | |
3293 | in: query | |
3294 | schema: | |
3295 | type: string | |
3296 | - name: searchVideo | |
3297 | in: query | |
3298 | description: only list reports of a specific video | |
3299 | schema: | |
3300 | type: string | |
3301 | - name: searchVideoChannel | |
3302 | in: query | |
3303 | description: only list reports of a specific video channel | |
3304 | schema: | |
3305 | type: string | |
17b07dc5 C |
3306 | - name: videoIs |
3307 | in: query | |
c756bae0 | 3308 | description: only list deleted or blocklisted videos |
17b07dc5 C |
3309 | schema: |
3310 | type: string | |
3311 | enum: | |
3312 | - 'deleted' | |
3313 | - 'blacklisted' | |
3314 | - name: filter | |
3315 | in: query | |
3316 | description: only list account, comment or video reports | |
3317 | schema: | |
3318 | type: string | |
3319 | enum: | |
3320 | - 'video' | |
3321 | - 'comment' | |
3322 | - 'account' | |
3e9e6f2f RK |
3323 | - $ref: '#/components/parameters/start' |
3324 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 3325 | - $ref: '#/components/parameters/abusesSort' |
1569a818 DG |
3326 | responses: |
3327 | '200': | |
3328 | description: successful operation | |
3e9e6f2f RK |
3329 | content: |
3330 | application/json: | |
3331 | schema: | |
985ece57 RK |
3332 | type: object |
3333 | properties: | |
3334 | total: | |
3335 | type: integer | |
3336 | example: 1 | |
3337 | data: | |
3338 | type: array | |
3339 | items: | |
3340 | $ref: '#/components/schemas/Abuse' | |
1569a818 | 3341 | post: |
b029d58a | 3342 | summary: Report an abuse |
94ff4c23 | 3343 | security: |
3e9e6f2f | 3344 | - OAuth2: [] |
1569a818 | 3345 | tags: |
310b5219 | 3346 | - Abuses |
50e16ccf | 3347 | requestBody: |
1ebddadd | 3348 | required: true |
50e16ccf C |
3349 | content: |
3350 | application/json: | |
3351 | schema: | |
3352 | type: object | |
3353 | properties: | |
3354 | reason: | |
3355 | description: Reason why the user reports this video | |
3356 | type: string | |
4302058c RK |
3357 | minLength: 2 |
3358 | maxLength: 3000 | |
1ebddadd | 3359 | predefinedReasons: |
e3489df9 | 3360 | $ref: '#/components/schemas/PredefinedAbuseReasons' |
e3489df9 C |
3361 | video: |
3362 | type: object | |
3363 | properties: | |
3364 | id: | |
3365 | description: Video id to report | |
b8375da9 RK |
3366 | allOf: |
3367 | - $ref: '#/components/schemas/Video/properties/id' | |
e3489df9 C |
3368 | startAt: |
3369 | type: integer | |
c00100b6 | 3370 | format: seconds |
e3489df9 C |
3371 | description: Timestamp in the video that marks the beginning of the report |
3372 | minimum: 0 | |
3373 | endAt: | |
3374 | type: integer | |
c00100b6 | 3375 | format: seconds |
e3489df9 C |
3376 | description: Timestamp in the video that marks the ending of the report |
3377 | minimum: 0 | |
3378 | comment: | |
3379 | type: object | |
3380 | properties: | |
3381 | id: | |
3382 | description: Comment id to report | |
b8375da9 RK |
3383 | allOf: |
3384 | - $ref: '#/components/schemas/VideoComment/properties/id' | |
e3489df9 C |
3385 | account: |
3386 | type: object | |
3387 | properties: | |
3388 | id: | |
3389 | description: Account id to report | |
b8375da9 | 3390 | type: integer |
1ebddadd RK |
3391 | required: |
3392 | - reason | |
50e16ccf | 3393 | responses: |
65cb01a2 | 3394 | '200': |
50e16ccf | 3395 | description: successful operation |
65cb01a2 RK |
3396 | content: |
3397 | application/json: | |
3398 | schema: | |
3399 | type: object | |
3400 | properties: | |
3401 | abuse: | |
3402 | type: object | |
3403 | properties: | |
3404 | id: | |
3405 | $ref: '#/components/schemas/id' | |
84f6e32c RK |
3406 | '400': |
3407 | description: incorrect request parameters | |
3f71c4c0 | 3408 | |
3545e72c | 3409 | '/api/v1/abuses/{abuseId}': |
50e16ccf C |
3410 | put: |
3411 | summary: Update an abuse | |
3412 | security: | |
3413 | - OAuth2: | |
3414 | - admin | |
3415 | - moderator | |
3416 | tags: | |
310b5219 | 3417 | - Abuses |
50e16ccf | 3418 | parameters: |
50e16ccf C |
3419 | - $ref: '#/components/parameters/abuseId' |
3420 | requestBody: | |
3421 | content: | |
3422 | application/json: | |
3423 | schema: | |
3424 | type: object | |
3425 | properties: | |
3426 | state: | |
4f32032f | 3427 | $ref: '#/components/schemas/AbuseStateSet' |
50e16ccf C |
3428 | moderationComment: |
3429 | type: string | |
84f6e32c | 3430 | description: Update the report comment visible only to the moderation team |
4302058c RK |
3431 | minLength: 2 |
3432 | maxLength: 3000 | |
84f6e32c RK |
3433 | responses: |
3434 | '204': | |
3435 | description: successful operation | |
3436 | '404': | |
310b5219 | 3437 | description: abuse not found |
50e16ccf | 3438 | delete: |
84f6e32c | 3439 | tags: |
310b5219 | 3440 | - Abuses |
50e16ccf C |
3441 | summary: Delete an abuse |
3442 | security: | |
3443 | - OAuth2: | |
64b5c247 RK |
3444 | - admin |
3445 | - moderator | |
84f6e32c | 3446 | parameters: |
84f6e32c | 3447 | - $ref: '#/components/parameters/abuseId' |
50e16ccf C |
3448 | responses: |
3449 | '204': | |
3450 | description: successful operation | |
06746a8b RK |
3451 | '404': |
3452 | description: block not found | |
3f71c4c0 | 3453 | |
3545e72c | 3454 | '/api/v1/abuses/{abuseId}/messages': |
668b7f09 C |
3455 | get: |
3456 | summary: List messages of an abuse | |
3457 | security: | |
3458 | - OAuth2: [] | |
3459 | tags: | |
3460 | - Abuses | |
3461 | parameters: | |
3462 | - $ref: '#/components/parameters/abuseId' | |
3463 | responses: | |
3464 | '200': | |
3465 | description: successful operation | |
3466 | content: | |
3467 | application/json: | |
3468 | schema: | |
c76ecc3f RK |
3469 | type: object |
3470 | properties: | |
3471 | total: | |
3472 | type: integer | |
3473 | example: 1 | |
3474 | data: | |
3475 | type: array | |
3476 | items: | |
3477 | $ref: '#/components/schemas/AbuseMessage' | |
668b7f09 C |
3478 | post: |
3479 | summary: Add message to an abuse | |
3480 | security: | |
3481 | - OAuth2: [] | |
3482 | tags: | |
3483 | - Abuses | |
fcc4466e C |
3484 | parameters: |
3485 | - $ref: '#/components/parameters/abuseId' | |
668b7f09 C |
3486 | requestBody: |
3487 | required: true | |
3488 | content: | |
3489 | application/json: | |
3490 | schema: | |
3491 | type: object | |
3492 | properties: | |
3493 | message: | |
3494 | description: Message to send | |
3495 | type: string | |
4302058c RK |
3496 | minLength: 2 |
3497 | maxLength: 3000 | |
668b7f09 C |
3498 | required: |
3499 | - message | |
3500 | responses: | |
3501 | '200': | |
3502 | description: successful operation | |
3503 | '400': | |
3504 | description: incorrect request parameters | |
3f71c4c0 | 3505 | |
3545e72c | 3506 | '/api/v1/abuses/{abuseId}/messages/{abuseMessageId}': |
668b7f09 C |
3507 | delete: |
3508 | summary: Delete an abuse message | |
3509 | security: | |
3510 | - OAuth2: [] | |
3511 | tags: | |
3512 | - Abuses | |
3513 | parameters: | |
3514 | - $ref: '#/components/parameters/abuseId' | |
3515 | - $ref: '#/components/parameters/abuseMessageId' | |
3516 | responses: | |
3517 | '204': | |
3518 | description: successful operation | |
50e16ccf | 3519 | |
3545e72c | 3520 | '/api/v1/videos/{id}/blacklist': |
1569a818 | 3521 | post: |
06746a8b | 3522 | summary: Block a video |
3f71c4c0 | 3523 | operationId: addVideoBlock |
94ff4c23 | 3524 | security: |
3e9e6f2f | 3525 | - OAuth2: |
64b5c247 RK |
3526 | - admin |
3527 | - moderator | |
1569a818 | 3528 | tags: |
06746a8b | 3529 | - Video Blocks |
1569a818 | 3530 | parameters: |
cb9d028a | 3531 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
3532 | responses: |
3533 | '204': | |
c1843150 | 3534 | description: successful operation |
1569a818 | 3535 | delete: |
06746a8b | 3536 | summary: Unblock a video by its id |
3f71c4c0 | 3537 | operationId: delVideoBlock |
94ff4c23 | 3538 | security: |
3e9e6f2f | 3539 | - OAuth2: |
64b5c247 RK |
3540 | - admin |
3541 | - moderator | |
1569a818 | 3542 | tags: |
06746a8b | 3543 | - Video Blocks |
1569a818 | 3544 | parameters: |
cb9d028a | 3545 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
3546 | responses: |
3547 | '204': | |
c1843150 | 3548 | description: successful operation |
06746a8b RK |
3549 | '404': |
3550 | description: block not found | |
3f71c4c0 | 3551 | |
3545e72c | 3552 | /api/v1/videos/blacklist: |
1569a818 | 3553 | get: |
06746a8b RK |
3554 | tags: |
3555 | - Video Blocks | |
f4d59981 | 3556 | summary: List video blocks |
3f71c4c0 | 3557 | operationId: getVideoBlocks |
94ff4c23 | 3558 | security: |
3e9e6f2f | 3559 | - OAuth2: |
64b5c247 RK |
3560 | - admin |
3561 | - moderator | |
44cb3b85 | 3562 | parameters: |
84f6e32c RK |
3563 | - name: type |
3564 | in: query | |
3565 | description: > | |
3566 | list only blocks that match this type: | |
3567 | ||
3568 | - `1`: manual block | |
3569 | ||
3570 | - `2`: automatic block that needs review | |
3571 | schema: | |
3572 | type: integer | |
3573 | enum: | |
3574 | - 1 | |
3575 | - 2 | |
3576 | - name: search | |
3577 | in: query | |
3578 | description: plain search that will match with video titles, and more | |
3579 | schema: | |
3580 | type: string | |
3e9e6f2f RK |
3581 | - $ref: '#/components/parameters/start' |
3582 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 3583 | - $ref: '#/components/parameters/blacklistsSort' |
1569a818 DG |
3584 | responses: |
3585 | '200': | |
3586 | description: successful operation | |
3e9e6f2f RK |
3587 | content: |
3588 | application/json: | |
3589 | schema: | |
84f6e32c RK |
3590 | type: object |
3591 | properties: | |
3592 | total: | |
3593 | type: integer | |
3594 | example: 1 | |
3595 | data: | |
3596 | type: array | |
3597 | items: | |
3598 | $ref: '#/components/schemas/VideoBlacklist' | |
3f71c4c0 | 3599 | |
3545e72c | 3600 | /api/v1/videos/{id}/captions: |
67ae04a5 | 3601 | get: |
b029d58a | 3602 | summary: List captions of a video |
3f71c4c0 | 3603 | operationId: getVideoCaptions |
67ae04a5 | 3604 | tags: |
04b703f6 | 3605 | - Video Captions |
67ae04a5 | 3606 | parameters: |
cb9d028a | 3607 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
3608 | responses: |
3609 | '200': | |
3610 | description: successful operation | |
3611 | content: | |
3612 | application/json: | |
3613 | schema: | |
3614 | type: object | |
3615 | properties: | |
3616 | total: | |
3617 | type: integer | |
84f6e32c | 3618 | example: 1 |
67ae04a5 C |
3619 | data: |
3620 | type: array | |
3621 | items: | |
3622 | $ref: '#/components/schemas/VideoCaption' | |
3f71c4c0 | 3623 | |
3545e72c | 3624 | /api/v1/videos/{id}/captions/{captionLanguage}: |
67ae04a5 C |
3625 | put: |
3626 | summary: Add or replace a video caption | |
3f71c4c0 | 3627 | operationId: addVideoCaption |
64b5c247 RK |
3628 | security: |
3629 | - OAuth2: | |
3630 | - user | |
67ae04a5 | 3631 | tags: |
04b703f6 | 3632 | - Video Captions |
67ae04a5 | 3633 | parameters: |
cb9d028a | 3634 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
3635 | - $ref: '#/components/parameters/captionLanguage' |
3636 | requestBody: | |
3637 | content: | |
3638 | multipart/form-data: | |
3639 | schema: | |
3640 | type: object | |
3641 | properties: | |
3642 | captionfile: | |
3643 | description: The file to upload. | |
3644 | type: string | |
3645 | format: binary | |
0ad45af7 FS |
3646 | encoding: |
3647 | captionfile: | |
205ed5b7 | 3648 | contentType: text/vtt, application/x-subrip, text/plain |
67ae04a5 C |
3649 | responses: |
3650 | '204': | |
c1843150 | 3651 | description: successful operation |
06746a8b RK |
3652 | '404': |
3653 | description: video or language not found | |
67ae04a5 C |
3654 | delete: |
3655 | summary: Delete a video caption | |
3f71c4c0 | 3656 | operationId: delVideoCaption |
64b5c247 RK |
3657 | security: |
3658 | - OAuth2: | |
3659 | - user | |
67ae04a5 | 3660 | tags: |
04b703f6 | 3661 | - Video Captions |
67ae04a5 | 3662 | parameters: |
cb9d028a | 3663 | - $ref: '#/components/parameters/idOrUUID' |
67ae04a5 C |
3664 | - $ref: '#/components/parameters/captionLanguage' |
3665 | responses: | |
3666 | '204': | |
c1843150 | 3667 | description: successful operation |
06746a8b RK |
3668 | '404': |
3669 | description: video or language or caption for that language not found | |
3f71c4c0 | 3670 | |
3545e72c | 3671 | /api/v1/video-channels: |
1569a818 | 3672 | get: |
b029d58a | 3673 | summary: List video channels |
9a320a06 | 3674 | operationId: getVideoChannels |
1569a818 | 3675 | tags: |
b029d58a | 3676 | - Video Channels |
44cb3b85 | 3677 | parameters: |
3e9e6f2f RK |
3678 | - $ref: '#/components/parameters/start' |
3679 | - $ref: '#/components/parameters/count' | |
3680 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
3681 | responses: |
3682 | '200': | |
3683 | description: successful operation | |
3e9e6f2f RK |
3684 | content: |
3685 | application/json: | |
3686 | schema: | |
045bcd0d | 3687 | $ref: '#/components/schemas/VideoChannelList' |
1569a818 | 3688 | post: |
b029d58a | 3689 | summary: Create a video channel |
3f71c4c0 | 3690 | operationId: addVideoChannel |
94ff4c23 | 3691 | security: |
3e9e6f2f | 3692 | - OAuth2: [] |
1569a818 | 3693 | tags: |
b029d58a | 3694 | - Video Channels |
1569a818 | 3695 | responses: |
2a491182 | 3696 | '200': |
c1843150 | 3697 | description: successful operation |
9a320a06 RK |
3698 | content: |
3699 | application/json: | |
3700 | schema: | |
3701 | type: object | |
3702 | properties: | |
3703 | videoChannel: | |
3704 | type: object | |
3705 | properties: | |
3706 | id: | |
d0800f76 | 3707 | $ref: '#/components/schemas/id' |
3e9e6f2f | 3708 | requestBody: |
7d14d4d2 C |
3709 | content: |
3710 | application/json: | |
3711 | schema: | |
3712 | $ref: '#/components/schemas/VideoChannelCreate' | |
3f71c4c0 | 3713 | |
3545e72c | 3714 | '/api/v1/video-channels/{channelHandle}': |
1569a818 | 3715 | get: |
b029d58a | 3716 | summary: Get a video channel |
9a320a06 | 3717 | operationId: getVideoChannel |
1569a818 | 3718 | tags: |
b029d58a | 3719 | - Video Channels |
1569a818 | 3720 | parameters: |
9ce3d302 | 3721 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
3722 | responses: |
3723 | '200': | |
3724 | description: successful operation | |
3e9e6f2f RK |
3725 | content: |
3726 | application/json: | |
3727 | schema: | |
3728 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 3729 | put: |
b029d58a | 3730 | summary: Update a video channel |
3f71c4c0 | 3731 | operationId: putVideoChannel |
94ff4c23 | 3732 | security: |
3e9e6f2f | 3733 | - OAuth2: [] |
1569a818 | 3734 | tags: |
b029d58a | 3735 | - Video Channels |
1569a818 | 3736 | parameters: |
9ce3d302 | 3737 | - $ref: '#/components/parameters/channelHandle' |
1569a818 DG |
3738 | responses: |
3739 | '204': | |
c1843150 | 3740 | description: successful operation |
3e9e6f2f | 3741 | requestBody: |
7d14d4d2 C |
3742 | content: |
3743 | application/json: | |
3744 | schema: | |
3745 | $ref: '#/components/schemas/VideoChannelUpdate' | |
1569a818 | 3746 | delete: |
b029d58a | 3747 | summary: Delete a video channel |
3f71c4c0 | 3748 | operationId: delVideoChannel |
94ff4c23 | 3749 | security: |
3e9e6f2f | 3750 | - OAuth2: [] |
1569a818 | 3751 | tags: |
b029d58a | 3752 | - Video Channels |
1569a818 | 3753 | parameters: |
9ce3d302 | 3754 | - $ref: '#/components/parameters/channelHandle' |
cc918ac3 C |
3755 | responses: |
3756 | '204': | |
c1843150 | 3757 | description: successful operation |
3f71c4c0 | 3758 | |
3545e72c | 3759 | '/api/v1/video-channels/{channelHandle}/videos': |
cc918ac3 | 3760 | get: |
b029d58a | 3761 | summary: List videos of a video channel |
3f71c4c0 | 3762 | operationId: getVideoChannelVideos |
cc918ac3 | 3763 | tags: |
048b6946 | 3764 | - Video |
b029d58a | 3765 | - Video Channels |
cc918ac3 | 3766 | parameters: |
9ce3d302 | 3767 | - $ref: '#/components/parameters/channelHandle' |
59c794a5 | 3768 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 3769 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
3770 | - $ref: '#/components/parameters/tagsOneOf' |
3771 | - $ref: '#/components/parameters/tagsAllOf' | |
3772 | - $ref: '#/components/parameters/licenceOneOf' | |
3773 | - $ref: '#/components/parameters/languageOneOf' | |
3774 | - $ref: '#/components/parameters/nsfw' | |
2760b454 C |
3775 | - $ref: '#/components/parameters/isLocal' |
3776 | - $ref: '#/components/parameters/include' | |
527a52ac | 3777 | - $ref: '#/components/parameters/privacyOneOf' |
d324756e C |
3778 | - $ref: '#/components/parameters/hasHLSFiles' |
3779 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
59c794a5 C |
3780 | - $ref: '#/components/parameters/skipCount' |
3781 | - $ref: '#/components/parameters/start' | |
3782 | - $ref: '#/components/parameters/count' | |
3783 | - $ref: '#/components/parameters/videosSort' | |
1569a818 | 3784 | responses: |
cc918ac3 | 3785 | '200': |
1569a818 | 3786 | description: successful operation |
3e9e6f2f RK |
3787 | content: |
3788 | application/json: | |
3789 | schema: | |
048b6946 | 3790 | $ref: '#/components/schemas/VideoListResponse' |
3f71c4c0 | 3791 | |
3545e72c | 3792 | '/api/v1/video-channels/{channelHandle}/followers': |
906f46d0 C |
3793 | get: |
3794 | tags: | |
3795 | - Video Channels | |
3796 | summary: 'List followers of a video channel' | |
3797 | security: | |
3798 | - OAuth2: [] | |
3799 | operationId: getVideoChannelFollowers | |
3800 | parameters: | |
3801 | - $ref: '#/components/parameters/channelHandle' | |
3802 | - $ref: '#/components/parameters/start' | |
3803 | - $ref: '#/components/parameters/count' | |
3804 | - $ref: '#/components/parameters/followersSort' | |
3805 | - $ref: '#/components/parameters/search' | |
3806 | responses: | |
3807 | '200': | |
3808 | description: successful operation | |
3809 | content: | |
3810 | application/json: | |
3811 | schema: | |
3812 | type: object | |
3813 | properties: | |
3814 | total: | |
3815 | type: integer | |
3816 | example: 1 | |
3817 | data: | |
3818 | type: array | |
3819 | items: | |
3820 | $ref: '#/components/schemas/Follow' | |
3821 | ||
3545e72c | 3822 | '/api/v1/video-channels/{channelHandle}/avatar/pick': |
75cba40d C |
3823 | post: |
3824 | summary: Update channel avatar | |
3825 | security: | |
3826 | - OAuth2: [] | |
3827 | tags: | |
3828 | - Video Channels | |
3829 | parameters: | |
3830 | - $ref: '#/components/parameters/channelHandle' | |
3831 | responses: | |
3832 | '200': | |
3833 | description: successful operation | |
3834 | content: | |
3835 | application/json: | |
3836 | schema: | |
3837 | type: object | |
3838 | properties: | |
d0800f76 | 3839 | avatars: |
3840 | type: array | |
3841 | items: | |
3842 | $ref: '#/components/schemas/ActorImage' | |
75cba40d C |
3843 | '413': |
3844 | description: image file too large | |
3845 | headers: | |
3846 | X-File-Maximum-Size: | |
3847 | schema: | |
3848 | type: string | |
3849 | format: Nginx size | |
3850 | description: Maximum file size for the avatar | |
3851 | requestBody: | |
3852 | content: | |
3853 | multipart/form-data: | |
3854 | schema: | |
3855 | type: object | |
3856 | properties: | |
3857 | avatarfile: | |
3858 | description: The file to upload. | |
3859 | type: string | |
3860 | format: binary | |
3861 | encoding: | |
3862 | avatarfile: | |
3863 | contentType: image/png, image/jpeg | |
3f71c4c0 | 3864 | |
3545e72c | 3865 | '/api/v1/video-channels/{channelHandle}/avatar': |
75cba40d C |
3866 | delete: |
3867 | summary: Delete channel avatar | |
3868 | security: | |
3869 | - OAuth2: [] | |
3870 | tags: | |
3871 | - Video Channels | |
3872 | parameters: | |
3873 | - $ref: '#/components/parameters/channelHandle' | |
3874 | responses: | |
3875 | '204': | |
3876 | description: successful operation | |
3877 | ||
3545e72c | 3878 | '/api/v1/video-channels/{channelHandle}/banner/pick': |
75cba40d C |
3879 | post: |
3880 | summary: Update channel banner | |
3881 | security: | |
3882 | - OAuth2: [] | |
3883 | tags: | |
3884 | - Video Channels | |
3885 | parameters: | |
3886 | - $ref: '#/components/parameters/channelHandle' | |
3887 | responses: | |
3888 | '200': | |
3889 | description: successful operation | |
3890 | content: | |
3891 | application/json: | |
3892 | schema: | |
3893 | type: object | |
3894 | properties: | |
d0800f76 | 3895 | banners: |
3896 | type: array | |
3897 | items: | |
3898 | $ref: '#/components/schemas/ActorImage' | |
75cba40d C |
3899 | '413': |
3900 | description: image file too large | |
3901 | headers: | |
3902 | X-File-Maximum-Size: | |
3903 | schema: | |
3904 | type: string | |
3905 | format: Nginx size | |
3906 | description: Maximum file size for the banner | |
3907 | requestBody: | |
3908 | content: | |
3909 | multipart/form-data: | |
3910 | schema: | |
3911 | type: object | |
3912 | properties: | |
3913 | bannerfile: | |
3914 | description: The file to upload. | |
3915 | type: string | |
3916 | format: binary | |
3917 | encoding: | |
3918 | bannerfile: | |
3919 | contentType: image/png, image/jpeg | |
3f71c4c0 | 3920 | |
3545e72c | 3921 | '/api/v1/video-channels/{channelHandle}/banner': |
75cba40d C |
3922 | delete: |
3923 | summary: Delete channel banner | |
3924 | security: | |
3925 | - OAuth2: [] | |
3926 | tags: | |
3927 | - Video Channels | |
3928 | parameters: | |
3929 | - $ref: '#/components/parameters/channelHandle' | |
3930 | responses: | |
3931 | '204': | |
3932 | description: successful operation | |
c1843150 | 3933 | |
3545e72c | 3934 | '/api/v1/video-channels/{channelHandle}/import-videos': |
87cd9397 C |
3935 | post: |
3936 | summary: Import videos in channel | |
3937 | description: Import a remote channel/playlist videos into a channel | |
3938 | security: | |
3939 | - OAuth2: [] | |
3940 | tags: | |
3941 | - Video Channels | |
3942 | - Channels Sync | |
3943 | parameters: | |
3944 | - $ref: '#/components/parameters/channelHandle' | |
3945 | requestBody: | |
3946 | content: | |
3947 | application/json: | |
3948 | schema: | |
3949 | $ref: '#/components/schemas/ImportVideosInChannelCreate' | |
3950 | responses: | |
3951 | '204': | |
3952 | description: successful operation | |
3953 | ||
3545e72c | 3954 | '/api/v1/video-channel-syncs': |
2a491182 F |
3955 | post: |
3956 | summary: Create a synchronization for a video channel | |
3957 | operationId: addVideoChannelSync | |
3958 | security: | |
3959 | - OAuth2: [] | |
3960 | tags: | |
3961 | - Channels Sync | |
3962 | requestBody: | |
3963 | content: | |
3964 | application/json: | |
3965 | schema: | |
3966 | $ref: '#/components/schemas/VideoChannelSyncCreate' | |
3967 | responses: | |
3968 | '200': | |
3969 | description: successful operation | |
3970 | content: | |
3971 | application/json: | |
3972 | schema: | |
3973 | type: object | |
3974 | properties: | |
3975 | videoChannelSync: | |
3976 | $ref: "#/components/schemas/VideoChannelSync" | |
3977 | ||
3545e72c | 3978 | '/api/v1/video-channel-syncs/{channelSyncId}': |
2a491182 F |
3979 | delete: |
3980 | summary: Delete a video channel synchronization | |
3981 | operationId: delVideoChannelSync | |
3982 | security: | |
3983 | - OAuth2: [] | |
3984 | tags: | |
3985 | - Channels Sync | |
3986 | parameters: | |
3987 | - $ref: '#/components/parameters/channelSyncId' | |
3988 | responses: | |
3989 | '204': | |
3990 | description: successful operation | |
3991 | ||
3545e72c | 3992 | '/api/v1/video-channel-syncs/{channelSyncId}/sync': |
2a491182 F |
3993 | post: |
3994 | summary: Triggers the channel synchronization job, fetching all the videos from the remote channel | |
3995 | operationId: triggerVideoChannelSync | |
3996 | security: | |
3997 | - OAuth2: [] | |
3998 | tags: | |
3999 | - Channels Sync | |
4000 | parameters: | |
4001 | - $ref: '#/components/parameters/channelSyncId' | |
4002 | responses: | |
4003 | '204': | |
4004 | description: successful operation | |
4005 | ||
4006 | ||
3545e72c | 4007 | /api/v1/video-playlists/privacies: |
c1843150 | 4008 | get: |
40cfb36b RK |
4009 | summary: List available playlist privacy policies |
4010 | operationId: getPlaylistPrivacyPolicies | |
c1843150 C |
4011 | tags: |
4012 | - Video Playlists | |
4013 | responses: | |
4014 | '200': | |
4015 | description: successful operation | |
4016 | content: | |
4017 | application/json: | |
4018 | schema: | |
4019 | type: array | |
4020 | items: | |
4021 | type: string | |
84f6e32c RK |
4022 | examples: |
4023 | nightly: | |
4024 | externalValue: https://peertube2.cpy.re/api/v1/video-playlists/privacies | |
c1843150 | 4025 | |
3545e72c | 4026 | /api/v1/video-playlists: |
71810d0b | 4027 | get: |
b029d58a | 4028 | summary: List video playlists |
40cfb36b | 4029 | operationId: getPlaylists |
71810d0b | 4030 | tags: |
b029d58a | 4031 | - Video Playlists |
71810d0b RK |
4032 | parameters: |
4033 | - $ref: '#/components/parameters/start' | |
4034 | - $ref: '#/components/parameters/count' | |
4035 | - $ref: '#/components/parameters/sort' | |
4036 | responses: | |
4037 | '200': | |
4038 | description: successful operation | |
4039 | content: | |
4040 | application/json: | |
4041 | schema: | |
84f6e32c RK |
4042 | type: object |
4043 | properties: | |
4044 | total: | |
4045 | type: integer | |
4046 | example: 1 | |
4047 | data: | |
4048 | type: array | |
4049 | items: | |
4050 | $ref: '#/components/schemas/VideoPlaylist' | |
c1843150 C |
4051 | post: |
4052 | summary: Create a video playlist | |
b8375da9 | 4053 | description: If the video playlist is set as public, `videoChannelId` is mandatory. |
e2adb8cb | 4054 | operationId: addPlaylist |
c1843150 C |
4055 | security: |
4056 | - OAuth2: [] | |
4057 | tags: | |
4058 | - Video Playlists | |
4059 | responses: | |
4060 | '200': | |
4061 | description: successful operation | |
4062 | content: | |
4063 | application/json: | |
4064 | schema: | |
4065 | type: object | |
4066 | properties: | |
4067 | videoPlaylist: | |
4068 | type: object | |
4069 | properties: | |
4070 | id: | |
b8375da9 | 4071 | $ref: '#/components/schemas/VideoPlaylist/properties/id' |
c1843150 | 4072 | uuid: |
b8375da9 | 4073 | $ref: '#/components/schemas/VideoPlaylist/properties/uuid' |
d4a8e7a6 C |
4074 | shortUUID: |
4075 | $ref: '#/components/schemas/VideoPlaylist/properties/shortUUID' | |
c1843150 C |
4076 | requestBody: |
4077 | content: | |
4078 | multipart/form-data: | |
4079 | schema: | |
4080 | type: object | |
4081 | properties: | |
4082 | displayName: | |
4083 | description: Video playlist display name | |
4084 | type: string | |
bdac0584 RK |
4085 | minLength: 1 |
4086 | maxLength: 120 | |
c1843150 C |
4087 | thumbnailfile: |
4088 | description: Video playlist thumbnail file | |
4089 | type: string | |
4090 | format: binary | |
4091 | privacy: | |
4092 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
4093 | description: | |
4094 | description: Video playlist description | |
4095 | type: string | |
b8375da9 RK |
4096 | minLength: 3 |
4097 | maxLength: 1000 | |
c1843150 | 4098 | videoChannelId: |
b8375da9 RK |
4099 | allOf: |
4100 | - $ref: '#/components/schemas/id' | |
c1843150 | 4101 | description: Video channel in which the playlist will be published |
c1843150 C |
4102 | required: |
4103 | - displayName | |
2c318664 RK |
4104 | encoding: |
4105 | thumbnailfile: | |
4106 | contentType: image/jpeg | |
c1843150 | 4107 | |
3545e72c | 4108 | /api/v1/video-playlists/{playlistId}: |
c1843150 C |
4109 | get: |
4110 | summary: Get a video playlist | |
4111 | tags: | |
4112 | - Video Playlists | |
4113 | parameters: | |
c00100b6 | 4114 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4115 | responses: |
4116 | '200': | |
4117 | description: successful operation | |
4118 | content: | |
4119 | application/json: | |
4120 | schema: | |
4121 | $ref: '#/components/schemas/VideoPlaylist' | |
4122 | put: | |
4123 | summary: Update a video playlist | |
4124 | description: 'If the video playlist is set as public, the playlist must have a assigned channel.' | |
4125 | security: | |
4126 | - OAuth2: [] | |
4127 | tags: | |
4128 | - Video Playlists | |
4129 | responses: | |
4130 | '204': | |
4131 | description: successful operation | |
4132 | parameters: | |
c00100b6 | 4133 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4134 | requestBody: |
4135 | content: | |
4136 | multipart/form-data: | |
4137 | schema: | |
4138 | type: object | |
4139 | properties: | |
4140 | displayName: | |
4141 | description: Video playlist display name | |
4142 | type: string | |
bdac0584 RK |
4143 | minLength: 1 |
4144 | maxLength: 120 | |
c1843150 C |
4145 | thumbnailfile: |
4146 | description: Video playlist thumbnail file | |
4147 | type: string | |
4148 | format: binary | |
4149 | privacy: | |
4150 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
4151 | description: | |
4152 | description: Video playlist description | |
4153 | type: string | |
4154 | videoChannelId: | |
b8375da9 RK |
4155 | allOf: |
4156 | - $ref: '#/components/schemas/id' | |
c1843150 | 4157 | description: Video channel in which the playlist will be published |
2c318664 RK |
4158 | encoding: |
4159 | thumbnailfile: | |
4160 | contentType: image/jpeg | |
c1843150 C |
4161 | delete: |
4162 | summary: Delete a video playlist | |
4163 | security: | |
4164 | - OAuth2: [] | |
4165 | tags: | |
4166 | - Video Playlists | |
4167 | parameters: | |
c00100b6 | 4168 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4169 | responses: |
4170 | '204': | |
4171 | description: successful operation | |
4172 | ||
3545e72c | 4173 | /api/v1/video-playlists/{playlistId}/videos: |
c1843150 C |
4174 | get: |
4175 | summary: 'List videos of a playlist' | |
e2adb8cb | 4176 | operationId: getVideoPlaylistVideos |
c1843150 C |
4177 | tags: |
4178 | - Videos | |
4179 | - Video Playlists | |
4180 | parameters: | |
c00100b6 | 4181 | - $ref: '#/components/parameters/playlistId' |
9c58375c J |
4182 | - $ref: '#/components/parameters/start' |
4183 | - $ref: '#/components/parameters/count' | |
c1843150 C |
4184 | responses: |
4185 | '200': | |
4186 | description: successful operation | |
4187 | content: | |
4188 | application/json: | |
4189 | schema: | |
4190 | $ref: '#/components/schemas/VideoListResponse' | |
4191 | post: | |
c00100b6 | 4192 | summary: Add a video in a playlist |
e2adb8cb | 4193 | operationId: addVideoPlaylistVideo |
c1843150 C |
4194 | security: |
4195 | - OAuth2: [] | |
4196 | tags: | |
4197 | - Videos | |
4198 | - Video Playlists | |
4199 | parameters: | |
c00100b6 | 4200 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4201 | responses: |
4202 | '200': | |
4203 | description: successful operation | |
4204 | content: | |
4205 | application/json: | |
4206 | schema: | |
4207 | type: object | |
4208 | properties: | |
4209 | videoPlaylistElement: | |
4210 | type: object | |
4211 | properties: | |
4212 | id: | |
06746a8b | 4213 | type: integer |
c00100b6 | 4214 | example: 2 |
c1843150 C |
4215 | requestBody: |
4216 | content: | |
4217 | application/json: | |
4218 | schema: | |
4219 | type: object | |
4220 | properties: | |
4221 | videoId: | |
c00100b6 RK |
4222 | oneOf: |
4223 | - $ref: '#/components/schemas/Video/properties/uuid' | |
b8375da9 RK |
4224 | - $ref: '#/components/schemas/Video/properties/id' |
4225 | description: Video to add in the playlist | |
c1843150 | 4226 | startTimestamp: |
06746a8b | 4227 | type: integer |
c00100b6 RK |
4228 | format: seconds |
4229 | description: Start the video at this specific timestamp | |
c1843150 | 4230 | stopTimestamp: |
06746a8b | 4231 | type: integer |
c00100b6 RK |
4232 | format: seconds |
4233 | description: Stop the video at this specific timestamp | |
c1843150 C |
4234 | required: |
4235 | - videoId | |
4236 | ||
3545e72c | 4237 | /api/v1/video-playlists/{playlistId}/videos/reorder: |
c1843150 C |
4238 | post: |
4239 | summary: 'Reorder a playlist' | |
e2adb8cb | 4240 | operationId: reorderVideoPlaylist |
c1843150 C |
4241 | security: |
4242 | - OAuth2: [] | |
4243 | tags: | |
4244 | - Video Playlists | |
4245 | parameters: | |
c00100b6 | 4246 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4247 | responses: |
4248 | '204': | |
4249 | description: successful operation | |
4250 | requestBody: | |
4251 | content: | |
4252 | application/json: | |
4253 | schema: | |
4254 | type: object | |
4255 | properties: | |
4256 | startPosition: | |
06746a8b RK |
4257 | type: integer |
4258 | description: 'Start position of the element to reorder' | |
4259 | minimum: 1 | |
c1843150 | 4260 | insertAfterPosition: |
06746a8b RK |
4261 | type: integer |
4262 | description: 'New position for the block to reorder, to add the block before the first element' | |
4263 | minimum: 0 | |
c1843150 | 4264 | reorderLength: |
06746a8b RK |
4265 | type: integer |
4266 | description: 'How many element from `startPosition` to reorder' | |
4267 | minimum: 1 | |
c1843150 C |
4268 | required: |
4269 | - startPosition | |
4270 | - insertAfterPosition | |
4271 | ||
3545e72c | 4272 | /api/v1/video-playlists/{playlistId}/videos/{playlistElementId}: |
c1843150 | 4273 | put: |
c00100b6 | 4274 | summary: Update a playlist element |
e2adb8cb | 4275 | operationId: putVideoPlaylistVideo |
c1843150 C |
4276 | security: |
4277 | - OAuth2: [] | |
4278 | tags: | |
4279 | - Video Playlists | |
4280 | parameters: | |
c00100b6 | 4281 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4282 | - $ref: '#/components/parameters/playlistElementId' |
4283 | responses: | |
4284 | '204': | |
4285 | description: successful operation | |
4286 | requestBody: | |
4287 | content: | |
4288 | application/json: | |
4289 | schema: | |
4290 | type: object | |
4291 | properties: | |
4292 | startTimestamp: | |
06746a8b | 4293 | type: integer |
c00100b6 RK |
4294 | format: seconds |
4295 | description: Start the video at this specific timestamp | |
c1843150 | 4296 | stopTimestamp: |
06746a8b | 4297 | type: integer |
c00100b6 RK |
4298 | format: seconds |
4299 | description: Stop the video at this specific timestamp | |
c1843150 | 4300 | delete: |
c00100b6 | 4301 | summary: Delete an element from a playlist |
e2adb8cb | 4302 | operationId: delVideoPlaylistVideo |
c1843150 C |
4303 | security: |
4304 | - OAuth2: [] | |
4305 | tags: | |
4306 | - Video Playlists | |
4307 | parameters: | |
c00100b6 | 4308 | - $ref: '#/components/parameters/playlistId' |
c1843150 C |
4309 | - $ref: '#/components/parameters/playlistElementId' |
4310 | responses: | |
4311 | '204': | |
4312 | description: successful operation | |
4313 | ||
3545e72c | 4314 | '/api/v1/users/me/video-playlists/videos-exist': |
0590bb46 | 4315 | get: |
c00100b6 | 4316 | summary: Check video exists in my playlists |
0590bb46 C |
4317 | security: |
4318 | - OAuth2: [] | |
4319 | tags: | |
4320 | - Video Playlists | |
4321 | parameters: | |
4322 | - name: videoIds | |
4323 | in: query | |
4324 | required: true | |
4325 | description: The video ids to check | |
4326 | schema: | |
4327 | type: array | |
4328 | items: | |
b8375da9 | 4329 | $ref: '#/components/schemas/Video/properties/id' |
0590bb46 C |
4330 | responses: |
4331 | '200': | |
4332 | description: successful operation | |
4333 | content: | |
4334 | application/json: | |
4335 | schema: | |
4336 | type: object | |
4337 | properties: | |
4338 | videoId: | |
4339 | type: array | |
4340 | items: | |
4341 | type: object | |
4342 | properties: | |
4343 | playlistElementId: | |
06746a8b | 4344 | type: integer |
0590bb46 | 4345 | playlistId: |
06746a8b | 4346 | type: integer |
0590bb46 | 4347 | startTimestamp: |
06746a8b | 4348 | type: integer |
c00100b6 | 4349 | format: seconds |
0590bb46 | 4350 | stopTimestamp: |
06746a8b | 4351 | type: integer |
c00100b6 | 4352 | format: seconds |
0590bb46 | 4353 | |
3545e72c | 4354 | '/api/v1/accounts/{name}/video-channels': |
6b738c7a | 4355 | get: |
b029d58a | 4356 | summary: List video channels of an account |
6b738c7a | 4357 | tags: |
b029d58a C |
4358 | - Video Channels |
4359 | - Accounts | |
6b738c7a | 4360 | parameters: |
3e9e6f2f | 4361 | - $ref: '#/components/parameters/name' |
84f6e32c RK |
4362 | - name: withStats |
4363 | in: query | |
c6f8ca4d | 4364 | description: include daily view statistics for the last 30 days and total views (only if authentified as the account user) |
84f6e32c RK |
4365 | schema: |
4366 | type: boolean | |
4367 | - $ref: '#/components/parameters/start' | |
4368 | - $ref: '#/components/parameters/count' | |
4369 | - $ref: '#/components/parameters/sort' | |
6b738c7a C |
4370 | responses: |
4371 | '200': | |
4372 | description: successful operation | |
3e9e6f2f RK |
4373 | content: |
4374 | application/json: | |
4375 | schema: | |
045bcd0d | 4376 | $ref: '#/components/schemas/VideoChannelList' |
3f71c4c0 | 4377 | |
3545e72c | 4378 | '/api/v1/accounts/{name}/video-channel-syncs': |
2a491182 F |
4379 | get: |
4380 | summary: List the synchronizations of video channels of an account | |
4381 | tags: | |
4382 | - Video Channels | |
4383 | - Channels Sync | |
4384 | - Accounts | |
4385 | parameters: | |
4386 | - $ref: '#/components/parameters/name' | |
4387 | - $ref: '#/components/parameters/start' | |
4388 | - $ref: '#/components/parameters/count' | |
4389 | - $ref: '#/components/parameters/sort' | |
4390 | responses: | |
4391 | '200': | |
4392 | description: successful operation | |
4393 | content: | |
4394 | application/json: | |
4395 | schema: | |
4396 | $ref: '#/components/schemas/VideoChannelSyncList' | |
4397 | ||
3545e72c | 4398 | '/api/v1/accounts/{name}/ratings': |
c100a614 | 4399 | get: |
b029d58a | 4400 | summary: List ratings of an account |
c100a614 YB |
4401 | security: |
4402 | - OAuth2: [] | |
4403 | tags: | |
b029d58a | 4404 | - Accounts |
c100a614 | 4405 | parameters: |
cb9d028a | 4406 | - $ref: '#/components/parameters/name' |
c100a614 YB |
4407 | - $ref: '#/components/parameters/start' |
4408 | - $ref: '#/components/parameters/count' | |
4409 | - $ref: '#/components/parameters/sort' | |
4410 | - name: rating | |
4411 | in: query | |
4412 | required: false | |
b3d1054e | 4413 | description: Optionally filter which ratings to retrieve |
c100a614 YB |
4414 | schema: |
4415 | type: string | |
4416 | enum: | |
4417 | - like | |
4418 | - dislike | |
4419 | responses: | |
4420 | '200': | |
4421 | description: successful operation | |
4422 | content: | |
4423 | application/json: | |
4424 | schema: | |
4425 | type: array | |
4426 | items: | |
4427 | $ref: '#/components/schemas/VideoRating' | |
3f71c4c0 | 4428 | |
3545e72c | 4429 | '/api/v1/videos/{id}/comment-threads': |
1569a818 | 4430 | get: |
b029d58a | 4431 | summary: List threads of a video |
1569a818 | 4432 | tags: |
b029d58a | 4433 | - Video Comments |
1569a818 | 4434 | parameters: |
cb9d028a | 4435 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f RK |
4436 | - $ref: '#/components/parameters/start' |
4437 | - $ref: '#/components/parameters/count' | |
71810d0b | 4438 | - $ref: '#/components/parameters/commentsSort' |
1569a818 DG |
4439 | responses: |
4440 | '200': | |
4441 | description: successful operation | |
3e9e6f2f RK |
4442 | content: |
4443 | application/json: | |
4444 | schema: | |
4445 | $ref: '#/components/schemas/CommentThreadResponse' | |
1569a818 | 4446 | post: |
b029d58a | 4447 | summary: Create a thread |
94ff4c23 | 4448 | security: |
3e9e6f2f | 4449 | - OAuth2: [] |
1569a818 | 4450 | tags: |
b029d58a | 4451 | - Video Comments |
1569a818 | 4452 | parameters: |
cb9d028a | 4453 | - $ref: '#/components/parameters/idOrUUID' |
1569a818 DG |
4454 | responses: |
4455 | '200': | |
4456 | description: successful operation | |
3e9e6f2f RK |
4457 | content: |
4458 | application/json: | |
4459 | schema: | |
4460 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
2c318664 RK |
4461 | '404': |
4462 | description: video does not exist | |
98639806 C |
4463 | requestBody: |
4464 | content: | |
4465 | application/json: | |
4466 | schema: | |
4467 | type: object | |
4468 | properties: | |
4469 | text: | |
bf3c3fea RK |
4470 | allOf: |
4471 | - $ref: '#/components/schemas/VideoComment/properties/text' | |
4472 | format: markdown | |
4473 | maxLength: 10000 | |
98639806 C |
4474 | required: |
4475 | - text | |
4476 | ||
3545e72c | 4477 | '/api/v1/videos/{id}/comment-threads/{threadId}': |
1569a818 | 4478 | get: |
b029d58a | 4479 | summary: Get a thread |
1569a818 | 4480 | tags: |
b029d58a | 4481 | - Video Comments |
1569a818 | 4482 | parameters: |
cb9d028a C |
4483 | - $ref: '#/components/parameters/idOrUUID' |
4484 | - $ref: '#/components/parameters/threadId' | |
1569a818 DG |
4485 | responses: |
4486 | '200': | |
4487 | description: successful operation | |
3e9e6f2f RK |
4488 | content: |
4489 | application/json: | |
4490 | schema: | |
4491 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
3f71c4c0 | 4492 | |
3545e72c | 4493 | '/api/v1/videos/{id}/comments/{commentId}': |
1569a818 | 4494 | post: |
b029d58a | 4495 | summary: Reply to a thread of a video |
94ff4c23 | 4496 | security: |
3e9e6f2f | 4497 | - OAuth2: [] |
1569a818 | 4498 | tags: |
b029d58a | 4499 | - Video Comments |
1569a818 | 4500 | parameters: |
cb9d028a | 4501 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 4502 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
4503 | responses: |
4504 | '200': | |
4505 | description: successful operation | |
3e9e6f2f RK |
4506 | content: |
4507 | application/json: | |
4508 | schema: | |
4509 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
2c318664 RK |
4510 | '404': |
4511 | description: thread or video does not exist | |
98639806 C |
4512 | requestBody: |
4513 | content: | |
4514 | application/json: | |
4515 | schema: | |
4516 | type: object | |
4517 | properties: | |
4518 | text: | |
bf3c3fea RK |
4519 | allOf: |
4520 | - $ref: '#/components/schemas/VideoComment/properties/text' | |
4521 | format: markdown | |
4522 | maxLength: 10000 | |
98639806 C |
4523 | required: |
4524 | - text | |
1569a818 | 4525 | delete: |
b029d58a | 4526 | summary: Delete a comment or a reply |
94ff4c23 | 4527 | security: |
3e9e6f2f | 4528 | - OAuth2: [] |
1569a818 | 4529 | tags: |
b029d58a | 4530 | - Video Comments |
1569a818 | 4531 | parameters: |
cb9d028a | 4532 | - $ref: '#/components/parameters/idOrUUID' |
3e9e6f2f | 4533 | - $ref: '#/components/parameters/commentId' |
1569a818 DG |
4534 | responses: |
4535 | '204': | |
c1843150 | 4536 | description: successful operation |
84f6e32c RK |
4537 | '403': |
4538 | description: cannot remove comment of another user | |
4539 | '404': | |
4540 | description: comment or video does not exist | |
4541 | '409': | |
4542 | description: comment is already deleted | |
3f71c4c0 | 4543 | |
3545e72c | 4544 | '/api/v1/videos/{id}/rate': |
1569a818 | 4545 | put: |
b029d58a | 4546 | summary: Like/dislike a video |
94ff4c23 | 4547 | security: |
3e9e6f2f | 4548 | - OAuth2: [] |
1569a818 | 4549 | tags: |
b029d58a | 4550 | - Video Rates |
1569a818 | 4551 | parameters: |
cb9d028a | 4552 | - $ref: '#/components/parameters/idOrUUID' |
4c440ced RK |
4553 | requestBody: |
4554 | content: | |
4555 | application/json: | |
4556 | schema: | |
4557 | type: object | |
4558 | properties: | |
4559 | rating: | |
4560 | type: string | |
4561 | enum: | |
4562 | - like | |
4563 | - dislike | |
9a320a06 RK |
4564 | required: |
4565 | - rating | |
1569a818 | 4566 | responses: |
ad5db104 C |
4567 | '204': |
4568 | description: successful operation | |
4569 | '404': | |
4570 | description: video does not exist | |
4571 | ||
3545e72c | 4572 | '/api/v1/videos/{id}/hls': |
ad5db104 C |
4573 | delete: |
4574 | summary: Delete video HLS files | |
4575 | security: | |
4576 | - OAuth2: | |
4577 | - admin | |
4578 | tags: | |
4579 | - Video Files | |
4580 | operationId: delVideoHLS | |
4581 | parameters: | |
4582 | - $ref: '#/components/parameters/idOrUUID' | |
4583 | responses: | |
4584 | '204': | |
4585 | description: successful operation | |
4586 | '404': | |
4587 | description: video does not exist | |
3545e72c | 4588 | '/api/v1/videos/{id}/webtorrent': |
ad5db104 C |
4589 | delete: |
4590 | summary: Delete video WebTorrent files | |
4591 | security: | |
4592 | - OAuth2: | |
4593 | - admin | |
4594 | tags: | |
4595 | - Video Files | |
4596 | operationId: delVideoWebTorrent | |
4597 | parameters: | |
4598 | - $ref: '#/components/parameters/idOrUUID' | |
4599 | responses: | |
4600 | '204': | |
4601 | description: successful operation | |
4602 | '404': | |
4603 | description: video does not exist | |
4604 | ||
3545e72c | 4605 | '/api/v1/videos/{id}/transcoding': |
ad5db104 C |
4606 | post: |
4607 | summary: Create a transcoding job | |
4608 | security: | |
4609 | - OAuth2: | |
4610 | - admin | |
4611 | tags: | |
4612 | - Video Transcoding | |
4613 | operationId: createVideoTranscoding | |
4614 | parameters: | |
4615 | - $ref: '#/components/parameters/idOrUUID' | |
4616 | requestBody: | |
4617 | content: | |
4618 | application/json: | |
4619 | schema: | |
4620 | type: object | |
4621 | properties: | |
4622 | transcodingType: | |
4623 | type: string | |
4624 | enum: | |
4625 | - hls | |
4626 | - webtorrent | |
4627 | required: | |
4628 | - transcodingType | |
4629 | responses: | |
1569a818 | 4630 | '204': |
c1843150 | 4631 | description: successful operation |
2c318664 RK |
4632 | '404': |
4633 | description: video does not exist | |
3f71c4c0 | 4634 | |
3545e72c | 4635 | /api/v1/search/videos: |
fb72c193 DL |
4636 | get: |
4637 | tags: | |
4638 | - Search | |
b029d58a | 4639 | summary: Search videos |
e2adb8cb | 4640 | operationId: searchVideos |
fb72c193 | 4641 | parameters: |
84f6e32c RK |
4642 | - name: search |
4643 | in: query | |
4644 | required: true | |
4645 | allowEmptyValue: false | |
4646 | description: > | |
4647 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
4648 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
4649 | you can use the REST API to fetch the complete video information and interact with it. | |
4650 | schema: | |
4651 | type: string | |
59c794a5 | 4652 | - $ref: '#/components/parameters/categoryOneOf' |
1fd61899 | 4653 | - $ref: '#/components/parameters/isLive' |
59c794a5 C |
4654 | - $ref: '#/components/parameters/tagsOneOf' |
4655 | - $ref: '#/components/parameters/tagsAllOf' | |
4656 | - $ref: '#/components/parameters/licenceOneOf' | |
4657 | - $ref: '#/components/parameters/languageOneOf' | |
4658 | - $ref: '#/components/parameters/nsfw' | |
2760b454 C |
4659 | - $ref: '#/components/parameters/isLocal' |
4660 | - $ref: '#/components/parameters/include' | |
527a52ac | 4661 | - $ref: '#/components/parameters/privacyOneOf' |
3299c9e1 | 4662 | - $ref: '#/components/parameters/uuids' |
d324756e C |
4663 | - $ref: '#/components/parameters/hasHLSFiles' |
4664 | - $ref: '#/components/parameters/hasWebtorrentFiles' | |
59c794a5 | 4665 | - $ref: '#/components/parameters/skipCount' |
3e9e6f2f RK |
4666 | - $ref: '#/components/parameters/start' |
4667 | - $ref: '#/components/parameters/count' | |
ad031145 | 4668 | - $ref: '#/components/parameters/searchTarget' |
fd5af7a2 | 4669 | - $ref: '#/components/parameters/videosSearchSort' |
ad031145 C |
4670 | - name: startDate |
4671 | in: query | |
ad031145 C |
4672 | description: Get videos that are published after this date |
4673 | schema: | |
4674 | type: string | |
4675 | format: date-time | |
4676 | - name: endDate | |
4677 | in: query | |
ad031145 C |
4678 | description: Get videos that are published before this date |
4679 | schema: | |
4680 | type: string | |
4681 | format: date-time | |
4682 | - name: originallyPublishedStartDate | |
4683 | in: query | |
ad031145 | 4684 | description: Get videos that are originally published after this date |
3e9e6f2f RK |
4685 | schema: |
4686 | type: string | |
ad031145 C |
4687 | format: date-time |
4688 | - name: originallyPublishedEndDate | |
4689 | in: query | |
ad031145 C |
4690 | description: Get videos that are originally published before this date |
4691 | schema: | |
4692 | type: string | |
4693 | format: date-time | |
4694 | - name: durationMin | |
4695 | in: query | |
ad031145 C |
4696 | description: Get videos that have this minimum duration |
4697 | schema: | |
06746a8b | 4698 | type: integer |
ad031145 C |
4699 | - name: durationMax |
4700 | in: query | |
ad031145 C |
4701 | description: Get videos that have this maximum duration |
4702 | schema: | |
06746a8b | 4703 | type: integer |
2c318664 RK |
4704 | callbacks: |
4705 | 'searchTarget === search-index': | |
4706 | $ref: '#/components/callbacks/searchIndex' | |
fb72c193 DL |
4707 | responses: |
4708 | '200': | |
4709 | description: successful operation | |
3e9e6f2f RK |
4710 | content: |
4711 | application/json: | |
4712 | schema: | |
048b6946 | 4713 | $ref: '#/components/schemas/VideoListResponse' |
2c318664 RK |
4714 | '500': |
4715 | description: search index unavailable | |
3f71c4c0 | 4716 | |
3545e72c | 4717 | /api/v1/search/video-channels: |
ad031145 C |
4718 | get: |
4719 | tags: | |
4720 | - Search | |
4721 | summary: Search channels | |
e2adb8cb | 4722 | operationId: searchChannels |
ad031145 | 4723 | parameters: |
ad031145 C |
4724 | - name: search |
4725 | in: query | |
4726 | required: true | |
4727 | description: > | |
4728 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
4729 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
4730 | you can use the REST API to fetch the complete channel information and interact with it. | |
4731 | schema: | |
4732 | type: string | |
84f6e32c RK |
4733 | - $ref: '#/components/parameters/start' |
4734 | - $ref: '#/components/parameters/count' | |
4735 | - $ref: '#/components/parameters/searchTarget' | |
4736 | - $ref: '#/components/parameters/sort' | |
2c318664 RK |
4737 | callbacks: |
4738 | 'searchTarget === search-index': | |
4739 | $ref: '#/components/callbacks/searchIndex' | |
ad031145 C |
4740 | responses: |
4741 | '200': | |
4742 | description: successful operation | |
4743 | content: | |
4744 | application/json: | |
4745 | schema: | |
045bcd0d | 4746 | $ref: '#/components/schemas/VideoChannelList' |
2c318664 RK |
4747 | '500': |
4748 | description: search index unavailable | |
37a44fc9 | 4749 | |
3545e72c | 4750 | /api/v1/search/video-playlists: |
37a44fc9 C |
4751 | get: |
4752 | tags: | |
4753 | - Search | |
4754 | summary: Search playlists | |
4755 | operationId: searchPlaylists | |
4756 | parameters: | |
4757 | - name: search | |
4758 | in: query | |
4759 | required: true | |
4760 | description: > | |
4761 | String to search. If the user can make a remote URI search, and the string is an URI then the | |
4762 | PeerTube instance will fetch the remote object and add it to its database. Then, | |
4763 | you can use the REST API to fetch the complete playlist information and interact with it. | |
4764 | schema: | |
4765 | type: string | |
4766 | - $ref: '#/components/parameters/start' | |
4767 | - $ref: '#/components/parameters/count' | |
4768 | - $ref: '#/components/parameters/searchTarget' | |
4769 | - $ref: '#/components/parameters/sort' | |
4770 | callbacks: | |
4771 | 'searchTarget === search-index': | |
4772 | $ref: '#/components/callbacks/searchIndex' | |
4773 | responses: | |
4774 | '200': | |
4775 | description: successful operation | |
4776 | content: | |
4777 | application/json: | |
4778 | schema: | |
4779 | type: object | |
4780 | properties: | |
4781 | total: | |
4782 | type: integer | |
4783 | example: 1 | |
4784 | data: | |
4785 | type: array | |
4786 | items: | |
4787 | $ref: '#/components/schemas/VideoPlaylist' | |
4788 | '500': | |
4789 | description: search index unavailable | |
da35b419 | 4790 | |
3545e72c | 4791 | /api/v1/blocklist/status: |
bdf70330 C |
4792 | get: |
4793 | tags: | |
4794 | - Account Blocks | |
4795 | - Server Blocks | |
4796 | summary: Get block status of accounts/hosts | |
4797 | parameters: | |
4798 | - | |
4799 | name: 'accounts' | |
4800 | in: query | |
4801 | description: 'Check if these accounts are blocked' | |
4802 | example: [ 'goofy@example.com', 'donald@example.com' ] | |
4803 | schema: | |
4804 | type: array | |
4805 | items: | |
4806 | type: string | |
4807 | - | |
4808 | name: 'hosts' | |
4809 | in: query | |
4810 | description: 'Check if these hosts are blocked' | |
4811 | example: [ 'example.com' ] | |
4812 | schema: | |
4813 | type: array | |
4814 | items: | |
4815 | type: string | |
4816 | responses: | |
4817 | '200': | |
4818 | description: successful operation | |
3545e72c C |
4819 | content: |
4820 | 'application/json': | |
4821 | schema: | |
4822 | $ref: '#/components/schemas/BlockStatus' | |
3f71c4c0 | 4823 | |
3545e72c | 4824 | /api/v1/server/blocklist/accounts: |
04b703f6 RK |
4825 | get: |
4826 | tags: | |
3545e72c C |
4827 | - Account Blocks |
4828 | summary: List account blocks | |
04b703f6 RK |
4829 | security: |
4830 | - OAuth2: | |
4831 | - admin | |
4832 | parameters: | |
04b703f6 RK |
4833 | - $ref: '#/components/parameters/start' |
4834 | - $ref: '#/components/parameters/count' | |
3545e72c | 4835 | - $ref: '#/components/parameters/sort' |
04b703f6 RK |
4836 | responses: |
4837 | '200': | |
4838 | description: successful operation | |
04b703f6 RK |
4839 | post: |
4840 | tags: | |
3545e72c C |
4841 | - Account Blocks |
4842 | summary: Block an account | |
04b703f6 RK |
4843 | security: |
4844 | - OAuth2: | |
4845 | - admin | |
4846 | requestBody: | |
4847 | content: | |
4848 | application/json: | |
4849 | schema: | |
4850 | type: object | |
4851 | properties: | |
3545e72c C |
4852 | accountName: |
4853 | type: string | |
4854 | example: chocobozzz@example.org | |
4855 | description: account to block, in the form `username@domain` | |
04b703f6 | 4856 | required: |
3545e72c | 4857 | - accountName |
04b703f6 | 4858 | responses: |
3545e72c | 4859 | '200': |
04b703f6 | 4860 | description: successful operation |
04b703f6 | 4861 | '409': |
3545e72c | 4862 | description: self-blocking forbidden |
3f71c4c0 | 4863 | |
3545e72c | 4864 | '/api/v1/server/blocklist/accounts/{accountName}': |
04b703f6 RK |
4865 | delete: |
4866 | tags: | |
3545e72c C |
4867 | - Account Blocks |
4868 | summary: Unblock an account by its handle | |
04b703f6 RK |
4869 | security: |
4870 | - OAuth2: | |
4871 | - admin | |
4872 | parameters: | |
3545e72c | 4873 | - name: accountName |
04b703f6 RK |
4874 | in: path |
4875 | required: true | |
3545e72c | 4876 | description: account to unblock, in the form `username@domain` |
04b703f6 RK |
4877 | schema: |
4878 | type: string | |
4879 | responses: | |
3545e72c | 4880 | '201': |
04b703f6 RK |
4881 | description: successful operation |
4882 | '404': | |
3545e72c | 4883 | description: account or account block does not exist |
da35b419 | 4884 | |
3545e72c | 4885 | /api/v1/server/blocklist/servers: |
b44b5a83 C |
4886 | get: |
4887 | tags: | |
3545e72c C |
4888 | - Server Blocks |
4889 | summary: List server blocks | |
4890 | security: | |
4891 | - OAuth2: | |
4892 | - admin | |
4893 | parameters: | |
4894 | - $ref: '#/components/parameters/start' | |
4895 | - $ref: '#/components/parameters/count' | |
4896 | - $ref: '#/components/parameters/sort' | |
b44b5a83 C |
4897 | responses: |
4898 | '200': | |
4899 | description: successful operation | |
42b40636 C |
4900 | post: |
4901 | tags: | |
3545e72c C |
4902 | - Server Blocks |
4903 | summary: Block a server | |
4904 | security: | |
4905 | - OAuth2: | |
4906 | - admin | |
42b40636 C |
4907 | requestBody: |
4908 | content: | |
4909 | application/json: | |
4910 | schema: | |
3545e72c C |
4911 | type: object |
4912 | properties: | |
4913 | host: | |
4914 | type: string | |
4915 | format: hostname | |
4916 | description: server domain to block | |
4917 | required: | |
4918 | - host | |
42b40636 C |
4919 | responses: |
4920 | '204': | |
4921 | description: successful operation | |
3545e72c C |
4922 | '409': |
4923 | description: self-blocking forbidden | |
42b40636 | 4924 | |
3545e72c C |
4925 | '/api/v1/server/blocklist/servers/{host}': |
4926 | delete: | |
42b40636 | 4927 | tags: |
3545e72c C |
4928 | - Server Blocks |
4929 | summary: Unblock a server by its domain | |
42b40636 C |
4930 | security: |
4931 | - OAuth2: | |
4932 | - admin | |
06746a8b | 4933 | parameters: |
3545e72c | 4934 | - name: host |
06746a8b RK |
4935 | in: path |
4936 | required: true | |
3545e72c | 4937 | description: server domain to unblock |
00494d6e RK |
4938 | schema: |
4939 | type: string | |
3545e72c | 4940 | format: hostname |
06746a8b RK |
4941 | responses: |
4942 | '204': | |
4943 | description: successful operation | |
00494d6e | 4944 | '404': |
3545e72c | 4945 | description: account block does not exist |
3f71c4c0 | 4946 | |
3545e72c C |
4947 | /api/v1/server/redundancy/{host}: |
4948 | put: | |
06746a8b | 4949 | tags: |
3545e72c C |
4950 | - Instance Redundancy |
4951 | summary: Update a server redundancy policy | |
4952 | security: | |
4953 | - OAuth2: | |
4954 | - admin | |
4955 | parameters: | |
4956 | - name: host | |
4957 | in: path | |
4958 | required: true | |
4959 | description: server domain to mirror | |
06746a8b RK |
4960 | schema: |
4961 | type: string | |
3545e72c C |
4962 | format: hostname |
4963 | requestBody: | |
4964 | content: | |
4965 | application/json: | |
4966 | schema: | |
4967 | type: object | |
4968 | properties: | |
4969 | redundancyAllowed: | |
4970 | type: boolean | |
4971 | description: allow mirroring of the host's local videos | |
4972 | required: | |
4973 | - redundancyAllowed | |
4974 | responses: | |
4975 | '204': | |
4976 | description: successful operation | |
4977 | '404': | |
4978 | description: server is not already known | |
4979 | ||
4980 | /api/v1/server/redundancy/videos: | |
4981 | get: | |
4982 | tags: | |
4983 | - Video Mirroring | |
4984 | summary: List videos being mirrored | |
4985 | operationId: getMirroredVideos | |
4986 | security: | |
4987 | - OAuth2: | |
4988 | - admin | |
4989 | parameters: | |
4990 | - name: target | |
d73810be | 4991 | in: query |
3545e72c C |
4992 | required: true |
4993 | description: direction of the mirror | |
06746a8b RK |
4994 | schema: |
4995 | type: string | |
3545e72c C |
4996 | enum: |
4997 | - my-videos | |
4998 | - remote-videos | |
4999 | - $ref: '#/components/parameters/start' | |
5000 | - $ref: '#/components/parameters/count' | |
5001 | - $ref: '#/components/parameters/videoRedundanciesSort' | |
06746a8b | 5002 | responses: |
3545e72c | 5003 | '200': |
06746a8b | 5004 | description: successful operation |
06746a8b | 5005 | content: |
06746a8b RK |
5006 | application/json: |
5007 | schema: | |
3545e72c C |
5008 | type: array |
5009 | items: | |
5010 | $ref: '#/components/schemas/VideoRedundancy' | |
5011 | post: | |
5012 | tags: | |
5013 | - Video Mirroring | |
5014 | summary: Mirror a video | |
5015 | operationId: putMirroredVideo | |
5016 | security: | |
5017 | - OAuth2: | |
5018 | - admin | |
5019 | requestBody: | |
5020 | content: | |
5021 | application/json: | |
5022 | schema: | |
5023 | type: object | |
5024 | properties: | |
5025 | videoId: | |
5026 | $ref: '#/components/schemas/Video/properties/id' | |
5027 | required: | |
5028 | - videoId | |
5029 | responses: | |
5030 | '204': | |
5031 | description: successful operation | |
5032 | '400': | |
5033 | description: cannot mirror a local video | |
00494d6e | 5034 | '404': |
3545e72c C |
5035 | description: video does not exist |
5036 | '409': | |
5037 | description: video is already mirrored | |
3f71c4c0 | 5038 | |
3545e72c C |
5039 | /api/v1/server/redundancy/videos/{redundancyId}: |
5040 | delete: | |
64df4b65 | 5041 | tags: |
3545e72c C |
5042 | - Video Mirroring |
5043 | summary: Delete a mirror done on a video | |
5044 | operationId: delMirroredVideo | |
5045 | security: | |
5046 | - OAuth2: | |
5047 | - admin | |
64df4b65 | 5048 | parameters: |
3545e72c | 5049 | - name: redundancyId |
64df4b65 RK |
5050 | in: path |
5051 | required: true | |
3545e72c | 5052 | description: id of an existing redundancy on a video |
64df4b65 RK |
5053 | schema: |
5054 | type: string | |
64df4b65 RK |
5055 | responses: |
5056 | '204': | |
5057 | description: successful operation | |
3545e72c C |
5058 | '404': |
5059 | description: video redundancy not found | |
5060 | ||
5061 | /api/v1/server/stats: | |
5062 | get: | |
5063 | tags: | |
5064 | - Stats | |
5065 | summary: Get instance stats | |
5066 | description: Get instance public statistics. This endpoint is cached. | |
5067 | operationId: getInstanceStats | |
5068 | responses: | |
5069 | '200': | |
5070 | description: successful operation | |
64df4b65 | 5071 | content: |
3545e72c | 5072 | application/json: |
64df4b65 | 5073 | schema: |
3545e72c C |
5074 | $ref: '#/components/schemas/ServerStats' |
5075 | ||
5076 | /api/v1/server/logs/client: | |
5077 | post: | |
5078 | tags: | |
5079 | - Logs | |
5080 | summary: Send client log | |
5081 | operationId: sendClientLog | |
5082 | requestBody: | |
5083 | content: | |
5084 | application/json: | |
5085 | schema: | |
5086 | $ref: '#/components/schemas/SendClientLog' | |
5087 | responses: | |
5088 | '204': | |
5089 | description: successful operation | |
5090 | ||
5091 | /api/v1/server/logs: | |
5092 | get: | |
5093 | tags: | |
5094 | - Logs | |
5095 | summary: Get instance logs | |
5096 | operationId: getInstanceLogs | |
5097 | security: | |
5098 | - OAuth2: | |
5099 | - admin | |
5100 | responses: | |
5101 | '200': | |
5102 | description: successful operation | |
5103 | content: | |
5104 | application/json: | |
64df4b65 | 5105 | schema: |
3545e72c C |
5106 | type: array |
5107 | items: | |
5108 | type: string | |
5109 | ||
5110 | /api/v1/server/audit-logs: | |
5111 | get: | |
5112 | tags: | |
5113 | - Logs | |
5114 | summary: Get instance audit logs | |
5115 | operationId: getInstanceAuditLogs | |
5116 | security: | |
5117 | - OAuth2: | |
5118 | - admin | |
5119 | responses: | |
5120 | '200': | |
5121 | description: successful operation | |
5122 | content: | |
64df4b65 RK |
5123 | application/json: |
5124 | schema: | |
3545e72c C |
5125 | type: array |
5126 | items: | |
5127 | type: string | |
3f71c4c0 | 5128 | |
3545e72c | 5129 | /api/v1/plugins: |
7461d440 RK |
5130 | get: |
5131 | tags: | |
5132 | - Plugins | |
5133 | summary: List plugins | |
e2adb8cb | 5134 | operationId: getPlugins |
7461d440 RK |
5135 | security: |
5136 | - OAuth2: | |
5137 | - admin | |
5138 | parameters: | |
5139 | - name: pluginType | |
5140 | in: query | |
5141 | schema: | |
5142 | type: integer | |
5143 | - name: uninstalled | |
5144 | in: query | |
5145 | schema: | |
5146 | type: boolean | |
5147 | - $ref: '#/components/parameters/start' | |
5148 | - $ref: '#/components/parameters/count' | |
5149 | - $ref: '#/components/parameters/sort' | |
5150 | responses: | |
5151 | '200': | |
5152 | description: successful operation | |
5153 | content: | |
5154 | application/json: | |
5155 | schema: | |
5156 | $ref: '#/components/schemas/PluginResponse' | |
3f71c4c0 | 5157 | |
3545e72c | 5158 | /api/v1/plugins/available: |
7461d440 RK |
5159 | get: |
5160 | tags: | |
5161 | - Plugins | |
5162 | summary: List available plugins | |
e2adb8cb | 5163 | operationId: getAvailablePlugins |
7461d440 RK |
5164 | security: |
5165 | - OAuth2: | |
5166 | - admin | |
5167 | parameters: | |
5168 | - name: search | |
5169 | in: query | |
5170 | schema: | |
5171 | type: string | |
5172 | - name: pluginType | |
5173 | in: query | |
5174 | schema: | |
5175 | type: integer | |
5176 | - name: currentPeerTubeEngine | |
5177 | in: query | |
5178 | schema: | |
5179 | type: string | |
5180 | - $ref: '#/components/parameters/start' | |
5181 | - $ref: '#/components/parameters/count' | |
5182 | - $ref: '#/components/parameters/sort' | |
5183 | responses: | |
5184 | '200': | |
5185 | description: successful operation | |
5186 | content: | |
5187 | application/json: | |
5188 | schema: | |
5189 | $ref: '#/components/schemas/PluginResponse' | |
5190 | '503': | |
5191 | description: plugin index unavailable | |
3f71c4c0 | 5192 | |
3545e72c | 5193 | /api/v1/plugins/install: |
7461d440 RK |
5194 | post: |
5195 | tags: | |
5196 | - Plugins | |
5197 | summary: Install a plugin | |
e2adb8cb | 5198 | operationId: addPlugin |
7461d440 RK |
5199 | security: |
5200 | - OAuth2: | |
5201 | - admin | |
5202 | requestBody: | |
5203 | content: | |
5204 | application/json: | |
5205 | schema: | |
5206 | oneOf: | |
5207 | - type: object | |
5208 | properties: | |
5209 | npmName: | |
5210 | type: string | |
84f6e32c | 5211 | example: peertube-plugin-auth-ldap |
7461d440 RK |
5212 | required: |
5213 | - npmName | |
5214 | additionalProperties: false | |
5215 | - type: object | |
5216 | properties: | |
5217 | path: | |
5218 | type: string | |
5219 | required: | |
5220 | - path | |
5221 | additionalProperties: false | |
5222 | responses: | |
5223 | '204': | |
5224 | description: successful operation | |
5225 | '400': | |
5226 | description: should have either `npmName` or `path` set | |
3f71c4c0 | 5227 | |
3545e72c | 5228 | /api/v1/plugins/update: |
7461d440 RK |
5229 | post: |
5230 | tags: | |
5231 | - Plugins | |
5232 | summary: Update a plugin | |
e2adb8cb | 5233 | operationId: updatePlugin |
7461d440 RK |
5234 | security: |
5235 | - OAuth2: | |
5236 | - admin | |
5237 | requestBody: | |
5238 | content: | |
5239 | application/json: | |
5240 | schema: | |
5241 | oneOf: | |
5242 | - type: object | |
5243 | properties: | |
5244 | npmName: | |
5245 | type: string | |
84f6e32c | 5246 | example: peertube-plugin-auth-ldap |
7461d440 RK |
5247 | required: |
5248 | - npmName | |
5249 | additionalProperties: false | |
5250 | - type: object | |
5251 | properties: | |
5252 | path: | |
5253 | type: string | |
5254 | required: | |
5255 | - path | |
5256 | additionalProperties: false | |
5257 | responses: | |
5258 | '204': | |
5259 | description: successful operation | |
5260 | '400': | |
5261 | description: should have either `npmName` or `path` set | |
5262 | '404': | |
5263 | description: existing plugin not found | |
3f71c4c0 | 5264 | |
3545e72c | 5265 | /api/v1/plugins/uninstall: |
7461d440 RK |
5266 | post: |
5267 | tags: | |
5268 | - Plugins | |
5269 | summary: Uninstall a plugin | |
e2adb8cb | 5270 | operationId: uninstallPlugin |
7461d440 RK |
5271 | security: |
5272 | - OAuth2: | |
5273 | - admin | |
5274 | requestBody: | |
5275 | content: | |
5276 | application/json: | |
5277 | schema: | |
5278 | type: object | |
5279 | properties: | |
5280 | npmName: | |
5281 | type: string | |
84f6e32c RK |
5282 | description: name of the plugin/theme in its package.json |
5283 | example: peertube-plugin-auth-ldap | |
7461d440 RK |
5284 | required: |
5285 | - npmName | |
5286 | responses: | |
5287 | '204': | |
5288 | description: successful operation | |
5289 | '404': | |
5290 | description: existing plugin not found | |
3f71c4c0 | 5291 | |
3545e72c | 5292 | /api/v1/plugins/{npmName}: |
7461d440 RK |
5293 | get: |
5294 | tags: | |
5295 | - Plugins | |
5296 | summary: Get a plugin | |
e2adb8cb | 5297 | operationId: getPlugin |
7461d440 RK |
5298 | security: |
5299 | - OAuth2: | |
5300 | - admin | |
5301 | parameters: | |
84f6e32c | 5302 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
5303 | responses: |
5304 | '200': | |
5305 | description: successful operation | |
5306 | content: | |
5307 | application/json: | |
5308 | schema: | |
5309 | $ref: '#/components/schemas/Plugin' | |
5310 | '404': | |
5311 | description: plugin not found | |
3f71c4c0 | 5312 | |
3545e72c | 5313 | /api/v1/plugins/{npmName}/settings: |
7461d440 RK |
5314 | put: |
5315 | tags: | |
5316 | - Plugins | |
5317 | summary: Set a plugin's settings | |
5318 | security: | |
5319 | - OAuth2: | |
5320 | - admin | |
5321 | parameters: | |
84f6e32c | 5322 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
5323 | requestBody: |
5324 | content: | |
5325 | application/json: | |
5326 | schema: | |
5327 | type: object | |
5328 | properties: | |
5329 | settings: | |
5330 | type: object | |
5331 | additionalProperties: true | |
5332 | responses: | |
5333 | '204': | |
5334 | description: successful operation | |
5335 | '404': | |
5336 | description: plugin not found | |
3f71c4c0 | 5337 | |
3545e72c | 5338 | /api/v1/plugins/{npmName}/public-settings: |
7461d440 RK |
5339 | get: |
5340 | tags: | |
5341 | - Plugins | |
5342 | summary: Get a plugin's public settings | |
7461d440 | 5343 | parameters: |
84f6e32c | 5344 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
5345 | responses: |
5346 | '200': | |
5347 | description: successful operation | |
5348 | content: | |
5349 | application/json: | |
5350 | schema: | |
5351 | type: object | |
5352 | additionalProperties: true | |
5353 | '404': | |
5354 | description: plugin not found | |
3f71c4c0 | 5355 | |
3545e72c | 5356 | /api/v1/plugins/{npmName}/registered-settings: |
7461d440 RK |
5357 | get: |
5358 | tags: | |
5359 | - Plugins | |
5360 | summary: Get a plugin's registered settings | |
5361 | security: | |
5362 | - OAuth2: | |
5363 | - admin | |
5364 | parameters: | |
84f6e32c | 5365 | - $ref: '#/components/parameters/npmName' |
7461d440 RK |
5366 | responses: |
5367 | '200': | |
5368 | description: successful operation | |
5369 | content: | |
5370 | application/json: | |
5371 | schema: | |
5372 | type: object | |
5373 | additionalProperties: true | |
5374 | '404': | |
5375 | description: plugin not found | |
3f71c4c0 | 5376 | |
3545e72c | 5377 | /api/v1/metrics/playback: |
fd3c2e87 C |
5378 | post: |
5379 | summary: Create playback metrics | |
5380 | description: These metrics are exposed by OpenTelemetry metrics exporter if enabled. | |
5381 | tags: | |
5382 | - Stats | |
5383 | requestBody: | |
5384 | content: | |
5385 | application/json: | |
5386 | schema: | |
5387 | $ref: '#/components/schemas/PlaybackMetricCreate' | |
5388 | responses: | |
5389 | '204': | |
5390 | description: successful operation | |
5391 | ||
3e9e6f2f | 5392 | servers: |
3545e72c | 5393 | - url: 'https://peertube2.cpy.re' |
f4d59981 | 5394 | description: Live Test Server (live data - latest nightly version) |
3545e72c | 5395 | - url: 'https://peertube3.cpy.re' |
b029d58a | 5396 | description: Live Test Server (live data - latest RC version) |
3545e72c | 5397 | - url: 'https://peertube.cpy.re' |
f4d59981 | 5398 | description: Live Test Server (live data - stable version) |
3e9e6f2f RK |
5399 | components: |
5400 | parameters: | |
5401 | start: | |
5402 | name: start | |
5403 | in: query | |
5404 | required: false | |
06746a8b | 5405 | description: Offset used to paginate results |
3e9e6f2f | 5406 | schema: |
06746a8b | 5407 | type: integer |
84f6e32c | 5408 | minimum: 0 |
3e9e6f2f RK |
5409 | count: |
5410 | name: count | |
5411 | in: query | |
5412 | required: false | |
06746a8b | 5413 | description: "Number of items to return" |
3e9e6f2f | 5414 | schema: |
06746a8b | 5415 | type: integer |
84f6e32c | 5416 | default: 15 |
06746a8b RK |
5417 | maximum: 100 |
5418 | minimum: 1 | |
3e9e6f2f RK |
5419 | sort: |
5420 | name: sort | |
5421 | in: query | |
5422 | required: false | |
84f6e32c | 5423 | description: Sort column |
3e9e6f2f RK |
5424 | schema: |
5425 | type: string | |
84f6e32c | 5426 | example: -createdAt |
8491293b RK |
5427 | search: |
5428 | name: search | |
5429 | in: query | |
5430 | required: false | |
5431 | description: Plain text search, applied to various parts of the model depending on endpoint | |
5432 | schema: | |
5433 | type: string | |
ad031145 C |
5434 | searchTarget: |
5435 | name: searchTarget | |
5436 | in: query | |
5437 | required: false | |
5438 | description: > | |
5439 | If the administrator enabled search index support, you can override the default search target. | |
5440 | ||
5441 | ||
5442 | **Warning**: If you choose to make an index search, PeerTube will get results from a third party service. | |
84f6e32c | 5443 | It means the instance may not yet know the objects you fetched. If you want to load video/channel information: |
ad031145 C |
5444 | * If the current user has the ability to make a remote URI search (this information is available in the config endpoint), |
5445 | then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. | |
5446 | After that, you can use the classic REST API endpoints to fetch the complete object or interact with it | |
84f6e32c | 5447 | * 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 |
5448 | the data from the origin instance API |
5449 | schema: | |
5450 | type: string | |
5451 | enum: | |
5452 | - 'local' | |
5453 | - 'search-index' | |
fd5af7a2 RK |
5454 | videosSort: |
5455 | name: sort | |
5456 | in: query | |
5457 | required: false | |
fd5af7a2 RK |
5458 | schema: |
5459 | type: string | |
5460 | enum: | |
d09ed46e C |
5461 | - name |
5462 | - -duration | |
5463 | - -createdAt | |
5464 | - -publishedAt | |
5465 | - -views | |
5466 | - -likes | |
5467 | - -trending | |
5468 | - -hot | |
5469 | - -best | |
5470 | description: > | |
5471 | Sort videos by criteria (prefixing with `-` means `DESC` order): | |
5472 | * `hot` - Adaptation of Reddit "hot" algorithm taking into account video views, likes, dislikes and comments and publication date | |
5473 | * `best` - Same than `hot`, but also takes into account user video history | |
5474 | * `trending` - Sort videos by recent views ("recent" is defined by the admin) | |
5475 | * `views` - Sort videos using their `views` counter | |
5476 | * `publishedAt` - Sort by video publication date (when it became publicly available) | |
fd5af7a2 RK |
5477 | videosSearchSort: |
5478 | name: sort | |
5479 | in: query | |
5480 | required: false | |
d09ed46e C |
5481 | description: > |
5482 | Sort videos by criteria (prefixing with `-` means `DESC` order): | |
fd5af7a2 RK |
5483 | schema: |
5484 | type: string | |
5485 | enum: | |
04b703f6 | 5486 | - name |
fd5af7a2 RK |
5487 | - -duration |
5488 | - -createdAt | |
5489 | - -publishedAt | |
5490 | - -views | |
5491 | - -likes | |
5492 | - -match | |
71810d0b RK |
5493 | commentsSort: |
5494 | name: sort | |
5495 | in: query | |
5496 | required: false | |
5497 | description: Sort comments by criteria | |
5498 | schema: | |
5499 | type: string | |
5500 | enum: | |
5501 | - -createdAt | |
5502 | - -totalReplies | |
fd5af7a2 RK |
5503 | blacklistsSort: |
5504 | name: sort | |
5505 | in: query | |
5506 | required: false | |
c756bae0 | 5507 | description: Sort blocklists by criteria |
fd5af7a2 RK |
5508 | schema: |
5509 | type: string | |
5510 | enum: | |
5511 | - -id | |
04b703f6 | 5512 | - name |
fd5af7a2 RK |
5513 | - -duration |
5514 | - -views | |
5515 | - -likes | |
5516 | - -dislikes | |
5517 | - -uuid | |
5518 | - -createdAt | |
8491293b RK |
5519 | usersSearch: |
5520 | name: search | |
5521 | in: query | |
5522 | required: false | |
5523 | description: Plain text search that will match with user usernames or emails | |
5524 | schema: | |
5525 | type: string | |
5526 | usersBlocked: | |
5527 | name: blocked | |
5528 | in: query | |
5529 | required: false | |
5530 | description: Filter results down to (un)banned users | |
5531 | schema: | |
5532 | type: boolean | |
fd5af7a2 RK |
5533 | usersSort: |
5534 | name: sort | |
5535 | in: query | |
5536 | required: false | |
5537 | description: Sort users by criteria | |
5538 | schema: | |
5539 | type: string | |
5540 | enum: | |
5541 | - -id | |
5542 | - -username | |
5543 | - -createdAt | |
5544 | abusesSort: | |
5545 | name: sort | |
5546 | in: query | |
5547 | required: false | |
5548 | description: Sort abuses by criteria | |
5549 | schema: | |
5550 | type: string | |
5551 | enum: | |
5552 | - -id | |
5553 | - -createdAt | |
5554 | - -state | |
04b703f6 RK |
5555 | videoRedundanciesSort: |
5556 | name: sort | |
5557 | in: query | |
5558 | required: false | |
5559 | description: Sort abuses by criteria | |
5560 | schema: | |
5561 | type: string | |
5562 | enum: | |
5563 | - name | |
906f46d0 C |
5564 | followersSort: |
5565 | name: sort | |
5566 | in: query | |
5567 | required: false | |
5568 | description: Sort followers by criteria | |
5569 | schema: | |
5570 | type: string | |
5571 | enum: | |
5572 | - createdAt | |
3e5716dd | 5573 | |
3e9e6f2f RK |
5574 | name: |
5575 | name: name | |
5576 | in: path | |
5577 | required: true | |
f2eb23cd | 5578 | description: The username or handle of the account |
3e9e6f2f RK |
5579 | schema: |
5580 | type: string | |
84f6e32c | 5581 | example: chocobozzz | chocobozzz@example.org |
3e9e6f2f RK |
5582 | id: |
5583 | name: id | |
5584 | in: path | |
5585 | required: true | |
419b520c | 5586 | description: Entity id |
3e9e6f2f | 5587 | schema: |
b8375da9 | 5588 | $ref: '#/components/schemas/id' |
3e5716dd C |
5589 | registrationId: |
5590 | name: registrationId | |
5591 | in: path | |
5592 | required: true | |
5593 | description: Registration ID | |
5594 | schema: | |
5595 | $ref: '#/components/schemas/id' | |
cb9d028a | 5596 | idOrUUID: |
3e9e6f2f RK |
5597 | name: id |
5598 | in: path | |
5599 | required: true | |
d4a8e7a6 | 5600 | description: The object id, uuid or short uuid |
3e9e6f2f | 5601 | schema: |
84f6e32c | 5602 | oneOf: |
b8375da9 | 5603 | - $ref: '#/components/schemas/id' |
f880a5e7 | 5604 | - $ref: '#/components/schemas/UUIDv4' |
d4a8e7a6 | 5605 | - $ref: '#/components/schemas/shortUUID' |
c00100b6 RK |
5606 | playlistId: |
5607 | name: playlistId | |
5608 | in: path | |
5609 | required: true | |
5610 | description: Playlist id | |
5611 | schema: | |
5612 | $ref: '#/components/schemas/VideoPlaylist/properties/id' | |
c1843150 C |
5613 | playlistElementId: |
5614 | name: playlistElementId | |
5615 | in: path | |
5616 | required: true | |
5617 | description: Playlist element id | |
5618 | schema: | |
b8375da9 | 5619 | $ref: '#/components/schemas/id' |
50e16ccf C |
5620 | abuseId: |
5621 | name: abuseId | |
5622 | in: path | |
5623 | required: true | |
310b5219 | 5624 | description: Abuse id |
50e16ccf | 5625 | schema: |
b8375da9 | 5626 | $ref: '#/components/schemas/Abuse/properties/id' |
668b7f09 C |
5627 | abuseMessageId: |
5628 | name: abuseMessageId | |
5629 | in: path | |
5630 | required: true | |
5631 | description: Abuse message id | |
5632 | schema: | |
b8375da9 | 5633 | $ref: '#/components/schemas/AbuseMessage/properties/id' |
67ae04a5 C |
5634 | captionLanguage: |
5635 | name: captionLanguage | |
5636 | in: path | |
5637 | required: true | |
5638 | description: The caption language | |
5639 | schema: | |
b8375da9 | 5640 | $ref: '#/components/schemas/VideoLanguageSet' |
9ce3d302 C |
5641 | channelHandle: |
5642 | name: channelHandle | |
3e9e6f2f RK |
5643 | in: path |
5644 | required: true | |
84f6e32c | 5645 | description: The video channel handle |
3e9e6f2f RK |
5646 | schema: |
5647 | type: string | |
84f6e32c | 5648 | example: my_username | my_username@example.com |
2a491182 F |
5649 | channelSyncId: |
5650 | name: channelSyncId | |
5651 | in: path | |
5652 | required: true | |
5653 | description: Channel Sync id | |
5654 | schema: | |
5655 | $ref: '#/components/schemas/Abuse/properties/id' | |
cb9d028a C |
5656 | subscriptionHandle: |
5657 | name: subscriptionHandle | |
5658 | in: path | |
5659 | required: true | |
84f6e32c | 5660 | description: The subscription handle |
cb9d028a C |
5661 | schema: |
5662 | type: string | |
84f6e32c | 5663 | example: my_username | my_username@example.com |
cb9d028a | 5664 | threadId: |
3e9e6f2f RK |
5665 | name: threadId |
5666 | in: path | |
5667 | required: true | |
cb9d028a C |
5668 | description: The thread id (root comment id) |
5669 | schema: | |
85a60d8b | 5670 | type: integer |
cb9d028a C |
5671 | commentId: |
5672 | name: commentId | |
5673 | in: path | |
5674 | required: true | |
3e9e6f2f RK |
5675 | description: The comment id |
5676 | schema: | |
b8375da9 | 5677 | $ref: '#/components/schemas/VideoComment/properties/id' |
1fd61899 C |
5678 | isLive: |
5679 | name: isLive | |
5680 | in: query | |
5681 | required: false | |
5682 | description: whether or not the video is a live | |
5683 | schema: | |
5684 | type: boolean | |
fd5af7a2 RK |
5685 | categoryOneOf: |
5686 | name: categoryOneOf | |
5687 | in: query | |
5688 | required: false | |
40cfb36b | 5689 | description: category id of the video (see [/videos/categories](#operation/getCategories)) |
fd5af7a2 RK |
5690 | schema: |
5691 | oneOf: | |
b8375da9 | 5692 | - $ref: '#/components/schemas/VideoCategorySet' |
fd5af7a2 RK |
5693 | - type: array |
5694 | items: | |
b8375da9 | 5695 | $ref: '#/components/schemas/VideoCategorySet' |
2beb9895 RK |
5696 | style: form |
5697 | explode: false | |
fd5af7a2 RK |
5698 | tagsOneOf: |
5699 | name: tagsOneOf | |
5700 | in: query | |
5701 | required: false | |
5702 | description: tag(s) of the video | |
5703 | schema: | |
5704 | oneOf: | |
5705 | - type: string | |
5706 | - type: array | |
f6d6e7f8 | 5707 | maxItems: 5 |
fd5af7a2 RK |
5708 | items: |
5709 | type: string | |
2beb9895 RK |
5710 | style: form |
5711 | explode: false | |
fd5af7a2 RK |
5712 | tagsAllOf: |
5713 | name: tagsAllOf | |
5714 | in: query | |
5715 | required: false | |
5716 | description: tag(s) of the video, where all should be present in the video | |
5717 | schema: | |
5718 | oneOf: | |
5719 | - type: string | |
5720 | - type: array | |
5721 | items: | |
5722 | type: string | |
2beb9895 RK |
5723 | style: form |
5724 | explode: false | |
fd5af7a2 RK |
5725 | languageOneOf: |
5726 | name: languageOneOf | |
5727 | in: query | |
5728 | required: false | |
40cfb36b | 5729 | description: language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language |
fd5af7a2 RK |
5730 | schema: |
5731 | oneOf: | |
b8375da9 | 5732 | - $ref: '#/components/schemas/VideoLanguageSet' |
fd5af7a2 RK |
5733 | - type: array |
5734 | items: | |
b8375da9 | 5735 | $ref: '#/components/schemas/VideoLanguageSet' |
2beb9895 RK |
5736 | style: form |
5737 | explode: false | |
fd5af7a2 RK |
5738 | licenceOneOf: |
5739 | name: licenceOneOf | |
5740 | in: query | |
5741 | required: false | |
40cfb36b | 5742 | description: licence id of the video (see [/videos/licences](#operation/getLicences)) |
fd5af7a2 RK |
5743 | schema: |
5744 | oneOf: | |
b8375da9 | 5745 | - $ref: '#/components/schemas/VideoLicenceSet' |
fd5af7a2 RK |
5746 | - type: array |
5747 | items: | |
b8375da9 | 5748 | $ref: '#/components/schemas/VideoLicenceSet' |
2beb9895 RK |
5749 | style: form |
5750 | explode: false | |
59c794a5 C |
5751 | skipCount: |
5752 | name: skipCount | |
5753 | in: query | |
5754 | required: false | |
5755 | description: if you don't need the `total` in the response | |
5756 | schema: | |
5757 | type: string | |
5758 | enum: | |
5759 | - 'true' | |
5760 | - 'false' | |
06746a8b | 5761 | default: 'false' |
fd5af7a2 RK |
5762 | nsfw: |
5763 | name: nsfw | |
5764 | in: query | |
5765 | required: false | |
5766 | description: whether to include nsfw videos, if any | |
5767 | schema: | |
5768 | type: string | |
5769 | enum: | |
5770 | - 'true' | |
5771 | - 'false' | |
2760b454 C |
5772 | isLocal: |
5773 | name: isLocal | |
fd5af7a2 RK |
5774 | in: query |
5775 | required: false | |
fd5af7a2 | 5776 | schema: |
2760b454 | 5777 | type: boolean |
7e7d8e48 | 5778 | description: '**PeerTube >= 4.0** Display only local or remote videos' |
d324756e C |
5779 | hasHLSFiles: |
5780 | name: hasHLSFiles | |
5781 | in: query | |
5782 | required: false | |
5783 | schema: | |
5784 | type: boolean | |
5785 | description: '**PeerTube >= 4.0** Display only videos that have HLS files' | |
5786 | hasWebtorrentFiles: | |
5787 | name: hasWebtorrentFiles | |
5788 | in: query | |
5789 | required: false | |
5790 | schema: | |
5791 | type: boolean | |
5792 | description: '**PeerTube >= 4.0** Display only videos that have WebTorrent files' | |
527a52ac C |
5793 | privacyOneOf: |
5794 | name: privacyOneOf | |
5795 | in: query | |
5796 | required: false | |
5797 | schema: | |
5798 | $ref: '#/components/schemas/VideoPrivacySet' | |
5799 | description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies' | |
3299c9e1 C |
5800 | uuids: |
5801 | name: uuids | |
5802 | in: query | |
5803 | required: false | |
5804 | schema: | |
5805 | items: | |
5806 | type: string | |
5807 | description: 'Find videos with specific UUIDs' | |
2760b454 C |
5808 | include: |
5809 | name: include | |
5810 | in: query | |
5811 | required: false | |
5812 | schema: | |
5813 | type: integer | |
fd5af7a2 | 5814 | enum: |
2760b454 C |
5815 | - 0 |
5816 | - 1 | |
5817 | - 2 | |
5818 | - 4 | |
5819 | - 8 | |
5820 | description: > | |
7e7d8e48 | 5821 | **PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator) |
2760b454 C |
5822 | |
5823 | - `0` NONE | |
5824 | ||
5825 | - `1` NOT_PUBLISHED_STATE | |
5826 | ||
527a52ac | 5827 | - `2` BLACKLISTED |
2760b454 | 5828 | |
527a52ac | 5829 | - `4` BLOCKED_OWNER |
2760b454 | 5830 | |
527a52ac | 5831 | - `8` FILES |
e76d5784 RK |
5832 | subscriptionsUris: |
5833 | name: uris | |
5834 | in: query | |
5835 | required: true | |
5836 | description: list of uris to check if each is part of the user subscriptions | |
5837 | schema: | |
5838 | type: array | |
5839 | items: | |
5840 | type: string | |
84f6e32c RK |
5841 | format: uri |
5842 | npmName: | |
5843 | name: npmName | |
5844 | in: path | |
5845 | required: true | |
5846 | description: name of the plugin/theme on npmjs.com or in its package.json | |
5847 | schema: | |
5848 | type: string | |
5849 | example: peertube-plugin-auth-ldap | |
040d6896 RK |
5850 | jobType: |
5851 | name: jobType | |
5852 | in: query | |
5853 | required: false | |
5854 | description: job type | |
5855 | schema: | |
5856 | type: string | |
5857 | enum: | |
5858 | - activitypub-follow | |
5859 | - activitypub-http-broadcast | |
5860 | - activitypub-http-fetcher | |
5861 | - activitypub-http-unicast | |
5862 | ||
5863 | - video-transcoding | |
5864 | - video-file-import | |
5865 | - video-import | |
51353d9a | 5866 | - videos-views-stats |
040d6896 RK |
5867 | - activitypub-refresher |
5868 | - video-redundancy | |
5869 | - video-live-ending | |
2a491182 | 5870 | - video-channel-import |
06dc7a1b RK |
5871 | followState: |
5872 | name: state | |
5873 | in: query | |
5874 | schema: | |
5875 | type: string | |
5876 | enum: | |
5877 | - pending | |
5878 | - accepted | |
5879 | actorType: | |
5880 | name: actorType | |
5881 | in: query | |
5882 | schema: | |
5883 | type: string | |
5884 | enum: | |
5885 | - Person | |
5886 | - Application | |
5887 | - Group | |
5888 | - Service | |
5889 | - Organization | |
3545e72c C |
5890 | staticFilename: |
5891 | name: filename | |
5892 | in: path | |
5893 | required: true | |
5894 | description: Filename | |
5895 | schema: | |
5896 | type: string | |
5897 | videoFileToken: | |
5898 | name: videoFileToken | |
5899 | in: query | |
5900 | required: false | |
5901 | description: Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. | |
5902 | schema: | |
5903 | type: string | |
71e3e879 C |
5904 | reinjectVideoFileToken: |
5905 | name: reinjectVideoFileToken | |
5906 | in: query | |
5907 | required: false | |
5908 | description: Ask the server to reinject videoFileToken in URLs in m3u8 playlist | |
5909 | schema: | |
5910 | type: boolean | |
3545e72c | 5911 | |
3e9e6f2f RK |
5912 | securitySchemes: |
5913 | OAuth2: | |
3c5e02f3 | 5914 | description: | |
3e9e6f2f | 5915 | Authenticating via OAuth requires the following steps: |
3c5e02f3 | 5916 | - Have an activated account |
e2464d22 RK |
5917 | - [Generate] an access token for that account at `/api/v1/users/token`. |
5918 | - Make requests with the *Authorization: Bearer <token\>* header | |
3c5e02f3 | 5919 | - Profit, depending on the role assigned to the account |
3e9e6f2f | 5920 | |
e2464d22 | 5921 | Note that the __access token is valid for 1 day__ and is given |
3c5e02f3 | 5922 | along with a __refresh token valid for 2 weeks__. |
e2464d22 RK |
5923 | |
5924 | [Generate]: https://docs.joinpeertube.org/api-rest-getting-started | |
3e9e6f2f RK |
5925 | type: oauth2 |
5926 | flows: | |
5927 | password: | |
e2464d22 | 5928 | tokenUrl: /api/v1/users/token |
3e9e6f2f RK |
5929 | scopes: |
5930 | admin: Admin scope | |
5931 | moderator: Moderator scope | |
5932 | user: User scope | |
5933 | schemas: | |
7a4fd56c | 5934 | # Reusable core properties |
b8375da9 RK |
5935 | id: |
5936 | type: integer | |
5937 | minimum: 1 | |
5938 | example: 42 | |
f880a5e7 RK |
5939 | UUIDv4: |
5940 | type: string | |
5941 | format: uuid | |
5942 | example: 9c9de5e8-0a1e-484a-b099-e80766180a6d | |
5943 | pattern: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' | |
f880a5e7 RK |
5944 | minLength: 36 |
5945 | maxLength: 36 | |
d4a8e7a6 C |
5946 | shortUUID: |
5947 | type: string | |
5948 | description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid | |
5949 | example: 2y84q2MQUMWPbiEcxNXMgC | |
b8375da9 RK |
5950 | username: |
5951 | type: string | |
77b0c6b5 | 5952 | description: immutable name of the user, used to find or mention its actor |
b8375da9 | 5953 | example: chocobozzz |
e2464d22 | 5954 | pattern: '/^[a-z0-9._]+$/' |
b8375da9 RK |
5955 | minLength: 1 |
5956 | maxLength: 50 | |
5957 | usernameChannel: | |
5958 | type: string | |
77b0c6b5 | 5959 | description: immutable name of the channel, used to interact with its actor |
9a320a06 | 5960 | example: framasoft_videos |
e2464d22 RK |
5961 | pattern: '/^[a-zA-Z0-9\\-_.:]+$/' |
5962 | minLength: 1 | |
5963 | maxLength: 50 | |
b8375da9 RK |
5964 | password: |
5965 | type: string | |
5966 | format: password | |
b8375da9 RK |
5967 | minLength: 6 |
5968 | maxLength: 255 | |
f880a5e7 | 5969 | |
40cfb36b RK |
5970 | VideoCategorySet: |
5971 | type: integer | |
5972 | description: category id of the video (see [/videos/categories](#operation/getCategories)) | |
b8375da9 | 5973 | example: 15 |
dfcb6f50 | 5974 | VideoConstantNumber-Category: |
3e9e6f2f RK |
5975 | properties: |
5976 | id: | |
40cfb36b | 5977 | $ref: '#/components/schemas/VideoCategorySet' |
3e9e6f2f RK |
5978 | label: |
5979 | type: string | |
b8375da9 | 5980 | example: Science & Technology |
40cfb36b RK |
5981 | |
5982 | VideoLicenceSet: | |
5983 | type: integer | |
5984 | description: licence id of the video (see [/videos/licences](#operation/getLicences)) | |
b8375da9 | 5985 | example: 2 |
dfcb6f50 RK |
5986 | VideoConstantNumber-Licence: |
5987 | properties: | |
5988 | id: | |
40cfb36b | 5989 | $ref: '#/components/schemas/VideoLicenceSet' |
dfcb6f50 RK |
5990 | label: |
5991 | type: string | |
b8375da9 RK |
5992 | example: Attribution - Share Alike |
5993 | ||
40cfb36b RK |
5994 | VideoLanguageSet: |
5995 | type: string | |
5996 | description: language id of the video (see [/videos/languages](#operation/getLanguages)) | |
b8375da9 | 5997 | example: en |
dfcb6f50 | 5998 | VideoConstantString-Language: |
3e9e6f2f RK |
5999 | properties: |
6000 | id: | |
40cfb36b | 6001 | $ref: '#/components/schemas/VideoLanguageSet' |
3e9e6f2f RK |
6002 | label: |
6003 | type: string | |
b8375da9 | 6004 | example: English |
c1843150 C |
6005 | |
6006 | VideoPlaylistPrivacySet: | |
6007 | type: integer | |
6008 | enum: | |
6009 | - 1 | |
6010 | - 2 | |
6011 | - 3 | |
40cfb36b | 6012 | description: Video playlist privacy policy (see [/video-playlists/privacies]) |
c1843150 C |
6013 | VideoPlaylistPrivacyConstant: |
6014 | properties: | |
6015 | id: | |
6016 | $ref: '#/components/schemas/VideoPlaylistPrivacySet' | |
6017 | label: | |
6018 | type: string | |
6019 | ||
6020 | VideoPlaylistTypeSet: | |
6021 | type: integer | |
6022 | enum: | |
6023 | - 1 | |
6024 | - 2 | |
40cfb36b | 6025 | description: The video playlist type (Regular = `1`, Watch Later = `2`) |
c1843150 C |
6026 | VideoPlaylistTypeConstant: |
6027 | properties: | |
6028 | id: | |
6029 | $ref: '#/components/schemas/VideoPlaylistTypeSet' | |
6030 | label: | |
6031 | type: string | |
6032 | ||
ee89e8fd C |
6033 | VideoPrivacySet: |
6034 | type: integer | |
3e9e6f2f | 6035 | enum: |
ee89e8fd C |
6036 | - 1 |
6037 | - 2 | |
6038 | - 3 | |
c1843150 | 6039 | - 4 |
40cfb36b | 6040 | description: privacy id of the video (see [/videos/privacies](#operation/getPrivacyPolicies)) |
ee89e8fd C |
6041 | VideoPrivacyConstant: |
6042 | properties: | |
6043 | id: | |
c1843150 | 6044 | $ref: '#/components/schemas/VideoPrivacySet' |
ee89e8fd C |
6045 | label: |
6046 | type: string | |
50e16ccf | 6047 | |
bdf70330 C |
6048 | BlockStatus: |
6049 | properties: | |
6050 | accounts: | |
6051 | type: object | |
6052 | additionalProperties: | |
6053 | x-additionalPropertiesName: account | |
6054 | type: object | |
6055 | properties: | |
6056 | blockedByServer: | |
6057 | type: boolean | |
6058 | blockedByUser: | |
6059 | type: boolean | |
6060 | hosts: | |
6061 | type: object | |
6062 | additionalProperties: | |
6063 | x-additionalPropertiesName: host | |
6064 | type: object | |
6065 | properties: | |
6066 | blockedByServer: | |
6067 | type: boolean | |
6068 | blockedByUser: | |
6069 | type: boolean | |
6070 | ||
0590bb46 C |
6071 | NSFWPolicy: |
6072 | type: string | |
6073 | enum: | |
6074 | - display | |
6075 | - blur | |
6076 | - do_not_list | |
6077 | ||
6078 | UserRole: | |
06746a8b | 6079 | type: integer |
0590bb46 C |
6080 | enum: |
6081 | - 0 | |
6082 | - 1 | |
6083 | - 2 | |
06746a8b | 6084 | description: 'The user role (Admin = `0`, Moderator = `1`, User = `2`)' |
2c318664 | 6085 | example: 2 |
6d989edc C |
6086 | UserAdminFlags: |
6087 | type: integer | |
6088 | enum: | |
6089 | - 0 | |
6090 | - 1 | |
c756bae0 | 6091 | description: 'Admin flags for the user (None = `0`, Bypass video blocklist = `1`)' |
6d989edc | 6092 | example: 1 |
0590bb46 | 6093 | |
f443a746 C |
6094 | LiveVideoLatencyMode: |
6095 | type: integer | |
6096 | enum: | |
6097 | - 1 | |
6098 | - 2 | |
6099 | - 3 | |
7a4fd56c | 6100 | description: 'The live latency mode (Default = `1`, High latency = `2`, Small Latency = `3`)' |
f443a746 | 6101 | |
5dce26d2 C |
6102 | VideoStateConstant: |
6103 | properties: | |
6104 | id: | |
6105 | type: integer | |
6106 | enum: | |
6107 | - 1 | |
6108 | - 2 | |
6109 | - 3 | |
acc6a1cb C |
6110 | - 4 |
6111 | - 5 | |
6112 | - 6 | |
6113 | - 7 | |
6114 | - 8 | |
6115 | - 9 | |
6116 | description: | | |
6117 | The video state: | |
6118 | - `1`: Published | |
6119 | - `2`: To transcode | |
6120 | - `3`: To import | |
6121 | - `4`: Waiting for live stream | |
6122 | - `5`: Live ended | |
6123 | - `6`: To move to an external storage (object storage...) | |
6124 | - `7`: Transcoding failed | |
6125 | - `8`: Moving to an external storage failed | |
6126 | - `9`: To edit using studio edition feature | |
5dce26d2 C |
6127 | label: |
6128 | type: string | |
50e16ccf | 6129 | |
4f32032f | 6130 | AbuseStateSet: |
50e16ccf C |
6131 | type: integer |
6132 | enum: | |
6133 | - 1 | |
6134 | - 2 | |
6135 | - 3 | |
668b7f09 | 6136 | description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)' |
4f32032f | 6137 | AbuseStateConstant: |
50e16ccf C |
6138 | properties: |
6139 | id: | |
4f32032f | 6140 | $ref: '#/components/schemas/AbuseStateSet' |
50e16ccf C |
6141 | label: |
6142 | type: string | |
4f32032f | 6143 | AbusePredefinedReasons: |
1ebddadd RK |
6144 | type: array |
6145 | items: | |
6146 | type: string | |
6147 | enum: | |
6148 | - violentOrAbusive | |
6149 | - hatefulOrAbusive | |
6150 | - spamOrMisleading | |
6151 | - privacy | |
6152 | - rights | |
6153 | - serverRules | |
6154 | - thumbnails | |
6155 | - captions | |
84f6e32c | 6156 | example: [spamOrMisleading] |
50e16ccf | 6157 | |
40cfb36b RK |
6158 | VideoResolutionSet: |
6159 | type: integer | |
6160 | description: | | |
6161 | Video resolution (`0`, `240`, `360`, `720`, `1080`, `1440` or `2160`) | |
6162 | ||
6163 | `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos. | |
6164 | example: 240 | |
5dce26d2 | 6165 | VideoResolutionConstant: |
2c4876f2 | 6166 | description: resolutions and their labels for the video |
5dce26d2 C |
6167 | properties: |
6168 | id: | |
40cfb36b | 6169 | $ref: '#/components/schemas/VideoResolutionSet' |
5dce26d2 C |
6170 | label: |
6171 | type: string | |
84f6e32c | 6172 | example: 240p |
5dce26d2 C |
6173 | VideoScheduledUpdate: |
6174 | properties: | |
6175 | privacy: | |
6176 | $ref: '#/components/schemas/VideoPrivacySet' | |
5dce26d2 C |
6177 | updateAt: |
6178 | type: string | |
6179 | format: date | |
6180 | description: When to update the video | |
6181 | required: | |
6182 | - updateAt | |
c1843150 | 6183 | AccountSummary: |
5dce26d2 C |
6184 | properties: |
6185 | id: | |
06746a8b | 6186 | type: integer |
5dce26d2 C |
6187 | name: |
6188 | type: string | |
6189 | displayName: | |
6190 | type: string | |
6191 | url: | |
6192 | type: string | |
84f6e32c | 6193 | format: url |
5dce26d2 C |
6194 | host: |
6195 | type: string | |
84f6e32c | 6196 | format: hostname |
d0800f76 | 6197 | avatars: |
6198 | type: array | |
6199 | items: | |
6200 | $ref: '#/components/schemas/ActorImage' | |
5dce26d2 C |
6201 | VideoChannelSummary: |
6202 | properties: | |
6203 | id: | |
b8375da9 | 6204 | $ref: '#/components/schemas/id' |
5dce26d2 C |
6205 | name: |
6206 | type: string | |
6207 | displayName: | |
6208 | type: string | |
6209 | url: | |
6210 | type: string | |
84f6e32c | 6211 | format: url |
5dce26d2 C |
6212 | host: |
6213 | type: string | |
84f6e32c | 6214 | format: hostname |
d0800f76 | 6215 | avatars: |
6216 | type: array | |
6217 | items: | |
6218 | $ref: '#/components/schemas/ActorImage' | |
5dce26d2 C |
6219 | PlaylistElement: |
6220 | properties: | |
6221 | position: | |
06746a8b | 6222 | type: integer |
5dce26d2 | 6223 | startTimestamp: |
06746a8b | 6224 | type: integer |
c00100b6 | 6225 | format: seconds |
5dce26d2 | 6226 | stopTimestamp: |
06746a8b | 6227 | type: integer |
c00100b6 | 6228 | format: seconds |
bfbd9128 C |
6229 | video: |
6230 | nullable: true | |
c1843150 C |
6231 | allOf: |
6232 | - $ref: '#/components/schemas/Video' | |
5dce26d2 | 6233 | VideoFile: |
2c4876f2 | 6234 | readOnly: true |
5dce26d2 | 6235 | properties: |
12d84abe C |
6236 | id: |
6237 | $ref: '#/components/schemas/id' | |
5dce26d2 C |
6238 | magnetUri: |
6239 | type: string | |
2c4876f2 RK |
6240 | format: uri |
6241 | description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file | |
2c4876f2 | 6242 | pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i |
5dce26d2 C |
6243 | resolution: |
6244 | $ref: '#/components/schemas/VideoResolutionConstant' | |
6245 | size: | |
06746a8b | 6246 | type: integer |
2c4876f2 | 6247 | description: Video file size in bytes |
5dce26d2 C |
6248 | torrentUrl: |
6249 | type: string | |
e81af300 | 6250 | description: Direct URL of the torrent file |
84f6e32c | 6251 | format: url |
0ad45af7 | 6252 | torrentDownloadUrl: |
5dce26d2 | 6253 | type: string |
e81af300 | 6254 | description: URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog) |
84f6e32c | 6255 | format: url |
5dce26d2 C |
6256 | fileUrl: |
6257 | type: string | |
e81af300 | 6258 | description: Direct URL of the video |
84f6e32c | 6259 | format: url |
5dce26d2 C |
6260 | fileDownloadUrl: |
6261 | type: string | |
e81af300 | 6262 | description: URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog) |
84f6e32c | 6263 | format: url |
5dce26d2 C |
6264 | fps: |
6265 | type: number | |
2c4876f2 | 6266 | description: Frames per second of the video file |
63748ad0 C |
6267 | metadataUrl: |
6268 | type: string | |
84f6e32c | 6269 | format: url |
2c4876f2 | 6270 | description: URL dereferencing the output of ffprobe on the file |
5dce26d2 | 6271 | VideoStreamingPlaylists: |
4ca669e3 RK |
6272 | allOf: |
6273 | - type: object | |
6274 | properties: | |
6275 | id: | |
b8375da9 | 6276 | $ref: '#/components/schemas/id' |
4ca669e3 RK |
6277 | type: |
6278 | type: integer | |
6279 | enum: | |
6280 | - 1 | |
6281 | description: | | |
6282 | Playlist type: | |
6283 | - `1`: HLS | |
6284 | - $ref: '#/components/schemas/VideoStreamingPlaylists-HLS' | |
6285 | VideoStreamingPlaylists-HLS: | |
5dce26d2 | 6286 | properties: |
5dce26d2 C |
6287 | playlistUrl: |
6288 | type: string | |
84f6e32c | 6289 | format: url |
5dce26d2 C |
6290 | segmentsSha256Url: |
6291 | type: string | |
84f6e32c | 6292 | format: url |
63748ad0 C |
6293 | files: |
6294 | type: array | |
c540d865 RK |
6295 | description: | |
6296 | Video files associated to this playlist. | |
6297 | ||
6298 | 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 |
6299 | items: |
6300 | $ref: '#/components/schemas/VideoFile' | |
5dce26d2 C |
6301 | redundancies: |
6302 | type: array | |
6303 | items: | |
6304 | type: object | |
6305 | properties: | |
6306 | baseUrl: | |
6307 | type: string | |
84f6e32c | 6308 | format: url |
f4d59981 RK |
6309 | VideoInfo: |
6310 | properties: | |
6311 | id: | |
b8375da9 | 6312 | $ref: '#/components/schemas/Video/properties/id' |
f4d59981 | 6313 | uuid: |
b8375da9 | 6314 | $ref: '#/components/schemas/Video/properties/uuid' |
f4d59981 | 6315 | name: |
b8375da9 | 6316 | $ref: '#/components/schemas/Video/properties/name' |
3e9e6f2f RK |
6317 | Video: |
6318 | properties: | |
6319 | id: | |
b8375da9 RK |
6320 | description: object id for the video |
6321 | allOf: | |
6322 | - $ref: '#/components/schemas/id' | |
3e9e6f2f | 6323 | uuid: |
b8375da9 RK |
6324 | description: universal identifier for the video, that can be used across instances |
6325 | allOf: | |
6326 | - $ref: '#/components/schemas/UUIDv4' | |
d4a8e7a6 C |
6327 | shortUUID: |
6328 | allOf: | |
6329 | - $ref: '#/components/schemas/shortUUID' | |
4e239e35 C |
6330 | isLive: |
6331 | type: boolean | |
3e9e6f2f RK |
6332 | createdAt: |
6333 | type: string | |
84f6e32c | 6334 | format: date-time |
0c114568 RK |
6335 | example: 2017-10-01T10:52:46.396Z |
6336 | description: time at which the video object was first drafted | |
3e9e6f2f RK |
6337 | publishedAt: |
6338 | type: string | |
84f6e32c | 6339 | format: date-time |
0c114568 RK |
6340 | example: 2018-10-01T10:52:46.396Z |
6341 | 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 |
6342 | updatedAt: |
6343 | type: string | |
84f6e32c | 6344 | format: date-time |
0c114568 RK |
6345 | example: 2021-05-04T08:01:01.502Z |
6346 | description: last time the video's metadata was modified | |
5dce26d2 C |
6347 | originallyPublishedAt: |
6348 | type: string | |
84f6e32c | 6349 | format: date-time |
0c114568 RK |
6350 | example: 2010-10-01T10:52:46.396Z |
6351 | description: used to represent a date of first publication, prior to the practical publication date of `publishedAt` | |
3e9e6f2f | 6352 | category: |
b8375da9 RK |
6353 | allOf: |
6354 | - $ref: '#/components/schemas/VideoConstantNumber-Category' | |
6355 | description: category in which the video is classified | |
3e9e6f2f | 6356 | licence: |
b8375da9 RK |
6357 | allOf: |
6358 | - $ref: '#/components/schemas/VideoConstantNumber-Licence' | |
6359 | description: licence under which the video is distributed | |
3e9e6f2f | 6360 | language: |
b8375da9 RK |
6361 | allOf: |
6362 | - $ref: '#/components/schemas/VideoConstantString-Language' | |
6363 | description: main language used in the video | |
3e9e6f2f | 6364 | privacy: |
b8375da9 RK |
6365 | allOf: |
6366 | - $ref: '#/components/schemas/VideoPrivacyConstant' | |
6367 | description: privacy policy used to distribute the video | |
3e9e6f2f RK |
6368 | description: |
6369 | type: string | |
0c114568 RK |
6370 | example: | |
6371 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n | |
6372 | **Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)**\r\n*A decentralized video hosting network, based on fr... | |
6373 | minLength: 3 | |
6374 | maxLength: 250 | |
6375 | description: | | |
6376 | truncated description of the video, written in Markdown. | |
6377 | Resolve `descriptionPath` to get the full description of maximum `10000` characters. | |
3e9e6f2f | 6378 | duration: |
06746a8b | 6379 | type: integer |
84f6e32c | 6380 | example: 1419 |
c00100b6 | 6381 | format: seconds |
0c114568 | 6382 | description: duration of the video in seconds |
3e9e6f2f RK |
6383 | isLocal: |
6384 | type: boolean | |
6385 | name: | |
6386 | type: string | |
b8375da9 | 6387 | description: title of the video |
84f6e32c | 6388 | example: What is PeerTube? |
bdac0584 RK |
6389 | minLength: 3 |
6390 | maxLength: 120 | |
3e9e6f2f RK |
6391 | thumbnailPath: |
6392 | type: string | |
84f6e32c | 6393 | example: /static/thumbnails/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
3e9e6f2f RK |
6394 | previewPath: |
6395 | type: string | |
20dcfd74 | 6396 | example: /lazy-static/previews/a65bc12f-9383-462e-81ae-8207e8b434ee.jpg |
3e9e6f2f RK |
6397 | embedPath: |
6398 | type: string | |
84f6e32c | 6399 | example: /videos/embed/a65bc12f-9383-462e-81ae-8207e8b434ee |
3e9e6f2f | 6400 | views: |
06746a8b | 6401 | type: integer |
84f6e32c | 6402 | example: 1337 |
3e9e6f2f | 6403 | likes: |
06746a8b | 6404 | type: integer |
84f6e32c | 6405 | example: 42 |
3e9e6f2f | 6406 | dislikes: |
06746a8b | 6407 | type: integer |
84f6e32c | 6408 | example: 7 |
3e9e6f2f RK |
6409 | nsfw: |
6410 | type: boolean | |
5dce26d2 C |
6411 | waitTranscoding: |
6412 | type: boolean | |
6413 | nullable: true | |
6414 | state: | |
b8375da9 RK |
6415 | allOf: |
6416 | - $ref: '#/components/schemas/VideoStateConstant' | |
6417 | description: represents the internal state of the video processing within the PeerTube instance | |
5dce26d2 C |
6418 | scheduledUpdate: |
6419 | nullable: true | |
c1843150 C |
6420 | allOf: |
6421 | - $ref: '#/components/schemas/VideoScheduledUpdate' | |
5dce26d2 C |
6422 | blacklisted: |
6423 | nullable: true | |
6424 | type: boolean | |
6425 | blacklistedReason: | |
6426 | nullable: true | |
6427 | type: string | |
3e9e6f2f | 6428 | account: |
c1843150 | 6429 | $ref: '#/components/schemas/AccountSummary' |
5dce26d2 C |
6430 | channel: |
6431 | $ref: '#/components/schemas/VideoChannelSummary' | |
6432 | userHistory: | |
6433 | nullable: true | |
3e9e6f2f RK |
6434 | type: object |
6435 | properties: | |
5dce26d2 | 6436 | currentTime: |
06746a8b | 6437 | type: integer |
5dce26d2 C |
6438 | VideoDetails: |
6439 | allOf: | |
6440 | - $ref: '#/components/schemas/Video' | |
6441 | - type: object | |
6442 | properties: | |
51353d9a C |
6443 | viewers: |
6444 | type: integer | |
6445 | description: If the video is a live, you have the amount of current viewers | |
5dce26d2 | 6446 | descriptionPath: |
3e9e6f2f | 6447 | type: string |
0c114568 RK |
6448 | example: /api/v1/videos/9c9de5e8-0a1e-484a-b099-e80766180a6d/description |
6449 | description: path at which to get the full description of maximum `10000` characters | |
5dce26d2 | 6450 | support: |
3e9e6f2f | 6451 | type: string |
00494d6e | 6452 | description: A text tell the audience how to support the video creator |
9a320a06 | 6453 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
c540d865 RK |
6454 | minLength: 3 |
6455 | maxLength: 1000 | |
5dce26d2 C |
6456 | channel: |
6457 | $ref: '#/components/schemas/VideoChannel' | |
6458 | account: | |
6459 | $ref: '#/components/schemas/Account' | |
6460 | tags: | |
bdac0584 | 6461 | example: [flowers, gardening] |
5dce26d2 | 6462 | type: array |
bdac0584 RK |
6463 | minItems: 1 |
6464 | maxItems: 5 | |
5dce26d2 C |
6465 | items: |
6466 | type: string | |
bdac0584 RK |
6467 | minLength: 2 |
6468 | maxLength: 30 | |
5dce26d2 C |
6469 | commentsEnabled: |
6470 | type: boolean | |
6471 | downloadEnabled: | |
6472 | type: boolean | |
6473 | trackerUrls: | |
6474 | type: array | |
6475 | items: | |
6476 | type: string | |
84f6e32c | 6477 | format: url |
2c4876f2 RK |
6478 | example: |
6479 | - https://peertube2.cpy.re/tracker/announce | |
6480 | - wss://peertube2.cpy.re/tracker/socket | |
c540d865 RK |
6481 | files: |
6482 | type: array | |
6483 | items: | |
6484 | $ref: '#/components/schemas/VideoFile' | |
6485 | description: | | |
6486 | WebTorrent/raw video files. If WebTorrent is disabled on the server: | |
6487 | ||
6488 | - field will be empty | |
6489 | - video files will be found in `streamingPlaylists[].files` field | |
5dce26d2 C |
6490 | streamingPlaylists: |
6491 | type: array | |
6492 | items: | |
6493 | $ref: '#/components/schemas/VideoStreamingPlaylists' | |
c540d865 RK |
6494 | description: | |
6495 | HLS playlists/manifest files. If HLS is disabled on the server: | |
6496 | ||
6497 | - field will be empty | |
6498 | - video files will be found in `files` field | |
04b703f6 RK |
6499 | FileRedundancyInformation: |
6500 | properties: | |
6501 | id: | |
b8375da9 | 6502 | $ref: '#/components/schemas/id' |
04b703f6 RK |
6503 | fileUrl: |
6504 | type: string | |
84f6e32c | 6505 | format: url |
04b703f6 RK |
6506 | strategy: |
6507 | type: string | |
84f6e32c RK |
6508 | enum: |
6509 | - manual | |
6510 | - most-views | |
6511 | - trending | |
6512 | - recently-added | |
04b703f6 RK |
6513 | size: |
6514 | type: integer | |
6515 | createdAt: | |
6516 | type: string | |
6517 | format: date-time | |
6518 | updatedAt: | |
6519 | type: string | |
6520 | format: date-time | |
6521 | expiresOn: | |
6522 | type: string | |
6523 | format: date-time | |
6524 | VideoRedundancy: | |
6525 | properties: | |
6526 | id: | |
b8375da9 | 6527 | $ref: '#/components/schemas/id' |
04b703f6 RK |
6528 | name: |
6529 | type: string | |
6530 | url: | |
6531 | type: string | |
84f6e32c | 6532 | format: url |
04b703f6 | 6533 | uuid: |
f880a5e7 | 6534 | $ref: '#/components/schemas/UUIDv4' |
04b703f6 RK |
6535 | redundancies: |
6536 | type: object | |
6537 | properties: | |
6538 | files: | |
6539 | type: array | |
6540 | items: | |
1e904cde | 6541 | $ref: '#/components/schemas/FileRedundancyInformation' |
04b703f6 RK |
6542 | streamingPlaylists: |
6543 | type: array | |
6544 | items: | |
1e904cde | 6545 | $ref: '#/components/schemas/FileRedundancyInformation' |
1f82e3e8 C |
6546 | VideoImportStateConstant: |
6547 | properties: | |
6548 | id: | |
6549 | type: integer | |
6550 | enum: | |
6551 | - 1 | |
6552 | - 2 | |
6553 | - 3 | |
06746a8b | 6554 | description: 'The video import state (Pending = `1`, Success = `2`, Failed = `3`)' |
1f82e3e8 C |
6555 | label: |
6556 | type: string | |
84f6e32c | 6557 | example: Pending |
ac2a5b54 RK |
6558 | VideoCreateImport: |
6559 | allOf: | |
6560 | - type: object | |
6561 | additionalProperties: false | |
6562 | oneOf: | |
6563 | - properties: | |
6564 | targetUrl: | |
6565 | $ref: '#/components/schemas/VideoImport/properties/targetUrl' | |
6566 | required: [targetUrl] | |
6567 | - properties: | |
6568 | magnetUri: | |
6569 | $ref: '#/components/schemas/VideoImport/properties/magnetUri' | |
6570 | required: [magnetUri] | |
6571 | - properties: | |
6572 | torrentfile: | |
6573 | $ref: '#/components/schemas/VideoImport/properties/torrentfile' | |
6574 | required: [torrentfile] | |
6575 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
6576 | required: | |
6577 | - channelId | |
6578 | - name | |
1f82e3e8 C |
6579 | VideoImport: |
6580 | properties: | |
6581 | id: | |
ac2a5b54 RK |
6582 | readOnly: true |
6583 | allOf: | |
6584 | - $ref: '#/components/schemas/id' | |
1f82e3e8 C |
6585 | targetUrl: |
6586 | type: string | |
84f6e32c | 6587 | format: url |
2c4876f2 | 6588 | description: remote URL where to find the import's source video |
84f6e32c | 6589 | example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d |
1f82e3e8 C |
6590 | magnetUri: |
6591 | type: string | |
84f6e32c | 6592 | format: uri |
2c4876f2 | 6593 | description: magnet URI allowing to resolve the import's source video |
2c4876f2 | 6594 | pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i |
ac2a5b54 RK |
6595 | torrentfile: |
6596 | writeOnly: true | |
6597 | type: string | |
6598 | format: binary | |
6599 | description: Torrent file containing only the video file | |
1f82e3e8 | 6600 | torrentName: |
ac2a5b54 | 6601 | readOnly: true |
1f82e3e8 C |
6602 | type: string |
6603 | state: | |
ac2a5b54 RK |
6604 | readOnly: true |
6605 | allOf: | |
6606 | - $ref: '#/components/schemas/VideoImportStateConstant' | |
1f82e3e8 | 6607 | error: |
ac2a5b54 | 6608 | readOnly: true |
1f82e3e8 C |
6609 | type: string |
6610 | createdAt: | |
ac2a5b54 | 6611 | readOnly: true |
1f82e3e8 | 6612 | type: string |
84f6e32c | 6613 | format: date-time |
1f82e3e8 | 6614 | updatedAt: |
ac2a5b54 | 6615 | readOnly: true |
1f82e3e8 | 6616 | type: string |
84f6e32c | 6617 | format: date-time |
1f82e3e8 | 6618 | video: |
ac2a5b54 | 6619 | readOnly: true |
2c4876f2 RK |
6620 | nullable: true |
6621 | allOf: | |
6622 | - $ref: '#/components/schemas/Video' | |
5844dde3 RK |
6623 | VideoImportsList: |
6624 | properties: | |
6625 | total: | |
6626 | type: integer | |
6627 | example: 1 | |
6628 | data: | |
6629 | type: array | |
6630 | maxItems: 100 | |
6631 | items: | |
6632 | $ref: '#/components/schemas/VideoImport' | |
668b7f09 | 6633 | Abuse: |
3e9e6f2f RK |
6634 | properties: |
6635 | id: | |
b8375da9 | 6636 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
6637 | reason: |
6638 | type: string | |
84f6e32c | 6639 | example: The video is a spam |
4302058c RK |
6640 | minLength: 2 |
6641 | maxLength: 3000 | |
1ebddadd | 6642 | predefinedReasons: |
4f32032f | 6643 | $ref: '#/components/schemas/AbusePredefinedReasons' |
3e9e6f2f RK |
6644 | reporterAccount: |
6645 | $ref: '#/components/schemas/Account' | |
50e16ccf | 6646 | state: |
4f32032f | 6647 | $ref: '#/components/schemas/AbuseStateConstant' |
50e16ccf C |
6648 | moderationComment: |
6649 | type: string | |
84f6e32c | 6650 | example: Decided to ban the server since it spams us regularly |
4302058c RK |
6651 | minLength: 2 |
6652 | maxLength: 3000 | |
3e9e6f2f | 6653 | video: |
bdac0584 | 6654 | $ref: '#/components/schemas/VideoInfo' |
3e9e6f2f RK |
6655 | createdAt: |
6656 | type: string | |
84f6e32c | 6657 | format: date-time |
668b7f09 C |
6658 | AbuseMessage: |
6659 | properties: | |
6660 | id: | |
b8375da9 | 6661 | $ref: '#/components/schemas/id' |
668b7f09 C |
6662 | message: |
6663 | type: string | |
4302058c | 6664 | minLength: 2 |
f6d6e7f8 | 6665 | maxLength: 3000 |
668b7f09 C |
6666 | byModerator: |
6667 | type: boolean | |
6668 | createdAt: | |
6669 | type: string | |
6670 | format: date-time | |
6671 | account: | |
6672 | $ref: '#/components/schemas/AccountSummary' | |
3e9e6f2f RK |
6673 | VideoBlacklist: |
6674 | properties: | |
6675 | id: | |
b8375da9 | 6676 | $ref: '#/components/schemas/id' |
3e9e6f2f | 6677 | videoId: |
b8375da9 | 6678 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f RK |
6679 | createdAt: |
6680 | type: string | |
84f6e32c | 6681 | format: date-time |
3e9e6f2f RK |
6682 | updatedAt: |
6683 | type: string | |
84f6e32c | 6684 | format: date-time |
3e9e6f2f RK |
6685 | name: |
6686 | type: string | |
4302058c RK |
6687 | minLength: 3 |
6688 | maxLength: 120 | |
3e9e6f2f | 6689 | uuid: |
f880a5e7 | 6690 | $ref: '#/components/schemas/UUIDv4' |
3e9e6f2f RK |
6691 | description: |
6692 | type: string | |
4302058c RK |
6693 | minLength: 3 |
6694 | maxLength: 10000 | |
3e9e6f2f | 6695 | duration: |
06746a8b | 6696 | type: integer |
3e9e6f2f | 6697 | views: |
06746a8b | 6698 | type: integer |
3e9e6f2f | 6699 | likes: |
06746a8b | 6700 | type: integer |
3e9e6f2f | 6701 | dislikes: |
06746a8b | 6702 | type: integer |
3e9e6f2f RK |
6703 | nsfw: |
6704 | type: boolean | |
71810d0b RK |
6705 | VideoPlaylist: |
6706 | properties: | |
6707 | id: | |
b8375da9 RK |
6708 | $ref: '#/components/schemas/id' |
6709 | uuid: | |
6710 | $ref: '#/components/schemas/UUIDv4' | |
d4a8e7a6 C |
6711 | shortUUID: |
6712 | allOf: | |
6713 | - $ref: '#/components/schemas/shortUUID' | |
71810d0b RK |
6714 | createdAt: |
6715 | type: string | |
84f6e32c | 6716 | format: date-time |
71810d0b RK |
6717 | updatedAt: |
6718 | type: string | |
84f6e32c | 6719 | format: date-time |
71810d0b RK |
6720 | description: |
6721 | type: string | |
4302058c RK |
6722 | minLength: 3 |
6723 | maxLength: 1000 | |
71810d0b RK |
6724 | displayName: |
6725 | type: string | |
4302058c RK |
6726 | minLength: 1 |
6727 | maxLength: 120 | |
71810d0b RK |
6728 | isLocal: |
6729 | type: boolean | |
6730 | videoLength: | |
06746a8b | 6731 | type: integer |
b8375da9 | 6732 | minimum: 0 |
71810d0b RK |
6733 | thumbnailPath: |
6734 | type: string | |
6735 | privacy: | |
c1843150 | 6736 | $ref: '#/components/schemas/VideoPlaylistPrivacyConstant' |
71810d0b | 6737 | type: |
c1843150 | 6738 | $ref: '#/components/schemas/VideoPlaylistTypeConstant' |
71810d0b | 6739 | ownerAccount: |
c1843150 C |
6740 | $ref: '#/components/schemas/AccountSummary' |
6741 | videoChannel: | |
6742 | $ref: '#/components/schemas/VideoChannelSummary' | |
3e9e6f2f RK |
6743 | VideoComment: |
6744 | properties: | |
6745 | id: | |
b8375da9 | 6746 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
6747 | url: |
6748 | type: string | |
84f6e32c | 6749 | format: url |
3e9e6f2f RK |
6750 | text: |
6751 | type: string | |
bf3c3fea RK |
6752 | format: html |
6753 | description: Text of the comment | |
4302058c | 6754 | minLength: 1 |
bf3c3fea | 6755 | example: This video is wonderful! |
3e9e6f2f | 6756 | threadId: |
b8375da9 | 6757 | $ref: '#/components/schemas/id' |
bf3c3fea RK |
6758 | inReplyToCommentId: |
6759 | nullable: true | |
6760 | allOf: | |
6761 | - $ref: '#/components/schemas/id' | |
3e9e6f2f | 6762 | videoId: |
b8375da9 | 6763 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f RK |
6764 | createdAt: |
6765 | type: string | |
84f6e32c | 6766 | format: date-time |
3e9e6f2f RK |
6767 | updatedAt: |
6768 | type: string | |
84f6e32c | 6769 | format: date-time |
bf3c3fea RK |
6770 | deletedAt: |
6771 | nullable: true | |
6772 | type: string | |
6773 | format: date-time | |
6774 | default: null | |
6775 | isDeleted: | |
6776 | type: boolean | |
6777 | default: false | |
5b0413dd | 6778 | totalRepliesFromVideoAuthor: |
06746a8b | 6779 | type: integer |
b8375da9 | 6780 | minimum: 0 |
3e9e6f2f | 6781 | totalReplies: |
06746a8b | 6782 | type: integer |
b8375da9 | 6783 | minimum: 0 |
3e9e6f2f RK |
6784 | account: |
6785 | $ref: '#/components/schemas/Account' | |
6786 | VideoCommentThreadTree: | |
6787 | properties: | |
6788 | comment: | |
6789 | $ref: '#/components/schemas/VideoComment' | |
6790 | children: | |
6791 | type: array | |
6792 | items: | |
6793 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
67ae04a5 C |
6794 | VideoCaption: |
6795 | properties: | |
6796 | language: | |
dfcb6f50 | 6797 | $ref: '#/components/schemas/VideoConstantString-Language' |
67ae04a5 C |
6798 | captionPath: |
6799 | type: string | |
2e401e85 | 6800 | VideoSource: |
6801 | properties: | |
6802 | filename: | |
6803 | type: string | |
75cba40d | 6804 | ActorImage: |
3e9e6f2f RK |
6805 | properties: |
6806 | path: | |
6807 | type: string | |
d0800f76 | 6808 | width: |
6809 | type: integer | |
3e9e6f2f RK |
6810 | createdAt: |
6811 | type: string | |
84f6e32c | 6812 | format: date-time |
3e9e6f2f RK |
6813 | updatedAt: |
6814 | type: string | |
84f6e32c | 6815 | format: date-time |
f4d59981 RK |
6816 | ActorInfo: |
6817 | properties: | |
6818 | id: | |
b8375da9 | 6819 | $ref: '#/components/schemas/id' |
f4d59981 RK |
6820 | name: |
6821 | type: string | |
6822 | displayName: | |
6823 | type: string | |
6824 | host: | |
6825 | type: string | |
84f6e32c | 6826 | format: hostname |
d0800f76 | 6827 | avatars: |
6828 | type: array | |
6829 | items: | |
6830 | $ref: '#/components/schemas/ActorImage' | |
3e9e6f2f RK |
6831 | Actor: |
6832 | properties: | |
6833 | id: | |
b8375da9 | 6834 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
6835 | url: |
6836 | type: string | |
84f6e32c | 6837 | format: url |
3e9e6f2f | 6838 | name: |
77b0c6b5 | 6839 | description: immutable name of the actor, used to find or mention it |
2c4876f2 RK |
6840 | allOf: |
6841 | - $ref: '#/components/schemas/username' | |
3e9e6f2f RK |
6842 | host: |
6843 | type: string | |
84f6e32c | 6844 | format: hostname |
2c4876f2 | 6845 | description: server on which the actor is resident |
045bcd0d RK |
6846 | hostRedundancyAllowed: |
6847 | type: boolean | |
2c4876f2 | 6848 | description: whether this actor's host allows redundancy of its videos |
3e9e6f2f | 6849 | followingCount: |
06746a8b | 6850 | type: integer |
2c4876f2 RK |
6851 | minimum: 0 |
6852 | description: number of actors subscribed to by this actor, as seen by this instance | |
3e9e6f2f | 6853 | followersCount: |
06746a8b | 6854 | type: integer |
2c4876f2 RK |
6855 | minimum: 0 |
6856 | description: number of followers of this actor, as seen by this instance | |
3e9e6f2f RK |
6857 | createdAt: |
6858 | type: string | |
84f6e32c | 6859 | format: date-time |
3e9e6f2f RK |
6860 | updatedAt: |
6861 | type: string | |
84f6e32c | 6862 | format: date-time |
3e9e6f2f RK |
6863 | Account: |
6864 | allOf: | |
6865 | - $ref: '#/components/schemas/Actor' | |
6866 | - properties: | |
2a8ae759 | 6867 | userId: |
2c4876f2 RK |
6868 | description: object id for the user tied to this account |
6869 | allOf: | |
6870 | - $ref: '#/components/schemas/User/properties/id' | |
3e9e6f2f RK |
6871 | displayName: |
6872 | type: string | |
77b0c6b5 RK |
6873 | description: editable name of the account, displayed in its representations |
6874 | minLength: 3 | |
6875 | maxLength: 120 | |
2a8ae759 FS |
6876 | description: |
6877 | type: string | |
2c4876f2 | 6878 | description: text or bio displayed on the account's profile |
cf158e7e | 6879 | UserViewingVideo: |
bfbdfc58 C |
6880 | required: |
6881 | - currentTime | |
6441981b RK |
6882 | properties: |
6883 | currentTime: | |
06746a8b | 6884 | type: integer |
c00100b6 | 6885 | format: seconds |
84f6e32c RK |
6886 | description: timestamp within the video, in seconds |
6887 | example: 5 | |
bfbdfc58 C |
6888 | viewEvent: |
6889 | type: string | |
6890 | enum: | |
6891 | - seek | |
6892 | description: > | |
6893 | Event since last viewing call: | |
6894 | * `seek` - If the user seeked the video | |
cf158e7e C |
6895 | |
6896 | VideoStatsOverall: | |
6897 | properties: | |
6898 | averageWatchTime: | |
6899 | type: number | |
6900 | totalWatchTime: | |
6901 | type: number | |
6902 | viewersPeak: | |
6903 | type: number | |
6904 | viewersPeakDate: | |
6905 | type: string | |
6906 | format: date-time | |
cf158e7e C |
6907 | countries: |
6908 | type: array | |
6909 | items: | |
6910 | type: object | |
6911 | properties: | |
6912 | isoCode: | |
6913 | type: string | |
6914 | viewers: | |
6915 | type: number | |
6916 | ||
6917 | VideoStatsRetention: | |
6918 | properties: | |
6919 | data: | |
6920 | type: array | |
6921 | items: | |
6922 | type: object | |
6923 | properties: | |
6924 | second: | |
6925 | type: number | |
6926 | retentionPercent: | |
6927 | type: number | |
6928 | ||
6929 | VideoStatsTimeserie: | |
6930 | properties: | |
6931 | data: | |
6932 | type: array | |
6933 | items: | |
6934 | type: object | |
6935 | properties: | |
6936 | date: | |
6937 | type: string | |
6938 | value: | |
6939 | type: number | |
6940 | ||
3e9e6f2f RK |
6941 | ServerConfig: |
6942 | properties: | |
2a8ae759 FS |
6943 | instance: |
6944 | type: object | |
6945 | properties: | |
6946 | name: | |
6947 | type: string | |
6948 | shortDescription: | |
6949 | type: string | |
6950 | defaultClientRoute: | |
6951 | type: string | |
6952 | isNSFW: | |
6953 | type: boolean | |
6954 | defaultNSFWPolicy: | |
6955 | type: string | |
6956 | customizations: | |
6957 | type: object | |
6958 | properties: | |
6959 | javascript: | |
6960 | type: string | |
6961 | css: | |
6962 | type: string | |
f30736c8 RK |
6963 | search: |
6964 | type: object | |
6965 | properties: | |
6966 | remoteUri: | |
6967 | type: object | |
6968 | properties: | |
6969 | users: | |
6970 | type: boolean | |
6971 | anonymous: | |
6972 | type: boolean | |
2a8ae759 FS |
6973 | plugin: |
6974 | type: object | |
6975 | properties: | |
6976 | registered: | |
6977 | type: array | |
6978 | items: | |
6979 | type: string | |
6980 | theme: | |
6981 | type: object | |
6982 | properties: | |
6983 | registered: | |
6984 | type: array | |
6985 | items: | |
6986 | type: string | |
6987 | email: | |
6988 | type: object | |
6989 | properties: | |
6990 | enabled: | |
6991 | type: boolean | |
6992 | contactForm: | |
6993 | type: object | |
6994 | properties: | |
6995 | enabled: | |
6996 | type: boolean | |
6997 | serverVersion: | |
6998 | type: string | |
6999 | serverCommit: | |
7000 | type: string | |
3e9e6f2f RK |
7001 | signup: |
7002 | type: object | |
7003 | properties: | |
7004 | allowed: | |
7005 | type: boolean | |
2a8ae759 FS |
7006 | allowedForCurrentIP: |
7007 | type: boolean | |
7008 | requiresEmailVerification: | |
7009 | type: boolean | |
3e9e6f2f RK |
7010 | transcoding: |
7011 | type: object | |
7012 | properties: | |
2a8ae759 FS |
7013 | hls: |
7014 | type: object | |
7015 | properties: | |
7016 | enabled: | |
7017 | type: boolean | |
f30736c8 RK |
7018 | webtorrent: |
7019 | type: object | |
7020 | properties: | |
7021 | enabled: | |
7022 | type: boolean | |
3e9e6f2f RK |
7023 | enabledResolutions: |
7024 | type: array | |
7025 | items: | |
40cfb36b | 7026 | $ref: '#/components/schemas/VideoResolutionSet' |
2a8ae759 FS |
7027 | import: |
7028 | type: object | |
7029 | properties: | |
7030 | videos: | |
7031 | type: object | |
7032 | properties: | |
7033 | http: | |
7034 | type: object | |
7035 | properties: | |
7036 | enabled: | |
7037 | type: boolean | |
7038 | torrent: | |
7039 | type: object | |
7040 | properties: | |
7041 | enabled: | |
7042 | type: boolean | |
2a491182 F |
7043 | videoChannelSynchronization: |
7044 | type: object | |
7045 | properties: | |
7046 | enabled: | |
7047 | type: boolean | |
2a8ae759 FS |
7048 | autoBlacklist: |
7049 | type: object | |
7050 | properties: | |
7051 | videos: | |
7052 | type: object | |
7053 | properties: | |
7054 | ofUsers: | |
7055 | type: object | |
7056 | properties: | |
7057 | enabled: | |
7058 | type: boolean | |
3e9e6f2f RK |
7059 | avatar: |
7060 | type: object | |
7061 | properties: | |
7062 | file: | |
7063 | type: object | |
7064 | properties: | |
7065 | size: | |
7066 | type: object | |
7067 | properties: | |
7068 | max: | |
06746a8b | 7069 | type: integer |
3e9e6f2f RK |
7070 | extensions: |
7071 | type: array | |
7072 | items: | |
7073 | type: string | |
7074 | video: | |
7075 | type: object | |
7076 | properties: | |
2a8ae759 FS |
7077 | image: |
7078 | type: object | |
7079 | properties: | |
7080 | extensions: | |
7081 | type: array | |
7082 | items: | |
7083 | type: string | |
7084 | size: | |
7085 | type: object | |
7086 | properties: | |
7087 | max: | |
06746a8b | 7088 | type: integer |
3e9e6f2f RK |
7089 | file: |
7090 | type: object | |
7091 | properties: | |
7092 | extensions: | |
7093 | type: array | |
7094 | items: | |
7095 | type: string | |
2a8ae759 FS |
7096 | videoCaption: |
7097 | type: object | |
7098 | properties: | |
7099 | file: | |
7100 | type: object | |
7101 | properties: | |
7102 | size: | |
7103 | type: object | |
7104 | properties: | |
7105 | max: | |
06746a8b | 7106 | type: integer |
2a8ae759 FS |
7107 | extensions: |
7108 | type: array | |
7109 | items: | |
7110 | type: string | |
7111 | user: | |
7112 | type: object | |
7113 | properties: | |
7114 | videoQuota: | |
06746a8b | 7115 | type: integer |
b8375da9 | 7116 | example: 16810141515 |
2a8ae759 | 7117 | videoQuotaDaily: |
06746a8b | 7118 | type: integer |
b8375da9 | 7119 | example: 1681014151 |
2a8ae759 FS |
7120 | trending: |
7121 | type: object | |
7122 | properties: | |
7123 | videos: | |
7124 | type: object | |
7125 | properties: | |
7126 | intervalDays: | |
06746a8b | 7127 | type: integer |
2a8ae759 | 7128 | tracker: |
747b17c7 | 7129 | type: object |
2a8ae759 FS |
7130 | properties: |
7131 | enabled: | |
7132 | type: boolean | |
f30736c8 RK |
7133 | followings: |
7134 | type: object | |
7135 | properties: | |
7136 | instance: | |
7137 | type: object | |
7138 | properties: | |
7139 | autoFollowIndex: | |
7140 | type: object | |
7141 | properties: | |
7142 | indexUrl: | |
7143 | type: string | |
84f6e32c | 7144 | format: url |
2539932e C |
7145 | homepage: |
7146 | type: object | |
7147 | properties: | |
7148 | enabled: | |
7149 | type: boolean | |
7150 | ||
42b40636 C |
7151 | SendClientLog: |
7152 | properties: | |
7153 | message: | |
7154 | type: string | |
7155 | url: | |
7156 | type: string | |
7157 | description: URL of the current user page | |
7158 | level: | |
7159 | enum: | |
7160 | - error | |
7161 | - warn | |
7162 | stackTrace: | |
7163 | type: string | |
7164 | description: Stack trace of the error if there is one | |
7165 | userAgent: | |
7166 | type: string | |
7167 | description: User agent of the web browser that sends the message | |
7168 | meta: | |
7169 | type: string | |
7170 | description: Additional information regarding this log | |
7171 | required: | |
7172 | - message | |
7173 | - url | |
7174 | - level | |
7175 | ||
b44b5a83 C |
7176 | ServerStats: |
7177 | properties: | |
7178 | totalUsers: | |
7179 | type: number | |
7180 | totalDailyActiveUsers: | |
7181 | type: number | |
7182 | totalWeeklyActiveUsers: | |
7183 | type: number | |
7184 | totalMonthlyActiveUsers: | |
7185 | type: number | |
7186 | totalLocalVideos: | |
7187 | type: number | |
7188 | totalLocalVideoViews: | |
7189 | type: number | |
7190 | description: Total video views made on the instance | |
7191 | totalLocalVideoComments: | |
7192 | type: number | |
7193 | description: Total comments made by local users | |
7194 | totalLocalVideoFilesSize: | |
7195 | type: number | |
7196 | totalVideos: | |
7197 | type: number | |
7198 | totalVideoComments: | |
7199 | type: number | |
7200 | totalLocalVideoChannels: | |
7201 | type: number | |
7202 | totalLocalDailyActiveVideoChannels: | |
7203 | type: number | |
7204 | totalLocalWeeklyActiveVideoChannels: | |
7205 | type: number | |
7206 | totalLocalMonthlyActiveVideoChannels: | |
7207 | type: number | |
7208 | totalLocalPlaylists: | |
7209 | type: number | |
7210 | totalInstanceFollowers: | |
7211 | type: number | |
7212 | totalInstanceFollowing: | |
7213 | type: number | |
7214 | videosRedundancy: | |
7215 | type: array | |
7216 | items: | |
7217 | type: object | |
7218 | properties: | |
7219 | strategy: | |
7220 | type: string | |
7221 | totalSize: | |
7222 | type: number | |
7223 | totalUsed: | |
7224 | type: number | |
7225 | totalVideoFiles: | |
7226 | type: number | |
7227 | totalVideos: | |
7228 | type: number | |
7229 | totalActivityPubMessagesProcessed: | |
7230 | type: number | |
7231 | totalActivityPubMessagesSuccesses: | |
7232 | type: number | |
7233 | totalActivityPubMessagesErrors: | |
7234 | type: number | |
7235 | ||
7236 | activityPubMessagesProcessedPerSecond: | |
7237 | type: number | |
7238 | totalActivityPubMessagesWaiting: | |
7239 | type: number | |
7240 | ||
2a8ae759 FS |
7241 | ServerConfigAbout: |
7242 | properties: | |
7243 | instance: | |
7244 | type: object | |
7245 | properties: | |
7246 | name: | |
7247 | type: string | |
7248 | shortDescription: | |
7249 | type: string | |
7250 | description: | |
7251 | type: string | |
7252 | terms: | |
7253 | type: string | |
7254 | ServerConfigCustom: | |
7255 | properties: | |
7256 | instance: | |
7257 | type: object | |
7258 | properties: | |
7259 | name: | |
7260 | type: string | |
7261 | shortDescription: | |
7262 | type: string | |
7263 | description: | |
7264 | type: string | |
7265 | terms: | |
7266 | type: string | |
7267 | defaultClientRoute: | |
7268 | type: string | |
7269 | isNSFW: | |
7270 | type: boolean | |
7271 | defaultNSFWPolicy: | |
7272 | type: string | |
7273 | customizations: | |
7274 | type: object | |
7275 | properties: | |
7276 | javascript: | |
7277 | type: string | |
7278 | css: | |
7279 | type: string | |
7280 | theme: | |
7281 | type: object | |
7282 | properties: | |
7283 | default: | |
7284 | type: string | |
7285 | services: | |
7286 | type: object | |
7287 | properties: | |
7288 | twitter: | |
7289 | type: object | |
7290 | properties: | |
7291 | username: | |
7292 | type: string | |
7293 | whitelisted: | |
7294 | type: boolean | |
7295 | cache: | |
7296 | type: object | |
7297 | properties: | |
7298 | previews: | |
7299 | type: object | |
7300 | properties: | |
7301 | size: | |
06746a8b | 7302 | type: integer |
2a8ae759 FS |
7303 | captions: |
7304 | type: object | |
7305 | properties: | |
7306 | size: | |
06746a8b | 7307 | type: integer |
2a8ae759 FS |
7308 | signup: |
7309 | type: object | |
7310 | properties: | |
7311 | enabled: | |
7312 | type: boolean | |
7313 | limit: | |
06746a8b | 7314 | type: integer |
2a8ae759 FS |
7315 | requiresEmailVerification: |
7316 | type: boolean | |
7317 | admin: | |
7318 | type: object | |
7319 | properties: | |
7320 | email: | |
7321 | type: string | |
84f6e32c | 7322 | format: email |
2a8ae759 FS |
7323 | contactForm: |
7324 | type: object | |
7325 | properties: | |
7326 | enabled: | |
7327 | type: boolean | |
7328 | user: | |
7329 | type: object | |
40cfb36b | 7330 | description: Settings that apply to new users, if registration is enabled |
2a8ae759 FS |
7331 | properties: |
7332 | videoQuota: | |
06746a8b | 7333 | type: integer |
b8375da9 | 7334 | example: 16810141515 |
2a8ae759 | 7335 | videoQuotaDaily: |
06746a8b | 7336 | type: integer |
b8375da9 | 7337 | example: 1681014151 |
2a8ae759 FS |
7338 | transcoding: |
7339 | type: object | |
40cfb36b | 7340 | description: Settings pertaining to transcoding jobs |
2a8ae759 FS |
7341 | properties: |
7342 | enabled: | |
7343 | type: boolean | |
7344 | allowAdditionalExtensions: | |
7345 | type: boolean | |
40cfb36b | 7346 | description: Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos |
2a8ae759 FS |
7347 | allowAudioFiles: |
7348 | type: boolean | |
40cfb36b | 7349 | description: If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file |
2a8ae759 | 7350 | threads: |
06746a8b | 7351 | type: integer |
40cfb36b RK |
7352 | description: Amount of threads used by ffmpeg for 1 transcoding job |
7353 | concurrency: | |
7354 | type: number | |
7355 | description: Amount of transcoding jobs to execute in parallel | |
7356 | profile: | |
7357 | type: string | |
7358 | enum: | |
7359 | - default | |
7360 | description: | | |
7361 | New profiles can be added by plugins ; available in core PeerTube: 'default'. | |
2a8ae759 FS |
7362 | resolutions: |
7363 | type: object | |
40cfb36b | 7364 | description: Resolutions to transcode _new videos_ to |
2a8ae759 | 7365 | properties: |
40cfb36b RK |
7366 | 0p: |
7367 | type: boolean | |
8dd754c7 FC |
7368 | 144p: |
7369 | type: boolean | |
2a8ae759 FS |
7370 | 240p: |
7371 | type: boolean | |
7372 | 360p: | |
7373 | type: boolean | |
7374 | 480p: | |
7375 | type: boolean | |
7376 | 720p: | |
7377 | type: boolean | |
7378 | 1080p: | |
7379 | type: boolean | |
b7085c71 RK |
7380 | 1440p: |
7381 | type: boolean | |
2a8ae759 FS |
7382 | 2160p: |
7383 | type: boolean | |
40cfb36b RK |
7384 | webtorrent: |
7385 | type: object | |
7386 | description: WebTorrent-specific settings | |
7387 | properties: | |
7388 | enabled: | |
7389 | type: boolean | |
2a8ae759 FS |
7390 | hls: |
7391 | type: object | |
40cfb36b | 7392 | description: HLS-specific settings |
2a8ae759 FS |
7393 | properties: |
7394 | enabled: | |
7395 | type: boolean | |
7396 | import: | |
7397 | type: object | |
7398 | properties: | |
7399 | videos: | |
7400 | type: object | |
7401 | properties: | |
7402 | http: | |
7403 | type: object | |
7404 | properties: | |
7405 | enabled: | |
7406 | type: boolean | |
7407 | torrent: | |
7408 | type: object | |
7409 | properties: | |
7410 | enabled: | |
7411 | type: boolean | |
2a491182 F |
7412 | video_channel_synchronization: |
7413 | type: object | |
7414 | properties: | |
7415 | enabled: | |
7416 | type: boolean | |
2a8ae759 FS |
7417 | autoBlacklist: |
7418 | type: object | |
7419 | properties: | |
7420 | videos: | |
7421 | type: object | |
7422 | properties: | |
7423 | ofUsers: | |
7424 | type: object | |
7425 | properties: | |
7426 | enabled: | |
7427 | type: boolean | |
7428 | followers: | |
7429 | type: object | |
7430 | properties: | |
7431 | instance: | |
7432 | type: object | |
7433 | properties: | |
7434 | enabled: | |
7435 | type: boolean | |
7436 | manualApproval: | |
7437 | type: boolean | |
2539932e C |
7438 | |
7439 | CustomHomepage: | |
7440 | properties: | |
7441 | content: | |
7442 | type: string | |
7443 | ||
3e9e6f2f RK |
7444 | Follow: |
7445 | properties: | |
7446 | id: | |
b8375da9 | 7447 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
7448 | follower: |
7449 | $ref: '#/components/schemas/Actor' | |
7450 | following: | |
7451 | $ref: '#/components/schemas/Actor' | |
7452 | score: | |
7453 | type: number | |
04b703f6 | 7454 | description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`. |
3e9e6f2f RK |
7455 | state: |
7456 | type: string | |
7457 | enum: | |
7458 | - pending | |
7459 | - accepted | |
7460 | createdAt: | |
7461 | type: string | |
84f6e32c | 7462 | format: date-time |
3e9e6f2f RK |
7463 | updatedAt: |
7464 | type: string | |
84f6e32c | 7465 | format: date-time |
e3489df9 C |
7466 | |
7467 | PredefinedAbuseReasons: | |
7468 | description: Reason categories that help triage reports | |
7469 | type: array | |
f6d6e7f8 | 7470 | maxItems: 8 |
e3489df9 C |
7471 | items: |
7472 | type: string | |
7473 | enum: | |
7474 | - violentOrAbusive | |
7475 | - hatefulOrAbusive | |
7476 | - spamOrMisleading | |
7477 | - privacy | |
7478 | - rights | |
7479 | - serverRules | |
7480 | - thumbnails | |
7481 | - captions | |
7482 | ||
3e9e6f2f RK |
7483 | Job: |
7484 | properties: | |
7485 | id: | |
b8375da9 | 7486 | $ref: '#/components/schemas/id' |
3e9e6f2f RK |
7487 | state: |
7488 | type: string | |
7489 | enum: | |
84f6e32c RK |
7490 | - active |
7491 | - completed | |
7492 | - failed | |
7493 | - waiting | |
7494 | - delayed | |
7495 | type: | |
3e9e6f2f RK |
7496 | type: string |
7497 | enum: | |
84f6e32c RK |
7498 | - activitypub-http-unicast |
7499 | - activitypub-http-broadcast | |
7500 | - activitypub-http-fetcher | |
7501 | - activitypub-follow | |
7502 | - video-file-import | |
7503 | - video-transcoding | |
7504 | ||
7505 | - video-import | |
51353d9a | 7506 | - videos-views-stats |
84f6e32c RK |
7507 | - activitypub-refresher |
7508 | - video-redundancy | |
2a491182 | 7509 | - video-channel-import |
84f6e32c RK |
7510 | data: |
7511 | type: object | |
7512 | additionalProperties: true | |
7513 | error: | |
7514 | type: object | |
7515 | additionalProperties: true | |
3e9e6f2f RK |
7516 | createdAt: |
7517 | type: string | |
84f6e32c RK |
7518 | format: date-time |
7519 | finishedOn: | |
3e9e6f2f | 7520 | type: string |
84f6e32c RK |
7521 | format: date-time |
7522 | processedOn: | |
7523 | type: string | |
7524 | format: date-time | |
3e9e6f2f RK |
7525 | AddUserResponse: |
7526 | properties: | |
2c318664 RK |
7527 | user: |
7528 | type: object | |
7529 | properties: | |
7530 | id: | |
b8375da9 | 7531 | $ref: '#/components/schemas/id' |
2c318664 RK |
7532 | account: |
7533 | type: object | |
7534 | properties: | |
7535 | id: | |
b8375da9 | 7536 | $ref: '#/components/schemas/id' |
f6d6e7f8 | 7537 | VideoUploadRequestCommon: |
7538 | properties: | |
7539 | name: | |
7540 | description: Video name | |
7541 | type: string | |
b8375da9 RK |
7542 | example: What is PeerTube? |
7543 | minLength: 3 | |
7544 | maxLength: 120 | |
f6d6e7f8 | 7545 | channelId: |
7546 | description: Channel id that will contain this video | |
7547 | type: integer | |
b8375da9 RK |
7548 | example: 3 |
7549 | minimum: 1 | |
f6d6e7f8 | 7550 | privacy: |
7551 | $ref: '#/components/schemas/VideoPrivacySet' | |
7552 | category: | |
40cfb36b | 7553 | $ref: '#/components/schemas/VideoCategorySet' |
f6d6e7f8 | 7554 | licence: |
40cfb36b | 7555 | $ref: '#/components/schemas/VideoLicenceSet' |
f6d6e7f8 | 7556 | language: |
40cfb36b | 7557 | $ref: '#/components/schemas/VideoLanguageSet' |
f6d6e7f8 | 7558 | description: |
7559 | description: Video description | |
7560 | type: string | |
b8375da9 RK |
7561 | example: | |
7562 | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)** | |
f6d6e7f8 | 7563 | waitTranscoding: |
7564 | description: Whether or not we wait transcoding before publish the video | |
7565 | type: boolean | |
7566 | support: | |
7567 | description: A text tell the audience how to support the video creator | |
9a320a06 | 7568 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 |
f6d6e7f8 | 7569 | type: string |
7570 | nsfw: | |
7571 | description: Whether or not this video contains sensitive content | |
7572 | type: boolean | |
7573 | tags: | |
7574 | description: Video tags (maximum 5 tags each between 2 and 30 characters) | |
7575 | type: array | |
7576 | minItems: 1 | |
7577 | maxItems: 5 | |
7578 | uniqueItems: true | |
b8375da9 RK |
7579 | example: |
7580 | - framasoft | |
7581 | - peertube | |
f6d6e7f8 | 7582 | items: |
7583 | type: string | |
7584 | minLength: 2 | |
7585 | maxLength: 30 | |
7586 | commentsEnabled: | |
7587 | description: Enable or disable comments for this video | |
7588 | type: boolean | |
7589 | downloadEnabled: | |
7590 | description: Enable or disable downloading for this video | |
7591 | type: boolean | |
7592 | originallyPublishedAt: | |
7593 | description: Date when the content was originally published | |
7594 | type: string | |
7595 | format: date-time | |
7596 | scheduleUpdate: | |
7597 | $ref: '#/components/schemas/VideoScheduledUpdate' | |
7598 | thumbnailfile: | |
7599 | description: Video thumbnail file | |
7600 | type: string | |
7601 | format: binary | |
7602 | previewfile: | |
7603 | description: Video preview file | |
7604 | type: string | |
7605 | format: binary | |
7606 | required: | |
7607 | - channelId | |
7608 | - name | |
7609 | VideoUploadRequestLegacy: | |
7610 | allOf: | |
7611 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
7612 | - type: object | |
7613 | required: | |
7614 | - videofile | |
7615 | properties: | |
7616 | videofile: | |
7617 | description: Video file | |
7618 | type: string | |
7619 | format: binary | |
7620 | VideoUploadRequestResumable: | |
7621 | allOf: | |
7622 | - $ref: '#/components/schemas/VideoUploadRequestCommon' | |
7623 | - type: object | |
7624 | required: | |
7625 | - filename | |
7626 | properties: | |
7627 | filename: | |
7628 | description: Video filename including extension | |
7629 | type: string | |
7630 | format: filename | |
b8375da9 | 7631 | example: what_is_peertube.mp4 |
f6d6e7f8 | 7632 | thumbnailfile: |
7633 | description: Video thumbnail file | |
7634 | type: string | |
7635 | format: binary | |
7636 | previewfile: | |
7637 | description: Video preview file | |
7638 | type: string | |
7639 | format: binary | |
3e9e6f2f RK |
7640 | VideoUploadResponse: |
7641 | properties: | |
7642 | video: | |
7643 | type: object | |
7644 | properties: | |
7645 | id: | |
b8375da9 | 7646 | $ref: '#/components/schemas/Video/properties/id' |
3e9e6f2f | 7647 | uuid: |
b8375da9 | 7648 | $ref: '#/components/schemas/Video/properties/uuid' |
d4a8e7a6 C |
7649 | shortUUID: |
7650 | $ref: '#/components/schemas/Video/properties/shortUUID' | |
3e9e6f2f RK |
7651 | CommentThreadResponse: |
7652 | properties: | |
7653 | total: | |
06746a8b | 7654 | type: integer |
84f6e32c | 7655 | example: 1 |
3e9e6f2f RK |
7656 | data: |
7657 | type: array | |
84f6e32c | 7658 | maxItems: 100 |
3e9e6f2f RK |
7659 | items: |
7660 | $ref: '#/components/schemas/VideoComment' | |
7661 | CommentThreadPostResponse: | |
7662 | properties: | |
7663 | comment: | |
7664 | $ref: '#/components/schemas/VideoComment' | |
3545e72c C |
7665 | VideoTokenResponse: |
7666 | properties: | |
7667 | files: | |
7668 | type: object | |
7669 | properties: | |
7670 | token: | |
7671 | type: string | |
7672 | expires: | |
7673 | type: string | |
7674 | format: date-time | |
048b6946 C |
7675 | VideoListResponse: |
7676 | properties: | |
7677 | total: | |
06746a8b | 7678 | type: integer |
84f6e32c | 7679 | example: 1 |
048b6946 C |
7680 | data: |
7681 | type: array | |
84f6e32c | 7682 | maxItems: 100 |
048b6946 C |
7683 | items: |
7684 | $ref: '#/components/schemas/Video' | |
84f6e32c RK |
7685 | User: |
7686 | properties: | |
fd5586b3 RK |
7687 | account: |
7688 | $ref: '#/components/schemas/Account' | |
7689 | autoPlayNextVideo: | |
7690 | type: boolean | |
7691 | description: Automatically start playing the upcoming video after the currently playing video | |
7692 | autoPlayNextVideoPlaylist: | |
7693 | type: boolean | |
7694 | description: Automatically start playing the video on the playlist after the currently playing video | |
7695 | autoPlayVideo: | |
7696 | type: boolean | |
7697 | description: Automatically start playing the video on the watch page | |
7698 | blocked: | |
7699 | type: boolean | |
7700 | blockedReason: | |
7701 | type: string | |
7702 | createdAt: | |
84f6e32c | 7703 | type: string |
84f6e32c RK |
7704 | email: |
7705 | type: string | |
7706 | format: email | |
7707 | description: The user email | |
fd5586b3 RK |
7708 | emailVerified: |
7709 | type: boolean | |
7710 | description: Has the user confirmed their email address? | |
7711 | id: | |
2c4876f2 RK |
7712 | allOf: |
7713 | - $ref: '#/components/schemas/id' | |
fd5586b3 | 7714 | readOnly: true |
6d989edc C |
7715 | pluginAuth: |
7716 | type: string | |
7717 | description: Auth plugin to use to authenticate the user | |
fd5586b3 | 7718 | lastLoginDate: |
84f6e32c | 7719 | type: string |
fd5586b3 RK |
7720 | format: date-time |
7721 | noInstanceConfigWarningModal: | |
7722 | type: boolean | |
8f581725 C |
7723 | noAccountSetupWarningModal: |
7724 | type: boolean | |
fd5586b3 | 7725 | noWelcomeModal: |
84f6e32c | 7726 | type: boolean |
84f6e32c RK |
7727 | nsfwPolicy: |
7728 | $ref: '#/components/schemas/NSFWPolicy' | |
84f6e32c | 7729 | role: |
9e5cf66b C |
7730 | type: object |
7731 | properties: | |
7732 | id: | |
7733 | $ref: '#/components/schemas/UserRole' | |
7734 | label: | |
7735 | type: string | |
7736 | enum: | |
7737 | - User | |
7738 | - Moderator | |
7739 | - Administrator | |
fd5586b3 | 7740 | theme: |
84f6e32c | 7741 | type: string |
fd5586b3 RK |
7742 | description: Theme enabled by this user |
7743 | username: | |
b8375da9 | 7744 | $ref: '#/components/schemas/username' |
84f6e32c RK |
7745 | videoChannels: |
7746 | type: array | |
7747 | items: | |
7748 | $ref: '#/components/schemas/VideoChannel' | |
fd5586b3 RK |
7749 | videoQuota: |
7750 | type: integer | |
7751 | description: The user video quota in bytes | |
7752 | example: -1 | |
7753 | videoQuotaDaily: | |
7754 | type: integer | |
7755 | description: The user daily video quota in bytes | |
7756 | example: -1 | |
a9bfa85d | 7757 | p2pEnabled: |
fd5586b3 RK |
7758 | type: boolean |
7759 | description: Enable P2P in the player | |
7760 | UserWithStats: | |
7761 | allOf: | |
7762 | - $ref: '#/components/schemas/User' | |
7763 | - properties: | |
7764 | # optionally present fields: they require WITH_STATS scope | |
7765 | videosCount: | |
7766 | type: integer | |
85a60d8b | 7767 | description: Count of videos published |
fd5586b3 RK |
7768 | abusesCount: |
7769 | type: integer | |
7770 | description: Count of reports/abuses of which the user is a target | |
7771 | abusesAcceptedCount: | |
7772 | type: integer | |
7773 | description: Count of reports/abuses created by the user and accepted/acted upon by the moderation team | |
7774 | abusesCreatedCount: | |
7775 | type: integer | |
7776 | description: Count of reports/abuses created by the user | |
7777 | videoCommentsCount: | |
7778 | type: integer | |
7779 | description: Count of comments published | |
3e9e6f2f RK |
7780 | AddUser: |
7781 | properties: | |
7782 | username: | |
b8375da9 | 7783 | $ref: '#/components/schemas/username' |
3e9e6f2f | 7784 | password: |
b8375da9 | 7785 | $ref: '#/components/schemas/password' |
3e9e6f2f RK |
7786 | email: |
7787 | type: string | |
84f6e32c RK |
7788 | format: email |
7789 | description: The user email | |
3e9e6f2f | 7790 | videoQuota: |
84f6e32c | 7791 | type: integer |
b8375da9 RK |
7792 | description: The user video quota in bytes |
7793 | example: -1 | |
fbe1bc2a | 7794 | videoQuotaDaily: |
84f6e32c | 7795 | type: integer |
b8375da9 RK |
7796 | description: The user daily video quota in bytes |
7797 | example: -1 | |
6d989edc | 7798 | channelName: |
b8375da9 | 7799 | $ref: '#/components/schemas/usernameChannel' |
3e9e6f2f | 7800 | role: |
0590bb46 | 7801 | $ref: '#/components/schemas/UserRole' |
6d989edc C |
7802 | adminFlags: |
7803 | $ref: '#/components/schemas/UserAdminFlags' | |
3e9e6f2f RK |
7804 | required: |
7805 | - username | |
7806 | - password | |
7807 | ||
7808 | - videoQuota | |
fbe1bc2a | 7809 | - videoQuotaDaily |
3e9e6f2f RK |
7810 | - role |
7811 | UpdateUser: | |
7812 | properties: | |
3e9e6f2f | 7813 | email: |
84f6e32c | 7814 | description: The updated email of the user |
77b0c6b5 RK |
7815 | allOf: |
7816 | - $ref: '#/components/schemas/User/properties/email' | |
6d989edc C |
7817 | emailVerified: |
7818 | type: boolean | |
7819 | description: Set the email as verified | |
3e9e6f2f | 7820 | videoQuota: |
84f6e32c | 7821 | type: integer |
b8375da9 | 7822 | description: The updated video quota of the user in bytes |
fbe1bc2a | 7823 | videoQuotaDaily: |
84f6e32c | 7824 | type: integer |
b8375da9 | 7825 | description: The updated daily video quota of the user in bytes |
6d989edc C |
7826 | pluginAuth: |
7827 | type: string | |
7828 | nullable: true | |
7829 | description: The auth plugin to use to authenticate the user | |
7830 | example: 'peertube-plugin-auth-saml2' | |
3e9e6f2f | 7831 | role: |
0590bb46 | 7832 | $ref: '#/components/schemas/UserRole' |
6d989edc C |
7833 | adminFlags: |
7834 | $ref: '#/components/schemas/UserAdminFlags' | |
5097cbda C |
7835 | password: |
7836 | $ref: '#/components/schemas/password' | |
3e9e6f2f | 7837 | UpdateMe: |
77b0c6b5 | 7838 | # see shared/models/users/user-update-me.model.ts: |
3e9e6f2f RK |
7839 | properties: |
7840 | password: | |
b8375da9 | 7841 | $ref: '#/components/schemas/password' |
77b0c6b5 RK |
7842 | currentPassword: |
7843 | $ref: '#/components/schemas/password' | |
3e9e6f2f | 7844 | email: |
77b0c6b5 RK |
7845 | description: new email used for login and service communications |
7846 | allOf: | |
7847 | - $ref: '#/components/schemas/User/properties/email' | |
7848 | displayName: | |
3e9e6f2f | 7849 | type: string |
77b0c6b5 RK |
7850 | description: new name of the user in its representations |
7851 | minLength: 3 | |
7852 | maxLength: 120 | |
3e9e6f2f RK |
7853 | displayNSFW: |
7854 | type: string | |
77b0c6b5 | 7855 | description: new NSFW display policy |
84f6e32c RK |
7856 | enum: |
7857 | - 'true' | |
7858 | - 'false' | |
7859 | - both | |
a9bfa85d | 7860 | p2pEnabled: |
77b0c6b5 RK |
7861 | type: boolean |
7862 | description: whether to enable P2P in the player or not | |
3e9e6f2f | 7863 | autoPlayVideo: |
84f6e32c | 7864 | type: boolean |
77b0c6b5 RK |
7865 | description: new preference regarding playing videos automatically |
7866 | autoPlayNextVideo: | |
7867 | type: boolean | |
7868 | description: new preference regarding playing following videos automatically | |
7869 | autoPlayNextVideoPlaylist: | |
7870 | type: boolean | |
7871 | description: new preference regarding playing following playlist videos automatically | |
7872 | videosHistoryEnabled: | |
7873 | type: boolean | |
7874 | description: whether to keep track of watched history or not | |
7875 | videoLanguages: | |
7876 | type: array | |
7877 | items: | |
7878 | type: string | |
7879 | description: list of languages to filter videos down to | |
7880 | theme: | |
7881 | type: string | |
7882 | noInstanceConfigWarningModal: | |
7883 | type: boolean | |
8f581725 C |
7884 | noAccountSetupWarningModal: |
7885 | type: boolean | |
77b0c6b5 RK |
7886 | noWelcomeModal: |
7887 | type: boolean | |
3e9e6f2f RK |
7888 | GetMeVideoRating: |
7889 | properties: | |
7890 | id: | |
b8375da9 | 7891 | $ref: '#/components/schemas/id' |
3e9e6f2f | 7892 | rating: |
30b40713 RK |
7893 | type: string |
7894 | enum: | |
7895 | - like | |
7896 | - dislike | |
7897 | - none | |
84f6e32c | 7898 | description: Rating of the video |
3e9e6f2f RK |
7899 | required: |
7900 | - id | |
7901 | - rating | |
c100a614 YB |
7902 | VideoRating: |
7903 | properties: | |
7904 | video: | |
7905 | $ref: '#/components/schemas/Video' | |
7906 | rating: | |
30b40713 RK |
7907 | type: string |
7908 | enum: | |
7909 | - like | |
7910 | - dislike | |
7911 | - none | |
7912 | description: Rating of the video | |
c100a614 YB |
7913 | required: |
7914 | - video | |
7915 | - rating | |
3e5716dd | 7916 | |
3e9e6f2f RK |
7917 | RegisterUser: |
7918 | properties: | |
7919 | username: | |
77b0c6b5 RK |
7920 | description: immutable name of the user, used to find or mention its actor |
7921 | allOf: | |
7922 | - $ref: '#/components/schemas/username' | |
3e9e6f2f | 7923 | password: |
b8375da9 | 7924 | $ref: '#/components/schemas/password' |
3e9e6f2f RK |
7925 | email: |
7926 | type: string | |
84f6e32c | 7927 | format: email |
77b0c6b5 | 7928 | description: email of the user, used for login or service communications |
1f20622f C |
7929 | displayName: |
7930 | type: string | |
77b0c6b5 | 7931 | description: editable name of the user, displayed in its representations |
84f6e32c RK |
7932 | minLength: 1 |
7933 | maxLength: 120 | |
1f20622f C |
7934 | channel: |
7935 | type: object | |
77b0c6b5 | 7936 | description: channel base information used to create the first channel of the user |
1f20622f C |
7937 | properties: |
7938 | name: | |
b8375da9 | 7939 | $ref: '#/components/schemas/usernameChannel' |
1f20622f | 7940 | displayName: |
d0800f76 | 7941 | type: string |
3e9e6f2f RK |
7942 | required: |
7943 | - username | |
7944 | - password | |
7945 | ||
4302058c | 7946 | |
3e5716dd C |
7947 | UserRegistrationRequest: |
7948 | allOf: | |
7949 | - $ref: '#/components/schemas/RegisterUser' | |
7950 | - type: object | |
7951 | properties: | |
7952 | registrationReason: | |
7953 | type: string | |
7954 | description: reason for the user to register on the instance | |
7955 | required: | |
7956 | - registrationReason | |
7957 | ||
7958 | UserRegistrationAcceptOrReject: | |
7959 | type: object | |
7960 | properties: | |
7961 | moderationResponse: | |
7962 | type: string | |
7963 | description: Moderation response to send to the user | |
4115f200 C |
7964 | preventEmailDelivery: |
7965 | type: boolean | |
7966 | description: Set it to true if you don't want PeerTube to send an email to the user | |
3e5716dd C |
7967 | required: |
7968 | - moderationResponse | |
7969 | ||
7970 | UserRegistration: | |
7971 | properties: | |
7972 | id: | |
7973 | $ref: '#/components/schemas/id' | |
7974 | state: | |
7975 | type: object | |
7976 | properties: | |
7977 | id: | |
7978 | type: integer | |
7979 | enum: | |
7980 | - 1 | |
7981 | - 2 | |
7982 | - 3 | |
7983 | description: 'The registration state (Pending = `1`, Rejected = `2`, Accepted = `3`)' | |
7984 | label: | |
7985 | type: string | |
7986 | registrationReason: | |
7987 | type: string | |
7988 | moderationResponse: | |
7989 | type: string | |
7990 | nullable: true | |
7991 | username: | |
7992 | type: string | |
7993 | email: | |
7994 | type: string | |
7995 | format: email | |
7996 | emailVerified: | |
7997 | type: boolean | |
7998 | accountDisplayName: | |
7999 | type: string | |
8000 | channelHandle: | |
8001 | type: string | |
8002 | channelDisplayName: | |
8003 | type: string | |
8004 | createdAt: | |
8005 | type: string | |
8006 | format: date-time | |
8007 | updatedAt: | |
8008 | type: string | |
8009 | format: date-time | |
8010 | user: | |
8011 | type: object | |
8012 | nullable: true | |
8013 | description: If the registration has been accepted, this is a partial user object created by the registration | |
8014 | properties: | |
8015 | id: | |
8016 | $ref: '#/components/schemas/id' | |
8017 | ||
e2464d22 RK |
8018 | OAuthClient: |
8019 | properties: | |
8020 | client_id: | |
8021 | type: string | |
8022 | pattern: /^[a-z0-9]$/ | |
8023 | maxLength: 32 | |
8024 | minLength: 32 | |
8025 | example: v1ikx5hnfop4mdpnci8nsqh93c45rldf | |
8026 | client_secret: | |
8027 | type: string | |
8028 | pattern: /^[a-zA-Z0-9]$/ | |
8029 | maxLength: 32 | |
8030 | minLength: 32 | |
8031 | example: AjWiOapPltI6EnsWQwlFarRtLh4u8tDt | |
8032 | OAuthToken-password: | |
8033 | allOf: | |
8034 | - $ref: '#/components/schemas/OAuthClient' | |
8035 | - type: object | |
8036 | properties: | |
8037 | grant_type: | |
8038 | type: string | |
8039 | enum: | |
8040 | - password | |
8041 | - refresh_token | |
8042 | default: password | |
8043 | username: | |
8044 | $ref: '#/components/schemas/User/properties/username' | |
8045 | password: | |
8046 | $ref: '#/components/schemas/password' | |
8047 | required: | |
8048 | - client_id | |
8049 | - client_secret | |
8050 | - grant_type | |
8051 | - username | |
8052 | - password | |
8053 | OAuthToken-refresh_token: | |
8054 | allOf: | |
8055 | - $ref: '#/components/schemas/OAuthClient' | |
8056 | - type: object | |
8057 | properties: | |
8058 | grant_type: | |
8059 | type: string | |
8060 | enum: | |
8061 | - password | |
8062 | - refresh_token | |
8063 | default: password | |
8064 | refresh_token: | |
8065 | type: string | |
8066 | example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7 | |
8067 | required: | |
8068 | - client_id | |
8069 | - client_secret | |
8070 | - grant_type | |
8071 | - refresh_token | |
8072 | ||
b8375da9 | 8073 | VideoChannel: |
d0800f76 | 8074 | allOf: |
8075 | - $ref: '#/components/schemas/Actor' | |
8076 | - type: object | |
b8375da9 | 8077 | properties: |
d0800f76 | 8078 | displayName: |
8079 | type: string | |
8080 | description: editable name of the channel, displayed in its representations | |
8081 | example: Videos of Framasoft | |
8082 | minLength: 1 | |
8083 | maxLength: 120 | |
8084 | description: | |
8085 | type: string | |
8086 | example: Videos made with <3 by Framasoft | |
8087 | minLength: 3 | |
8088 | maxLength: 1000 | |
8089 | support: | |
8090 | type: string | |
8091 | description: text shown by default on all videos of this channel, to tell the audience how to support it | |
8092 | example: Please support our work on https://soutenir.framasoft.org/en/ <3 | |
8093 | minLength: 3 | |
8094 | maxLength: 1000 | |
8095 | isLocal: | |
8096 | readOnly: true | |
8097 | type: boolean | |
8098 | updatedAt: | |
8099 | readOnly: true | |
8100 | type: string | |
8101 | format: date-time | |
8102 | banners: | |
8103 | type: array | |
8104 | items: | |
8105 | $ref: '#/components/schemas/ActorImage' | |
8106 | ownerAccount: | |
8107 | readOnly: true | |
8108 | nullable: true | |
8109 | type: object | |
8110 | properties: | |
8111 | id: | |
8112 | type: integer | |
8113 | uuid: | |
8114 | $ref: '#/components/schemas/UUIDv4' | |
2a491182 | 8115 | |
4302058c RK |
8116 | VideoChannelCreate: |
8117 | allOf: | |
b8375da9 | 8118 | - $ref: '#/components/schemas/VideoChannel' |
4302058c RK |
8119 | - properties: |
8120 | name: | |
b8375da9 RK |
8121 | description: username of the channel to create |
8122 | allOf: | |
8123 | - $ref: '#/components/schemas/usernameChannel' | |
7d14d4d2 C |
8124 | required: |
8125 | - name | |
8126 | - displayName | |
8127 | VideoChannelUpdate: | |
4302058c | 8128 | allOf: |
b8375da9 | 8129 | - $ref: '#/components/schemas/VideoChannel' |
4302058c RK |
8130 | - properties: |
8131 | bulkVideosSupportUpdate: | |
8132 | type: boolean | |
b8375da9 | 8133 | description: Update the support field for all videos of this channel |
045bcd0d RK |
8134 | VideoChannelList: |
8135 | properties: | |
8136 | total: | |
8137 | type: integer | |
8138 | example: 1 | |
8139 | data: | |
8140 | type: array | |
8141 | items: | |
8142 | allOf: | |
8143 | - $ref: '#/components/schemas/VideoChannel' | |
8144 | - $ref: '#/components/schemas/Actor' | |
1569a818 | 8145 | |
87cd9397 C |
8146 | ImportVideosInChannelCreate: |
8147 | type: object | |
8148 | properties: | |
8149 | externalChannelUrl: | |
8150 | type: string | |
8151 | example: https://youtube.com/c/UC_myfancychannel | |
8152 | videoChannelSyncId: | |
8153 | type: integer | |
8154 | description: If part of a channel sync process, specify its id to assign video imports to this channel synchronization | |
8155 | required: | |
8156 | - 'externalChannelUrl' | |
8157 | ||
2a491182 F |
8158 | VideoChannelSync: |
8159 | type: object | |
8160 | properties: | |
8161 | id: | |
8162 | $ref: '#/components/schemas/id' | |
8163 | state: | |
8164 | type: object | |
8165 | properties: | |
8166 | id: | |
8167 | type: integer | |
8168 | example: 2 | |
8169 | label: | |
8170 | type: string | |
8171 | example: PROCESSING | |
8172 | externalChannelUrl: | |
8173 | type: string | |
8174 | example: 'https://youtube.com/c/UC_myfancychannel' | |
8175 | createdAt: | |
8176 | type: string | |
8177 | format: date-time | |
8178 | lastSyncAt: | |
8179 | type: string | |
8180 | format: date-time | |
8181 | nullable: true | |
8182 | channel: | |
8183 | $ref: '#/components/schemas/VideoChannel' | |
8184 | VideoChannelSyncList: | |
8185 | type: object | |
8186 | properties: | |
8187 | total: | |
8188 | type: integer | |
8189 | example: 1 | |
8190 | data: | |
8191 | type: array | |
8192 | items: | |
8193 | allOf: | |
8194 | - $ref: '#/components/schemas/VideoChannelSync' | |
8195 | VideoChannelSyncCreate: | |
8196 | type: object | |
8197 | properties: | |
8198 | externalChannelUrl: | |
8199 | type: string | |
8200 | example: https://youtube.com/c/UC_myfancychannel | |
8201 | videoChannelId: | |
8202 | $ref: '#/components/schemas/id' | |
06746a8b RK |
8203 | MRSSPeerLink: |
8204 | type: object | |
8205 | xml: | |
8206 | name: 'media:peerLink' | |
8207 | properties: | |
8208 | href: | |
8209 | type: string | |
8210 | xml: | |
8211 | attribute: true | |
8212 | type: | |
8213 | type: string | |
8214 | enum: | |
8215 | - application/x-bittorrent | |
8216 | xml: | |
8217 | attribute: true | |
8218 | MRSSGroupContent: | |
8219 | type: object | |
8220 | xml: | |
8221 | name: 'media:content' | |
8222 | properties: | |
8223 | url: | |
8224 | type: string | |
84f6e32c | 8225 | format: url |
06746a8b RK |
8226 | xml: |
8227 | attribute: true | |
8228 | fileSize: | |
8229 | type: integer | |
8230 | xml: | |
8231 | attribute: true | |
8232 | type: | |
8233 | type: string | |
8234 | xml: | |
8235 | attribute: true | |
8236 | framerate: | |
8237 | type: integer | |
8238 | xml: | |
8239 | attribute: true | |
8240 | duration: | |
8241 | type: integer | |
8242 | xml: | |
8243 | attribute: true | |
8244 | height: | |
8245 | type: integer | |
8246 | xml: | |
8247 | attribute: true | |
8248 | lang: | |
8249 | type: string | |
8250 | xml: | |
8251 | attribute: true | |
8252 | VideoCommentsForXML: | |
8253 | type: array | |
8254 | xml: | |
8255 | wrapped: true | |
8256 | name: 'channel' | |
8257 | items: | |
8258 | type: object | |
8259 | xml: | |
8260 | name: 'item' | |
8261 | properties: | |
8262 | link: | |
8263 | type: string | |
84f6e32c | 8264 | format: url |
06746a8b RK |
8265 | guid: |
8266 | type: string | |
8267 | pubDate: | |
8268 | type: string | |
8269 | format: date-time | |
8270 | 'content:encoded': | |
8271 | type: string | |
8272 | 'dc:creator': | |
8273 | type: string | |
8274 | VideosForXML: | |
8275 | type: array | |
8276 | xml: | |
8277 | wrapped: true | |
8278 | name: 'channel' | |
8279 | items: | |
8280 | type: object | |
8281 | xml: | |
8282 | name: 'item' | |
8283 | properties: | |
8284 | link: | |
8285 | type: string | |
84f6e32c | 8286 | format: url |
06746a8b RK |
8287 | description: video watch page URL |
8288 | guid: | |
8289 | type: string | |
8290 | description: video canonical URL | |
8291 | pubDate: | |
8292 | type: string | |
8293 | format: date-time | |
8294 | description: video publication date | |
8295 | description: | |
8296 | type: string | |
8297 | description: video description | |
8298 | 'content:encoded': | |
8299 | type: string | |
8300 | description: video description | |
8301 | 'dc:creator': | |
8302 | type: string | |
8303 | description: publisher user name | |
8304 | 'media:category': | |
8305 | type: integer | |
8306 | description: video category (MRSS) | |
8307 | 'media:community': | |
8308 | type: object | |
8309 | description: see [media:community](https://www.rssboard.org/media-rss#media-community) (MRSS) | |
8310 | properties: | |
8311 | 'media:statistics': | |
8312 | type: object | |
8313 | properties: | |
8314 | views: | |
8315 | type: integer | |
8316 | xml: | |
8317 | attribute: true | |
8318 | 'media:embed': | |
8319 | type: object | |
8320 | properties: | |
8321 | url: | |
8322 | type: string | |
84f6e32c | 8323 | format: url |
06746a8b RK |
8324 | description: video embed path, relative to the canonical URL domain (MRSS) |
8325 | xml: | |
8326 | attribute: true | |
8327 | 'media:player': | |
8328 | type: object | |
8329 | properties: | |
8330 | url: | |
8331 | type: string | |
84f6e32c | 8332 | format: url |
06746a8b RK |
8333 | description: video watch path, relative to the canonical URL domain (MRSS) |
8334 | xml: | |
8335 | attribute: true | |
8336 | 'media:thumbnail': | |
8337 | type: object | |
8338 | properties: | |
8339 | url: | |
8340 | type: string | |
84f6e32c | 8341 | format: url |
06746a8b RK |
8342 | xml: |
8343 | attribute: true | |
8344 | height: | |
8345 | type: integer | |
8346 | xml: | |
8347 | attribute: true | |
8348 | width: | |
8349 | type: integer | |
8350 | xml: | |
8351 | attribute: true | |
8352 | 'media:title': | |
8353 | type: string | |
8354 | description: see [media:title](https://www.rssboard.org/media-rss#media-title) (MRSS). We only use `plain` titles. | |
8355 | 'media:description': | |
8356 | type: string | |
8357 | 'media:rating': | |
8358 | type: string | |
8359 | enum: | |
8360 | - nonadult | |
8361 | - adult | |
8362 | description: see [media:rating](https://www.rssboard.org/media-rss#media-rating) (MRSS) | |
8363 | 'enclosure': | |
8364 | type: object | |
8365 | description: main streamable file for the video | |
8366 | properties: | |
8367 | url: | |
8368 | type: string | |
84f6e32c | 8369 | format: url |
06746a8b RK |
8370 | xml: |
8371 | attribute: true | |
8372 | type: | |
8373 | type: string | |
8374 | enum: | |
8375 | - application/x-bittorrent | |
8376 | xml: | |
8377 | attribute: true | |
8378 | length: | |
8379 | type: integer | |
8380 | xml: | |
8381 | attribute: true | |
8382 | 'media:group': | |
8383 | type: array | |
8384 | 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) | |
8385 | items: | |
8386 | anyOf: | |
8387 | - $ref: '#/components/schemas/MRSSPeerLink' | |
f4d59981 RK |
8388 | - $ref: '#/components/schemas/MRSSGroupContent' |
8389 | NotificationSettingValue: | |
8390 | type: integer | |
8391 | description: > | |
7dcd45a9 | 8392 | Notification type. One of the following values, or a sum of multiple values: |
84f6e32c | 8393 | |
f4d59981 | 8394 | - `0` NONE |
84f6e32c | 8395 | |
f4d59981 | 8396 | - `1` WEB |
84f6e32c | 8397 | |
f4d59981 | 8398 | - `2` EMAIL |
f4d59981 RK |
8399 | Notification: |
8400 | properties: | |
8401 | id: | |
b8375da9 | 8402 | $ref: '#/components/schemas/id' |
f4d59981 RK |
8403 | type: |
8404 | type: integer | |
8405 | description: > | |
8406 | Notification type, following the `UserNotificationType` enum: | |
84f6e32c | 8407 | |
f4d59981 | 8408 | - `1` NEW_VIDEO_FROM_SUBSCRIPTION |
84f6e32c | 8409 | |
f4d59981 | 8410 | - `2` NEW_COMMENT_ON_MY_VIDEO |
84f6e32c | 8411 | |
310b5219 | 8412 | - `3` NEW_ABUSE_FOR_MODERATORS |
84f6e32c | 8413 | |
f4d59981 | 8414 | - `4` BLACKLIST_ON_MY_VIDEO |
84f6e32c | 8415 | |
f4d59981 | 8416 | - `5` UNBLACKLIST_ON_MY_VIDEO |
84f6e32c | 8417 | |
f4d59981 | 8418 | - `6` MY_VIDEO_PUBLISHED |
84f6e32c | 8419 | |
f4d59981 | 8420 | - `7` MY_VIDEO_IMPORT_SUCCESS |
84f6e32c | 8421 | |
f4d59981 | 8422 | - `8` MY_VIDEO_IMPORT_ERROR |
84f6e32c | 8423 | |
f4d59981 | 8424 | - `9` NEW_USER_REGISTRATION |
84f6e32c | 8425 | |
f4d59981 | 8426 | - `10` NEW_FOLLOW |
84f6e32c | 8427 | |
f4d59981 | 8428 | - `11` COMMENT_MENTION |
84f6e32c | 8429 | |
f4d59981 | 8430 | - `12` VIDEO_AUTO_BLACKLIST_FOR_MODERATORS |
84f6e32c | 8431 | |
f4d59981 | 8432 | - `13` NEW_INSTANCE_FOLLOWER |
84f6e32c | 8433 | |
f4d59981 | 8434 | - `14` AUTO_INSTANCE_FOLLOWING |
5097cbda | 8435 | |
597da8dd | 8436 | - `15` ABUSE_STATE_CHANGE |
5097cbda | 8437 | |
597da8dd | 8438 | - `16` ABUSE_NEW_MESSAGE |
5097cbda | 8439 | |
597da8dd | 8440 | - `17` NEW_PLUGIN_VERSION |
5097cbda | 8441 | |
597da8dd | 8442 | - `18` NEW_PEERTUBE_VERSION |
f4d59981 RK |
8443 | read: |
8444 | type: boolean | |
8445 | video: | |
8446 | nullable: true | |
8447 | allOf: | |
8448 | - $ref: '#/components/schemas/VideoInfo' | |
8449 | - type: object | |
8450 | properties: | |
8451 | channel: | |
8452 | $ref: '#/components/schemas/ActorInfo' | |
8453 | videoImport: | |
8454 | nullable: true | |
8455 | type: object | |
8456 | properties: | |
8457 | id: | |
b8375da9 | 8458 | $ref: '#/components/schemas/id' |
f4d59981 RK |
8459 | video: |
8460 | nullable: true | |
8461 | $ref: '#/components/schemas/VideoInfo' | |
8462 | torrentName: | |
8463 | type: string | |
8464 | nullable: true | |
8465 | magnetUri: | |
2c4876f2 | 8466 | $ref: '#/components/schemas/VideoImport/properties/magnetUri' |
f4d59981 RK |
8467 | targetUri: |
8468 | type: string | |
84f6e32c | 8469 | format: uri |
f4d59981 RK |
8470 | nullable: true |
8471 | comment: | |
8472 | nullable: true | |
8473 | type: object | |
8474 | properties: | |
8475 | id: | |
b8375da9 | 8476 | $ref: '#/components/schemas/id' |
f4d59981 RK |
8477 | threadId: |
8478 | type: integer | |
8479 | video: | |
8480 | $ref: '#/components/schemas/VideoInfo' | |
8481 | account: | |
8482 | $ref: '#/components/schemas/ActorInfo' | |
8483 | videoAbuse: | |
8484 | nullable: true | |
8485 | type: object | |
8486 | properties: | |
8487 | id: | |
b8375da9 | 8488 | $ref: '#/components/schemas/id' |
f4d59981 RK |
8489 | video: |
8490 | allOf: | |
8491 | - $ref: '#/components/schemas/VideoInfo' | |
8492 | videoBlacklist: | |
8493 | nullable: true | |
8494 | type: object | |
8495 | properties: | |
8496 | id: | |
b8375da9 | 8497 | $ref: '#/components/schemas/id' |
f4d59981 RK |
8498 | video: |
8499 | allOf: | |
8500 | - $ref: '#/components/schemas/VideoInfo' | |
8501 | account: | |
8502 | nullable: true | |
8503 | allOf: | |
8504 | - $ref: '#/components/schemas/ActorInfo' | |
8505 | actorFollow: | |
8506 | type: object | |
8507 | nullable: true | |
8508 | properties: | |
8509 | id: | |
b8375da9 | 8510 | $ref: '#/components/schemas/id' |
f4d59981 RK |
8511 | follower: |
8512 | $ref: '#/components/schemas/ActorInfo' | |
8513 | state: | |
8514 | type: string | |
8515 | enum: | |
8516 | - pending | |
8517 | - accepted | |
8518 | following: | |
8519 | type: object | |
8520 | properties: | |
8521 | type: | |
8522 | type: string | |
8523 | enum: | |
8524 | - account | |
8525 | - channel | |
8526 | - instance | |
8527 | name: | |
8528 | type: string | |
8529 | displayName: | |
8530 | type: string | |
8531 | host: | |
8532 | type: string | |
84f6e32c | 8533 | format: hostname |
f4d59981 RK |
8534 | createdAt: |
8535 | type: string | |
8536 | format: date-time | |
8537 | updatedAt: | |
8538 | type: string | |
8539 | format: date-time | |
8540 | NotificationListResponse: | |
8541 | properties: | |
8542 | total: | |
8543 | type: integer | |
84f6e32c | 8544 | example: 1 |
f4d59981 RK |
8545 | data: |
8546 | type: array | |
84f6e32c | 8547 | maxItems: 100 |
f4d59981 | 8548 | items: |
7461d440 RK |
8549 | $ref: '#/components/schemas/Notification' |
8550 | Plugin: | |
8551 | properties: | |
8552 | name: | |
8553 | type: string | |
84f6e32c | 8554 | example: peertube-plugin-auth-ldap |
7461d440 RK |
8555 | type: |
8556 | type: integer | |
84f6e32c RK |
8557 | description: > |
8558 | - `1`: PLUGIN | |
8559 | ||
8560 | - `2`: THEME | |
7461d440 RK |
8561 | enum: |
8562 | - 1 | |
8563 | - 2 | |
8564 | latestVersion: | |
8565 | type: string | |
84f6e32c | 8566 | example: 0.0.3 |
7461d440 RK |
8567 | version: |
8568 | type: string | |
84f6e32c | 8569 | example: 0.0.1 |
7461d440 RK |
8570 | enabled: |
8571 | type: boolean | |
8572 | uninstalled: | |
8573 | type: boolean | |
8574 | peertubeEngine: | |
8575 | type: string | |
84f6e32c | 8576 | example: 2.2.0 |
7461d440 RK |
8577 | description: |
8578 | type: string | |
8579 | homepage: | |
8580 | type: string | |
84f6e32c RK |
8581 | format: url |
8582 | example: https://framagit.org/framasoft/peertube/official-plugins/tree/master/peertube-plugin-auth-ldap | |
7461d440 RK |
8583 | settings: |
8584 | type: object | |
8585 | additionalProperties: true | |
8586 | createdAt: | |
8587 | type: string | |
8588 | format: date-time | |
8589 | updatedAt: | |
8590 | type: string | |
8591 | format: date-time | |
8592 | PluginResponse: | |
8593 | properties: | |
8594 | total: | |
8595 | type: integer | |
84f6e32c | 8596 | example: 1 |
7461d440 RK |
8597 | data: |
8598 | type: array | |
84f6e32c | 8599 | maxItems: 100 |
7461d440 | 8600 | items: |
2c318664 | 8601 | $ref: '#/components/schemas/Plugin' |
4e239e35 C |
8602 | |
8603 | LiveVideoUpdate: | |
8604 | properties: | |
8605 | saveReplay: | |
8606 | type: boolean | |
bb4ba6d9 C |
8607 | permanentLive: |
8608 | description: User can stream multiple times in a permanent live | |
8609 | type: boolean | |
f443a746 C |
8610 | latencyMode: |
8611 | description: User can select live latency mode if enabled by the instance | |
8612 | $ref: '#/components/schemas/LiveVideoLatencyMode' | |
4e239e35 C |
8613 | |
8614 | LiveVideoResponse: | |
8615 | properties: | |
8616 | rtmpUrl: | |
8617 | type: string | |
961cbe42 | 8618 | description: Included in the response if an appropriate token is provided |
df1db951 C |
8619 | rtmpsUrl: |
8620 | type: string | |
961cbe42 | 8621 | description: Included in the response if an appropriate token is provided |
4e239e35 C |
8622 | streamKey: |
8623 | type: string | |
961cbe42 | 8624 | description: RTMP stream key to use to stream into this live video. Included in the response if an appropriate token is provided |
4e239e35 C |
8625 | saveReplay: |
8626 | type: boolean | |
bb4ba6d9 C |
8627 | permanentLive: |
8628 | description: User can stream multiple times in a permanent live | |
8629 | type: boolean | |
f443a746 C |
8630 | latencyMode: |
8631 | description: User can select live latency mode if enabled by the instance | |
8632 | $ref: '#/components/schemas/LiveVideoLatencyMode' | |
75cba40d | 8633 | |
a69ea130 C |
8634 | RequestTwoFactorResponse: |
8635 | properties: | |
8636 | otpRequest: | |
8637 | type: object | |
8638 | properties: | |
8639 | requestToken: | |
8640 | type: string | |
8641 | description: The token to send to confirm this request | |
8642 | secret: | |
8643 | type: string | |
8644 | description: The OTP secret | |
8645 | uri: | |
8646 | type: string | |
8647 | description: The OTP URI | |
8648 | ||
f9079a78 C |
8649 | VideoStudioCreateTask: |
8650 | type: array | |
8651 | items: | |
8652 | anyOf: | |
8653 | - | |
8654 | title: cut | |
8655 | type: object | |
8656 | properties: | |
8657 | name: | |
8658 | type: string | |
8659 | enum: | |
8660 | - 'cut' | |
8661 | options: | |
8662 | type: object | |
8663 | properties: | |
8664 | start: | |
8665 | type: integer | |
8666 | end: | |
8667 | type: integer | |
8668 | - | |
8669 | title: add-intro | |
8670 | type: object | |
8671 | properties: | |
8672 | name: | |
8673 | type: string | |
8674 | enum: | |
8675 | - 'add-intro' | |
8676 | options: | |
8677 | type: object | |
8678 | properties: | |
8679 | file: | |
8680 | type: string | |
8681 | format: binary | |
8682 | - | |
8683 | title: add-outro | |
8684 | type: object | |
8685 | properties: | |
8686 | name: | |
8687 | type: string | |
8688 | enum: | |
8689 | - 'add-outro' | |
8690 | options: | |
8691 | type: object | |
8692 | properties: | |
8693 | file: | |
8694 | type: string | |
8695 | format: binary | |
8696 | - | |
8697 | title: add-watermark | |
8698 | type: object | |
8699 | properties: | |
8700 | name: | |
8701 | type: string | |
8702 | enum: | |
8703 | - 'add-watermark' | |
8704 | options: | |
8705 | type: object | |
8706 | properties: | |
8707 | file: | |
8708 | type: string | |
8709 | format: binary | |
8710 | ||
26e3e98f | 8711 | LiveVideoSessionResponse: |
fd3c2e87 C |
8712 | properties: |
8713 | id: | |
8714 | type: integer | |
8715 | startDate: | |
8716 | type: string | |
8717 | format: date-time | |
8718 | description: Start date of the live session | |
8719 | endDate: | |
8720 | type: string | |
8721 | format: date-time | |
8722 | nullable: true | |
8723 | description: End date of the live session | |
8724 | error: | |
8725 | type: integer | |
8726 | enum: | |
8727 | - 1 | |
8728 | - 2 | |
8729 | - 3 | |
8730 | - 4 | |
8731 | - 5 | |
8732 | nullable: true | |
8733 | description: > | |
8734 | Error type if an error occurred during the live session: | |
8735 | - `1`: Bad socket health (transcoding is too slow) | |
8736 | - `2`: Max duration exceeded | |
8737 | - `3`: Quota exceeded | |
8738 | - `4`: Quota FFmpeg error | |
8739 | - `5`: Video has been blacklisted during the live | |
8740 | replayVideo: | |
8741 | type: object | |
8742 | description: Video replay information | |
8743 | properties: | |
8744 | id: | |
8745 | type: number | |
8746 | uuid: | |
8747 | $ref: '#/components/schemas/UUIDv4' | |
8748 | shortUUID: | |
8749 | $ref: '#/components/schemas/shortUUID' | |
8750 | ||
8751 | PlaybackMetricCreate: | |
8752 | properties: | |
8753 | playerMode: | |
8754 | type: string | |
8755 | enum: | |
8756 | - 'p2p-media-loader' | |
8757 | - 'webtorrent' | |
8758 | resolution: | |
8759 | type: number | |
8760 | description: Current player video resolution | |
8761 | fps: | |
8762 | type: number | |
8763 | description: Current player video fps | |
8764 | resolutionChanges: | |
8765 | type: number | |
8766 | description: How many resolution changes occured since the last metric creation | |
8767 | errors: | |
8768 | type: number | |
8769 | description: How many errors occured since the last metric creation | |
8770 | downloadedBytesP2P: | |
8771 | type: number | |
8772 | description: How many bytes were downloaded with P2P since the last metric creation | |
8773 | downloadedBytesHTTP: | |
8774 | type: number | |
8775 | description: How many bytes were downloaded with HTTP since the last metric creation | |
8776 | uploadedBytesP2P: | |
8777 | type: number | |
8778 | description: How many bytes were uploaded with P2P since the last metric creation | |
8779 | videoId: | |
8780 | oneOf: | |
8781 | - $ref: '#/components/schemas/id' | |
8782 | - $ref: '#/components/schemas/UUIDv4' | |
8783 | - $ref: '#/components/schemas/shortUUID' | |
8784 | required: | |
8785 | - playerMode | |
8786 | - resolutionChanges | |
8787 | - errors | |
8788 | - downloadedBytesP2P | |
8789 | - downloadedBytesHTTP | |
8790 | - uploadedBytesP2P | |
8791 | - videoId | |
26e3e98f | 8792 | |
2c318664 RK |
8793 | callbacks: |
8794 | searchIndex: | |
c00f96ce | 8795 | 'https://search.example.org/api/v1/search/videos': |
2c318664 RK |
8796 | post: |
8797 | summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget` | |
8798 | responses: | |
8799 | '200': | |
8800 | description: successful operation | |
8801 | content: | |
8802 | application/json: | |
8803 | schema: | |
1e904cde | 8804 | $ref: '#/components/schemas/VideoListResponse' |