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