diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-21 15:24:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-21 15:24:19 +0200 |
commit | 50e16ccf61e4fc9bdd95fc920125b3b3ec7d1dc3 (patch) | |
tree | 49caca4d265a69117b397ccdd6caadcddaff3f3b /support/doc/api/openapi.yaml | |
parent | c18431505fd1d769554e9f848799284f84c30110 (diff) | |
download | PeerTube-50e16ccf61e4fc9bdd95fc920125b3b3ec7d1dc3.tar.gz PeerTube-50e16ccf61e4fc9bdd95fc920125b3b3ec7d1dc3.tar.zst PeerTube-50e16ccf61e4fc9bdd95fc920125b3b3ec7d1dc3.zip |
Improve abuse api doc
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r-- | support/doc/api/openapi.yaml | 90 |
1 files changed, 83 insertions, 7 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 8de9c6505..6197a431f 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -63,7 +63,7 @@ tags: | |||
63 | server then deals with inter-server ActivityPub operations and propagates | 63 | server then deals with inter-server ActivityPub operations and propagates |
64 | information across its social graph by posting activities to actors' inbox | 64 | information across its social graph by posting activities to actors' inbox |
65 | endpoints. | 65 | endpoints. |
66 | - name: Video Abuse | 66 | - name: Video Abuses |
67 | description: | | 67 | description: | |
68 | Video abuses deal with reports of local or remote videos alike. | 68 | Video abuses deal with reports of local or remote videos alike. |
69 | - name: Video | 69 | - name: Video |
@@ -116,7 +116,7 @@ x-tagGroups: | |||
116 | - Search | 116 | - Search |
117 | - name: Moderation | 117 | - name: Moderation |
118 | tags: | 118 | tags: |
119 | - Video Abuse | 119 | - Video Abuses |
120 | - Video Blacklist | 120 | - Video Blacklist |
121 | - name: Instance Configuration | 121 | - name: Instance Configuration |
122 | tags: | 122 | tags: |
@@ -538,7 +538,7 @@ paths: | |||
538 | type: number | 538 | type: number |
539 | '/users/me/videos/{videoId}/rating': | 539 | '/users/me/videos/{videoId}/rating': |
540 | get: | 540 | get: |
541 | summary: Get rate of my user of a video | 541 | summary: Get rate of my user for a video |
542 | security: | 542 | security: |
543 | - OAuth2: [] | 543 | - OAuth2: [] |
544 | tags: | 544 | tags: |
@@ -1197,7 +1197,7 @@ paths: | |||
1197 | - admin | 1197 | - admin |
1198 | - moderator | 1198 | - moderator |
1199 | tags: | 1199 | tags: |
1200 | - Video Abuse | 1200 | - Video Abuses |
1201 | parameters: | 1201 | parameters: |
1202 | - $ref: '#/components/parameters/start' | 1202 | - $ref: '#/components/parameters/start' |
1203 | - $ref: '#/components/parameters/count' | 1203 | - $ref: '#/components/parameters/count' |
@@ -1217,12 +1217,63 @@ paths: | |||
1217 | security: | 1217 | security: |
1218 | - OAuth2: [] | 1218 | - OAuth2: [] |
1219 | tags: | 1219 | tags: |
1220 | - Video Abuse | 1220 | - Video Abuses |
1221 | - Videos | ||
1221 | parameters: | 1222 | parameters: |
1222 | - $ref: '#/components/parameters/idOrUUID' | 1223 | - $ref: '#/components/parameters/idOrUUID' |
1224 | requestBody: | ||
1225 | content: | ||
1226 | application/json: | ||
1227 | schema: | ||
1228 | type: object | ||
1229 | properties: | ||
1230 | reason: | ||
1231 | description: Reason why the user reports this video | ||
1232 | type: string | ||
1233 | responses: | ||
1234 | '204': | ||
1235 | description: successful operation | ||
1236 | '/videos/{id}/abuse/{abuseId}': | ||
1237 | put: | ||
1238 | summary: Update an abuse | ||
1239 | security: | ||
1240 | - OAuth2: | ||
1241 | - admin | ||
1242 | - moderator | ||
1243 | tags: | ||
1244 | - Video Abuses | ||
1223 | responses: | 1245 | responses: |
1224 | '204': | 1246 | '204': |
1225 | description: successful operation | 1247 | description: successful operation |
1248 | parameters: | ||
1249 | - $ref: '#/components/parameters/idOrUUID' | ||
1250 | - $ref: '#/components/parameters/abuseId' | ||
1251 | requestBody: | ||
1252 | content: | ||
1253 | application/json: | ||
1254 | schema: | ||
1255 | type: object | ||
1256 | properties: | ||
1257 | state: | ||
1258 | $ref: '#/components/schemas/VideoAbuseStateSet' | ||
1259 | moderationComment: | ||
1260 | type: string | ||
1261 | description: 'Update the comment of the video abuse for other admin/moderators' | ||
1262 | delete: | ||
1263 | summary: Delete an abuse | ||
1264 | security: | ||
1265 | - OAuth2: | ||
1266 | - admin | ||
1267 | - moderator | ||
1268 | tags: | ||
1269 | - Video Abuses | ||
1270 | responses: | ||
1271 | '204': | ||
1272 | description: successful operation | ||
1273 | parameters: | ||
1274 | - $ref: '#/components/parameters/idOrUUID' | ||
1275 | - $ref: '#/components/parameters/abuseId' | ||
1276 | |||
1226 | '/videos/{id}/blacklist': | 1277 | '/videos/{id}/blacklist': |
1227 | post: | 1278 | post: |
1228 | summary: Blacklist a video | 1279 | summary: Blacklist a video |
@@ -1973,6 +2024,13 @@ components: | |||
1973 | description: Playlist element id | 2024 | description: Playlist element id |
1974 | schema: | 2025 | schema: |
1975 | type: number | 2026 | type: number |
2027 | abuseId: | ||
2028 | name: abuseId | ||
2029 | in: path | ||
2030 | required: true | ||
2031 | description: Video abuse id | ||
2032 | schema: | ||
2033 | type: number | ||
1976 | captionLanguage: | 2034 | captionLanguage: |
1977 | name: captionLanguage | 2035 | name: captionLanguage |
1978 | in: path | 2036 | in: path |
@@ -2183,6 +2241,7 @@ components: | |||
2183 | $ref: '#/components/schemas/VideoPrivacySet' | 2241 | $ref: '#/components/schemas/VideoPrivacySet' |
2184 | label: | 2242 | label: |
2185 | type: string | 2243 | type: string |
2244 | |||
2186 | VideoStateConstant: | 2245 | VideoStateConstant: |
2187 | properties: | 2246 | properties: |
2188 | id: | 2247 | id: |
@@ -2194,6 +2253,21 @@ components: | |||
2194 | description: 'The video state (Published = 1, to transcode = 2, to import = 3)' | 2253 | description: 'The video state (Published = 1, to transcode = 2, to import = 3)' |
2195 | label: | 2254 | label: |
2196 | type: string | 2255 | type: string |
2256 | |||
2257 | VideoAbuseStateSet: | ||
2258 | type: integer | ||
2259 | enum: | ||
2260 | - 1 | ||
2261 | - 2 | ||
2262 | - 3 | ||
2263 | description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)' | ||
2264 | VideoAbuseStateConstant: | ||
2265 | properties: | ||
2266 | id: | ||
2267 | $ref: '#/components/schemas/VideoAbuseStateSet' | ||
2268 | label: | ||
2269 | type: string | ||
2270 | |||
2197 | VideoResolutionConstant: | 2271 | VideoResolutionConstant: |
2198 | properties: | 2272 | properties: |
2199 | id: | 2273 | id: |
@@ -2440,6 +2514,10 @@ components: | |||
2440 | type: string | 2514 | type: string |
2441 | reporterAccount: | 2515 | reporterAccount: |
2442 | $ref: '#/components/schemas/Account' | 2516 | $ref: '#/components/schemas/Account' |
2517 | state: | ||
2518 | $ref: '#/components/schemas/VideoAbuseStateConstant' | ||
2519 | moderationComment: | ||
2520 | type: string | ||
2443 | video: | 2521 | video: |
2444 | type: object | 2522 | type: object |
2445 | properties: | 2523 | properties: |
@@ -2449,8 +2527,6 @@ components: | |||
2449 | type: string | 2527 | type: string |
2450 | uuid: | 2528 | uuid: |
2451 | type: string | 2529 | type: string |
2452 | url: | ||
2453 | type: string | ||
2454 | createdAt: | 2530 | createdAt: |
2455 | type: string | 2531 | type: string |
2456 | VideoBlacklist: | 2532 | VideoBlacklist: |