diff --git a/backend/openapi/openvidu-meet-api.yaml b/backend/openapi/openvidu-meet-api.yaml index d3c0fcb..f25df1c 100644 --- a/backend/openapi/openvidu-meet-api.yaml +++ b/backend/openapi/openvidu-meet-api.yaml @@ -702,7 +702,13 @@ paths: example: 'room-123--EG_XYZ--XX445' responses: '200': - description: Successfully stopped the recording. + description: Accepted — The stop request has been accepted. The endpoint to retrieve the recording is provided in the Location header. + headers: + Location: + description: The URL to retrieve the recording details + schema: + type: string + example: 'https://openvidu.example.com/meet/api/v1/recordings/room-123--EG_XYZ--XX445' content: application/json: schema: diff --git a/backend/src/controllers/recording.controller.ts b/backend/src/controllers/recording.controller.ts index f8e7591..efe3d3a 100644 --- a/backend/src/controllers/recording.controller.ts +++ b/backend/src/controllers/recording.controller.ts @@ -94,6 +94,7 @@ export const stopRecording = async (req: Request, res: Response) => { const recordingService = container.get(RecordingService); const recordingInfo = await recordingService.stopRecording(recordingId); + res.setHeader('Location', `${req.protocol}://${req.get('host')}${req.originalUrl}`); return res.status(200).json(recordingInfo); } catch (error) { if (error instanceof OpenViduMeetError) {