]>
Commit | Line | Data |
---|---|---|
3e9e6f2f | 1 | openapi: 3.0.0 |
1569a818 | 2 | info: |
5e1c08eb | 3 | title: PeerTube |
f5305c04 | 4 | version: 1.2.0 |
2963c343 RK |
5 | contact: |
6 | name: PeerTube Community | |
7 | url: 'https://joinpeertube.org' | |
8 | license: | |
9 | name: AGPLv3.0 | |
10 | url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE' | |
11 | x-logo: | |
12 | url: 'https://joinpeertube.org/img/brand.png' | |
5776f78e | 13 | altText: PeerTube Project Homepage |
2963c343 RK |
14 | description: | |
15 | # Introduction | |
16 | The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable | |
17 | resource URLs. It returns HTTP response codes to indicate errors. It also | |
18 | accepts and returns JSON in the HTTP body. You can use your favorite | |
19 | HTTP/REST library for your programming language to use PeerTube. No official | |
5776f78e RK |
20 | SDK is currently provided, but the spec API is fully compatible with |
21 | [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO) | |
22 | which generates a client SDK in the language of your choice. | |
3e9e6f2f | 23 | |
2963c343 RK |
24 | # Authentication |
25 | When you sign up for an account, you are given the possibility to generate | |
1fd12c7c | 26 | sessions, and authenticate using this session token. One session token can |
2963c343 | 27 | currently be used at a time. |
5776f78e RK |
28 | |
29 | # Errors | |
30 | The API uses standard HTTP status codes to indicate the success or failure | |
31 | of the API call. The body of the response will be JSON in the following | |
32 | format. | |
33 | ||
34 | ``` | |
35 | { | |
36 | "code": "unauthorized_request", // example inner error code | |
37 | "error": "Token is invalid." // example exposed error message | |
38 | } | |
39 | ``` | |
6441981b RK |
40 | externalDocs: |
41 | url: https://docs.joinpeertube.org/api.html | |
2963c343 RK |
42 | tags: |
43 | - name: Accounts | |
3e9e6f2f | 44 | description: > |
2963c343 | 45 | Using some features of PeerTube require authentication, for which Accounts |
3e9e6f2f | 46 | provide different levels of permission as well as associated user |
5776f78e | 47 | information. Accounts also encompass remote accounts discovered across the federation. |
2963c343 | 48 | - name: Config |
3e9e6f2f RK |
49 | description: > |
50 | Each server exposes public information regarding supported videos and | |
51 | options. | |
2963c343 RK |
52 | - name: Feeds |
53 | description: | | |
54 | Feeds of videos and feeds of comments allow to see updates and get them in | |
55 | an aggregator or script of your choice. | |
56 | - name: Job | |
3e9e6f2f RK |
57 | description: > |
58 | Jobs are long-running tasks enqueued and processed by the instance | |
5776f78e RK |
59 | itself. No additional worker registration is currently available. |
60 | - name: Server Following | |
3e9e6f2f RK |
61 | description: > |
62 | Managing servers which the instance interacts with is crucial to the | |
5776f78e | 63 | concept of federation in PeerTube and external video indexation. The PeerTube |
1fd12c7c | 64 | server then deals with inter-server ActivityPub operations and propagates |
2963c343 RK |
65 | information across its social graph by posting activities to actors' inbox |
66 | endpoints. | |
5776f78e | 67 | - name: Video Abuse |
2963c343 RK |
68 | description: | |
69 | Video abuses deal with reports of local or remote videos alike. | |
70 | - name: Video | |
71 | description: | | |
72 | Operations dealing with listing, uploading, fetching or modifying videos. | |
73 | - name: Search | |
74 | description: | | |
75 | The search helps to find _videos_ from within the instance and beyond. | |
76 | Videos from other instances federated by the instance (that is, instances | |
77 | followed by the instance) can be found via keywords and other criteria of | |
78 | the advanced search. | |
5776f78e | 79 | - name: Video Comment |
3e9e6f2f RK |
80 | description: > |
81 | Operations dealing with comments to a video. Comments are organized in | |
82 | threads. | |
5776f78e | 83 | - name: Video Channel |
3e9e6f2f RK |
84 | description: > |
85 | Operations dealing with creation, modification and video listing of a | |
5776f78e RK |
86 | user's channels. |
87 | - name: Video Blacklist | |
88 | description: > | |
89 | Operations dealing with blacklisting videos (removing them from view and | |
90 | preventing interactions). | |
91 | - name: Video Rate | |
92 | description: > | |
93 | Voting for a video. | |
94 | x-tagGroups: | |
95 | - name: Accounts | |
96 | tags: | |
97 | - Accounts | |
98 | - User | |
99 | - name: Videos | |
100 | tags: | |
101 | - Video | |
102 | - Video Channel | |
103 | - Video Comment | |
5776f78e RK |
104 | - Video Following |
105 | - Video Rate | |
106 | - name: Moderation | |
107 | tags: | |
9d0b856e | 108 | - Video Abuse |
5776f78e | 109 | - Video Blacklist |
65f02679 | 110 | - name: Instance Configuration |
5776f78e RK |
111 | tags: |
112 | - Config | |
113 | - Server Following | |
114 | - name: Notifications | |
115 | tags: | |
116 | - Feeds | |
117 | - name: Jobs | |
118 | tags: | |
119 | - Job | |
120 | - name: Search | |
121 | tags: | |
122 | - Search | |
1569a818 | 123 | paths: |
ad9e39fb | 124 | '/accounts/{name}': |
1569a818 DG |
125 | get: |
126 | tags: | |
127 | - Accounts | |
2963c343 | 128 | summary: Get the account by name |
1569a818 | 129 | parameters: |
3e9e6f2f RK |
130 | - $ref: '#/components/parameters/name' |
131 | - $ref: '#/components/parameters/start' | |
132 | - $ref: '#/components/parameters/count' | |
133 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
134 | responses: |
135 | '200': | |
136 | description: successful operation | |
3e9e6f2f RK |
137 | content: |
138 | application/json: | |
139 | schema: | |
140 | $ref: '#/components/schemas/Account' | |
ad9e39fb | 141 | '/accounts/{name}/videos': |
6b738c7a C |
142 | get: |
143 | tags: | |
144 | - Accounts | |
2963c343 | 145 | - Video |
3e9e6f2f | 146 | summary: 'Get videos for an account, provided the name of that account' |
6b738c7a | 147 | parameters: |
3e9e6f2f | 148 | - $ref: '#/components/parameters/name' |
6b738c7a C |
149 | responses: |
150 | '200': | |
151 | description: successful operation | |
3e9e6f2f RK |
152 | content: |
153 | application/json: | |
154 | schema: | |
155 | $ref: '#/components/schemas/Video' | |
2963c343 RK |
156 | x-code-samples: |
157 | - lang: JavaScript | |
158 | source: | | |
8f9e8be1 | 159 | fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos') |
2963c343 RK |
160 | .then(function(response) { |
161 | return response.json() | |
162 | }).then(function(data) { | |
163 | console.log(data) | |
164 | }) | |
8f9e8be1 RK |
165 | - lang: Shell |
166 | source: | | |
167 | # pip install httpie | |
168 | http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos | |
5776f78e RK |
169 | - lang: Ruby |
170 | source: | | |
171 | require 'uri' | |
172 | require 'net/http' | |
173 | ||
174 | url = URI("https://peertube2.cpy.re/api/v1/accounts/{name}/videos") | |
175 | ||
176 | http = Net::HTTP.new(url.host, url.port) | |
177 | http.use_ssl = true | |
178 | http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
179 | ||
180 | request = Net::HTTP::Post.new(url) | |
181 | request["content-type"] = 'application/json' | |
182 | response = http.request(request) | |
183 | puts response.read_body | |
184 | - lang: Python | |
185 | source: | | |
186 | import http.client | |
187 | ||
188 | conn = http.client.HTTPSConnection("https://peertube2.cpy.re/api/v1") | |
189 | ||
190 | headers = { | |
191 | 'content-type': "application/json" | |
192 | } | |
193 | ||
194 | conn.request("POST", "/accounts/{name}/videos", None, headers) | |
195 | ||
196 | res = conn.getresponse() | |
197 | data = res.read() | |
198 | ||
199 | print(data.decode("utf-8")) | |
1569a818 DG |
200 | /accounts: |
201 | get: | |
202 | tags: | |
203 | - Accounts | |
2963c343 | 204 | summary: Get all accounts |
1569a818 DG |
205 | responses: |
206 | '200': | |
207 | description: successful operation | |
3e9e6f2f | 208 | content: |
8f9e8be1 | 209 | 'application/json': |
3e9e6f2f RK |
210 | schema: |
211 | type: array | |
212 | items: | |
213 | $ref: '#/components/schemas/Account' | |
1569a818 DG |
214 | /config: |
215 | get: | |
216 | tags: | |
217 | - Config | |
6441981b | 218 | summary: Get the public configuration of the server |
1569a818 DG |
219 | responses: |
220 | '200': | |
221 | description: successful operation | |
3e9e6f2f RK |
222 | content: |
223 | application/json: | |
224 | schema: | |
225 | $ref: '#/components/schemas/ServerConfig' | |
6441981b RK |
226 | /config/about: |
227 | get: | |
228 | summary: Get the instance about page content | |
229 | tags: | |
230 | - Config | |
231 | responses: | |
232 | '200': | |
233 | description: successful operation | |
234 | /config/custom: | |
235 | get: | |
236 | summary: Get the runtime configuration of the server | |
237 | tags: | |
238 | - Config | |
239 | security: | |
240 | - OAuth2: | |
241 | - admin | |
242 | responses: | |
243 | '200': | |
244 | description: successful operation | |
245 | put: | |
246 | summary: Set the runtime configuration of the server | |
247 | tags: | |
248 | - Config | |
249 | security: | |
250 | - OAuth2: | |
251 | - admin | |
252 | responses: | |
253 | '200': | |
254 | description: successful operation | |
255 | delete: | |
256 | summary: Delete the runtime configuration of the server | |
257 | tags: | |
258 | - Config | |
259 | security: | |
260 | - OAuth2: | |
261 | - admin | |
262 | responses: | |
263 | '200': | |
264 | description: successful operation | |
3e9e6f2f | 265 | '/feeds/videos.{format}': |
244e76a5 | 266 | get: |
3e9e6f2f RK |
267 | summary: >- |
268 | Get the feed of videos for the server, with optional filter by account | |
269 | name or id | |
244e76a5 RK |
270 | tags: |
271 | - Feeds | |
244e76a5 RK |
272 | parameters: |
273 | - name: format | |
274 | in: path | |
275 | required: true | |
3e9e6f2f RK |
276 | description: >- |
277 | The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and | |
278 | json to JSON FEED 1.0 | |
279 | schema: | |
280 | type: string | |
281 | enum: | |
282 | - xml | |
283 | - atom | |
284 | - json | |
285 | default: xml | |
244e76a5 RK |
286 | - name: accountId |
287 | in: query | |
288 | required: false | |
3e9e6f2f RK |
289 | description: >- |
290 | The id of the local account to filter to (beware, users IDs and not | |
291 | actors IDs which will return empty feeds | |
292 | schema: | |
293 | type: number | |
244e76a5 RK |
294 | - name: accountName |
295 | in: query | |
296 | required: false | |
3e9e6f2f RK |
297 | description: The name of the local account to filter to |
298 | schema: | |
299 | type: string | |
244e76a5 RK |
300 | responses: |
301 | '200': | |
302 | description: successful operation | |
d216b538 | 303 | /jobs/{state}: |
1569a818 | 304 | get: |
2963c343 | 305 | summary: Get list of jobs |
94ff4c23 | 306 | security: |
3e9e6f2f RK |
307 | - OAuth2: |
308 | - admin | |
1569a818 DG |
309 | tags: |
310 | - Job | |
44cb3b85 DG |
311 | parameters: |
312 | - name: state | |
313 | in: path | |
314 | required: true | |
3e9e6f2f RK |
315 | description: The state of the job |
316 | schema: | |
317 | type: string | |
65f02679 RK |
318 | enum: |
319 | - active | |
320 | - completed | |
321 | - failed | |
322 | - waiting | |
323 | - delayed | |
3e9e6f2f RK |
324 | - $ref: '#/components/parameters/start' |
325 | - $ref: '#/components/parameters/count' | |
326 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
327 | responses: |
328 | '200': | |
329 | description: successful operation | |
3e9e6f2f RK |
330 | content: |
331 | application/json: | |
332 | schema: | |
333 | type: array | |
334 | items: | |
335 | $ref: '#/components/schemas/Job' | |
1569a818 DG |
336 | '/server/following/{host}': |
337 | delete: | |
94ff4c23 | 338 | security: |
3e9e6f2f RK |
339 | - OAuth2: |
340 | - admin | |
1569a818 | 341 | tags: |
5776f78e | 342 | - Server Following |
2963c343 | 343 | summary: Unfollow a server by hostname |
1569a818 DG |
344 | parameters: |
345 | - name: host | |
346 | in: path | |
347 | required: true | |
1569a818 | 348 | description: 'The host to unfollow ' |
3e9e6f2f RK |
349 | schema: |
350 | type: string | |
1569a818 DG |
351 | responses: |
352 | '201': | |
353 | description: successful operation | |
354 | /server/followers: | |
355 | get: | |
356 | tags: | |
5776f78e | 357 | - Server Following |
2963c343 | 358 | summary: Get followers of the server |
44cb3b85 | 359 | parameters: |
3e9e6f2f RK |
360 | - $ref: '#/components/parameters/start' |
361 | - $ref: '#/components/parameters/count' | |
362 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
363 | responses: |
364 | '200': | |
365 | description: successful operation | |
3e9e6f2f RK |
366 | content: |
367 | application/json: | |
368 | schema: | |
369 | type: array | |
370 | items: | |
371 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
372 | /server/following: |
373 | get: | |
374 | tags: | |
5776f78e | 375 | - Server Following |
2963c343 | 376 | summary: Get servers followed by the server |
44cb3b85 | 377 | parameters: |
3e9e6f2f RK |
378 | - $ref: '#/components/parameters/start' |
379 | - $ref: '#/components/parameters/count' | |
380 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
381 | responses: |
382 | '200': | |
383 | description: successful operation | |
3e9e6f2f RK |
384 | content: |
385 | application/json: | |
386 | schema: | |
387 | type: array | |
388 | items: | |
389 | $ref: '#/components/schemas/Follow' | |
1569a818 | 390 | post: |
94ff4c23 | 391 | security: |
3e9e6f2f RK |
392 | - OAuth2: |
393 | - admin | |
1569a818 | 394 | tags: |
5776f78e | 395 | - Server Following |
2963c343 | 396 | summary: Follow a server |
1569a818 DG |
397 | responses: |
398 | '204': | |
3e9e6f2f RK |
399 | $ref: '#/paths/~1users~1me/put/responses/204' |
400 | requestBody: | |
401 | content: | |
402 | application/json: | |
403 | schema: | |
404 | $ref: '#/components/schemas/Follow' | |
1569a818 DG |
405 | /users: |
406 | post: | |
2963c343 | 407 | summary: Creates user |
94ff4c23 | 408 | security: |
3e9e6f2f RK |
409 | - OAuth2: |
410 | - admin | |
1569a818 DG |
411 | tags: |
412 | - User | |
1569a818 DG |
413 | responses: |
414 | '200': | |
415 | description: successful operation | |
3e9e6f2f RK |
416 | content: |
417 | application/json: | |
418 | schema: | |
419 | $ref: '#/components/schemas/AddUserResponse' | |
420 | requestBody: | |
421 | content: | |
422 | application/json: | |
423 | schema: | |
424 | $ref: '#/components/schemas/AddUser' | |
425 | description: User to create | |
426 | required: true | |
1569a818 | 427 | get: |
2963c343 | 428 | summary: Get a list of users |
94ff4c23 | 429 | security: |
3e9e6f2f | 430 | - OAuth2: [] |
1569a818 DG |
431 | tags: |
432 | - User | |
44cb3b85 | 433 | parameters: |
3e9e6f2f RK |
434 | - $ref: '#/components/parameters/start' |
435 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 436 | - $ref: '#/components/parameters/usersSort' |
1569a818 DG |
437 | responses: |
438 | '200': | |
439 | description: successful operation | |
3e9e6f2f RK |
440 | content: |
441 | application/json: | |
442 | schema: | |
443 | type: array | |
444 | items: | |
445 | $ref: '#/components/schemas/User' | |
1569a818 DG |
446 | '/users/{id}': |
447 | delete: | |
2963c343 | 448 | summary: Delete a user by its id |
94ff4c23 | 449 | security: |
3e9e6f2f RK |
450 | - OAuth2: |
451 | - admin | |
1569a818 DG |
452 | tags: |
453 | - User | |
1569a818 | 454 | parameters: |
3e9e6f2f | 455 | - $ref: '#/components/parameters/id' |
1569a818 DG |
456 | responses: |
457 | '204': | |
3e9e6f2f | 458 | $ref: '#/paths/~1users~1me/put/responses/204' |
1569a818 | 459 | get: |
2963c343 | 460 | summary: Get user by its id |
94ff4c23 | 461 | security: |
3e9e6f2f | 462 | - OAuth2: [] |
1569a818 DG |
463 | tags: |
464 | - User | |
1569a818 | 465 | parameters: |
3e9e6f2f | 466 | - $ref: '#/components/parameters/id' |
1569a818 DG |
467 | responses: |
468 | '200': | |
469 | description: successful operation | |
3e9e6f2f RK |
470 | content: |
471 | application/json: | |
472 | schema: | |
473 | $ref: '#/components/schemas/User' | |
1569a818 | 474 | put: |
2963c343 | 475 | summary: Update user profile by its id |
94ff4c23 | 476 | security: |
3e9e6f2f | 477 | - OAuth2: [] |
1569a818 DG |
478 | tags: |
479 | - User | |
1569a818 | 480 | parameters: |
3e9e6f2f | 481 | - $ref: '#/components/parameters/id' |
1569a818 DG |
482 | responses: |
483 | '204': | |
3e9e6f2f RK |
484 | $ref: '#/paths/~1users~1me/put/responses/204' |
485 | requestBody: | |
486 | content: | |
487 | application/json: | |
488 | schema: | |
489 | $ref: '#/components/schemas/UpdateUser' | |
490 | required: true | |
1569a818 DG |
491 | /users/me: |
492 | get: | |
2963c343 | 493 | summary: Get current user information |
94ff4c23 | 494 | security: |
e76d5784 RK |
495 | - OAuth2: |
496 | - user | |
1569a818 DG |
497 | tags: |
498 | - User | |
1569a818 DG |
499 | responses: |
500 | '200': | |
501 | description: successful operation | |
3e9e6f2f RK |
502 | content: |
503 | application/json: | |
504 | schema: | |
505 | type: array | |
506 | items: | |
507 | $ref: '#/components/schemas/User' | |
1569a818 | 508 | put: |
2963c343 | 509 | summary: Update current user information |
94ff4c23 | 510 | security: |
e76d5784 RK |
511 | - OAuth2: |
512 | - user | |
1569a818 DG |
513 | tags: |
514 | - User | |
1569a818 DG |
515 | responses: |
516 | '204': | |
3e9e6f2f RK |
517 | description: Successful operation |
518 | requestBody: | |
519 | content: | |
520 | application/json: | |
521 | schema: | |
522 | $ref: '#/components/schemas/UpdateMe' | |
523 | required: true | |
1569a818 DG |
524 | /users/me/video-quota-used: |
525 | get: | |
2963c343 | 526 | summary: Get current user used quota |
94ff4c23 | 527 | security: |
e76d5784 RK |
528 | - OAuth2: |
529 | - user | |
1569a818 DG |
530 | tags: |
531 | - User | |
1569a818 DG |
532 | responses: |
533 | '200': | |
534 | description: successful operation | |
3e9e6f2f RK |
535 | content: |
536 | application/json: | |
537 | schema: | |
538 | type: number | |
1569a818 DG |
539 | '/users/me/videos/{videoId}/rating': |
540 | get: | |
3e9e6f2f | 541 | summary: 'Get rating of video by its id, among those of the current user' |
94ff4c23 | 542 | security: |
3e9e6f2f | 543 | - OAuth2: [] |
1569a818 DG |
544 | tags: |
545 | - User | |
1569a818 DG |
546 | parameters: |
547 | - name: videoId | |
548 | in: path | |
549 | required: true | |
1569a818 | 550 | description: 'The video id ' |
3e9e6f2f RK |
551 | schema: |
552 | type: string | |
1569a818 DG |
553 | responses: |
554 | '200': | |
555 | description: successful operation | |
3e9e6f2f RK |
556 | content: |
557 | application/json: | |
558 | schema: | |
559 | $ref: '#/components/schemas/GetMeVideoRating' | |
1569a818 DG |
560 | /users/me/videos: |
561 | get: | |
2963c343 | 562 | summary: Get videos of the current user |
94ff4c23 | 563 | security: |
e76d5784 RK |
564 | - OAuth2: |
565 | - user | |
1569a818 DG |
566 | tags: |
567 | - User | |
44cb3b85 | 568 | parameters: |
3e9e6f2f RK |
569 | - $ref: '#/components/parameters/start' |
570 | - $ref: '#/components/parameters/count' | |
571 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
572 | responses: |
573 | '200': | |
574 | description: successful operation | |
3e9e6f2f RK |
575 | content: |
576 | application/json: | |
577 | schema: | |
578 | type: array | |
579 | items: | |
580 | $ref: '#/components/schemas/Video' | |
e76d5784 RK |
581 | /users/me/subscriptions: |
582 | get: | |
583 | summary: Get subscriptions of the current user | |
584 | security: | |
585 | - OAuth2: | |
586 | - user | |
587 | tags: | |
588 | - User | |
589 | parameters: | |
590 | - $ref: '#/components/parameters/start' | |
591 | - $ref: '#/components/parameters/count' | |
592 | - $ref: '#/components/parameters/sort' | |
593 | responses: | |
594 | '200': | |
595 | description: successful operation | |
596 | post: | |
597 | summary: Add subscription to the current user | |
598 | security: | |
599 | - OAuth2: | |
600 | - user | |
601 | tags: | |
602 | - User | |
603 | responses: | |
604 | '200': | |
605 | description: successful operation | |
606 | /users/me/subscriptions/exist: | |
607 | get: | |
608 | summary: Get if subscriptions exist for the current user | |
609 | security: | |
610 | - OAuth2: | |
611 | - user | |
612 | tags: | |
613 | - User | |
614 | parameters: | |
615 | - $ref: '#/components/parameters/subscriptionsUris' | |
616 | responses: | |
617 | '200': | |
618 | description: successful operation | |
619 | content: | |
620 | application/json: | |
621 | schema: | |
622 | type: object | |
623 | /users/me/subscriptions/videos: | |
624 | get: | |
625 | summary: Get videos of subscriptions of the current user | |
626 | security: | |
627 | - OAuth2: | |
628 | - user | |
629 | tags: | |
630 | - User | |
631 | parameters: | |
632 | - $ref: '#/components/parameters/start' | |
633 | - $ref: '#/components/parameters/count' | |
634 | - $ref: '#/components/parameters/sort' | |
635 | responses: | |
636 | '200': | |
637 | description: successful operation | |
638 | content: | |
639 | application/json: | |
640 | schema: | |
641 | type: array | |
642 | items: | |
643 | $ref: '#/components/schemas/Video' | |
644 | '/users/me/subscriptions/{uri}': | |
645 | get: | |
646 | summary: Get subscription of the current user for a given uri | |
647 | security: | |
648 | - OAuth2: | |
649 | - user | |
650 | tags: | |
651 | - User | |
652 | responses: | |
653 | '200': | |
654 | description: successful operation | |
655 | content: | |
656 | application/json: | |
657 | schema: | |
658 | $ref: '#/components/schemas/VideoChannel' | |
659 | delete: | |
660 | summary: Delete subscription of the current user for a given uri | |
661 | security: | |
662 | - OAuth2: | |
663 | - user | |
664 | tags: | |
665 | - User | |
666 | responses: | |
667 | '200': | |
668 | description: successful operation | |
1569a818 DG |
669 | /users/register: |
670 | post: | |
2963c343 | 671 | summary: Register a user |
1569a818 DG |
672 | tags: |
673 | - User | |
1569a818 DG |
674 | responses: |
675 | '204': | |
3e9e6f2f RK |
676 | $ref: '#/paths/~1users~1me/put/responses/204' |
677 | requestBody: | |
678 | content: | |
679 | application/json: | |
680 | schema: | |
681 | $ref: '#/components/schemas/RegisterUser' | |
682 | required: true | |
1569a818 DG |
683 | /users/me/avatar/pick: |
684 | post: | |
2963c343 | 685 | summary: Update current user avatar |
94ff4c23 | 686 | security: |
3e9e6f2f | 687 | - OAuth2: [] |
1569a818 DG |
688 | tags: |
689 | - User | |
1569a818 DG |
690 | responses: |
691 | '200': | |
692 | description: successful operation | |
3e9e6f2f RK |
693 | content: |
694 | application/json: | |
695 | schema: | |
696 | $ref: '#/components/schemas/Avatar' | |
697 | requestBody: | |
698 | content: | |
699 | multipart/form-data: | |
700 | schema: | |
701 | type: object | |
702 | properties: | |
703 | avatarfile: | |
704 | description: The file to upload. | |
705 | type: string | |
706 | format: binary | |
707 | encoding: | |
708 | profileImage: | |
709 | # only accept png/jpeg | |
710 | contentType: image/png, image/jpeg | |
c360c494 | 711 | /videos: |
1569a818 | 712 | get: |
2963c343 | 713 | summary: Get list of videos |
1569a818 DG |
714 | tags: |
715 | - Video | |
44cb3b85 | 716 | parameters: |
fd5af7a2 RK |
717 | - $ref: '#/components/parameters/categoryOneOf' |
718 | - $ref: '#/components/parameters/tagsOneOf' | |
719 | - $ref: '#/components/parameters/tagsAllOf' | |
720 | - $ref: '#/components/parameters/licenceOneOf' | |
721 | - $ref: '#/components/parameters/languageOneOf' | |
722 | - $ref: '#/components/parameters/nsfw' | |
723 | - $ref: '#/components/parameters/filter' | |
3e9e6f2f RK |
724 | - $ref: '#/components/parameters/start' |
725 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 726 | - $ref: '#/components/parameters/videosSort' |
1569a818 DG |
727 | responses: |
728 | '200': | |
729 | description: successful operation | |
3e9e6f2f RK |
730 | content: |
731 | application/json: | |
732 | schema: | |
733 | type: array | |
734 | items: | |
735 | $ref: '#/components/schemas/Video' | |
c360c494 | 736 | /videos/categories: |
1569a818 | 737 | get: |
2963c343 | 738 | summary: Get list of video licences known by the server |
1569a818 DG |
739 | tags: |
740 | - Video | |
1569a818 DG |
741 | responses: |
742 | '200': | |
743 | description: successful operation | |
3e9e6f2f RK |
744 | content: |
745 | application/json: | |
746 | schema: | |
747 | type: array | |
748 | items: | |
749 | type: string | |
c360c494 | 750 | /videos/licences: |
1569a818 | 751 | get: |
2963c343 | 752 | summary: Get list of video licences known by the server |
1569a818 DG |
753 | tags: |
754 | - Video | |
1569a818 DG |
755 | responses: |
756 | '200': | |
757 | description: successful operation | |
3e9e6f2f RK |
758 | content: |
759 | application/json: | |
760 | schema: | |
761 | type: array | |
762 | items: | |
763 | type: string | |
c360c494 | 764 | /videos/languages: |
1569a818 | 765 | get: |
2963c343 | 766 | summary: Get list of languages known by the server |
1569a818 DG |
767 | tags: |
768 | - Video | |
1569a818 DG |
769 | responses: |
770 | '200': | |
771 | description: successful operation | |
3e9e6f2f RK |
772 | content: |
773 | application/json: | |
774 | schema: | |
775 | type: array | |
776 | items: | |
777 | type: string | |
c360c494 | 778 | /videos/privacies: |
1569a818 | 779 | get: |
2963c343 | 780 | summary: Get list of privacy policies supported by the server |
1569a818 DG |
781 | tags: |
782 | - Video | |
1569a818 DG |
783 | responses: |
784 | '200': | |
785 | description: successful operation | |
3e9e6f2f RK |
786 | content: |
787 | application/json: | |
788 | schema: | |
789 | type: array | |
790 | items: | |
791 | type: string | |
792 | '/videos/{id}': | |
1569a818 | 793 | put: |
2963c343 | 794 | summary: Update metadata for a video by its id |
94ff4c23 | 795 | security: |
3e9e6f2f | 796 | - OAuth2: [] |
1569a818 DG |
797 | tags: |
798 | - Video | |
1569a818 | 799 | parameters: |
3e9e6f2f | 800 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
801 | responses: |
802 | '200': | |
803 | description: successful operation | |
3e9e6f2f RK |
804 | content: |
805 | application/json: | |
806 | schema: | |
807 | $ref: '#/components/schemas/Video' | |
808 | requestBody: | |
809 | content: | |
810 | multipart/form-data: | |
811 | schema: | |
812 | type: object | |
813 | properties: | |
814 | thumbnailfile: | |
815 | description: Video thumbnail file | |
816 | type: string | |
817 | previewfile: | |
818 | description: Video preview file | |
819 | type: string | |
820 | category: | |
821 | description: Video category | |
822 | type: string | |
823 | licence: | |
824 | description: Video licence | |
825 | type: string | |
826 | language: | |
827 | description: Video language | |
828 | type: string | |
829 | description: | |
830 | description: Video description | |
831 | type: string | |
832 | waitTranscoding: | |
833 | description: Whether or not we wait transcoding before publish the video | |
834 | type: string | |
835 | support: | |
836 | description: Text describing how to support the video uploader | |
837 | type: string | |
838 | nsfw: | |
839 | description: Whether or not this video contains sensitive content | |
840 | type: string | |
841 | name: | |
842 | description: Video name | |
843 | type: string | |
844 | tags: | |
845 | description: Video tags | |
1fd12c7c C |
846 | type: array |
847 | items: | |
848 | type: string | |
3e9e6f2f RK |
849 | commentsEnabled: |
850 | description: Enable or disable comments for this video | |
851 | type: string | |
852 | scheduleUpdate: &ref_0 | |
853 | type: object | |
854 | properties: | |
855 | privacy: | |
856 | type: string | |
857 | enum: | |
858 | - Public | |
859 | - Unlisted | |
860 | description: Video privacy target | |
861 | updateAt: | |
862 | type: string | |
863 | format: date | |
864 | description: When to update the video | |
865 | required: | |
866 | - updateAt | |
1569a818 | 867 | get: |
2963c343 | 868 | summary: Get a video by its id |
1569a818 DG |
869 | tags: |
870 | - Video | |
1569a818 | 871 | parameters: |
3e9e6f2f | 872 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
873 | responses: |
874 | '200': | |
875 | description: successful operation | |
3e9e6f2f RK |
876 | content: |
877 | application/json: | |
878 | schema: | |
879 | $ref: '#/components/schemas/Video' | |
1569a818 | 880 | delete: |
2963c343 | 881 | summary: Delete a video by its id |
94ff4c23 | 882 | security: |
3e9e6f2f | 883 | - OAuth2: [] |
1569a818 DG |
884 | tags: |
885 | - Video | |
1569a818 | 886 | parameters: |
3e9e6f2f | 887 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
888 | responses: |
889 | '204': | |
3e9e6f2f RK |
890 | $ref: '#/paths/~1users~1me/put/responses/204' |
891 | '/videos/{id}/description': | |
1569a818 | 892 | get: |
2963c343 | 893 | summary: Get a video description by its id |
1569a818 DG |
894 | tags: |
895 | - Video | |
1569a818 | 896 | parameters: |
3e9e6f2f | 897 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
898 | responses: |
899 | '200': | |
900 | description: successful operation | |
3e9e6f2f RK |
901 | content: |
902 | application/json: | |
903 | schema: | |
904 | type: string | |
905 | '/videos/{id}/views': | |
1569a818 | 906 | post: |
2963c343 | 907 | summary: Add a view to the video by its id |
1569a818 DG |
908 | tags: |
909 | - Video | |
1569a818 | 910 | parameters: |
3e9e6f2f | 911 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
912 | responses: |
913 | '204': | |
3e9e6f2f | 914 | $ref: '#/paths/~1users~1me/put/responses/204' |
6441981b RK |
915 | '/videos/{id}/watching': |
916 | put: | |
f50ab1c2 | 917 | summary: Set watching progress of a video by its id for a user |
6441981b RK |
918 | tags: |
919 | - Video | |
920 | security: | |
921 | - OAuth2: [] | |
922 | parameters: | |
923 | - $ref: '#/components/parameters/id2' | |
924 | requestBody: | |
925 | content: | |
926 | application/json: | |
927 | schema: | |
928 | $ref: '#/components/schemas/UserWatchingVideo' | |
929 | required: true | |
930 | responses: | |
931 | '204': | |
932 | $ref: '#/paths/~1users~1me/put/responses/204' | |
933 | /videos/ownership: | |
934 | get: | |
935 | summary: Get list of video ownership changes requests | |
936 | tags: | |
937 | - Video | |
938 | security: | |
939 | - OAuth2: [] | |
940 | parameters: | |
941 | - $ref: '#/components/parameters/id2' | |
942 | responses: | |
943 | '200': | |
944 | description: successful operation | |
945 | '/videos/ownership/{id}/accept': | |
946 | post: | |
947 | summary: Refuse ownership change request for video by its id | |
948 | tags: | |
949 | - Video | |
950 | security: | |
951 | - OAuth2: [] | |
952 | parameters: | |
953 | - $ref: '#/components/parameters/id2' | |
954 | responses: | |
955 | '204': | |
956 | $ref: '#/paths/~1users~1me/put/responses/204' | |
957 | '/videos/ownership/{id}/refuse': | |
958 | post: | |
959 | summary: Accept ownership change request for video by its id | |
960 | tags: | |
961 | - Video | |
962 | security: | |
963 | - OAuth2: [] | |
964 | parameters: | |
965 | - $ref: '#/components/parameters/id2' | |
966 | responses: | |
967 | '204': | |
968 | $ref: '#/paths/~1users~1me/put/responses/204' | |
969 | '/videos/{id}/give-ownership': | |
970 | post: | |
971 | summary: Request change of ownership for a video you own, by its id | |
972 | tags: | |
973 | - Video | |
974 | security: | |
975 | - OAuth2: [] | |
976 | parameters: | |
977 | - $ref: '#/components/parameters/id2' | |
978 | requestBody: | |
979 | required: true | |
980 | content: | |
981 | application/x-www-form-urlencoded: | |
982 | schema: | |
983 | type: object | |
984 | properties: | |
985 | username: | |
986 | type: string | |
987 | required: | |
988 | - username | |
989 | responses: | |
990 | '204': | |
991 | $ref: '#/paths/~1users~1me/put/responses/204' | |
992 | '400': | |
993 | description: 'Changing video ownership to a remote account is not supported yet' | |
c360c494 | 994 | /videos/upload: |
1569a818 | 995 | post: |
2963c343 | 996 | summary: Upload a video file with its metadata |
94ff4c23 | 997 | security: |
3e9e6f2f | 998 | - OAuth2: [] |
1569a818 DG |
999 | tags: |
1000 | - Video | |
1569a818 DG |
1001 | responses: |
1002 | '200': | |
1003 | description: successful operation | |
3e9e6f2f RK |
1004 | content: |
1005 | application/json: | |
1006 | schema: | |
1007 | $ref: '#/components/schemas/VideoUploadResponse' | |
1008 | requestBody: | |
1009 | content: | |
1010 | multipart/form-data: | |
1011 | schema: | |
1012 | type: object | |
1013 | properties: | |
1014 | videofile: | |
1015 | description: Video file | |
1016 | type: string | |
1017 | format: binary | |
1018 | channelId: | |
1019 | description: Channel id that will contain this video | |
1020 | type: number | |
1021 | thumbnailfile: | |
1022 | description: Video thumbnail file | |
1023 | type: string | |
1024 | previewfile: | |
1025 | description: Video preview file | |
1026 | type: string | |
8f9e8be1 RK |
1027 | privacy: |
1028 | $ref: '#/components/schemas/VideoPrivacy' | |
3e9e6f2f RK |
1029 | category: |
1030 | description: Video category | |
1031 | type: string | |
1032 | licence: | |
1033 | description: Video licence | |
1034 | type: string | |
1035 | language: | |
1036 | description: Video language | |
1037 | type: string | |
1038 | description: | |
1039 | description: Video description | |
1040 | type: string | |
1041 | waitTranscoding: | |
1042 | description: Whether or not we wait transcoding before publish the video | |
1043 | type: string | |
1044 | support: | |
1045 | description: Text describing how to support the video uploader | |
1046 | type: string | |
1047 | nsfw: | |
1048 | description: Whether or not this video contains sensitive content | |
1049 | type: string | |
1050 | name: | |
1051 | description: Video name | |
1052 | type: string | |
1053 | tags: | |
1054 | description: Video tags | |
1fd12c7c C |
1055 | type: array |
1056 | items: | |
1057 | type: string | |
3e9e6f2f RK |
1058 | commentsEnabled: |
1059 | description: Enable or disable comments for this video | |
1060 | type: string | |
1061 | scheduleUpdate: *ref_0 | |
1062 | required: | |
1063 | - videofile | |
1064 | - channelId | |
8f9e8be1 | 1065 | - name |
8f9e8be1 RK |
1066 | x-code-samples: |
1067 | - lang: Shell | |
1068 | source: | | |
1069 | ## DEPENDENCIES: httpie, jq | |
1070 | # pip install httpie | |
1071 | USERNAME="<your_username>" | |
1072 | PASSWORD="<your_password>" | |
1073 | FILE_PATH="<your_file_path>" | |
1074 | CHANNEL_ID="<your_channel_id>" | |
8f9e8be1 RK |
1075 | NAME="<video_name>" |
1076 | ||
1077 | API_PATH="https://peertube2.cpy.re/api/v1" | |
1078 | ## AUTH | |
1079 | client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id") | |
1080 | client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret") | |
1081 | token=$(http -b --form POST "$API_PATH/users/token" \ | |
1082 | client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \ | |
1083 | username=$USERNAME \ | |
1084 | password=$PASSWORD \ | |
1085 | | jq -r ".access_token") | |
1086 | ## VIDEO UPLOAD | |
1087 | http -b --form POST "$API_PATH/videos/upload" \ | |
1088 | videofile@$FILE_PATH \ | |
1089 | channelId=$CHANNEL_ID \ | |
1090 | name=$NAME \ | |
8f9e8be1 | 1091 | "Authorization:Bearer $token" |
c360c494 | 1092 | /videos/abuse: |
1569a818 | 1093 | get: |
2963c343 | 1094 | summary: Get list of reported video abuses |
94ff4c23 | 1095 | security: |
3e9e6f2f | 1096 | - OAuth2: [] |
1569a818 | 1097 | tags: |
5776f78e | 1098 | - Video Abuse |
44cb3b85 | 1099 | parameters: |
3e9e6f2f RK |
1100 | - $ref: '#/components/parameters/start' |
1101 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1102 | - $ref: '#/components/parameters/abusesSort' |
1569a818 DG |
1103 | responses: |
1104 | '200': | |
1105 | description: successful operation | |
3e9e6f2f RK |
1106 | content: |
1107 | application/json: | |
1108 | schema: | |
1109 | type: array | |
1110 | items: | |
1111 | $ref: '#/components/schemas/VideoAbuse' | |
1112 | '/videos/{id}/abuse': | |
1569a818 | 1113 | post: |
3e9e6f2f | 1114 | summary: 'Report an abuse, on a video by its id' |
94ff4c23 | 1115 | security: |
3e9e6f2f | 1116 | - OAuth2: [] |
1569a818 | 1117 | tags: |
5776f78e | 1118 | - Video Abuse |
1569a818 | 1119 | parameters: |
3e9e6f2f | 1120 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
1121 | responses: |
1122 | '204': | |
3e9e6f2f RK |
1123 | $ref: '#/paths/~1users~1me/put/responses/204' |
1124 | '/videos/{id}/blacklist': | |
1569a818 | 1125 | post: |
2963c343 | 1126 | summary: Put on blacklist a video by its id |
94ff4c23 | 1127 | security: |
3e9e6f2f RK |
1128 | - OAuth2: |
1129 | - admin | |
1130 | - moderator | |
1569a818 | 1131 | tags: |
5776f78e | 1132 | - Video Blacklist |
1569a818 | 1133 | parameters: |
3e9e6f2f | 1134 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
1135 | responses: |
1136 | '204': | |
3e9e6f2f | 1137 | $ref: '#/paths/~1users~1me/put/responses/204' |
1569a818 | 1138 | delete: |
2963c343 | 1139 | summary: Delete an entry of the blacklist of a video by its id |
94ff4c23 | 1140 | security: |
3e9e6f2f RK |
1141 | - OAuth2: |
1142 | - admin | |
1143 | - moderator | |
1569a818 | 1144 | tags: |
5776f78e | 1145 | - Video Blacklist |
1569a818 | 1146 | parameters: |
3e9e6f2f | 1147 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
1148 | responses: |
1149 | '204': | |
3e9e6f2f | 1150 | $ref: '#/paths/~1users~1me/put/responses/204' |
c360c494 | 1151 | /videos/blacklist: |
1569a818 | 1152 | get: |
2963c343 | 1153 | summary: Get list of videos on blacklist |
94ff4c23 | 1154 | security: |
3e9e6f2f RK |
1155 | - OAuth2: |
1156 | - admin | |
1157 | - moderator | |
1569a818 | 1158 | tags: |
5776f78e | 1159 | - Video Blacklist |
44cb3b85 | 1160 | parameters: |
3e9e6f2f RK |
1161 | - $ref: '#/components/parameters/start' |
1162 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1163 | - $ref: '#/components/parameters/blacklistsSort' |
1569a818 DG |
1164 | responses: |
1165 | '200': | |
1166 | description: successful operation | |
3e9e6f2f RK |
1167 | content: |
1168 | application/json: | |
1169 | schema: | |
1170 | type: array | |
1171 | items: | |
1172 | $ref: '#/components/schemas/VideoBlacklist' | |
48dce1c9 | 1173 | /video-channels: |
1569a818 | 1174 | get: |
2963c343 | 1175 | summary: Get list of video channels |
1569a818 | 1176 | tags: |
5776f78e | 1177 | - Video Channel |
44cb3b85 | 1178 | parameters: |
3e9e6f2f RK |
1179 | - $ref: '#/components/parameters/start' |
1180 | - $ref: '#/components/parameters/count' | |
1181 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
1182 | responses: |
1183 | '200': | |
1184 | description: successful operation | |
3e9e6f2f RK |
1185 | content: |
1186 | application/json: | |
1187 | schema: | |
1188 | type: array | |
1189 | items: | |
1190 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 1191 | post: |
2963c343 | 1192 | summary: Creates a video channel for the current user |
94ff4c23 | 1193 | security: |
3e9e6f2f | 1194 | - OAuth2: [] |
1569a818 | 1195 | tags: |
5776f78e | 1196 | - Video Channel |
1569a818 DG |
1197 | responses: |
1198 | '204': | |
3e9e6f2f RK |
1199 | $ref: '#/paths/~1users~1me/put/responses/204' |
1200 | requestBody: | |
1201 | $ref: '#/components/requestBodies/VideoChannelInput' | |
1202 | '/video-channels/{id}': | |
1569a818 | 1203 | get: |
2963c343 | 1204 | summary: Get a video channel by its id |
1569a818 | 1205 | tags: |
5776f78e | 1206 | - Video Channel |
1569a818 | 1207 | parameters: |
3e9e6f2f | 1208 | - $ref: '#/components/parameters/id3' |
1569a818 DG |
1209 | responses: |
1210 | '200': | |
1211 | description: successful operation | |
3e9e6f2f RK |
1212 | content: |
1213 | application/json: | |
1214 | schema: | |
1215 | $ref: '#/components/schemas/VideoChannel' | |
1569a818 | 1216 | put: |
2963c343 | 1217 | summary: Update a video channel by its id |
94ff4c23 | 1218 | security: |
3e9e6f2f | 1219 | - OAuth2: [] |
1569a818 | 1220 | tags: |
5776f78e | 1221 | - Video Channel |
1569a818 | 1222 | parameters: |
3e9e6f2f | 1223 | - $ref: '#/components/parameters/id3' |
1569a818 DG |
1224 | responses: |
1225 | '204': | |
3e9e6f2f RK |
1226 | $ref: '#/paths/~1users~1me/put/responses/204' |
1227 | requestBody: | |
1228 | $ref: '#/components/requestBodies/VideoChannelInput' | |
1569a818 | 1229 | delete: |
2963c343 | 1230 | summary: Delete a video channel by its id |
94ff4c23 | 1231 | security: |
3e9e6f2f | 1232 | - OAuth2: [] |
1569a818 | 1233 | tags: |
5776f78e | 1234 | - Video Channel |
1569a818 | 1235 | parameters: |
3e9e6f2f | 1236 | - $ref: '#/components/parameters/id3' |
cc918ac3 C |
1237 | responses: |
1238 | '204': | |
3e9e6f2f RK |
1239 | $ref: '#/paths/~1users~1me/put/responses/204' |
1240 | '/video-channels/{id}/videos': | |
cc918ac3 | 1241 | get: |
2963c343 | 1242 | summary: Get videos of a video channel by its id |
cc918ac3 | 1243 | tags: |
5776f78e | 1244 | - Video Channel |
cc918ac3 | 1245 | parameters: |
3e9e6f2f | 1246 | - $ref: '#/components/parameters/id3' |
1569a818 | 1247 | responses: |
cc918ac3 | 1248 | '200': |
1569a818 | 1249 | description: successful operation |
3e9e6f2f RK |
1250 | content: |
1251 | application/json: | |
1252 | schema: | |
1253 | $ref: '#/components/schemas/Video' | |
1254 | '/accounts/{name}/video-channels': | |
6b738c7a | 1255 | get: |
2963c343 | 1256 | summary: Get video channels of an account by its name |
6b738c7a | 1257 | tags: |
5776f78e | 1258 | - Video Channel |
6b738c7a | 1259 | parameters: |
3e9e6f2f | 1260 | - $ref: '#/components/parameters/name' |
6b738c7a C |
1261 | responses: |
1262 | '200': | |
1263 | description: successful operation | |
3e9e6f2f RK |
1264 | content: |
1265 | application/json: | |
1266 | schema: | |
1267 | type: array | |
1268 | items: | |
1269 | $ref: '#/components/schemas/VideoChannel' | |
1270 | '/videos/{id}/comment-threads': | |
1569a818 | 1271 | get: |
2963c343 | 1272 | summary: Get the comment threads of a video by its id |
1569a818 | 1273 | tags: |
5776f78e | 1274 | - Video Comment |
1569a818 | 1275 | parameters: |
3e9e6f2f RK |
1276 | - $ref: '#/components/parameters/id2' |
1277 | - $ref: '#/components/parameters/start' | |
1278 | - $ref: '#/components/parameters/count' | |
1279 | - $ref: '#/components/parameters/sort' | |
1569a818 DG |
1280 | responses: |
1281 | '200': | |
1282 | description: successful operation | |
3e9e6f2f RK |
1283 | content: |
1284 | application/json: | |
1285 | schema: | |
1286 | $ref: '#/components/schemas/CommentThreadResponse' | |
1569a818 | 1287 | post: |
3e9e6f2f | 1288 | summary: 'Creates a comment thread, on a video by its id' |
94ff4c23 | 1289 | security: |
3e9e6f2f | 1290 | - OAuth2: [] |
1569a818 | 1291 | tags: |
5776f78e | 1292 | - Video Comment |
1569a818 | 1293 | parameters: |
3e9e6f2f | 1294 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
1295 | responses: |
1296 | '200': | |
1297 | description: successful operation | |
3e9e6f2f RK |
1298 | content: |
1299 | application/json: | |
1300 | schema: | |
1301 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
1302 | '/videos/{id}/comment-threads/{threadId}': | |
1569a818 | 1303 | get: |
3e9e6f2f | 1304 | summary: 'Get the comment thread by its id, of a video by its id' |
1569a818 | 1305 | tags: |
5776f78e | 1306 | - Video Comment |
1569a818 | 1307 | parameters: |
3e9e6f2f RK |
1308 | - $ref: '#/components/parameters/id2' |
1309 | - name: threadId | |
1310 | in: path | |
1311 | required: true | |
1312 | description: The thread id (root comment id) | |
1313 | schema: | |
1314 | type: number | |
1569a818 DG |
1315 | responses: |
1316 | '200': | |
1317 | description: successful operation | |
3e9e6f2f RK |
1318 | content: |
1319 | application/json: | |
1320 | schema: | |
1321 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
1322 | '/videos/{id}/comments/{commentId}': | |
1569a818 | 1323 | post: |
3e9e6f2f | 1324 | summary: 'Creates a comment in a comment thread by its id, of a video by its id' |
94ff4c23 | 1325 | security: |
3e9e6f2f | 1326 | - OAuth2: [] |
1569a818 | 1327 | tags: |
5776f78e | 1328 | - Video Comment |
1569a818 | 1329 | parameters: |
3e9e6f2f RK |
1330 | - $ref: '#/components/parameters/id2' |
1331 | - $ref: '#/components/parameters/commentId' | |
1569a818 DG |
1332 | responses: |
1333 | '200': | |
1334 | description: successful operation | |
3e9e6f2f RK |
1335 | content: |
1336 | application/json: | |
1337 | schema: | |
1338 | $ref: '#/components/schemas/CommentThreadPostResponse' | |
1569a818 | 1339 | delete: |
3e9e6f2f | 1340 | summary: 'Delete a comment in a comment therad by its id, of a video by its id' |
94ff4c23 | 1341 | security: |
3e9e6f2f | 1342 | - OAuth2: [] |
1569a818 | 1343 | tags: |
5776f78e | 1344 | - Video Comment |
1569a818 | 1345 | parameters: |
3e9e6f2f RK |
1346 | - $ref: '#/components/parameters/id2' |
1347 | - $ref: '#/components/parameters/commentId' | |
1569a818 DG |
1348 | responses: |
1349 | '204': | |
3e9e6f2f RK |
1350 | $ref: '#/paths/~1users~1me/put/responses/204' |
1351 | '/videos/{id}/rate': | |
1569a818 | 1352 | put: |
2963c343 | 1353 | summary: Vote for a video by its id |
94ff4c23 | 1354 | security: |
3e9e6f2f | 1355 | - OAuth2: [] |
1569a818 | 1356 | tags: |
5776f78e | 1357 | - Video Rate |
1569a818 | 1358 | parameters: |
3e9e6f2f | 1359 | - $ref: '#/components/parameters/id2' |
1569a818 DG |
1360 | responses: |
1361 | '204': | |
3e9e6f2f | 1362 | $ref: '#/paths/~1users~1me/put/responses/204' |
fb72c193 DL |
1363 | /search/videos: |
1364 | get: | |
1365 | tags: | |
1366 | - Search | |
2963c343 | 1367 | summary: Get the videos corresponding to a given query |
fb72c193 | 1368 | parameters: |
3e9e6f2f RK |
1369 | - $ref: '#/components/parameters/start' |
1370 | - $ref: '#/components/parameters/count' | |
fd5af7a2 | 1371 | - $ref: '#/components/parameters/videosSearchSort' |
655b5490 | 1372 | - name: search |
fb72c193 DL |
1373 | in: query |
1374 | required: true | |
3e9e6f2f RK |
1375 | description: String to search |
1376 | schema: | |
1377 | type: string | |
fb72c193 DL |
1378 | responses: |
1379 | '200': | |
1380 | description: successful operation | |
3e9e6f2f RK |
1381 | content: |
1382 | application/json: | |
1383 | schema: | |
1569a818 DG |
1384 | type: array |
1385 | items: | |
3e9e6f2f RK |
1386 | $ref: '#/components/schemas/Video' |
1387 | servers: | |
6441981b RK |
1388 | - url: 'https://peertube.cpy.re/api/v1' |
1389 | description: Live Test Server (live data - stable version) | |
8f9e8be1 | 1390 | - url: 'https://peertube2.cpy.re/api/v1' |
6441981b RK |
1391 | description: Live Test Server (live data - bleeding edge version) |
1392 | - url: 'https://peertube3.cpy.re/api/v1' | |
1393 | description: Live Test Server (live data - bleeding edge version) | |
3e9e6f2f RK |
1394 | components: |
1395 | parameters: | |
1396 | start: | |
1397 | name: start | |
1398 | in: query | |
1399 | required: false | |
1400 | description: Offset | |
1401 | schema: | |
1569a818 | 1402 | type: number |
3e9e6f2f RK |
1403 | count: |
1404 | name: count | |
1405 | in: query | |
1406 | required: false | |
1407 | description: Number of items | |
1408 | schema: | |
1569a818 | 1409 | type: number |
3e9e6f2f RK |
1410 | sort: |
1411 | name: sort | |
1412 | in: query | |
1413 | required: false | |
1414 | description: Sort column (-createdAt for example) | |
1415 | schema: | |
1416 | type: string | |
fd5af7a2 RK |
1417 | videosSort: |
1418 | name: sort | |
1419 | in: query | |
1420 | required: false | |
1421 | description: Sort videos by criteria | |
1422 | schema: | |
1423 | type: string | |
1424 | enum: | |
1425 | - -name | |
1426 | - -duration | |
1427 | - -createdAt | |
1428 | - -publishedAt | |
1429 | - -views | |
1430 | - -likes | |
1431 | - -trending | |
1432 | videosSearchSort: | |
1433 | name: sort | |
1434 | in: query | |
1435 | required: false | |
1436 | description: Sort videos by criteria | |
1437 | schema: | |
1438 | type: string | |
1439 | enum: | |
1440 | - -name | |
1441 | - -duration | |
1442 | - -createdAt | |
1443 | - -publishedAt | |
1444 | - -views | |
1445 | - -likes | |
1446 | - -match | |
1447 | blacklistsSort: | |
1448 | name: sort | |
1449 | in: query | |
1450 | required: false | |
1451 | description: Sort blacklists by criteria | |
1452 | schema: | |
1453 | type: string | |
1454 | enum: | |
1455 | - -id | |
1456 | - -name | |
1457 | - -duration | |
1458 | - -views | |
1459 | - -likes | |
1460 | - -dislikes | |
1461 | - -uuid | |
1462 | - -createdAt | |
1463 | usersSort: | |
1464 | name: sort | |
1465 | in: query | |
1466 | required: false | |
1467 | description: Sort users by criteria | |
1468 | schema: | |
1469 | type: string | |
1470 | enum: | |
1471 | - -id | |
1472 | - -username | |
1473 | - -createdAt | |
1474 | abusesSort: | |
1475 | name: sort | |
1476 | in: query | |
1477 | required: false | |
1478 | description: Sort abuses by criteria | |
1479 | schema: | |
1480 | type: string | |
1481 | enum: | |
1482 | - -id | |
1483 | - -createdAt | |
1484 | - -state | |
3e9e6f2f RK |
1485 | name: |
1486 | name: name | |
1487 | in: path | |
1488 | required: true | |
1489 | description: >- | |
1490 | The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for | |
1491 | example) | |
1492 | schema: | |
1493 | type: string | |
1494 | id: | |
1495 | name: id | |
1496 | in: path | |
1497 | required: true | |
1498 | description: The user id | |
1499 | schema: | |
1569a818 | 1500 | type: number |
3e9e6f2f RK |
1501 | id2: |
1502 | name: id | |
1503 | in: path | |
1504 | required: true | |
1505 | description: The video id or uuid | |
1506 | schema: | |
1507 | type: string | |
1508 | id3: | |
1509 | name: id | |
1510 | in: path | |
1511 | required: true | |
1512 | description: The video channel id or uuid | |
1513 | schema: | |
1514 | type: string | |
1515 | commentId: | |
1516 | name: threadId | |
1517 | in: path | |
1518 | required: true | |
1519 | description: The comment id | |
1520 | schema: | |
c360c494 | 1521 | type: number |
fd5af7a2 RK |
1522 | categoryOneOf: |
1523 | name: categoryOneOf | |
1524 | in: query | |
1525 | required: false | |
1526 | description: category id of the video | |
1527 | schema: | |
1528 | oneOf: | |
1529 | - type: number | |
1530 | - type: array | |
1531 | items: | |
1532 | type: number | |
2beb9895 RK |
1533 | style: form |
1534 | explode: false | |
fd5af7a2 RK |
1535 | tagsOneOf: |
1536 | name: tagsOneOf | |
1537 | in: query | |
1538 | required: false | |
1539 | description: tag(s) of the video | |
1540 | schema: | |
1541 | oneOf: | |
1542 | - type: string | |
1543 | - type: array | |
1544 | items: | |
1545 | type: string | |
2beb9895 RK |
1546 | style: form |
1547 | explode: false | |
fd5af7a2 RK |
1548 | tagsAllOf: |
1549 | name: tagsAllOf | |
1550 | in: query | |
1551 | required: false | |
1552 | description: tag(s) of the video, where all should be present in the video | |
1553 | schema: | |
1554 | oneOf: | |
1555 | - type: string | |
1556 | - type: array | |
1557 | items: | |
1558 | type: string | |
2beb9895 RK |
1559 | style: form |
1560 | explode: false | |
fd5af7a2 RK |
1561 | languageOneOf: |
1562 | name: languageOneOf | |
1563 | in: query | |
1564 | required: false | |
1565 | description: language id of the video | |
1566 | schema: | |
1567 | oneOf: | |
2beb9895 | 1568 | - type: string |
fd5af7a2 RK |
1569 | - type: array |
1570 | items: | |
2beb9895 RK |
1571 | type: string |
1572 | style: form | |
1573 | explode: false | |
fd5af7a2 RK |
1574 | licenceOneOf: |
1575 | name: licenceOneOf | |
1576 | in: query | |
1577 | required: false | |
1578 | description: licence id of the video | |
1579 | schema: | |
1580 | oneOf: | |
1581 | - type: number | |
1582 | - type: array | |
1583 | items: | |
1584 | type: number | |
2beb9895 RK |
1585 | style: form |
1586 | explode: false | |
fd5af7a2 RK |
1587 | nsfw: |
1588 | name: nsfw | |
1589 | in: query | |
1590 | required: false | |
1591 | description: whether to include nsfw videos, if any | |
1592 | schema: | |
1593 | type: string | |
1594 | enum: | |
1595 | - 'true' | |
1596 | - 'false' | |
1597 | filter: | |
1598 | name: filter | |
1599 | in: query | |
1600 | required: false | |
1601 | description: > | |
1602 | Special filters (local for instance) which might require special rights: | |
1603 | * `local` - only videos local to the instance | |
1604 | * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges) | |
1605 | schema: | |
1606 | type: string | |
1607 | enum: | |
1608 | - local | |
1609 | - all-local | |
e76d5784 RK |
1610 | subscriptionsUris: |
1611 | name: uris | |
1612 | in: query | |
1613 | required: true | |
1614 | description: list of uris to check if each is part of the user subscriptions | |
1615 | schema: | |
1616 | type: array | |
1617 | items: | |
1618 | type: string | |
3e9e6f2f RK |
1619 | requestBodies: |
1620 | VideoChannelInput: | |
1621 | content: | |
1622 | application/json: | |
1623 | schema: | |
1624 | $ref: '#/components/schemas/VideoChannelInput' | |
1625 | securitySchemes: | |
1626 | OAuth2: | |
1627 | description: > | |
1628 | In the header: *Authorization: Bearer <token\>* | |
1629 | ||
1630 | ||
1631 | Authenticating via OAuth requires the following steps: | |
1632 | ||
1633 | ||
1634 | - Have an account with sufficient authorization levels | |
1635 | ||
1636 | - [Generate](https://docs.joinpeertube.org/lang/en/devdocs/rest.html) a | |
1637 | Bearer Token | |
1638 | ||
1639 | - Make Authenticated Requests | |
1640 | type: oauth2 | |
1641 | flows: | |
1642 | password: | |
1643 | tokenUrl: 'https://peertube.example.com/api/v1/users/token' | |
1644 | scopes: | |
1645 | admin: Admin scope | |
1646 | moderator: Moderator scope | |
1647 | user: User scope | |
1648 | schemas: | |
1649 | VideoConstantNumber: | |
1650 | properties: | |
1651 | id: | |
1652 | type: number | |
1653 | label: | |
1654 | type: string | |
1655 | VideoConstantString: | |
1656 | properties: | |
1657 | id: | |
1658 | type: string | |
1659 | label: | |
1660 | type: string | |
1661 | VideoPrivacy: | |
1662 | type: string | |
1663 | enum: | |
1664 | - Public | |
1665 | - Unlisted | |
1666 | - Private | |
1667 | Video: | |
1668 | properties: | |
1669 | id: | |
1670 | type: number | |
1671 | uuid: | |
1672 | type: string | |
1673 | createdAt: | |
1674 | type: string | |
1675 | publishedAt: | |
1676 | type: string | |
1677 | updatedAt: | |
1678 | type: string | |
1679 | category: | |
1680 | $ref: '#/components/schemas/VideoConstantNumber' | |
1681 | licence: | |
1682 | $ref: '#/components/schemas/VideoConstantNumber' | |
1683 | language: | |
1684 | $ref: '#/components/schemas/VideoConstantString' | |
1685 | privacy: | |
1686 | $ref: '#/components/schemas/VideoPrivacy' | |
1687 | description: | |
1688 | type: string | |
1689 | duration: | |
1690 | type: number | |
1691 | isLocal: | |
1692 | type: boolean | |
1693 | name: | |
1694 | type: string | |
1695 | thumbnailPath: | |
1696 | type: string | |
1697 | previewPath: | |
1698 | type: string | |
1699 | embedPath: | |
1700 | type: string | |
1701 | views: | |
1702 | type: number | |
1703 | likes: | |
1704 | type: number | |
1705 | dislikes: | |
1706 | type: number | |
1707 | nsfw: | |
1708 | type: boolean | |
1709 | account: | |
1710 | type: object | |
1711 | properties: | |
1712 | name: | |
1713 | type: string | |
1714 | displayName: | |
1715 | type: string | |
1716 | url: | |
1717 | type: string | |
1718 | host: | |
1719 | type: string | |
1720 | avatar: | |
1721 | $ref: '#/components/schemas/Avatar' | |
1722 | VideoAbuse: | |
1723 | properties: | |
1724 | id: | |
1725 | type: number | |
1726 | reason: | |
1727 | type: string | |
1728 | reporterAccount: | |
1729 | $ref: '#/components/schemas/Account' | |
1730 | video: | |
1731 | type: object | |
1732 | properties: | |
1733 | id: | |
1734 | type: number | |
1735 | name: | |
1736 | type: string | |
1737 | uuid: | |
1738 | type: string | |
1739 | url: | |
1740 | type: string | |
1741 | createdAt: | |
1742 | type: string | |
1743 | VideoBlacklist: | |
1744 | properties: | |
1745 | id: | |
1746 | type: number | |
1747 | videoId: | |
1748 | type: number | |
1749 | createdAt: | |
1750 | type: string | |
1751 | updatedAt: | |
1752 | type: string | |
1753 | name: | |
1754 | type: string | |
1755 | uuid: | |
1756 | type: string | |
1757 | description: | |
1758 | type: string | |
1759 | duration: | |
1760 | type: number | |
1761 | views: | |
1762 | type: number | |
1763 | likes: | |
1764 | type: number | |
1765 | dislikes: | |
1766 | type: number | |
1767 | nsfw: | |
1768 | type: boolean | |
1769 | VideoChannel: | |
1770 | properties: | |
1771 | displayName: | |
1772 | type: string | |
1773 | description: | |
1774 | type: string | |
1775 | isLocal: | |
1776 | type: boolean | |
1777 | ownerAccount: | |
1778 | type: object | |
1779 | properties: | |
1780 | id: | |
1781 | type: number | |
1782 | uuid: | |
1783 | type: string | |
1784 | VideoComment: | |
1785 | properties: | |
1786 | id: | |
1787 | type: number | |
1788 | url: | |
1789 | type: string | |
1790 | text: | |
1791 | type: string | |
1792 | threadId: | |
1793 | type: number | |
1794 | inReplyToCommentId: | |
1795 | type: number | |
1796 | videoId: | |
1797 | type: number | |
1798 | createdAt: | |
1799 | type: string | |
1800 | updatedAt: | |
1801 | type: string | |
1802 | totalReplies: | |
1803 | type: number | |
1804 | account: | |
1805 | $ref: '#/components/schemas/Account' | |
1806 | VideoCommentThreadTree: | |
1807 | properties: | |
1808 | comment: | |
1809 | $ref: '#/components/schemas/VideoComment' | |
1810 | children: | |
1811 | type: array | |
1812 | items: | |
1813 | $ref: '#/components/schemas/VideoCommentThreadTree' | |
1814 | Avatar: | |
1815 | properties: | |
1816 | path: | |
1817 | type: string | |
1818 | createdAt: | |
1819 | type: string | |
1820 | updatedAt: | |
1821 | type: string | |
1822 | Actor: | |
1823 | properties: | |
1824 | id: | |
1825 | type: number | |
1826 | uuid: | |
1827 | type: string | |
1828 | url: | |
1829 | type: string | |
1830 | name: | |
1831 | type: string | |
1832 | host: | |
1833 | type: string | |
1834 | followingCount: | |
1835 | type: number | |
1836 | followersCount: | |
1837 | type: number | |
1838 | createdAt: | |
1839 | type: string | |
1840 | updatedAt: | |
1841 | type: string | |
1842 | avatar: | |
1843 | $ref: '#/components/schemas/Avatar' | |
1844 | Account: | |
1845 | allOf: | |
1846 | - $ref: '#/components/schemas/Actor' | |
1847 | - properties: | |
1848 | displayName: | |
1849 | type: string | |
1850 | User: | |
1851 | properties: | |
1852 | id: | |
1853 | type: number | |
1854 | username: | |
1855 | type: string | |
1856 | email: | |
1857 | type: string | |
1858 | displayNSFW: | |
1859 | type: boolean | |
1860 | autoPlayVideo: | |
1861 | type: boolean | |
1862 | role: | |
1863 | type: string | |
1864 | enum: | |
1865 | - User | |
1866 | - Moderator | |
1867 | - Administrator | |
1868 | videoQuota: | |
1869 | type: number | |
1870 | createdAt: | |
1871 | type: string | |
1872 | account: | |
1873 | $ref: '#/components/schemas/Account' | |
1874 | videoChannels: | |
1875 | type: array | |
1876 | items: | |
1877 | $ref: '#/components/schemas/VideoChannel' | |
6441981b RK |
1878 | UserWatchingVideo: |
1879 | properties: | |
1880 | currentTime: | |
1881 | type: number | |
3e9e6f2f RK |
1882 | ServerConfig: |
1883 | properties: | |
1884 | signup: | |
1885 | type: object | |
1886 | properties: | |
1887 | allowed: | |
1888 | type: boolean | |
1889 | transcoding: | |
1890 | type: object | |
1891 | properties: | |
1892 | enabledResolutions: | |
1893 | type: array | |
1894 | items: | |
1895 | type: number | |
1896 | avatar: | |
1897 | type: object | |
1898 | properties: | |
1899 | file: | |
1900 | type: object | |
1901 | properties: | |
1902 | size: | |
1903 | type: object | |
1904 | properties: | |
1905 | max: | |
1906 | type: number | |
1907 | extensions: | |
1908 | type: array | |
1909 | items: | |
1910 | type: string | |
1911 | video: | |
1912 | type: object | |
1913 | properties: | |
1914 | file: | |
1915 | type: object | |
1916 | properties: | |
1917 | extensions: | |
1918 | type: array | |
1919 | items: | |
1920 | type: string | |
1921 | Follow: | |
1922 | properties: | |
1923 | id: | |
1924 | type: number | |
1925 | follower: | |
1926 | $ref: '#/components/schemas/Actor' | |
1927 | following: | |
1928 | $ref: '#/components/schemas/Actor' | |
1929 | score: | |
1930 | type: number | |
1931 | state: | |
1932 | type: string | |
1933 | enum: | |
1934 | - pending | |
1935 | - accepted | |
1936 | createdAt: | |
1937 | type: string | |
1938 | updatedAt: | |
1939 | type: string | |
1940 | Job: | |
1941 | properties: | |
1942 | id: | |
1943 | type: number | |
1944 | state: | |
1945 | type: string | |
1946 | enum: | |
1947 | - pending | |
1948 | - processing | |
1949 | - error | |
1950 | - success | |
1951 | category: | |
1952 | type: string | |
1953 | enum: | |
1954 | - transcoding | |
1955 | - activitypub-http | |
1956 | handlerName: | |
1957 | type: string | |
1958 | handlerInputData: | |
1959 | type: string | |
1960 | createdAt: | |
1961 | type: string | |
1962 | updatedAt: | |
1963 | type: string | |
1964 | AddUserResponse: | |
1965 | properties: | |
1966 | id: | |
1967 | type: number | |
1968 | uuid: | |
1969 | type: string | |
1970 | VideoUploadResponse: | |
1971 | properties: | |
1972 | video: | |
1973 | type: object | |
1974 | properties: | |
1975 | id: | |
1976 | type: number | |
1977 | uuid: | |
1978 | type: string | |
1979 | CommentThreadResponse: | |
1980 | properties: | |
1981 | total: | |
1982 | type: number | |
1983 | data: | |
1984 | type: array | |
1985 | items: | |
1986 | $ref: '#/components/schemas/VideoComment' | |
1987 | CommentThreadPostResponse: | |
1988 | properties: | |
1989 | comment: | |
1990 | $ref: '#/components/schemas/VideoComment' | |
1991 | AddUser: | |
1992 | properties: | |
1993 | username: | |
1994 | type: string | |
1995 | description: 'The user username ' | |
1996 | password: | |
1997 | type: string | |
1998 | description: 'The user password ' | |
1999 | email: | |
2000 | type: string | |
2001 | description: 'The user email ' | |
2002 | videoQuota: | |
2003 | type: string | |
2004 | description: 'The user videoQuota ' | |
2005 | role: | |
0f490230 RK |
2006 | type: integer |
2007 | format: int32 | |
2008 | enum: | |
2009 | - 0 | |
2010 | - 1 | |
2011 | - 2 | |
3e9e6f2f RK |
2012 | description: 'The user role ' |
2013 | required: | |
2014 | - username | |
2015 | - password | |
2016 | ||
2017 | - videoQuota | |
2018 | - role | |
2019 | UpdateUser: | |
2020 | properties: | |
2021 | id: | |
2022 | type: string | |
2023 | description: 'The user id ' | |
2024 | email: | |
2025 | type: string | |
2026 | description: 'The updated email of the user ' | |
2027 | videoQuota: | |
2028 | type: string | |
2029 | description: 'The updated videoQuota of the user ' | |
2030 | role: | |
2031 | type: string | |
2032 | description: 'The updated role of the user ' | |
2033 | required: | |
2034 | - id | |
2035 | ||
2036 | - videoQuota | |
2037 | - role | |
2038 | UpdateMe: | |
2039 | properties: | |
2040 | password: | |
2041 | type: string | |
2042 | description: 'Your new password ' | |
2043 | email: | |
2044 | type: string | |
2045 | description: 'Your new email ' | |
2046 | displayNSFW: | |
2047 | type: string | |
2048 | description: 'Your new displayNSFW ' | |
2049 | autoPlayVideo: | |
2050 | type: string | |
2051 | description: 'Your new autoPlayVideo ' | |
2052 | required: | |
2053 | - password | |
2054 | ||
2055 | - displayNSFW | |
2056 | - autoPlayVideo | |
2057 | GetMeVideoRating: | |
2058 | properties: | |
2059 | id: | |
2060 | type: string | |
2061 | description: 'Id of the video ' | |
2062 | rating: | |
2063 | type: number | |
2064 | description: 'Rating of the video ' | |
2065 | required: | |
2066 | - id | |
2067 | - rating | |
2068 | RegisterUser: | |
2069 | properties: | |
2070 | username: | |
2071 | type: string | |
2072 | description: 'The username of the user ' | |
2073 | password: | |
2074 | type: string | |
2075 | description: 'The password of the user ' | |
2076 | email: | |
2077 | type: string | |
2078 | description: 'The email of the user ' | |
2079 | required: | |
2080 | - username | |
2081 | - password | |
2082 | ||
2083 | VideoChannelInput: | |
2084 | properties: | |
2085 | name: | |
2086 | type: string | |
2087 | description: | |
2088 | type: string | |
1569a818 | 2089 |