diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/api/openapi.yaml | 154 |
1 files changed, 88 insertions, 66 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 7d308a114..f3edca682 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -106,9 +106,9 @@ tags: | |||
106 | Managing plugins installed from a local path or from NPM, or search for new ones. | 106 | Managing plugins installed from a local path or from NPM, or search for new ones. |
107 | externalDocs: | 107 | externalDocs: |
108 | url: https://docs.joinpeertube.org/#/api-plugins | 108 | url: https://docs.joinpeertube.org/#/api-plugins |
109 | - name: Video Abuses | 109 | - name: Abuses |
110 | description: | | 110 | description: | |
111 | Video abuses deal with reports of local or remote videos alike. | 111 | Abuses deal with reports of local or remote videos/comments/accounts alike. |
112 | - name: Video | 112 | - name: Video |
113 | description: | | 113 | description: | |
114 | Operations dealing with listing, uploading, fetching or modifying videos. | 114 | Operations dealing with listing, uploading, fetching or modifying videos. |
@@ -166,7 +166,7 @@ x-tagGroups: | |||
166 | - Search | 166 | - Search |
167 | - name: Moderation | 167 | - name: Moderation |
168 | tags: | 168 | tags: |
169 | - Video Abuses | 169 | - Abuses |
170 | - Video Blocks | 170 | - Video Blocks |
171 | - Account Blocks | 171 | - Account Blocks |
172 | - Server Blocks | 172 | - Server Blocks |
@@ -893,7 +893,7 @@ paths: | |||
893 | $ref: '#/components/schemas/NotificationSettingValue' | 893 | $ref: '#/components/schemas/NotificationSettingValue' |
894 | newCommentOnMyVideo: | 894 | newCommentOnMyVideo: |
895 | $ref: '#/components/schemas/NotificationSettingValue' | 895 | $ref: '#/components/schemas/NotificationSettingValue' |
896 | videoAbuseAsModerator: | 896 | abuseAsModerator: |
897 | $ref: '#/components/schemas/NotificationSettingValue' | 897 | $ref: '#/components/schemas/NotificationSettingValue' |
898 | videoAutoBlacklistAsModerator: | 898 | videoAutoBlacklistAsModerator: |
899 | $ref: '#/components/schemas/NotificationSettingValue' | 899 | $ref: '#/components/schemas/NotificationSettingValue' |
@@ -1471,16 +1471,15 @@ paths: | |||
1471 | description: HTTP or Torrent/magnetURI import not enabled | 1471 | description: HTTP or Torrent/magnetURI import not enabled |
1472 | '400': | 1472 | '400': |
1473 | description: '`magnetUri` or `targetUrl` or a torrent file missing' | 1473 | description: '`magnetUri` or `targetUrl` or a torrent file missing' |
1474 | /videos/abuse: | 1474 | /abuses: |
1475 | get: | 1475 | get: |
1476 | deprecated: true | 1476 | summary: List abuses |
1477 | summary: List video abuses | ||
1478 | security: | 1477 | security: |
1479 | - OAuth2: | 1478 | - OAuth2: |
1480 | - admin | 1479 | - admin |
1481 | - moderator | 1480 | - moderator |
1482 | tags: | 1481 | tags: |
1483 | - Video Abuses | 1482 | - Abuses |
1484 | parameters: | 1483 | parameters: |
1485 | - name: id | 1484 | - name: id |
1486 | in: query | 1485 | in: query |
@@ -1491,16 +1490,7 @@ paths: | |||
1491 | in: query | 1490 | in: query |
1492 | description: predefined reason the listed reports should contain | 1491 | description: predefined reason the listed reports should contain |
1493 | schema: | 1492 | schema: |
1494 | type: string | 1493 | $ref: '#/components/schemas/PredefinedAbuseReasons' |
1495 | enum: | ||
1496 | - violentOrAbusive | ||
1497 | - hatefulOrAbusive | ||
1498 | - spamOrMisleading | ||
1499 | - privacy | ||
1500 | - rights | ||
1501 | - serverRules | ||
1502 | - thumbnails | ||
1503 | - captions | ||
1504 | - name: search | 1494 | - name: search |
1505 | in: query | 1495 | in: query |
1506 | description: plain search that will match with video titles, reporter names and more | 1496 | description: plain search that will match with video titles, reporter names and more |
@@ -1508,7 +1498,7 @@ paths: | |||
1508 | type: string | 1498 | type: string |
1509 | - name: state | 1499 | - name: state |
1510 | in: query | 1500 | in: query |
1511 | description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)' | 1501 | description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)' |
1512 | schema: | 1502 | schema: |
1513 | type: integer | 1503 | type: integer |
1514 | enum: | 1504 | enum: |
@@ -1535,6 +1525,23 @@ paths: | |||
1535 | description: only list reports of a specific video channel | 1525 | description: only list reports of a specific video channel |
1536 | schema: | 1526 | schema: |
1537 | type: string | 1527 | type: string |
1528 | - name: videoIs | ||
1529 | in: query | ||
1530 | description: only list blacklisted or deleted videos | ||
1531 | schema: | ||
1532 | type: string | ||
1533 | enum: | ||
1534 | - 'deleted' | ||
1535 | - 'blacklisted' | ||
1536 | - name: filter | ||
1537 | in: query | ||
1538 | description: only list account, comment or video reports | ||
1539 | schema: | ||
1540 | type: string | ||
1541 | enum: | ||
1542 | - 'video' | ||
1543 | - 'comment' | ||
1544 | - 'account' | ||
1538 | - $ref: '#/components/parameters/start' | 1545 | - $ref: '#/components/parameters/start' |
1539 | - $ref: '#/components/parameters/count' | 1546 | - $ref: '#/components/parameters/count' |
1540 | - $ref: '#/components/parameters/abusesSort' | 1547 | - $ref: '#/components/parameters/abusesSort' |
@@ -1547,17 +1554,13 @@ paths: | |||
1547 | type: array | 1554 | type: array |
1548 | items: | 1555 | items: |
1549 | $ref: '#/components/schemas/VideoAbuse' | 1556 | $ref: '#/components/schemas/VideoAbuse' |
1550 | '/videos/{id}/abuse': | 1557 | |
1551 | post: | 1558 | post: |
1552 | deprecated: true | ||
1553 | summary: Report an abuse | 1559 | summary: Report an abuse |
1554 | security: | 1560 | security: |
1555 | - OAuth2: [] | 1561 | - OAuth2: [] |
1556 | tags: | 1562 | tags: |
1557 | - Video Abuses | 1563 | - Abuses |
1558 | - Videos | ||
1559 | parameters: | ||
1560 | - $ref: '#/components/parameters/idOrUUID' | ||
1561 | requestBody: | 1564 | requestBody: |
1562 | required: true | 1565 | required: true |
1563 | content: | 1566 | content: |
@@ -1570,27 +1573,34 @@ paths: | |||
1570 | type: string | 1573 | type: string |
1571 | minLength: 4 | 1574 | minLength: 4 |
1572 | predefinedReasons: | 1575 | predefinedReasons: |
1573 | description: Reason categories that help triage reports | 1576 | $ref: '#/components/schemas/PredefinedAbuseReasons' |
1574 | type: array | 1577 | |
1575 | items: | 1578 | video: |
1576 | type: string | 1579 | type: object |
1577 | enum: | 1580 | properties: |
1578 | - violentOrAbusive | 1581 | id: |
1579 | - hatefulOrAbusive | 1582 | description: Video id to report |
1580 | - spamOrMisleading | 1583 | type: number |
1581 | - privacy | 1584 | startAt: |
1582 | - rights | 1585 | type: integer |
1583 | - serverRules | 1586 | description: Timestamp in the video that marks the beginning of the report |
1584 | - thumbnails | 1587 | minimum: 0 |
1585 | - captions | 1588 | endAt: |
1586 | startAt: | 1589 | type: integer |
1587 | type: integer | 1590 | description: Timestamp in the video that marks the ending of the report |
1588 | description: Timestamp in the video that marks the beginning of the report | 1591 | minimum: 0 |
1589 | minimum: 0 | 1592 | comment: |
1590 | endAt: | 1593 | type: object |
1591 | type: integer | 1594 | properties: |
1592 | description: Timestamp in the video that marks the ending of the report | 1595 | id: |
1593 | minimum: 0 | 1596 | description: Comment id to report |
1597 | type: number | ||
1598 | account: | ||
1599 | type: object | ||
1600 | properties: | ||
1601 | id: | ||
1602 | description: Account id to report | ||
1603 | type: number | ||
1594 | required: | 1604 | required: |
1595 | - reason | 1605 | - reason |
1596 | responses: | 1606 | responses: |
@@ -1598,18 +1608,16 @@ paths: | |||
1598 | description: successful operation | 1608 | description: successful operation |
1599 | '400': | 1609 | '400': |
1600 | description: incorrect request parameters | 1610 | description: incorrect request parameters |
1601 | '/videos/{id}/abuse/{abuseId}': | 1611 | '/abuses/{abuseId}': |
1602 | put: | 1612 | put: |
1603 | deprecated: true | ||
1604 | summary: Update an abuse | 1613 | summary: Update an abuse |
1605 | security: | 1614 | security: |
1606 | - OAuth2: | 1615 | - OAuth2: |
1607 | - admin | 1616 | - admin |
1608 | - moderator | 1617 | - moderator |
1609 | tags: | 1618 | tags: |
1610 | - Video Abuses | 1619 | - Abuses |
1611 | parameters: | 1620 | parameters: |
1612 | - $ref: '#/components/parameters/idOrUUID' | ||
1613 | - $ref: '#/components/parameters/abuseId' | 1621 | - $ref: '#/components/parameters/abuseId' |
1614 | requestBody: | 1622 | requestBody: |
1615 | content: | 1623 | content: |
@@ -1618,7 +1626,7 @@ paths: | |||
1618 | type: object | 1626 | type: object |
1619 | properties: | 1627 | properties: |
1620 | state: | 1628 | state: |
1621 | $ref: '#/components/schemas/VideoAbuseStateSet' | 1629 | $ref: '#/components/schemas/AbuseStateSet' |
1622 | moderationComment: | 1630 | moderationComment: |
1623 | type: string | 1631 | type: string |
1624 | description: Update the report comment visible only to the moderation team | 1632 | description: Update the report comment visible only to the moderation team |
@@ -1626,18 +1634,16 @@ paths: | |||
1626 | '204': | 1634 | '204': |
1627 | description: successful operation | 1635 | description: successful operation |
1628 | '404': | 1636 | '404': |
1629 | description: video abuse not found | 1637 | description: abuse not found |
1630 | delete: | 1638 | delete: |
1631 | deprecated: true | ||
1632 | tags: | 1639 | tags: |
1633 | - Video Abuses | 1640 | - Abuses |
1634 | summary: Delete an abuse | 1641 | summary: Delete an abuse |
1635 | security: | 1642 | security: |
1636 | - OAuth2: | 1643 | - OAuth2: |
1637 | - admin | 1644 | - admin |
1638 | - moderator | 1645 | - moderator |
1639 | parameters: | 1646 | parameters: |
1640 | - $ref: '#/components/parameters/idOrUUID' | ||
1641 | - $ref: '#/components/parameters/abuseId' | 1647 | - $ref: '#/components/parameters/abuseId' |
1642 | responses: | 1648 | responses: |
1643 | '204': | 1649 | '204': |
@@ -3320,7 +3326,7 @@ components: | |||
3320 | name: abuseId | 3326 | name: abuseId |
3321 | in: path | 3327 | in: path |
3322 | required: true | 3328 | required: true |
3323 | description: Video abuse id | 3329 | description: Abuse id |
3324 | schema: | 3330 | schema: |
3325 | type: integer | 3331 | type: integer |
3326 | captionLanguage: | 3332 | captionLanguage: |
@@ -3584,20 +3590,20 @@ components: | |||
3584 | label: | 3590 | label: |
3585 | type: string | 3591 | type: string |
3586 | 3592 | ||
3587 | VideoAbuseStateSet: | 3593 | AbuseStateSet: |
3588 | type: integer | 3594 | type: integer |
3589 | enum: | 3595 | enum: |
3590 | - 1 | 3596 | - 1 |
3591 | - 2 | 3597 | - 2 |
3592 | - 3 | 3598 | - 3 |
3593 | description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)' | 3599 | description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)' |
3594 | VideoAbuseStateConstant: | 3600 | AbuseStateConstant: |
3595 | properties: | 3601 | properties: |
3596 | id: | 3602 | id: |
3597 | $ref: '#/components/schemas/VideoAbuseStateSet' | 3603 | $ref: '#/components/schemas/AbuseStateSet' |
3598 | label: | 3604 | label: |
3599 | type: string | 3605 | type: string |
3600 | VideoAbusePredefinedReasons: | 3606 | AbusePredefinedReasons: |
3601 | type: array | 3607 | type: array |
3602 | items: | 3608 | items: |
3603 | type: string | 3609 | type: string |
@@ -3960,11 +3966,11 @@ components: | |||
3960 | type: string | 3966 | type: string |
3961 | example: The video is a spam | 3967 | example: The video is a spam |
3962 | predefinedReasons: | 3968 | predefinedReasons: |
3963 | $ref: '#/components/schemas/VideoAbusePredefinedReasons' | 3969 | $ref: '#/components/schemas/AbusePredefinedReasons' |
3964 | reporterAccount: | 3970 | reporterAccount: |
3965 | $ref: '#/components/schemas/Account' | 3971 | $ref: '#/components/schemas/Account' |
3966 | state: | 3972 | state: |
3967 | $ref: '#/components/schemas/VideoAbuseStateConstant' | 3973 | $ref: '#/components/schemas/AbuseStateConstant' |
3968 | moderationComment: | 3974 | moderationComment: |
3969 | type: string | 3975 | type: string |
3970 | example: Decided to ban the server since it spams us regularly | 3976 | example: Decided to ban the server since it spams us regularly |
@@ -4553,6 +4559,22 @@ components: | |||
4553 | updatedAt: | 4559 | updatedAt: |
4554 | type: string | 4560 | type: string |
4555 | format: date-time | 4561 | format: date-time |
4562 | |||
4563 | PredefinedAbuseReasons: | ||
4564 | description: Reason categories that help triage reports | ||
4565 | type: array | ||
4566 | items: | ||
4567 | type: string | ||
4568 | enum: | ||
4569 | - violentOrAbusive | ||
4570 | - hatefulOrAbusive | ||
4571 | - spamOrMisleading | ||
4572 | - privacy | ||
4573 | - rights | ||
4574 | - serverRules | ||
4575 | - thumbnails | ||
4576 | - captions | ||
4577 | |||
4556 | Job: | 4578 | Job: |
4557 | properties: | 4579 | properties: |
4558 | id: | 4580 | id: |
@@ -4690,11 +4712,11 @@ components: | |||
4690 | description: The user daily video quota | 4712 | description: The user daily video quota |
4691 | videosCount: | 4713 | videosCount: |
4692 | type: integer | 4714 | type: integer |
4693 | videoAbusesCount: | 4715 | abusesCount: |
4694 | type: integer | 4716 | type: integer |
4695 | videoAbusesAcceptedCount: | 4717 | abusesAcceptedCount: |
4696 | type: integer | 4718 | type: integer |
4697 | videoAbusesCreatedCount: | 4719 | abusesCreatedCount: |
4698 | type: integer | 4720 | type: integer |
4699 | videoCommentsCount: | 4721 | videoCommentsCount: |
4700 | type: integer | 4722 | type: integer |
@@ -5098,7 +5120,7 @@ components: | |||
5098 | 5120 | ||
5099 | - `2` NEW_COMMENT_ON_MY_VIDEO | 5121 | - `2` NEW_COMMENT_ON_MY_VIDEO |
5100 | 5122 | ||
5101 | - `3` NEW_VIDEO_ABUSE_FOR_MODERATORS | 5123 | - `3` NEW_ABUSE_FOR_MODERATORS |
5102 | 5124 | ||
5103 | - `4` BLACKLIST_ON_MY_VIDEO | 5125 | - `4` BLACKLIST_ON_MY_VIDEO |
5104 | 5126 | ||