aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api/openapi.yaml
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-16 10:48:17 +0200
committerChocobozzz <me@florianbigard.com>2018-04-16 17:27:00 +0200
commit94ff4c2335ace54b36b2bca96f63226ee8f575b1 (patch)
tree60eaf4b370bdd165383231cf76cb918c19d36fc5 /support/doc/api/openapi.yaml
parentf36fb3ecb114c8c274618bf9fefbe7a5a3d45f10 (diff)
downloadPeerTube-94ff4c2335ace54b36b2bca96f63226ee8f575b1.tar.gz
PeerTube-94ff4c2335ace54b36b2bca96f63226ee8f575b1.tar.zst
PeerTube-94ff4c2335ace54b36b2bca96f63226ee8f575b1.zip
Add auth documentation
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r--support/doc/api/openapi.yaml66
1 files changed, 66 insertions, 0 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index e5fe34a1d..c3efa512d 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -4,6 +4,14 @@ info:
4 version: 1.0.0-beta 4 version: 1.0.0-beta
5 description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular. 5 description: Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.
6host: peertube.example.com 6host: peertube.example.com
7securityDefinitions:
8 OAuth2:
9 description: 'In the header: *Authorization: Bearer mytoken*'
10 type: oauth2
11 flow: password
12 # Not implemented yet
13 # authorizationUrl: https://example.com/oauth/authorize
14 tokenUrl: https://peertube.example.com/api/v1/users/token
7basePath: '/api/v1' 15basePath: '/api/v1'
8schemes: 16schemes:
9 - https 17 - https
@@ -72,6 +80,8 @@ paths:
72 $ref: '#/definitions/ServerConfig' 80 $ref: '#/definitions/ServerConfig'
73 /jobs: 81 /jobs:
74 get: 82 get:
83 security:
84 - OAuth2: [ ]
75 tags: 85 tags:
76 - Job 86 - Job
77 consumes: 87 consumes:
@@ -108,6 +118,8 @@ paths:
108 $ref: '#/definitions/Job' 118 $ref: '#/definitions/Job'
109 '/server/following/{host}': 119 '/server/following/{host}':
110 delete: 120 delete:
121 security:
122 - OAuth2: [ ]
111 tags: 123 tags:
112 - ServerFollowing 124 - ServerFollowing
113 consumes: 125 consumes:
@@ -186,6 +198,8 @@ paths:
186 items: 198 items:
187 $ref: '#/definitions/Follow' 199 $ref: '#/definitions/Follow'
188 post: 200 post:
201 security:
202 - OAuth2: [ ]
189 tags: 203 tags:
190 - ServerFollowing 204 - ServerFollowing
191 consumes: 205 consumes:
@@ -202,6 +216,8 @@ paths:
202 description: successful operation 216 description: successful operation
203 /users: 217 /users:
204 post: 218 post:
219 security:
220 - OAuth2: [ ]
205 tags: 221 tags:
206 - User 222 - User
207 consumes: 223 consumes:
@@ -221,6 +237,8 @@ paths:
221 schema: 237 schema:
222 $ref: '#/definitions/AddUserResponse' 238 $ref: '#/definitions/AddUserResponse'
223 get: 239 get:
240 security:
241 - OAuth2: [ ]
224 tags: 242 tags:
225 - User 243 - User
226 consumes: 244 consumes:
@@ -252,6 +270,8 @@ paths:
252 $ref: '#/definitions/User' 270 $ref: '#/definitions/User'
253 '/users/{id}': 271 '/users/{id}':
254 delete: 272 delete:
273 security:
274 - OAuth2: [ ]
255 tags: 275 tags:
256 - User 276 - User
257 consumes: 277 consumes:
@@ -268,6 +288,8 @@ paths:
268 '204': 288 '204':
269 description: successful operation 289 description: successful operation
270 get: 290 get:
291 security:
292 - OAuth2: [ ]
271 tags: 293 tags:
272 - User 294 - User
273 consumes: 295 consumes:
@@ -286,6 +308,8 @@ paths:
286 schema: 308 schema:
287 $ref: '#/definitions/User' 309 $ref: '#/definitions/User'
288 put: 310 put:
311 security:
312 - OAuth2: [ ]
289 tags: 313 tags:
290 - User 314 - User
291 consumes: 315 consumes:
@@ -308,6 +332,8 @@ paths:
308 description: successful operation 332 description: successful operation
309 /users/me: 333 /users/me:
310 get: 334 get:
335 security:
336 - OAuth2: [ ]
311 tags: 337 tags:
312 - User 338 - User
313 consumes: 339 consumes:
@@ -322,6 +348,8 @@ paths:
322 items: 348 items:
323 $ref: '#/definitions/User' 349 $ref: '#/definitions/User'
324 put: 350 put:
351 security:
352 - OAuth2: [ ]
325 tags: 353 tags:
326 - User 354 - User
327 consumes: 355 consumes:
@@ -339,6 +367,8 @@ paths:
339 description: successful operation 367 description: successful operation
340 /users/me/video-quota-used: 368 /users/me/video-quota-used:
341 get: 369 get:
370 security:
371 - OAuth2: [ ]
342 tags: 372 tags:
343 - User 373 - User
344 consumes: 374 consumes:
@@ -353,6 +383,8 @@ paths:
353 type: number 383 type: number
354 '/users/me/videos/{videoId}/rating': 384 '/users/me/videos/{videoId}/rating':
355 get: 385 get:
386 security:
387 - OAuth2: [ ]
356 tags: 388 tags:
357 - User 389 - User
358 consumes: 390 consumes:
@@ -372,6 +404,8 @@ paths:
372 $ref: '#/definitions/GetMeVideoRating' 404 $ref: '#/definitions/GetMeVideoRating'
373 /users/me/videos: 405 /users/me/videos:
374 get: 406 get:
407 security:
408 - OAuth2: [ ]
375 tags: 409 tags:
376 - User 410 - User
377 consumes: 411 consumes:
@@ -420,6 +454,8 @@ paths:
420 description: successful operation 454 description: successful operation
421 /users/me/avatar/pick: 455 /users/me/avatar/pick:
422 post: 456 post:
457 security:
458 - OAuth2: [ ]
423 tags: 459 tags:
424 - User 460 - User
425 consumes: 461 consumes:
@@ -560,6 +596,8 @@ paths:
560 $ref: '#/definitions/Video' 596 $ref: '#/definitions/Video'
561 "/videos/{id}": 597 "/videos/{id}":
562 put: 598 put:
599 security:
600 - OAuth2: [ ]
563 tags: 601 tags:
564 - Video 602 - Video
565 consumes: 603 consumes:
@@ -645,6 +683,8 @@ paths:
645 schema: 683 schema:
646 $ref: '#/definitions/Video' 684 $ref: '#/definitions/Video'
647 delete: 685 delete:
686 security:
687 - OAuth2: [ ]
648 tags: 688 tags:
649 - Video 689 - Video
650 consumes: 690 consumes:
@@ -698,6 +738,8 @@ paths:
698 description: successful operation 738 description: successful operation
699 /videos/upload: 739 /videos/upload:
700 post: 740 post:
741 security:
742 - OAuth2: [ ]
701 tags: 743 tags:
702 - Video 744 - Video
703 consumes: 745 consumes:
@@ -776,6 +818,8 @@ paths:
776 $ref: '#/definitions/VideoUploadResponse' 818 $ref: '#/definitions/VideoUploadResponse'
777 /videos/abuse: 819 /videos/abuse:
778 get: 820 get:
821 security:
822 - OAuth2: [ ]
779 tags: 823 tags:
780 - VideoAbuse 824 - VideoAbuse
781 consumes: 825 consumes:
@@ -807,6 +851,8 @@ paths:
807 $ref: '#/definitions/VideoAbuse' 851 $ref: '#/definitions/VideoAbuse'
808 "/videos/{id}/abuse": 852 "/videos/{id}/abuse":
809 post: 853 post:
854 security:
855 - OAuth2: [ ]
810 tags: 856 tags:
811 - VideoAbuse 857 - VideoAbuse
812 consumes: 858 consumes:
@@ -824,6 +870,8 @@ paths:
824 description: successful operation 870 description: successful operation
825 "/videos/{videoId}/blacklist": 871 "/videos/{videoId}/blacklist":
826 post: 872 post:
873 security:
874 - OAuth2: [ ]
827 tags: 875 tags:
828 - VideoBlacklist 876 - VideoBlacklist
829 consumes: 877 consumes:
@@ -840,6 +888,8 @@ paths:
840 '204': 888 '204':
841 description: successful operation 889 description: successful operation
842 delete: 890 delete:
891 security:
892 - OAuth2: [ ]
843 tags: 893 tags:
844 - VideoBlacklist 894 - VideoBlacklist
845 consumes: 895 consumes:
@@ -857,6 +907,8 @@ paths:
857 description: successful operation 907 description: successful operation
858 /videos/blacklist: 908 /videos/blacklist:
859 get: 909 get:
910 security:
911 - OAuth2: [ ]
860 tags: 912 tags:
861 - VideoBlacklist 913 - VideoBlacklist
862 consumes: 914 consumes:
@@ -918,6 +970,8 @@ paths:
918 items: 970 items:
919 $ref: '#/definitions/VideoChannel' 971 $ref: '#/definitions/VideoChannel'
920 post: 972 post:
973 security:
974 - OAuth2: [ ]
921 tags: 975 tags:
922 - VideoChannel 976 - VideoChannel
923 consumes: 977 consumes:
@@ -952,6 +1006,8 @@ paths:
952 schema: 1006 schema:
953 $ref: '#/definitions/VideoChannel' 1007 $ref: '#/definitions/VideoChannel'
954 put: 1008 put:
1009 security:
1010 - OAuth2: [ ]
955 tags: 1011 tags:
956 - VideoChannel 1012 - VideoChannel
957 consumes: 1013 consumes:
@@ -972,6 +1028,8 @@ paths:
972 '204': 1028 '204':
973 description: successful operation 1029 description: successful operation
974 delete: 1030 delete:
1031 security:
1032 - OAuth2: [ ]
975 tags: 1033 tags:
976 - VideoChannel 1034 - VideoChannel
977 consumes: 1035 consumes:
@@ -1043,6 +1101,8 @@ paths:
1043 schema: 1101 schema:
1044 $ref: '#/definitions/CommentThreadResponse' 1102 $ref: '#/definitions/CommentThreadResponse'
1045 post: 1103 post:
1104 security:
1105 - OAuth2: [ ]
1046 tags: 1106 tags:
1047 - VideoComment 1107 - VideoComment
1048 consumes: 1108 consumes:
@@ -1086,6 +1146,8 @@ paths:
1086 $ref: '#/definitions/VideoCommentThreadTree' 1146 $ref: '#/definitions/VideoCommentThreadTree'
1087 "/videos/{videoId}/comments/{commentId}": 1147 "/videos/{videoId}/comments/{commentId}":
1088 post: 1148 post:
1149 security:
1150 - OAuth2: [ ]
1089 tags: 1151 tags:
1090 - VideoComment 1152 - VideoComment
1091 consumes: 1153 consumes:
@@ -1109,6 +1171,8 @@ paths:
1109 schema: 1171 schema:
1110 $ref: '#/definitions/CommentThreadPostResponse' 1172 $ref: '#/definitions/CommentThreadPostResponse'
1111 delete: 1173 delete:
1174 security:
1175 - OAuth2: [ ]
1112 tags: 1176 tags:
1113 - VideoComment 1177 - VideoComment
1114 consumes: 1178 consumes:
@@ -1131,6 +1195,8 @@ paths:
1131 description: successful operation 1195 description: successful operation
1132 "/videos/{id}/rate": 1196 "/videos/{id}/rate":
1133 put: 1197 put:
1198 security:
1199 - OAuth2: [ ]
1134 tags: 1200 tags:
1135 - VideoRate 1201 - VideoRate
1136 consumes: 1202 consumes: