From 39a9b7da02b58652ece50ec14379cd7bccaadbaf Mon Sep 17 00:00:00 2001 From: juancarmore Date: Fri, 28 Nov 2025 12:17:24 +0100 Subject: [PATCH] openapi: add room guests management API with update permissions for moderator and speaker roles --- .../update-room-guests-request.yaml | 30 +++++ .../responses/success-get-room.yaml | 75 +++++++++++- .../responses/success-get-rooms.yaml | 88 +++++++++++--- .../success-room-schedule-deletion.yaml | 114 +++++++++++++++++- .../responses/success-update-room-guests.yaml | 10 ++ .../components/schemas/meet-room-guests.yaml | 36 ++++++ .../components/schemas/meet-room-options.yaml | 24 ++++ .../openapi/components/schemas/meet-room.yaml | 23 ++-- .../backend/openapi/openvidu-meet-api.yaml | 2 + meet-ce/backend/openapi/paths/rooms.yaml | 33 +++++ 10 files changed, 398 insertions(+), 37 deletions(-) create mode 100644 meet-ce/backend/openapi/components/requestBodies/update-room-guests-request.yaml create mode 100644 meet-ce/backend/openapi/components/responses/success-update-room-guests.yaml create mode 100644 meet-ce/backend/openapi/components/schemas/meet-room-guests.yaml diff --git a/meet-ce/backend/openapi/components/requestBodies/update-room-guests-request.yaml b/meet-ce/backend/openapi/components/requestBodies/update-room-guests-request.yaml new file mode 100644 index 00000000..58a09275 --- /dev/null +++ b/meet-ce/backend/openapi/components/requestBodies/update-room-guests-request.yaml @@ -0,0 +1,30 @@ +description: Room guests configuration update options +required: true +content: + application/json: + schema: + type: object + properties: + moderator: + type: object + properties: + permissions: + $ref: '../schemas/meet-permissions.yaml' + description: > + The updated permissions for moderator guests. These permissions will replace the current default permissions for moderators. + description: > + Configuration for moderator guest role. If provided, the permissions will be updated. + speaker: + type: object + properties: + permissions: + $ref: '../schemas/meet-permissions.yaml' + description: > + The updated permissions for speaker guests. These permissions will replace the current default permissions for speakers. + description: > + Configuration for speaker guest role. If provided, the permissions will be updated. + description: | + Update the default permissions for moderator and/or speaker guest roles. + + You can update one or both roles. Only the roles specified in the request will be updated. + The permissions must be complete permission objects (all permission flags must be specified). diff --git a/meet-ce/backend/openapi/components/responses/success-get-room.yaml b/meet-ce/backend/openapi/components/responses/success-get-room.yaml index 8cdd2eba..ecf9b4e5 100644 --- a/meet-ce/backend/openapi/components/responses/success-get-room.yaml +++ b/meet-ce/backend/openapi/components/responses/success-get-room.yaml @@ -9,6 +9,7 @@ content: value: roomId: 'room-123' roomName: 'room' + owner: 'admin' creationDate: 1620000000000 autoDeletionDate: 1900000000000 autoDeletionPolicy: @@ -23,8 +24,41 @@ content: enabled: true e2ee: enabled: false - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-123?secret=123456' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-123?secret=654321' + permissions: + canRecord: false + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true status: open meetingEndAction: none @@ -53,5 +87,38 @@ content: fields=moderatorUrl,speakerUrl: summary: Response containing only moderator and speaker URLs value: - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-123?secret=123456' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-123?secret=654321' + permissions: + canRecord: false + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true diff --git a/meet-ce/backend/openapi/components/responses/success-get-rooms.yaml b/meet-ce/backend/openapi/components/responses/success-get-rooms.yaml index 5e9221c8..fbd79491 100644 --- a/meet-ce/backend/openapi/components/responses/success-get-rooms.yaml +++ b/meet-ce/backend/openapi/components/responses/success-get-rooms.yaml @@ -18,6 +18,7 @@ content: rooms: - roomId: 'room-123' roomName: 'room' + owner: 'admin' creationDate: 1620000000000 autoDeletionDate: 1900000000000 autoDeletionPolicy: @@ -32,12 +33,46 @@ content: enabled: true e2ee: enabled: false - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-123?secret=123456' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-123?secret=654321' + permissions: + canRecord: false + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true status: open meetingEndAction: none - roomId: 'room-456' roomName: 'room' + owner: 'app' creationDate: 1620001000000 autoDeletionDate: 1900000000000 autoDeletionPolicy: @@ -52,8 +87,41 @@ content: enabled: false e2ee: enabled: false - moderatorUrl: 'http://localhost:6080/room/room-456?secret=789012' - speakerUrl: 'http://localhost:6080/room/room-456?secret=210987' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-456?secret=789012' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-456?secret=210987' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true status: open meetingEndAction: none pagination: @@ -103,15 +171,3 @@ content: isTruncated: true nextPageToken: 'abc123' maxItems: 10 - - fields=moderatorUrl,speakerUrl: - summary: Response containing only moderator and speaker URLs - value: - rooms: - - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' - - moderatorUrl: 'http://localhost:6080/room/room-456?secret=789012' - speakerUrl: 'http://localhost:6080/room/room-456?secret=210987' - pagination: - isTruncated: false - maxItems: 10 diff --git a/meet-ce/backend/openapi/components/responses/success-room-schedule-deletion.yaml b/meet-ce/backend/openapi/components/responses/success-room-schedule-deletion.yaml index b83feebc..b2abec74 100644 --- a/meet-ce/backend/openapi/components/responses/success-room-schedule-deletion.yaml +++ b/meet-ce/backend/openapi/components/responses/success-room-schedule-deletion.yaml @@ -24,6 +24,7 @@ content: room: roomId: room-123 roomName: room + owner: 'admin' creationDate: 1620000000000 config: chat: @@ -32,8 +33,41 @@ content: enabled: false virtualBackground: enabled: true - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-123?secret=123456' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-123?secret=654321' + permissions: + canRecord: false + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true status: active_meeting meetingEndAction: delete room_with_active_meeting_and_recordings_scheduled_to_be_deleted: @@ -43,6 +77,7 @@ content: room: roomId: room-123 roomName: room + owner: 'admin' creationDate: 1620000000000 config: chat: @@ -51,8 +86,41 @@ content: enabled: false virtualBackground: enabled: true - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-123?secret=123456' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-123?secret=654321' + permissions: + canRecord: false + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true status: active_meeting meetingEndAction: delete room_with_active_meeting_scheduled_to_be_closed: @@ -62,6 +130,7 @@ content: room: roomId: room-123 roomName: room + owner: 'admin' creationDate: 1620000000000 config: chat: @@ -70,7 +139,40 @@ content: enabled: false virtualBackground: enabled: true - moderatorUrl: 'http://localhost:6080/room/room-123?secret=123456' - speakerUrl: 'http://localhost:6080/room/room-123?secret=654321' + guests: + moderator: + accessUrl: 'http://localhost:6080/room/room-123?secret=123456' + permissions: + canRecord: true + canRetrieveRecordings: true + canDeleteRecordings: true + canJoinMeeting: true + canShareAccessLinks: true + canMakeModerator: true + canKickParticipants: true + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true + speaker: + accessUrl: 'http://localhost:6080/room/room-123?secret=654321' + permissions: + canRecord: false + canRetrieveRecordings: true + canDeleteRecordings: false + canJoinMeeting: true + canShareAccessLinks: false + canMakeModerator: false + canKickParticipants: false + canEndMeeting: false + canPublishVideo: true + canPublishAudio: true + canShareScreen: true + canReadChat: true + canWriteChat: true + canChangeVirtualBackground: true status: active_meeting meetingEndAction: close diff --git a/meet-ce/backend/openapi/components/responses/success-update-room-guests.yaml b/meet-ce/backend/openapi/components/responses/success-update-room-guests.yaml new file mode 100644 index 00000000..7a0a7f51 --- /dev/null +++ b/meet-ce/backend/openapi/components/responses/success-update-room-guests.yaml @@ -0,0 +1,10 @@ +description: Success response for updating room guests configuration +content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: Room guests config for room 'room-123' updated successfully diff --git a/meet-ce/backend/openapi/components/schemas/meet-room-guests.yaml b/meet-ce/backend/openapi/components/schemas/meet-room-guests.yaml new file mode 100644 index 00000000..552dcb0e --- /dev/null +++ b/meet-ce/backend/openapi/components/schemas/meet-room-guests.yaml @@ -0,0 +1,36 @@ +type: object +properties: + moderator: + type: object + properties: + accessUrl: + type: string + format: uri + example: 'http://localhost:6080/room/room-123?secret=123456' + description: > + The URL for moderator guests to access the room. + permissions: + $ref: meet-permissions.yaml + description: > + The default permissions for moderator guests. These permissions define what moderator guests can do in the meeting. + speaker: + type: object + properties: + accessUrl: + type: string + format: uri + example: 'http://localhost:6080/room/room-123?secret=654321' + description: > + The URL for speaker guests to access the room. + permissions: + $ref: meet-permissions.yaml + description: > + The default permissions for speaker guests. These permissions define what speaker guests can do in the meeting. +description: | + Configuration for guest access to the room. Guests are participants who join without being registered members. + + The guests object contains two roles: + - moderator: Has full permissions to manage the room and meeting by default. + - speaker: Has permissions to publish audio and video streams by default. + + Each role has an access URL and a set of default permissions that will be applied to all guests joining with that role. diff --git a/meet-ce/backend/openapi/components/schemas/meet-room-options.yaml b/meet-ce/backend/openapi/components/schemas/meet-room-options.yaml index 0c0ac3e3..fe252f54 100644 --- a/meet-ce/backend/openapi/components/schemas/meet-room-options.yaml +++ b/meet-ce/backend/openapi/components/schemas/meet-room-options.yaml @@ -58,3 +58,27 @@ properties: $ref: './meet-room-config.yaml#/MeetRoomConfig' description: > The config for the room. These config will be used to configure the room's settings. + guests: + type: object + properties: + moderator: + type: object + properties: + permissions: + $ref: meet-permissions.yaml + description: > + Optional custom permissions for moderator guests. If not provided, default moderator permissions will be used. + speaker: + type: object + properties: + permissions: + $ref: meet-permissions.yaml + description: > + Optional custom permissions for speaker guests. If not provided, default speaker permissions will be used. + description: | + Optional configuration for default guest permissions. + + You can specify custom permissions for moderator and/or speaker guest roles. + If not provided, default permissions for each role will be used: + - Moderator: Full permissions to manage the room and meeting. + - Speaker: Permissions to publish audio and video streams. diff --git a/meet-ce/backend/openapi/components/schemas/meet-room.yaml b/meet-ce/backend/openapi/components/schemas/meet-room.yaml index 217bf919..9e880f1c 100644 --- a/meet-ce/backend/openapi/components/schemas/meet-room.yaml +++ b/meet-ce/backend/openapi/components/schemas/meet-room.yaml @@ -14,6 +14,15 @@ properties: The display name of the room, used to identify it in a user-friendly way. This value does not need to be unique. Maximum length: 50 characters. If not provided, the default value "Room" will be used. + owner: + type: string + example: 'admin' + description: | + The owner of the room, indicating who created it. + + This can be: + - A username (e.g., 'alice_smith') if the room was created by a registered Meet user. + - The string 'app' if the room was created via the REST API using an API key. creationDate: type: number example: 1620000000000 @@ -67,18 +76,10 @@ properties: # description: > # The maximum number of participants allowed in the room. If the number of participants exceeds # this limit, new participants will not be allowed to join. - moderatorUrl: - type: string - example: 'http://localhost:6080/room/room-123?secret=123456' + guests: + $ref: meet-room-guests.yaml description: > - The URL for moderator room members to access the room. The moderator role has special permissions to manage the - room resources and meeting participants. - speakerUrl: - type: string - example: 'http://localhost:6080/room/room-123?secret=654321' - description: > - The URL for speaker room members to access the room. The speaker role has permissions to publish audio and - video streams to the meeting. + Configuration for guest access to the room, including access URLs and default permissions for moderator and speaker roles. status: type: string enum: diff --git a/meet-ce/backend/openapi/openvidu-meet-api.yaml b/meet-ce/backend/openapi/openvidu-meet-api.yaml index d34ee222..219fed91 100644 --- a/meet-ce/backend/openapi/openvidu-meet-api.yaml +++ b/meet-ce/backend/openapi/openvidu-meet-api.yaml @@ -17,6 +17,8 @@ paths: $ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1config' /rooms/{roomId}/status: $ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1status' + /rooms/{roomId}/guests: + $ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1guests' /rooms/{roomId}/members: $ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1members' /rooms/{roomId}/members/{memberId}: diff --git a/meet-ce/backend/openapi/paths/rooms.yaml b/meet-ce/backend/openapi/paths/rooms.yaml index 2ee2140d..4b61ec29 100644 --- a/meet-ce/backend/openapi/paths/rooms.yaml +++ b/meet-ce/backend/openapi/paths/rooms.yaml @@ -235,6 +235,39 @@ $ref: '../components/responses/validation-error.yaml' '500': $ref: '../components/responses/internal-server-error.yaml' +/rooms/{roomId}/guests: + put: + operationId: updateRoomGuests + summary: Update room guests configuration + description: | + Updates the default permissions for moderator and/or speaker guest roles in the specified room. + + This allows you to customize what permissions guests will have when joining the room + using the moderator or speaker access URLs. + + You can update one or both roles in a single request. + tags: + - OpenVidu Meet - Rooms + security: + - apiKeyHeader: [] + - accessTokenHeader: [] + parameters: + - $ref: '../components/parameters/room-id-path.yaml' + requestBody: + $ref: '../components/requestBodies/update-room-guests-request.yaml' + responses: + '200': + $ref: '../components/responses/success-update-room-guests.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: post: operationId: addRoomMember