openapi: add bulk delete endpoints to room members and users API, and add more query params to get all endpoints

This commit is contained in:
juancarmore 2025-12-04 16:45:37 +01:00
parent 450aa85b88
commit 5abd106641
21 changed files with 415 additions and 157 deletions

View File

@ -0,0 +1,9 @@
in: query
name: userId
required: false
description: >
Filter users by userId. The search matches users that contain the specified text in their userId.
For example, 'alice' will match 'alice_smith', 'bob_alice', and 'alice123'.
schema:
type: string
example: 'alice_smith'

View File

@ -0,0 +1,9 @@
name: userIds
in: query
required: true
description: >
Comma-separated list of user IDs to delete.
Each ID should correspond to an existing user.
schema:
type: string
example: 'alice_smith,john_doe'

View File

@ -0,0 +1,9 @@
name: name
in: query
required: false
description: >
Filter users by name. The search is case-insensitive and matches users that contain the specified text in their name.
For example, 'alice' will match 'Alice Smith' and 'Bob Alice'.
schema:
type: string
example: 'Alice'

View File

@ -0,0 +1,8 @@
name: role
in: query
required: false
description: Filter users by their role.
schema:
type: string
enum: [admin, user, room_member]
example: 'admin'

View File

@ -0,0 +1,9 @@
name: memberIds
in: query
required: true
description: >
Comma-separated list of room member IDs to delete.
Each ID should correspond to an existing member in the room.
schema:
type: string
example: 'alice_smith,ext:abc123'

View File

@ -0,0 +1,9 @@
name: name
in: query
required: false
description: >
Filter members by name. The search is case-insensitive and matches members whose names contain the specified text.
For example, 'ali' will match 'Alice' and 'Malik'.
schema:
type: string
example: 'Alice'

View File

@ -3,4 +3,7 @@ required: true
content:
application/json:
schema:
$ref: '../schemas/meet-room-anonymous-config.yaml'
type: object
properties:
config:
$ref: '../schemas/meet-room-anonymous-config.yaml'

View File

@ -3,4 +3,7 @@ required: true
content:
application/json:
schema:
$ref: '../schemas/meet-room-roles-config.yaml'
type: object
properties:
config:
$ref: '../schemas/meet-room-roles-config.yaml'

View File

@ -0,0 +1,53 @@
description: >
**Mixed results**. Some room members were deleted successfully while others
could not be deleted (e.g., if they do not exist).
content:
application/json:
schema:
type: object
properties:
message:
type: string
deleted:
type: array
items:
type: string
description: List of room members that were deleted successfully.
failed:
type: array
description: List of room members that could not be deleted along with the corresponding error messages.
items:
type: object
properties:
memberId:
type: string
description: The unique identifier of the room member that was not deleted.
example: 'alice_smith'
error:
type: string
description: A message explaining why the deletion failed.
example: 'Room member not found'
examples:
partial_deletion_with_errors:
summary: Some room members were deleted successfully, others failed
value:
message: '2 room member(s) could not be deleted'
deleted:
- 'alice_smith'
- 'ext:abc123'
failed:
- memberId: 'bob_jones'
error: 'Room member not found'
- memberId: 'ext:def456'
error: 'Room member not found'
no_deletion_performed:
summary: No room members were deleted
value:
message: '2 room member(s) could not be deleted'
deleted: []
failed:
- memberId: 'bob_jones'
error: 'Room member not found'
- memberId: 'room-123--EG_ZYX--XX448'
error: 'Room member not found'

View File

@ -0,0 +1,53 @@
description: >
**Mixed results**. Some users were deleted successfully while others
could not be deleted (e.g., if they do not exist).
content:
application/json:
schema:
type: object
properties:
message:
type: string
deleted:
type: array
items:
type: string
description: List of users that were deleted successfully.
failed:
type: array
description: List of users that could not be deleted along with the corresponding error messages.
items:
type: object
properties:
userId:
type: string
description: The unique identifier of the user that was not deleted.
example: 'john_doe'
error:
type: string
description: A message explaining why the deletion failed.
example: 'User not found'
examples:
partial_deletion_with_errors:
summary: Some users were deleted successfully, others failed
value:
message: '2 user(s) could not be deleted'
deleted:
- 'john_doe'
- 'jane_doe'
failed:
- userId: 'alice_smith'
error: 'User not found'
- userId: 'bob_jones'
error: 'User not found'
no_deletion_performed:
summary: No users were deleted
value:
message: '2 user(s) could not be deleted'
deleted: []
failed:
- userId: 'alice_smith'
error: 'User not found'
- userId: 'bob_jones'
error: 'User not found'

View File

@ -0,0 +1,18 @@
description: All specified users were deleted successfully.
content:
application/json:
schema:
type: object
properties:
message:
type: string
deleted:
type: array
items:
type: string
description: List of users that were deleted successfully.
example:
message: "All users deleted successfully"
deleted:
- 'alice_smith'
- 'john_doe'

View File

@ -0,0 +1,18 @@
description: All specified room members were deleted successfully.
content:
application/json:
schema:
type: object
properties:
message:
type: string
deleted:
type: array
items:
type: string
description: List of room members that were deleted successfully.
example:
message: "All room members deleted successfully"
deleted:
- 'alice_smith'
- 'ext:abc123'

View File

@ -22,9 +22,9 @@ paths:
/rooms/{roomId}/status:
$ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1status'
/rooms/{roomId}/members:
$ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1members'
$ref: './paths/room-members.yaml#/~1rooms~1{roomId}~1members'
/rooms/{roomId}/members/{memberId}:
$ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1members~1{memberId}'
$ref: './paths/room-members.yaml#/~1rooms~1{roomId}~1members~1{memberId}'
/recordings:
$ref: './paths/recordings.yaml#/~1recordings'
/recordings/download:

View File

@ -32,8 +32,8 @@ paths:
$ref: './paths/internal/meet-global-config.yaml#/~1config~1security'
/config/rooms/appearance:
$ref: './paths/internal/meet-global-config.yaml#/~1config~1rooms~1appearance'
/rooms/{roomId}/token:
$ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}~1token'
/rooms/{roomId}/members/token:
$ref: './paths/internal/room-members.yaml#/~1rooms~1{roomId}~1members~1token'
/recordings:
$ref: './paths/internal/recordings.yaml#/~1recordings'
/recordings/{recordingId}/stop:

View File

@ -1,11 +1,11 @@
/rooms/{roomId}/token:
/rooms/{roomId}/members/token:
post:
operationId: generateRoomMemberToken
summary: Generate room member token
description: >
Generates a token for a user to access an OpenVidu Meet room and its resources.
tags:
- Internal API - Rooms
- Internal API - Room Members
security:
- accessTokenHeader: []
parameters:

View File

@ -36,6 +36,9 @@
security:
- accessTokenHeader: []
parameters:
- $ref: '../../components/parameters/internal/user-id-query.yaml'
- $ref: '../../components/parameters/internal/user-name.yaml'
- $ref: '../../components/parameters/internal/user-role.yaml'
- $ref: '../../components/parameters/max-items.yaml'
- $ref: '../../components/parameters/next-page-token.yaml'
responses:
@ -49,6 +52,30 @@
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
delete:
operationId: bulkDeleteUsers
summary: Bulk delete users
description: |
Deletes multiple users at once by their userIds.
tags:
- Internal API - Users
security:
- accessTokenHeader: []
parameters:
- $ref: '../../components/parameters/internal/user-ids.yaml'
responses:
'200':
$ref: '../../components/responses/internal/success-bulk-delete-users.yaml'
'400':
$ref: '../../components/responses/internal/error-bulk-delete-users.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
'403':
$ref: '../../components/responses/forbidden-error.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
/users/me:
get:
operationId: getMe
@ -98,7 +125,7 @@
security:
- accessTokenHeader: []
parameters:
- $ref: '../../components/parameters/internal/userId-path.yaml'
- $ref: '../../components/parameters/internal/user-id-path.yaml'
responses:
'200':
$ref: '../../components/responses/internal/success-get-user.yaml'
@ -125,7 +152,7 @@
security:
- accessTokenHeader: []
parameters:
- $ref: '../../components/parameters/internal/userId-path.yaml'
- $ref: '../../components/parameters/internal/user-id-path.yaml'
responses:
'200':
$ref: '../../components/responses/internal/success-delete-user.yaml'

View File

@ -0,0 +1,173 @@
/rooms/{roomId}/members:
post:
operationId: addRoomMember
summary: Add a member to a room
description: |
Adds a new member to the specified room with custom permissions.
Each member receives a unique access URL that is different from the moderator and speaker URLs.
The member's permissions are based on a base role (moderator or speaker) with optional overrides.
This allows fine-grained control over what each specific participant can do in the meeting.
tags:
- OpenVidu Meet - Room Members
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
requestBody:
$ref: '../components/requestBodies/add-room-member-request.yaml'
responses:
'201':
$ref: '../components/responses/success-add-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
get:
operationId: getRoomMembers
summary: Get all members of a room
description: >
Retrieves a paginated list of all members in the specified room.
Each member has custom access URLs and permissions that can differ from the default moderator and speaker roles.
tags:
- OpenVidu Meet - Room Members
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/room-member-name.yaml'
- $ref: '../components/parameters/room-member-fields.yaml'
- $ref: '../components/parameters/max-items.yaml'
- $ref: '../components/parameters/next-page-token.yaml'
responses:
'200':
$ref: '../components/responses/success-get-room-members.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: bulkDeleteRoomMembers
summary: Bulk delete room members
description: |
Deletes multiple members from the room at once by their member IDs.
tags:
- OpenVidu Meet - Room Members
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/room-member-ids.yaml'
responses:
'200':
$ref: '../components/responses/success-bulk-delete-room-members.yaml'
'400':
$ref: '../components/responses/error-bulk-delete-room-members.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
/rooms/{roomId}/members/{memberId}:
get:
operationId: getRoomMember
summary: Get a room member
description: >
Retrieves the details of a specific room member by their member ID.
tags:
- OpenVidu Meet - Room Members
security:
- apiKeyHeader: []
- roomMemberTokenHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/room-member-id.yaml'
responses:
'200':
$ref: '../components/responses/success-get-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-member-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
put:
operationId: updateRoomMember
summary: Update a room member
description: |
Updates the permissions and/or base role of a specific room member.
You can modify the member's base role and custom permission overrides.
The effective permissions will be recalculated based on the new base role and custom permissions.
tags:
- OpenVidu Meet - Room Members
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/room-member-id.yaml'
requestBody:
$ref: '../components/requestBodies/update-room-member-request.yaml'
responses:
'200':
$ref: '../components/responses/success-update-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-member-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: deleteRoomMember
summary: Delete a room member
description: |
Removes a member from the specified room, revoking their access.
If the member is currently in an active meeting, they will be immediately kicked out.
The member's access URL will no longer be valid after deletion.
tags:
- OpenVidu Meet - Room Members
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/room-member-id.yaml'
responses:
'200':
$ref: '../components/responses/success-delete-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-member-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'

View File

@ -301,148 +301,3 @@
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
/rooms/{roomId}/members:
post:
operationId: addRoomMember
summary: Add a member to a room
description: |
Adds a new member to the specified room with custom permissions.
Each member receives a unique access URL that is different from the moderator and speaker URLs.
The member's permissions are based on a base role (moderator or speaker) with optional overrides.
This allows fine-grained control over what each specific participant can do in the meeting.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
requestBody:
$ref: '../components/requestBodies/add-room-member-request.yaml'
responses:
'201':
$ref: '../components/responses/success-add-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
get:
operationId: getRoomMembers
summary: Get all members of a room
description: >
Retrieves a paginated list of all members in the specified room.
Each member has custom access URLs and permissions that can differ from the default moderator and speaker roles.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/room-member-fields.yaml'
- $ref: '../components/parameters/max-items.yaml'
- $ref: '../components/parameters/next-page-token.yaml'
responses:
'200':
$ref: '../components/responses/success-get-room-members.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
/rooms/{roomId}/members/{memberId}:
get:
operationId: getRoomMember
summary: Get a room member
description: >
Retrieves the details of a specific room member by their member ID.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyHeader: []
- roomMemberTokenHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/member-id-path.yaml'
responses:
'200':
$ref: '../components/responses/success-get-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-member-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
put:
operationId: updateRoomMember
summary: Update a room member
description: |
Updates the permissions and/or base role of a specific room member.
You can modify the member's base role and custom permission overrides.
The effective permissions will be recalculated based on the new base role and custom permissions.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/member-id-path.yaml'
requestBody:
$ref: '../components/requestBodies/update-room-member-request.yaml'
responses:
'200':
$ref: '../components/responses/success-update-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-member-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: deleteRoomMember
summary: Delete a room member
description: |
Removes a member from the specified room, revoking their access.
If the member is currently in an active meeting, they will be immediately kicked out.
The member's access URL will no longer be valid after deletion.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyHeader: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/member-id-path.yaml'
responses:
'200':
$ref: '../components/responses/success-delete-room-member.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-member-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'

View File

@ -1,5 +1,7 @@
- name: OpenVidu Meet - Rooms
description: Operations related to managing OpenVidu Meet rooms
- name: OpenVidu Meet - Room Members
description: Operations related to managing members within OpenVidu Meet rooms
- name: OpenVidu Meet - Recordings
description: Operations related to managing OpenVidu Meet recordings
- name: Internal API - Authentication
@ -12,8 +14,8 @@
description: Operations related to managing users in OpenVidu Meet
- name: Internal API - Global Config
description: Operations related to managing global config in OpenVidu Meet
- name: Internal API - Rooms
description: Operations related to managing OpenVidu Meet rooms
- name: Internal API - Room Members
description: Operations related to managing members within OpenVidu Meet rooms
- name: Internal API - Meetings
description: Operations related to managing meetings in OpenVidu Meet rooms
- name: Internal API - Recordings