diff --git a/backend/openapi/components/parameters/private-access.yaml b/backend/openapi/components/parameters/private-access.yaml new file mode 100644 index 0000000..804392b --- /dev/null +++ b/backend/openapi/components/parameters/private-access.yaml @@ -0,0 +1,8 @@ +name: privateAcess +in: query +description: > + Indicates whether the retrieved recording URL should be configured for private access, i.e., the URL will be accessible only to authenticated users. +required: false +schema: + type: string + example: 'true' diff --git a/backend/openapi/components/responses/error-invalid-recording-secret.yaml b/backend/openapi/components/responses/error-invalid-recording-secret.yaml new file mode 100644 index 0000000..de476db --- /dev/null +++ b/backend/openapi/components/responses/error-invalid-recording-secret.yaml @@ -0,0 +1,8 @@ +description: Invalid recording secret +content: + application/json: + schema: + $ref: ../../schemas/error.yaml + example: + error: 'Recording Error' + message: 'Secret "123456" is not recognized for recording "room-123--EG_XYZ--XX445"' \ No newline at end of file diff --git a/backend/openapi/components/responses/success-get-recording-url.yaml b/backend/openapi/components/responses/success-get-recording-url.yaml new file mode 100644 index 0000000..44940a2 --- /dev/null +++ b/backend/openapi/components/responses/success-get-recording-url.yaml @@ -0,0 +1,11 @@ +description: Successfully retrieved the recording URL. +content: + application/json: + schema: + type: object + properties: + url: + type: string + format: uri + description: URL to access the recording media. + example: https://example.com/meet/api/v1/recordings/room-123--EG_XYZ--XX445/media?secret=abc123 diff --git a/backend/openapi/openvidu-meet-api.yaml b/backend/openapi/openvidu-meet-api.yaml index 53ce3df..da141fd 100644 --- a/backend/openapi/openvidu-meet-api.yaml +++ b/backend/openapi/openvidu-meet-api.yaml @@ -19,6 +19,8 @@ paths: $ref: './paths/recordings.yaml#/~1recordings~1{recordingId}' /recordings/{recordingId}/media: $ref: './paths/recordings.yaml#/~1recordings~1{recordingId}~1media' + /recordings/{recordingId/url: + $ref: './paths/recordings.yaml#/~1recordings~1{recordingId}~1url' components: securitySchemes: $ref: './components/security.yaml' diff --git a/backend/openapi/paths/recordings.yaml b/backend/openapi/paths/recordings.yaml index 648ae96..5c146cb 100644 --- a/backend/openapi/paths/recordings.yaml +++ b/backend/openapi/paths/recordings.yaml @@ -188,6 +188,8 @@ schema: type: string format: binary + '400': + $ref: '../components/responses/invalid-recording-secret.yaml' '401': $ref: '../components/responses/unauthorized-error.yaml' '403': @@ -209,3 +211,32 @@ $ref: '../components/responses/validation-error.yaml' '500': $ref: '../components/responses/internal-server-error.yaml' +/recordings/{recordingId}/url: + get: + operationId: getRecordingUrl + summary: Get recording URL + description: > + Retrieves the URL of a recording with the specified recording ID. + This URL can be used to access the recording media directly. + tags: + - OpenVidu Meet - Recordings + security: + - apiKeyInHeader: [] + - accessTokenCookie: [] + - recordingTokenCookie: [] + parameters: + - $ref: '../components/parameters/recording-id.yaml' + - $ref: '../components/parameters/private-access.yaml' + responses: + '200': + $ref: '../components/responses/success-get-recording-url.yaml' + '401': + $ref: '../components/responses/unauthorized-error.yaml' + '403': + $ref: '../components/responses/forbidden-error.yaml' + '404': + $ref: '../components/responses/error-recording-not-found.yaml' + '422': + $ref: '../components/responses/validation-error.yaml' + '500': + $ref: '../components/responses/internal-server-error.yaml'