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