aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api/openapi.yaml
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-06 10:17:06 +0200
committerChocobozzz <me@florianbigard.com>2018-04-06 10:17:06 +0200
commit61b66b361f3e5f6d507188517461c2791d0600e5 (patch)
tree3fa575e8b106a606c549d255f9b78172fb21429b /support/doc/api/openapi.yaml
parentf37bad639b36d35c29a464dc52123a1e7c9cd28a (diff)
downloadPeerTube-61b66b361f3e5f6d507188517461c2791d0600e5.tar.gz
PeerTube-61b66b361f3e5f6d507188517461c2791d0600e5.tar.zst
PeerTube-61b66b361f3e5f6d507188517461c2791d0600e5.zip
Upgrade api doc
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r--support/doc/api/openapi.yaml196
1 files changed, 164 insertions, 32 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 44b437c40..86dfae69d 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -31,7 +31,7 @@ paths:
31 in: query 31 in: query
32 required: false 32 required: false
33 type: number 33 type: number
34 description: 'stoping page' 34 description: 'stopping page'
35 - name: sort 35 - name: sort
36 in: query 36 in: query
37 required: false 37 required: false
@@ -141,7 +141,7 @@ paths:
141 in: query 141 in: query
142 required: false 142 required: false
143 type: number 143 type: number
144 description: 'stoping page' 144 description: 'stopping page'
145 - name: sort 145 - name: sort
146 in: query 146 in: query
147 required: false 147 required: false
@@ -172,7 +172,7 @@ paths:
172 in: query 172 in: query
173 required: false 173 required: false
174 type: number 174 type: number
175 description: 'stoping page' 175 description: 'stopping page'
176 - name: sort 176 - name: sort
177 in: query 177 in: query
178 required: false 178 required: false
@@ -212,6 +212,7 @@ paths:
212 - in: body 212 - in: body
213 name: body 213 name: body
214 required: true 214 required: true
215 description: 'User to create'
215 schema: 216 schema:
216 $ref: '#/definitions/AddUser' 217 $ref: '#/definitions/AddUser'
217 responses: 218 responses:
@@ -236,7 +237,7 @@ paths:
236 in: query 237 in: query
237 required: false 238 required: false
238 type: number 239 type: number
239 description: 'stoping page' 240 description: 'stopping page'
240 - name: sort 241 - name: sort
241 in: query 242 in: query
242 required: false 243 required: false
@@ -387,7 +388,7 @@ paths:
387 in: query 388 in: query
388 required: false 389 required: false
389 type: number 390 type: number
390 description: 'stoping page' 391 description: 'stopping page'
391 - name: sort 392 - name: sort
392 in: query 393 in: query
393 required: false 394 required: false
@@ -453,7 +454,7 @@ paths:
453 in: query 454 in: query
454 required: false 455 required: false
455 type: number 456 type: number
456 description: 'stoping page' 457 description: 'stopping page'
457 - name: sort 458 - name: sort
458 in: query 459 in: query
459 required: false 460 required: false
@@ -544,7 +545,7 @@ paths:
544 in: query 545 in: query
545 required: false 546 required: false
546 type: number 547 type: number
547 description: 'stoping page' 548 description: 'stopping page'
548 - name: sort 549 - name: sort
549 in: query 550 in: query
550 required: false 551 required: false
@@ -562,7 +563,7 @@ paths:
562 tags: 563 tags:
563 - Video 564 - Video
564 consumes: 565 consumes:
565 - application/json 566 - multipart/form-data
566 produces: 567 produces:
567 - application/json 568 - application/json
568 parameters: 569 parameters:
@@ -570,7 +571,56 @@ paths:
570 in: path 571 in: path
571 required: true 572 required: true
572 type: string 573 type: string
573 description: 'The video id ' 574 description: 'The video id'
575 - name: thumbnailfile
576 in: formData
577 type: file
578 description: 'Video thumbnail file'
579 - name: previewfile
580 in: formData
581 type: file
582 description: 'Video preview file'
583 - name: category
584 in: formData
585 type: number
586 description: 'Video category'
587 - name: licence
588 in: formData
589 type: number
590 description: 'Video licence'
591 - name: language
592 in: formData
593 type: number
594 description: 'Video language'
595 - name: description
596 in: formData
597 type: string
598 description: 'Video description'
599 - name: support
600 in: formData
601 type: string
602 description: 'Text describing how to support the video uploader'
603 - name: nsfw
604 in: formData
605 type: boolean
606 description: 'Whether or not this video contains sensitive content'
607 - name: name
608 in: formData
609 type: string
610 description: 'Video name'
611 - name: tags
612 in: formData
613 type: string[]
614 description: 'Video tags'
615 - name: commentsEnabled
616 in: formData
617 type: boolean
618 description: 'Enable or disable comments for this video'
619 - name: privacy
620 in: formData
621 type: string
622 enum: [Public, Unlisted, Private]
623 description: 'Video privacy'
574 responses: 624 responses:
575 '200': 625 '200':
576 description: successful operation 626 description: successful operation
@@ -655,10 +705,70 @@ paths:
655 produces: 705 produces:
656 - application/json 706 - application/json
657 parameters: 707 parameters:
658 - in: formData 708 - name: videofile
659 name: videofile 709 in: formData
660 type: file 710 type: file
661 description: The file to upload. 711 required: true
712 description: 'Video file'
713 - name: thumbnailfile
714 in: formData
715 type: file
716 required: true
717 description: 'Video thumbnail file'
718 - name: previewfile
719 in: formData
720 type: file
721 required: true
722 description: 'Video preview file'
723 - name: category
724 in: formData
725 type: number
726 description: 'Video category'
727 - name: licence
728 in: formData
729 type: number
730 description: 'Video licence'
731 - name: language
732 in: formData
733 type: number
734 description: 'Video language'
735 - name: description
736 in: formData
737 type: string
738 description: 'Video description'
739 - name: support
740 in: formData
741 type: string
742 description: 'Text describing how to support the video uploader'
743 - name: channelId
744 in: formData
745 required: true
746 type: number
747 description: 'Channel id that will contain this video'
748 - name: nsfw
749 in: formData
750 required: true
751 type: boolean
752 description: 'Whether or not this video contains sensitive content'
753 - name: name
754 in: formData
755 required: true
756 type: string
757 description: 'Video name'
758 - name: tags
759 in: formData
760 type: string[]
761 description: 'Video tags'
762 - name: commentsEnabled
763 in: formData
764 type: boolean
765 description: 'Enable or disable comments for this video'
766 - name: privacy
767 in: formData
768 required: true
769 type: string
770 enum: [Public, Unlisted, Private]
771 description: 'Video privacy'
662 responses: 772 responses:
663 '200': 773 '200':
664 description: successful operation 774 description: successful operation
@@ -682,7 +792,7 @@ paths:
682 in: query 792 in: query
683 required: false 793 required: false
684 type: number 794 type: number
685 description: 'stoping page' 795 description: 'stopping page'
686 - name: sort 796 - name: sort
687 in: query 797 in: query
688 required: false 798 required: false
@@ -763,7 +873,7 @@ paths:
763 in: query 873 in: query
764 required: false 874 required: false
765 type: number 875 type: number
766 description: 'stoping page' 876 description: 'stopping page'
767 - name: sort 877 - name: sort
768 in: query 878 in: query
769 required: false 879 required: false
@@ -794,7 +904,7 @@ paths:
794 in: query 904 in: query
795 required: false 905 required: false
796 type: number 906 type: number
797 description: 'stoping page' 907 description: 'stopping page'
798 - name: sort 908 - name: sort
799 in: query 909 in: query
800 required: false 910 required: false
@@ -921,7 +1031,7 @@ paths:
921 in: query 1031 in: query
922 required: false 1032 required: false
923 type: number 1033 type: number
924 description: 'stoping page' 1034 description: 'stopping page'
925 - name: sort 1035 - name: sort
926 in: query 1036 in: query
927 required: false 1037 required: false
@@ -1043,6 +1153,9 @@ definitions:
1043 type: number 1153 type: number
1044 label: 1154 label:
1045 type: string 1155 type: string
1156 VideoPrivacy:
1157 type: string
1158 enum: [Public, Unlisted, Private]
1046 Video: 1159 Video:
1047 properties: 1160 properties:
1048 id: 1161 id:
@@ -1051,6 +1164,8 @@ definitions:
1051 type: string 1164 type: string
1052 createdAt: 1165 createdAt:
1053 type: string 1166 type: string
1167 publishedAt:
1168 type: string
1054 updatedAt: 1169 updatedAt:
1055 type: string 1170 type: string
1056 category: 1171 category:
@@ -1059,6 +1174,8 @@ definitions:
1059 $ref: "#/definitions/VideoConstant" 1174 $ref: "#/definitions/VideoConstant"
1060 language: 1175 language:
1061 $ref: "#/definitions/VideoConstant" 1176 $ref: "#/definitions/VideoConstant"
1177 privacy:
1178 $ref: "#/definitions/VideoPrivacy"
1062 description: 1179 description:
1063 type: string 1180 type: string
1064 duration: 1181 duration:
@@ -1082,12 +1199,18 @@ definitions:
1082 nsfw: 1199 nsfw:
1083 type: boolean 1200 type: boolean
1084 account: 1201 account:
1085 name: string 1202 type: object
1086 displayName: string 1203 properties:
1087 url: string 1204 name:
1088 host: string 1205 type: string
1089 avatar: 1206 displayName:
1090 $ref: "#/definitions/Avatar" 1207 type: string
1208 url:
1209 type: string
1210 host:
1211 type: string
1212 avatar:
1213 $ref: "#/definitions/Avatar"
1091 VideoAbuse: 1214 VideoAbuse:
1092 properties: 1215 properties:
1093 id: 1216 id:
@@ -1097,10 +1220,16 @@ definitions:
1097 reporterAccount: 1220 reporterAccount:
1098 $ref: "#/definitions/Account" 1221 $ref: "#/definitions/Account"
1099 video: 1222 video:
1100 id: number 1223 type: object
1101 name: string 1224 properties:
1102 uuid: string 1225 id:
1103 url: string 1226 type: number
1227 name:
1228 type: string
1229 uuid:
1230 type: string
1231 url:
1232 type: string
1104 createdAt: 1233 createdAt:
1105 type: string 1234 type: string
1106 VideoBlacklist: 1235 VideoBlacklist:
@@ -1314,7 +1443,7 @@ definitions:
1314 updatedAt: 1443 updatedAt:
1315 type: string 1444 type: string
1316 1445
1317#Api responses 1446# Api responses
1318 AddUserResponse: 1447 AddUserResponse:
1319 properties: 1448 properties:
1320 id: 1449 id:
@@ -1323,10 +1452,13 @@ definitions:
1323 type: string 1452 type: string
1324 VideoUploadResponse: 1453 VideoUploadResponse:
1325 properties: 1454 properties:
1326 id: 1455 video:
1327 type: number 1456 type: object
1328 uuid: 1457 properties:
1329 type: string 1458 id:
1459 type: number
1460 uuid:
1461 type: string
1330 CommentThreadResponse: 1462 CommentThreadResponse:
1331 properties: 1463 properties:
1332 total: 1464 total:
@@ -1340,7 +1472,7 @@ definitions:
1340 comment: 1472 comment:
1341 $ref: "#/definitions/VideoComment" 1473 $ref: "#/definitions/VideoComment"
1342 1474
1343#request bodies 1475# Request bodies
1344 AddUser: 1476 AddUser:
1345 properties: 1477 properties:
1346 username: 1478 username: