From 355d773dd1c2f82db9ad19906a1e4933c120989d Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Mon, 7 Apr 2025 18:40:20 +0200 Subject: [PATCH] backend: Add internal API endpoints for starting and stopping recordings --- .../openapi/openvidu-meet-internal-api.yaml | 4 ++ .../openapi/paths/internal/recordings.yaml | 55 +++++++++++++++++++ backend/openapi/paths/recordings.yaml | 52 ------------------ 3 files changed, 59 insertions(+), 52 deletions(-) diff --git a/backend/openapi/openvidu-meet-internal-api.yaml b/backend/openapi/openvidu-meet-internal-api.yaml index f9bf812..b67bfb0 100644 --- a/backend/openapi/openvidu-meet-internal-api.yaml +++ b/backend/openapi/openvidu-meet-internal-api.yaml @@ -20,6 +20,10 @@ paths: $ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}' /rooms/{roomId}/participant-role: $ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}~1participant-role' + /recordings: + $ref: './paths/internal/recordings.yaml#/~1recordings' + /recordings/{recordingId}: + $ref: './paths/internal/recordings.yaml#/~1recordings~1{recordingId}' /participants/token: $ref: './paths/internal/participants.yaml#/~1participants~1token' /participants/token/refresh: diff --git a/backend/openapi/paths/internal/recordings.yaml b/backend/openapi/paths/internal/recordings.yaml index e69de29..cc87895 100644 --- a/backend/openapi/paths/internal/recordings.yaml +++ b/backend/openapi/paths/internal/recordings.yaml @@ -0,0 +1,55 @@ +/recordings: + post: + operationId: startRecording + summary: Start a recording + description: > + Start a new recording for an OpenVidu Meet room with the specified room ID. + tags: + - Internal API - Recordings + security: + - participantTokenCookie: [] + requestBody: + $ref: '../../components/requestBodies/start-recording-request.yaml' + responses: + '200': + $ref: '../../components/responses/success-start-recording.yaml' + '401': + $ref: '../../components/responses/unauthorized-error.yaml' + '403': + $ref: '../../components/responses/forbidden-error.yaml' + '404': + $ref: '../../components/responses/error-room-not-found.yaml' + '409': + $ref: '../../components/responses/error-recording-already-started.yaml' + '422': + $ref: '../../components/responses/validation-error.yaml' + '500': + $ref: '../../components/responses/internal-server-error.yaml' + +/recordings/{recordingId}: + put: + operationId: stopRecording + summary: Stop a recording + description: > + Stops a recording with the specified recording ID. + The recording must be in an `ACTIVE` state; otherwise, a 409 error is returned. + tags: + - Internal API - Recordings + security: + - participantTokenCookie: [] + parameters: + - $ref: '../../components/parameters/recording-id.yaml' + responses: + '200': + $ref: '../../components/responses/success-stop-recording.yaml' + '401': + $ref: '../../components/responses/unauthorized-error.yaml' + '403': + $ref: '../../components/responses/forbidden-error.yaml' + '404': + $ref: '../../components/responses/error-recording-not-found.yaml' + '409': + $ref: '../../components/responses/error-recording-in-progress.yaml' + '500': + $ref: '../../components/responses/internal-server-error.yaml' + diff --git a/backend/openapi/paths/recordings.yaml b/backend/openapi/paths/recordings.yaml index e398685..d5786f0 100644 --- a/backend/openapi/paths/recordings.yaml +++ b/backend/openapi/paths/recordings.yaml @@ -1,30 +1,4 @@ /recordings: - post: - operationId: createRecording - summary: Start a recording - description: > - Start a new recording for an OpenVidu Meet room with the specified room ID. - tags: - - OpenVidu Meet - Recordings - security: - - participantTokenCookie: [] - requestBody: - $ref: '../components/requestBodies/start-recording-request.yaml' - responses: - '200': - $ref: '../components/responses/success-start-recording.yaml' - '401': - $ref: '../components/responses/unauthorized-error.yaml' - '403': - $ref: '../components/responses/forbidden-error.yaml' - '404': - $ref: '../components/responses/error-room-not-found.yaml' - '409': - $ref: '../components/responses/error-recording-already-started.yaml' - '422': - $ref: '../components/responses/validation-error.yaml' - '500': - $ref: '../components/responses/internal-server-error.yaml' get: operationId: getRecordings summary: Get all recordings @@ -103,32 +77,6 @@ $ref: '../components/responses/internal-server-error.yaml' /recordings/{recordingId}: - put: - operationId: stopRecording - summary: Stop a recording - description: > - Stops a recording with the specified recording ID. - The recording must be in an `ACTIVE` state; otherwise, a 409 error is returned. - tags: - - OpenVidu Meet - Recordings - security: - - participantTokenCookie: [] - parameters: - - $ref: '../components/parameters/recording-id.yaml' - responses: - '200': - $ref: '../components/responses/success-stop-recording.yaml' - '401': - $ref: '../components/responses/unauthorized-error.yaml' - '403': - $ref: '../components/responses/forbidden-error.yaml' - '404': - $ref: '../components/responses/error-recording-not-found.yaml' - '409': - $ref: '../components/responses/error-recording-in-progress.yaml' - '500': - $ref: '../components/responses/internal-server-error.yaml' - get: operationId: getRecording summary: Get a recording