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