aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/doc/api/openapi.yaml120
1 files changed, 111 insertions, 9 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index ad4d58e4b..ec2fe9155 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1474,6 +1474,38 @@ paths:
1474 description: HTTP or Torrent/magnetURI import not enabled 1474 description: HTTP or Torrent/magnetURI import not enabled
1475 '400': 1475 '400':
1476 description: '`magnetUri` or `targetUrl` or a torrent file missing' 1476 description: '`magnetUri` or `targetUrl` or a torrent file missing'
1477
1478 /users/me/abuses:
1479 get:
1480 summary: List my abuses
1481 security:
1482 - OAuth2: []
1483 tags:
1484 - Abuses
1485 - My User
1486 parameters:
1487 - name: id
1488 in: query
1489 description: only list the report with this id
1490 schema:
1491 type: integer
1492 - name: state
1493 in: query
1494 schema:
1495 $ref: '#/components/schemas/AbuseStateSet'
1496 - $ref: '#/components/parameters/start'
1497 - $ref: '#/components/parameters/count'
1498 - $ref: '#/components/parameters/abusesSort'
1499 responses:
1500 '200':
1501 description: successful operation
1502 content:
1503 application/json:
1504 schema:
1505 type: array
1506 items:
1507 $ref: '#/components/schemas/Abuse'
1508
1477 /abuses: 1509 /abuses:
1478 get: 1510 get:
1479 summary: List abuses 1511 summary: List abuses
@@ -1501,13 +1533,8 @@ paths:
1501 type: string 1533 type: string
1502 - name: state 1534 - name: state
1503 in: query 1535 in: query
1504 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
1505 schema: 1536 schema:
1506 type: integer 1537 $ref: '#/components/schemas/AbuseStateSet'
1507 enum:
1508 - 1
1509 - 2
1510 - 3
1511 - name: searchReporter 1538 - name: searchReporter
1512 in: query 1539 in: query
1513 description: only list reports of a specific reporter 1540 description: only list reports of a specific reporter
@@ -1556,7 +1583,7 @@ paths:
1556 schema: 1583 schema:
1557 type: array 1584 type: array
1558 items: 1585 items:
1559 $ref: '#/components/schemas/VideoAbuse' 1586 $ref: '#/components/schemas/Abuse'
1560 1587
1561 post: 1588 post:
1562 summary: Report an abuse 1589 summary: Report an abuse
@@ -1653,6 +1680,61 @@ paths:
1653 description: successful operation 1680 description: successful operation
1654 '404': 1681 '404':
1655 description: block not found 1682 description: block not found
1683 '/abuses/{abuseId}/messages':
1684 get:
1685 summary: List messages of an abuse
1686 security:
1687 - OAuth2: []
1688 tags:
1689 - Abuses
1690 parameters:
1691 - $ref: '#/components/parameters/abuseId'
1692 responses:
1693 '200':
1694 description: successful operation
1695 content:
1696 application/json:
1697 schema:
1698 type: array
1699 items:
1700 $ref: '#/components/schemas/AbuseMessage'
1701
1702 post:
1703 summary: Add message to an abuse
1704 security:
1705 - OAuth2: []
1706 tags:
1707 - Abuses
1708 requestBody:
1709 required: true
1710 content:
1711 application/json:
1712 schema:
1713 type: object
1714 properties:
1715 message:
1716 description: Message to send
1717 type: string
1718 required:
1719 - message
1720 responses:
1721 '200':
1722 description: successful operation
1723 '400':
1724 description: incorrect request parameters
1725 '/abuses/{abuseId}/messages/{abuseMessageId}':
1726 delete:
1727 summary: Delete an abuse message
1728 security:
1729 - OAuth2: []
1730 tags:
1731 - Abuses
1732 parameters:
1733 - $ref: '#/components/parameters/abuseId'
1734 - $ref: '#/components/parameters/abuseMessageId'
1735 responses:
1736 '204':
1737 description: successful operation
1656 1738
1657 '/videos/{id}/blacklist': 1739 '/videos/{id}/blacklist':
1658 post: 1740 post:
@@ -3332,6 +3414,13 @@ components:
3332 description: Abuse id 3414 description: Abuse id
3333 schema: 3415 schema:
3334 type: integer 3416 type: integer
3417 abuseMessageId:
3418 name: abuseMessageId
3419 in: path
3420 required: true
3421 description: Abuse message id
3422 schema:
3423 type: integer
3335 captionLanguage: 3424 captionLanguage:
3336 name: captionLanguage 3425 name: captionLanguage
3337 in: path 3426 in: path
@@ -3599,7 +3688,7 @@ components:
3599 - 1 3688 - 1
3600 - 2 3689 - 2
3601 - 3 3690 - 3
3602 description: 'The video playlist privacy (Pending = `1`, Rejected = `2`, Accepted = `3`)' 3691 description: 'The abuse state (Pending = `1`, Rejected = `2`, Accepted = `3`)'
3603 AbuseStateConstant: 3692 AbuseStateConstant:
3604 properties: 3693 properties:
3605 id: 3694 id:
@@ -3960,7 +4049,7 @@ components:
3960 format: date-time 4049 format: date-time
3961 video: 4050 video:
3962 $ref: '#/components/schemas/Video' 4051 $ref: '#/components/schemas/Video'
3963 VideoAbuse: 4052 Abuse:
3964 properties: 4053 properties:
3965 id: 4054 id:
3966 type: integer 4055 type: integer
@@ -3991,6 +4080,19 @@ components:
3991 createdAt: 4080 createdAt:
3992 type: string 4081 type: string
3993 format: date-time 4082 format: date-time
4083 AbuseMessage:
4084 properties:
4085 id:
4086 type: integer
4087 message:
4088 type: string
4089 byModerator:
4090 type: boolean
4091 createdAt:
4092 type: string
4093 format: date-time
4094 account:
4095 $ref: '#/components/schemas/AccountSummary'
3994 VideoBlacklist: 4096 VideoBlacklist:
3995 properties: 4097 properties:
3996 id: 4098 id: