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