Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Update REST API blocklist documentation

Chocobozzz80e3be3559c4
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 70d8285892..d4249c7151 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -365,8 +365,8 @@ x-tagGroups:
tags:
- Abuses
- Video Blocks
- - Account Blocks
- - Server Blocks
+ - Account Blocklist
+ - Server Blocklist
- Automatic Tags
- Watched Words
- name: Instance
@@ -6302,8 +6302,8 @@ paths:
/api/v1/blocklist/status:
get:
tags:
- - Account Blocks
- - Server Blocks
+ - Account Blocklist
+ - Server Blocklist
summary: Get block status of accounts/hosts
parameters:
-
@@ -6332,11 +6332,205 @@ paths:
schema:
$ref: '#/components/schemas/BlockStatus'
+ /api/v1/users/me/blocklist/accounts:
+ get:
+ summary: List accounts blocked by my account
+ description: Get the list of accounts that the authenticated user has blocked
+ operationId: getMyBlockedAccounts
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - Account Blocklist
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ - name: search
+ in: query
+ required: false
+ description: Search query string
+ schema:
+ type: string
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountBlock'
+ '401':
+ description: authentication required
+ post:
+ summary: Block an account by my account
+ description: Add an account to the authenticated user's blocklist
+ operationId: blockAccount
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - Account Blocklist
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ accountName:
+ type: string
+ description: "Account name to block (format: name@host)"
+ example: '[email protected]'
+ required:
+ - accountName
+ responses:
+ '204':
+ description: successful operation - account blocked
+ '400':
+ description: invalid account name
+ '401':
+ description: authentication required
+ '404':
+ description: account not found
+
+ /api/v1/users/me/blocklist/accounts/{accountName}:
+ delete:
+ summary: Unblock an account by my account
+ description: Remove an account from the authenticated user's blocklist
+ operationId: unblockAccount
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - Account Blocklist
+ parameters:
+ - name: accountName
+ in: path
+ required: true
+ description: "Account name to unblock (format: name@host)"
+ schema:
+ type: string
+ example: '[email protected]'
+ responses:
+ '204':
+ description: successful operation - account unblocked
+ '400':
+ description: invalid account name
+ '401':
+ description: authentication required
+ '404':
+ description: account block not found
+
+ /api/v1/users/me/blocklist/servers:
+ get:
+ summary: List servers blocked by my account
+ description: Get the list of servers that the authenticated user has blocked
+ operationId: getMyBlockedServers
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - Account Blocklist
+ parameters:
+ - $ref: '#/components/parameters/start'
+ - $ref: '#/components/parameters/count'
+ - $ref: '#/components/parameters/sort'
+ - name: search
+ in: query
+ required: false
+ description: Search query string
+ schema:
+ type: string
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ total:
+ type: integer
+ example: 1
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/ServerBlock'
+ '401':
+ description: authentication required
+ post:
+ summary: Block a server by my account
+ description: Add a server to the authenticated user's blocklist
+ operationId: blockServer
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - Account Blocklist
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ host:
+ type: string
+ description: Server host to block
+ example: 'example.com'
+ required:
+ - host
+ responses:
+ '204':
+ description: successful operation - server blocked
+ '400':
+ description: invalid server host
+ '401':
+ description: authentication required
+ '404':
+ description: server not found
+
+ /api/v1/users/me/blocklist/servers/{host}:
+ delete:
+ summary: Unblock a server by my account
+ description: Remove a server from the authenticated user's blocklist
+ operationId: unblockServer
+ security:
+ - OAuth2:
+ - user
+ tags:
+ - Account Blocklist
+ parameters:
+ - name: host
+ in: path
+ required: true
+ description: Server host to unblock
+ schema:
+ type: string
+ example: 'example.com'
+ responses:
+ '204':
+ description: successful operation - server unblocked
+ '400':
+ description: invalid server host
+ '401':
+ description: authentication required
+ '404':
+ description: server block not found
+
/api/v1/server/blocklist/accounts:
get:
tags:
- - Account Blocks
- summary: List account blocks
+ - Server Blocklist
+ summary: List blocked accounts by server
security:
- OAuth2:
- admin
@@ -6349,8 +6543,8 @@ paths:
description: successful operation
post:
tags:
- - Account Blocks
- summary: Block an account
+ - Server Blocklist
+ summary: Block an account by server
security:
- OAuth2:
- admin
@@ -6375,8 +6569,8 @@ paths:
'/api/v1/server/blocklist/accounts/{accountName}':
delete:
tags:
- - Account Blocks
- summary: Unblock an account by its handle
+ - Server Blocklist
+ summary: Unblock an account by server
security:
- OAuth2:
- admin
@@ -6396,8 +6590,8 @@ paths:
/api/v1/server/blocklist/servers:
get:
tags:
- - Server Blocks
- summary: List server blocks
+ - Server Blocklist
+ summary: List blocked servers by server
security:
- OAuth2:
- admin
@@ -6410,8 +6604,8 @@ paths:
description: successful operation
post:
tags:
- - Server Blocks
- summary: Block a server
+ - Server Blocklist
+ summary: Block a server by server
security:
- OAuth2:
- admin
@@ -6436,8 +6630,8 @@ paths:
'/api/v1/server/blocklist/servers/{host}':
delete:
tags:
- - Server Blocks
- summary: Unblock a server by its domain
+ - Server Blocklist
+ summary: Unblock a server by server
security:
- OAuth2:
- admin
@@ -6453,7 +6647,7 @@ paths:
'204':
description: successful operation
'404':
- description: account block does not exist
+ description: server block does not exist
/api/v1/server/redundancy/{host}:
put:
@@ -9469,6 +9663,29 @@ components:
type: array
items:
$ref: '#/components/schemas/FileRedundancyInformation'
+ AccountBlock:
+ properties:
+ byAccount:
+ $ref: '#/components/schemas/Account'
+ blockedAccount:
+ $ref: '#/components/schemas/Account'
+ type: boolean
+ createdAt:
+ type: string
+ format: date-time
+ ServerBlock:
+ properties:
+ byAccount:
+ $ref: '#/components/schemas/Account'
+ blockedServer:
+ type: object
+ properties:
+ host:
+ type: string
+ format: hostname
+ createdAt:
+ type: string
+ format: date-time
CommentAutoTagPolicies:
properties:
review: