diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-11-13 23:27:58 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2018-11-13 23:32:55 +0100 |
commit | 2963c3432f3967675530162b1bf87b549cc124f5 (patch) | |
tree | 9740118cc83f43ed8e3f153fab6d2e430081e32f /support/doc/api/openapi.yaml | |
parent | be0f59b4eec3c2c4dcd151e2b174be39dff1568e (diff) | |
download | PeerTube-2963c3432f3967675530162b1bf87b549cc124f5.tar.gz PeerTube-2963c3432f3967675530162b1bf87b549cc124f5.tar.zst PeerTube-2963c3432f3967675530162b1bf87b549cc124f5.zip |
updated REST API documentation
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r-- | support/doc/api/openapi.yaml | 168 |
1 files changed, 155 insertions, 13 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index f3520a7b1..e88c05333 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -2,24 +2,105 @@ swagger: '2.0' | |||
2 | info: | 2 | info: |
3 | title: PeerTube | 3 | title: PeerTube |
4 | version: 1.1.0-alpha.2 | 4 | version: 1.1.0-alpha.2 |
5 | description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular. | 5 | contact: |
6 | host: peertube.example.com | 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' | ||
13 | description: | | ||
14 | # Introduction | ||
15 | The PeerTube API is built on HTTP(S). Our API is RESTful. It has predictable | ||
16 | resource URLs. It returns HTTP response codes to indicate errors. It also | ||
17 | accepts and returns JSON in the HTTP body. You can use your favorite | ||
18 | HTTP/REST library for your programming language to use PeerTube. No official | ||
19 | SDK is currently provided. | ||
20 | |||
21 | # Authentication | ||
22 | When you sign up for an account, you are given the possibility to generate | ||
23 | sessions, and authenticate using this session token. One session token can | ||
24 | currently be used at a time. | ||
7 | securityDefinitions: | 25 | securityDefinitions: |
8 | OAuth2: | 26 | OAuth2: |
9 | description: 'In the header: *Authorization: Bearer mytoken*' | 27 | description: | |
28 | In the header: *Authorization: Bearer <token\>* | ||
29 | |||
30 | Authenticating via OAuth requires the following steps: | ||
31 | |||
32 | - Have an account with sufficient authorization levels | ||
33 | - [Generate](https://docs.joinpeertube.org/lang/en/devdocs/rest.html) a Bearer Token | ||
34 | - Make Authenticated Requests | ||
10 | type: oauth2 | 35 | type: oauth2 |
11 | flow: password | 36 | flow: password |
12 | # Not implemented yet | 37 | # Not implemented yet |
13 | # authorizationUrl: https://example.com/oauth/authorize | 38 | # authorizationUrl: https://example.com/oauth/authorize |
14 | tokenUrl: https://peertube.example.com/api/v1/users/token | 39 | tokenUrl: https://peertube.example.com/api/v1/users/token |
40 | scopes: | ||
41 | admin: Admin scope | ||
42 | moderator: Moderator scope | ||
43 | user: User scope | ||
15 | basePath: '/api/v1' | 44 | basePath: '/api/v1' |
16 | schemes: | 45 | schemes: |
17 | - https | 46 | - https |
47 | host: peertube.example.com | ||
48 | x-servers: | ||
49 | - url: 'https://peertube.cpy.re/api/v1' | ||
50 | description: Live Server | ||
51 | produces: | ||
52 | - application/json; charset=utf-8 | ||
53 | consumes: | ||
54 | - application/json | ||
55 | tags: | ||
56 | - name: Accounts | ||
57 | description: | | ||
58 | Using some features of PeerTube require authentication, for which Accounts | ||
59 | provide different levels of permission as well as associated user information. | ||
60 | Accounts also encompass remote accounts discovered across the federation. | ||
61 | - name: Config | ||
62 | description: | | ||
63 | Each server exposes public information regarding supported videos and options. | ||
64 | - name: Feeds | ||
65 | description: | | ||
66 | Feeds of videos and feeds of comments allow to see updates and get them in | ||
67 | an aggregator or script of your choice. | ||
68 | - name: Job | ||
69 | description: | | ||
70 | Jobs are long-running tasks enqueued and processed by the instance itself. | ||
71 | No additional worker registration is currently available. | ||
72 | - name: ServerFollowing | ||
73 | description: | | ||
74 | Managing servers which the instance interacts with is crucial to the concept | ||
75 | of federation in PeerTube and external video indexation. The PeerTube server | ||
76 | then deals with inter-server ActivityPub operations and propagates | ||
77 | information across its social graph by posting activities to actors' inbox | ||
78 | endpoints. | ||
79 | - name: VideoAbuse | ||
80 | description: | | ||
81 | Video abuses deal with reports of local or remote videos alike. | ||
82 | - name: Video | ||
83 | description: | | ||
84 | Operations dealing with listing, uploading, fetching or modifying videos. | ||
85 | - name: Search | ||
86 | description: | | ||
87 | The search helps to find _videos_ from within the instance and beyond. | ||
88 | Videos from other instances federated by the instance (that is, instances | ||
89 | followed by the instance) can be found via keywords and other criteria of | ||
90 | the advanced search. | ||
91 | - name: VideoComment | ||
92 | description: | | ||
93 | Operations dealing with comments to a video. Comments are organized in threads. | ||
94 | - name: VideoChannel | ||
95 | description: | | ||
96 | Operations dealing with creation, modification and video listing of a user's | ||
97 | channels. | ||
18 | paths: | 98 | paths: |
19 | '/accounts/{name}': | 99 | '/accounts/{name}': |
20 | get: | 100 | get: |
21 | tags: | 101 | tags: |
22 | - Accounts | 102 | - Accounts |
103 | summary: Get the account by name | ||
23 | consumes: | 104 | consumes: |
24 | - application/json | 105 | - application/json |
25 | produces: | 106 | produces: |
@@ -38,6 +119,8 @@ paths: | |||
38 | get: | 119 | get: |
39 | tags: | 120 | tags: |
40 | - Accounts | 121 | - Accounts |
122 | - Video | ||
123 | summary: Get videos for an account, provided the name of that account | ||
41 | consumes: | 124 | consumes: |
42 | - application/json | 125 | - application/json |
43 | produces: | 126 | produces: |
@@ -49,14 +132,24 @@ paths: | |||
49 | description: successful operation | 132 | description: successful operation |
50 | schema: | 133 | schema: |
51 | $ref: '#/definitions/Video' | 134 | $ref: '#/definitions/Video' |
135 | x-code-samples: | ||
136 | - lang: JavaScript | ||
137 | source: | | ||
138 | fetch('https://peertube.cpy.re/api/v1/accounts/{name}/videos') | ||
139 | .then(function(response) { | ||
140 | return response.json() | ||
141 | }).then(function(data) { | ||
142 | console.log(data) | ||
143 | }) | ||
52 | /accounts: | 144 | /accounts: |
53 | get: | 145 | get: |
54 | tags: | 146 | tags: |
55 | - Accounts | 147 | - Accounts |
148 | summary: Get all accounts | ||
56 | consumes: | 149 | consumes: |
57 | - application/json | 150 | - application/json |
58 | produces: | 151 | produces: |
59 | - application/json | 152 | - application/jsonhttps://peertube.cpy.re/api/v1 |
60 | responses: | 153 | responses: |
61 | '200': | 154 | '200': |
62 | description: successful operation | 155 | description: successful operation |
@@ -68,6 +161,7 @@ paths: | |||
68 | get: | 161 | get: |
69 | tags: | 162 | tags: |
70 | - Config | 163 | - Config |
164 | summary: Get the configuration of the server | ||
71 | consumes: | 165 | consumes: |
72 | - application/json | 166 | - application/json |
73 | produces: | 167 | produces: |
@@ -79,6 +173,7 @@ paths: | |||
79 | $ref: '#/definitions/ServerConfig' | 173 | $ref: '#/definitions/ServerConfig' |
80 | /feeds/videos.{format}: | 174 | /feeds/videos.{format}: |
81 | get: | 175 | get: |
176 | summary: Get the feed of videos for the server, with optional filter by account name or id | ||
82 | tags: | 177 | tags: |
83 | - Feeds | 178 | - Feeds |
84 | produces: | 179 | produces: |
@@ -108,8 +203,9 @@ paths: | |||
108 | description: successful operation | 203 | description: successful operation |
109 | /jobs: | 204 | /jobs: |
110 | get: | 205 | get: |
206 | summary: Get list of jobs | ||
111 | security: | 207 | security: |
112 | - OAuth2: [ ] | 208 | - OAuth2: [ admin ] |
113 | tags: | 209 | tags: |
114 | - Job | 210 | - Job |
115 | consumes: | 211 | consumes: |
@@ -135,9 +231,10 @@ paths: | |||
135 | '/server/following/{host}': | 231 | '/server/following/{host}': |
136 | delete: | 232 | delete: |
137 | security: | 233 | security: |
138 | - OAuth2: [ ] | 234 | - OAuth2: [ admin ] |
139 | tags: | 235 | tags: |
140 | - ServerFollowing | 236 | - ServerFollowing |
237 | summary: Unfollow a server by hostname | ||
141 | consumes: | 238 | consumes: |
142 | - application/json | 239 | - application/json |
143 | produces: | 240 | produces: |
@@ -155,6 +252,7 @@ paths: | |||
155 | get: | 252 | get: |
156 | tags: | 253 | tags: |
157 | - ServerFollowing | 254 | - ServerFollowing |
255 | summary: Get followers of the server | ||
158 | consumes: | 256 | consumes: |
159 | - application/json | 257 | - application/json |
160 | produces: | 258 | produces: |
@@ -174,6 +272,7 @@ paths: | |||
174 | get: | 272 | get: |
175 | tags: | 273 | tags: |
176 | - ServerFollowing | 274 | - ServerFollowing |
275 | summary: Get servers followed by the server | ||
177 | consumes: | 276 | consumes: |
178 | - application/json | 277 | - application/json |
179 | produces: | 278 | produces: |
@@ -191,9 +290,10 @@ paths: | |||
191 | $ref: '#/definitions/Follow' | 290 | $ref: '#/definitions/Follow' |
192 | post: | 291 | post: |
193 | security: | 292 | security: |
194 | - OAuth2: [ ] | 293 | - OAuth2: [ admin ] |
195 | tags: | 294 | tags: |
196 | - ServerFollowing | 295 | - ServerFollowing |
296 | summary: Follow a server | ||
197 | consumes: | 297 | consumes: |
198 | - application/json | 298 | - application/json |
199 | produces: | 299 | produces: |
@@ -208,8 +308,9 @@ paths: | |||
208 | $ref: "commons.yaml#/responses/emptySuccess" | 308 | $ref: "commons.yaml#/responses/emptySuccess" |
209 | /users: | 309 | /users: |
210 | post: | 310 | post: |
311 | summary: Creates user | ||
211 | security: | 312 | security: |
212 | - OAuth2: [ ] | 313 | - OAuth2: [ admin ] |
213 | tags: | 314 | tags: |
214 | - User | 315 | - User |
215 | consumes: | 316 | consumes: |
@@ -229,6 +330,7 @@ paths: | |||
229 | schema: | 330 | schema: |
230 | $ref: '#/definitions/AddUserResponse' | 331 | $ref: '#/definitions/AddUserResponse' |
231 | get: | 332 | get: |
333 | summary: Get a list of users | ||
232 | security: | 334 | security: |
233 | - OAuth2: [ ] | 335 | - OAuth2: [ ] |
234 | tags: | 336 | tags: |
@@ -250,8 +352,9 @@ paths: | |||
250 | $ref: '#/definitions/User' | 352 | $ref: '#/definitions/User' |
251 | '/users/{id}': | 353 | '/users/{id}': |
252 | delete: | 354 | delete: |
355 | summary: Delete a user by its id | ||
253 | security: | 356 | security: |
254 | - OAuth2: [ ] | 357 | - OAuth2: [ admin ] |
255 | tags: | 358 | tags: |
256 | - User | 359 | - User |
257 | consumes: | 360 | consumes: |
@@ -264,6 +367,7 @@ paths: | |||
264 | '204': | 367 | '204': |
265 | $ref: "commons.yaml#/responses/emptySuccess" | 368 | $ref: "commons.yaml#/responses/emptySuccess" |
266 | get: | 369 | get: |
370 | summary: Get user by its id | ||
267 | security: | 371 | security: |
268 | - OAuth2: [ ] | 372 | - OAuth2: [ ] |
269 | tags: | 373 | tags: |
@@ -280,6 +384,7 @@ paths: | |||
280 | schema: | 384 | schema: |
281 | $ref: '#/definitions/User' | 385 | $ref: '#/definitions/User' |
282 | put: | 386 | put: |
387 | summary: Update user profile by its id | ||
283 | security: | 388 | security: |
284 | - OAuth2: [ ] | 389 | - OAuth2: [ ] |
285 | tags: | 390 | tags: |
@@ -300,6 +405,7 @@ paths: | |||
300 | $ref: "commons.yaml#/responses/emptySuccess" | 405 | $ref: "commons.yaml#/responses/emptySuccess" |
301 | /users/me: | 406 | /users/me: |
302 | get: | 407 | get: |
408 | summary: Get current user information | ||
303 | security: | 409 | security: |
304 | - OAuth2: [ ] | 410 | - OAuth2: [ ] |
305 | tags: | 411 | tags: |
@@ -316,6 +422,7 @@ paths: | |||
316 | items: | 422 | items: |
317 | $ref: '#/definitions/User' | 423 | $ref: '#/definitions/User' |
318 | put: | 424 | put: |
425 | summary: Update current user information | ||
319 | security: | 426 | security: |
320 | - OAuth2: [ ] | 427 | - OAuth2: [ ] |
321 | tags: | 428 | tags: |
@@ -335,6 +442,7 @@ paths: | |||
335 | $ref: "commons.yaml#/responses/emptySuccess" | 442 | $ref: "commons.yaml#/responses/emptySuccess" |
336 | /users/me/video-quota-used: | 443 | /users/me/video-quota-used: |
337 | get: | 444 | get: |
445 | summary: Get current user used quota | ||
338 | security: | 446 | security: |
339 | - OAuth2: [ ] | 447 | - OAuth2: [ ] |
340 | tags: | 448 | tags: |
@@ -351,6 +459,7 @@ paths: | |||
351 | type: number | 459 | type: number |
352 | '/users/me/videos/{videoId}/rating': | 460 | '/users/me/videos/{videoId}/rating': |
353 | get: | 461 | get: |
462 | summary: Get rating of video by its id, among those of the current user | ||
354 | security: | 463 | security: |
355 | - OAuth2: [ ] | 464 | - OAuth2: [ ] |
356 | tags: | 465 | tags: |
@@ -372,6 +481,7 @@ paths: | |||
372 | $ref: '#/definitions/GetMeVideoRating' | 481 | $ref: '#/definitions/GetMeVideoRating' |
373 | /users/me/videos: | 482 | /users/me/videos: |
374 | get: | 483 | get: |
484 | summary: Get videos of the current user | ||
375 | security: | 485 | security: |
376 | - OAuth2: [ ] | 486 | - OAuth2: [ ] |
377 | tags: | 487 | tags: |
@@ -393,6 +503,7 @@ paths: | |||
393 | $ref: '#/definitions/Video' | 503 | $ref: '#/definitions/Video' |
394 | /users/register: | 504 | /users/register: |
395 | post: | 505 | post: |
506 | summary: Register a user | ||
396 | tags: | 507 | tags: |
397 | - User | 508 | - User |
398 | consumes: | 509 | consumes: |
@@ -410,6 +521,7 @@ paths: | |||
410 | $ref: "commons.yaml#/responses/emptySuccess" | 521 | $ref: "commons.yaml#/responses/emptySuccess" |
411 | /users/me/avatar/pick: | 522 | /users/me/avatar/pick: |
412 | post: | 523 | post: |
524 | summary: Update current user avatar | ||
413 | security: | 525 | security: |
414 | - OAuth2: [ ] | 526 | - OAuth2: [ ] |
415 | tags: | 527 | tags: |
@@ -430,6 +542,7 @@ paths: | |||
430 | $ref: '#/definitions/Avatar' | 542 | $ref: '#/definitions/Avatar' |
431 | /videos: | 543 | /videos: |
432 | get: | 544 | get: |
545 | summary: Get list of videos | ||
433 | tags: | 546 | tags: |
434 | - Video | 547 | - Video |
435 | consumes: | 548 | consumes: |
@@ -454,6 +567,7 @@ paths: | |||
454 | $ref: '#/definitions/Video' | 567 | $ref: '#/definitions/Video' |
455 | /videos/categories: | 568 | /videos/categories: |
456 | get: | 569 | get: |
570 | summary: Get list of video licences known by the server | ||
457 | tags: | 571 | tags: |
458 | - Video | 572 | - Video |
459 | consumes: | 573 | consumes: |
@@ -469,6 +583,7 @@ paths: | |||
469 | type: string | 583 | type: string |
470 | /videos/licences: | 584 | /videos/licences: |
471 | get: | 585 | get: |
586 | summary: Get list of video licences known by the server | ||
472 | tags: | 587 | tags: |
473 | - Video | 588 | - Video |
474 | consumes: | 589 | consumes: |
@@ -484,6 +599,7 @@ paths: | |||
484 | type: string | 599 | type: string |
485 | /videos/languages: | 600 | /videos/languages: |
486 | get: | 601 | get: |
602 | summary: Get list of languages known by the server | ||
487 | tags: | 603 | tags: |
488 | - Video | 604 | - Video |
489 | consumes: | 605 | consumes: |
@@ -499,6 +615,7 @@ paths: | |||
499 | type: string | 615 | type: string |
500 | /videos/privacies: | 616 | /videos/privacies: |
501 | get: | 617 | get: |
618 | summary: Get list of privacy policies supported by the server | ||
502 | tags: | 619 | tags: |
503 | - Video | 620 | - Video |
504 | consumes: | 621 | consumes: |
@@ -514,6 +631,7 @@ paths: | |||
514 | type: string | 631 | type: string |
515 | "/videos/{id}": | 632 | "/videos/{id}": |
516 | put: | 633 | put: |
634 | summary: Update metadata for a video by its id | ||
517 | security: | 635 | security: |
518 | - OAuth2: [ ] | 636 | - OAuth2: [ ] |
519 | tags: | 637 | tags: |
@@ -544,6 +662,7 @@ paths: | |||
544 | schema: | 662 | schema: |
545 | $ref: '#/definitions/Video' | 663 | $ref: '#/definitions/Video' |
546 | get: | 664 | get: |
665 | summary: Get a video by its id | ||
547 | tags: | 666 | tags: |
548 | - Video | 667 | - Video |
549 | consumes: | 668 | consumes: |
@@ -558,6 +677,7 @@ paths: | |||
558 | schema: | 677 | schema: |
559 | $ref: '#/definitions/Video' | 678 | $ref: '#/definitions/Video' |
560 | delete: | 679 | delete: |
680 | summary: Delete a video by its id | ||
561 | security: | 681 | security: |
562 | - OAuth2: [ ] | 682 | - OAuth2: [ ] |
563 | tags: | 683 | tags: |
@@ -573,6 +693,7 @@ paths: | |||
573 | $ref: "commons.yaml#/responses/emptySuccess" | 693 | $ref: "commons.yaml#/responses/emptySuccess" |
574 | "/videos/{id}/description": | 694 | "/videos/{id}/description": |
575 | get: | 695 | get: |
696 | summary: Get a video description by its id | ||
576 | tags: | 697 | tags: |
577 | - Video | 698 | - Video |
578 | consumes: | 699 | consumes: |
@@ -588,6 +709,7 @@ paths: | |||
588 | type: string | 709 | type: string |
589 | "/videos/{id}/views": | 710 | "/videos/{id}/views": |
590 | post: | 711 | post: |
712 | summary: Add a view to the video by its id | ||
591 | tags: | 713 | tags: |
592 | - Video | 714 | - Video |
593 | consumes: | 715 | consumes: |
@@ -601,6 +723,7 @@ paths: | |||
601 | $ref: "commons.yaml#/responses/emptySuccess" | 723 | $ref: "commons.yaml#/responses/emptySuccess" |
602 | /videos/upload: | 724 | /videos/upload: |
603 | post: | 725 | post: |
726 | summary: Upload a video file with its metadata | ||
604 | security: | 727 | security: |
605 | - OAuth2: [ ] | 728 | - OAuth2: [ ] |
606 | tags: | 729 | tags: |
@@ -641,6 +764,7 @@ paths: | |||
641 | $ref: '#/definitions/VideoUploadResponse' | 764 | $ref: '#/definitions/VideoUploadResponse' |
642 | /videos/abuse: | 765 | /videos/abuse: |
643 | get: | 766 | get: |
767 | summary: Get list of reported video abuses | ||
644 | security: | 768 | security: |
645 | - OAuth2: [ ] | 769 | - OAuth2: [ ] |
646 | tags: | 770 | tags: |
@@ -662,6 +786,7 @@ paths: | |||
662 | $ref: '#/definitions/VideoAbuse' | 786 | $ref: '#/definitions/VideoAbuse' |
663 | "/videos/{id}/abuse": | 787 | "/videos/{id}/abuse": |
664 | post: | 788 | post: |
789 | summary: Report an abuse, on a video by its id | ||
665 | security: | 790 | security: |
666 | - OAuth2: [ ] | 791 | - OAuth2: [ ] |
667 | tags: | 792 | tags: |
@@ -677,8 +802,9 @@ paths: | |||
677 | $ref: "commons.yaml#/responses/emptySuccess" | 802 | $ref: "commons.yaml#/responses/emptySuccess" |
678 | "/videos/{id}/blacklist": | 803 | "/videos/{id}/blacklist": |
679 | post: | 804 | post: |
805 | summary: Put on blacklist a video by its id | ||
680 | security: | 806 | security: |
681 | - OAuth2: [ ] | 807 | - OAuth2: [ admin, moderator ] |
682 | tags: | 808 | tags: |
683 | - VideoBlacklist | 809 | - VideoBlacklist |
684 | consumes: | 810 | consumes: |
@@ -691,8 +817,9 @@ paths: | |||
691 | '204': | 817 | '204': |
692 | $ref: "commons.yaml#/responses/emptySuccess" | 818 | $ref: "commons.yaml#/responses/emptySuccess" |
693 | delete: | 819 | delete: |
820 | summary: Delete an entry of the blacklist of a video by its id | ||
694 | security: | 821 | security: |
695 | - OAuth2: [ ] | 822 | - OAuth2: [ admin, moderator ] |
696 | tags: | 823 | tags: |
697 | - VideoBlacklist | 824 | - VideoBlacklist |
698 | consumes: | 825 | consumes: |
@@ -706,8 +833,9 @@ paths: | |||
706 | $ref: "commons.yaml#/responses/emptySuccess" | 833 | $ref: "commons.yaml#/responses/emptySuccess" |
707 | /videos/blacklist: | 834 | /videos/blacklist: |
708 | get: | 835 | get: |
836 | summary: Get list of videos on blacklist | ||
709 | security: | 837 | security: |
710 | - OAuth2: [ ] | 838 | - OAuth2: [ admin, moderator ] |
711 | tags: | 839 | tags: |
712 | - VideoBlacklist | 840 | - VideoBlacklist |
713 | consumes: | 841 | consumes: |
@@ -727,6 +855,7 @@ paths: | |||
727 | $ref: '#/definitions/VideoBlacklist' | 855 | $ref: '#/definitions/VideoBlacklist' |
728 | /video-channels: | 856 | /video-channels: |
729 | get: | 857 | get: |
858 | summary: Get list of video channels | ||
730 | tags: | 859 | tags: |
731 | - VideoChannel | 860 | - VideoChannel |
732 | consumes: | 861 | consumes: |
@@ -745,6 +874,7 @@ paths: | |||
745 | items: | 874 | items: |
746 | $ref: '#/definitions/VideoChannel' | 875 | $ref: '#/definitions/VideoChannel' |
747 | post: | 876 | post: |
877 | summary: Creates a video channel for the current user | ||
748 | security: | 878 | security: |
749 | - OAuth2: [ ] | 879 | - OAuth2: [ ] |
750 | tags: | 880 | tags: |
@@ -763,6 +893,7 @@ paths: | |||
763 | $ref: "commons.yaml#/responses/emptySuccess" | 893 | $ref: "commons.yaml#/responses/emptySuccess" |
764 | "/video-channels/{id}": | 894 | "/video-channels/{id}": |
765 | get: | 895 | get: |
896 | summary: Get a video channel by its id | ||
766 | tags: | 897 | tags: |
767 | - VideoChannel | 898 | - VideoChannel |
768 | consumes: | 899 | consumes: |
@@ -777,6 +908,7 @@ paths: | |||
777 | schema: | 908 | schema: |
778 | $ref: '#/definitions/VideoChannel' | 909 | $ref: '#/definitions/VideoChannel' |
779 | put: | 910 | put: |
911 | summary: Update a video channel by its id | ||
780 | security: | 912 | security: |
781 | - OAuth2: [ ] | 913 | - OAuth2: [ ] |
782 | tags: | 914 | tags: |
@@ -795,6 +927,7 @@ paths: | |||
795 | '204': | 927 | '204': |
796 | $ref: "commons.yaml#/responses/emptySuccess" | 928 | $ref: "commons.yaml#/responses/emptySuccess" |
797 | delete: | 929 | delete: |
930 | summary: Delete a video channel by its id | ||
798 | security: | 931 | security: |
799 | - OAuth2: [ ] | 932 | - OAuth2: [ ] |
800 | tags: | 933 | tags: |
@@ -810,6 +943,7 @@ paths: | |||
810 | $ref: "commons.yaml#/responses/emptySuccess" | 943 | $ref: "commons.yaml#/responses/emptySuccess" |
811 | "/video-channels/{id}/videos": | 944 | "/video-channels/{id}/videos": |
812 | get: | 945 | get: |
946 | summary: Get videos of a video channel by its id | ||
813 | tags: | 947 | tags: |
814 | - VideoChannel | 948 | - VideoChannel |
815 | consumes: | 949 | consumes: |
@@ -825,6 +959,7 @@ paths: | |||
825 | $ref: '#/definitions/Video' | 959 | $ref: '#/definitions/Video' |
826 | /accounts/{name}/video-channels: | 960 | /accounts/{name}/video-channels: |
827 | get: | 961 | get: |
962 | summary: Get video channels of an account by its name | ||
828 | tags: | 963 | tags: |
829 | - VideoChannel | 964 | - VideoChannel |
830 | consumes: | 965 | consumes: |
@@ -842,6 +977,7 @@ paths: | |||
842 | $ref: '#/definitions/VideoChannel' | 977 | $ref: '#/definitions/VideoChannel' |
843 | "/videos/{id}/comment-threads": | 978 | "/videos/{id}/comment-threads": |
844 | get: | 979 | get: |
980 | summary: Get the comment threads of a video by its id | ||
845 | tags: | 981 | tags: |
846 | - VideoComment | 982 | - VideoComment |
847 | consumes: | 983 | consumes: |
@@ -859,6 +995,7 @@ paths: | |||
859 | schema: | 995 | schema: |
860 | $ref: '#/definitions/CommentThreadResponse' | 996 | $ref: '#/definitions/CommentThreadResponse' |
861 | post: | 997 | post: |
998 | summary: Creates a comment thread, on a video by its id | ||
862 | security: | 999 | security: |
863 | - OAuth2: [ ] | 1000 | - OAuth2: [ ] |
864 | tags: | 1001 | tags: |
@@ -876,6 +1013,7 @@ paths: | |||
876 | $ref: '#/definitions/CommentThreadPostResponse' | 1013 | $ref: '#/definitions/CommentThreadPostResponse' |
877 | "/videos/{id}/comment-threads/{threadId}": | 1014 | "/videos/{id}/comment-threads/{threadId}": |
878 | get: | 1015 | get: |
1016 | summary: Get the comment thread by its id, of a video by its id | ||
879 | tags: | 1017 | tags: |
880 | - VideoComment | 1018 | - VideoComment |
881 | consumes: | 1019 | consumes: |
@@ -892,6 +1030,7 @@ paths: | |||
892 | $ref: '#/definitions/VideoCommentThreadTree' | 1030 | $ref: '#/definitions/VideoCommentThreadTree' |
893 | "/videos/{id}/comments/{commentId}": | 1031 | "/videos/{id}/comments/{commentId}": |
894 | post: | 1032 | post: |
1033 | summary: Creates a comment in a comment thread by its id, of a video by its id | ||
895 | security: | 1034 | security: |
896 | - OAuth2: [ ] | 1035 | - OAuth2: [ ] |
897 | tags: | 1036 | tags: |
@@ -909,6 +1048,7 @@ paths: | |||
909 | schema: | 1048 | schema: |
910 | $ref: '#/definitions/CommentThreadPostResponse' | 1049 | $ref: '#/definitions/CommentThreadPostResponse' |
911 | delete: | 1050 | delete: |
1051 | summary: Delete a comment in a comment therad by its id, of a video by its id | ||
912 | security: | 1052 | security: |
913 | - OAuth2: [ ] | 1053 | - OAuth2: [ ] |
914 | tags: | 1054 | tags: |
@@ -925,6 +1065,7 @@ paths: | |||
925 | $ref: "commons.yaml#/responses/emptySuccess" | 1065 | $ref: "commons.yaml#/responses/emptySuccess" |
926 | "/videos/{id}/rate": | 1066 | "/videos/{id}/rate": |
927 | put: | 1067 | put: |
1068 | summary: Vote for a video by its id | ||
928 | security: | 1069 | security: |
929 | - OAuth2: [ ] | 1070 | - OAuth2: [ ] |
930 | tags: | 1071 | tags: |
@@ -942,6 +1083,7 @@ paths: | |||
942 | get: | 1083 | get: |
943 | tags: | 1084 | tags: |
944 | - Search | 1085 | - Search |
1086 | summary: Get the videos corresponding to a given query | ||
945 | consumes: | 1087 | consumes: |
946 | - application/json | 1088 | - application/json |
947 | produces: | 1089 | produces: |
@@ -1383,4 +1525,4 @@ definitions: | |||
1383 | name: | 1525 | name: |
1384 | type: string | 1526 | type: string |
1385 | description: | 1527 | description: |
1386 | type: string \ No newline at end of file | 1528 | type: string |