From 9bdc85922703aa9a2693d646a855ed12ff7853ef Mon Sep 17 00:00:00 2001 From: surajshivakumar Date: Thu, 6 Jun 2024 14:15:46 -0400 Subject: [PATCH 1/2] added api get request for call retrieval --- lib/swagger/swagger.yaml | 57 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/lib/swagger/swagger.yaml b/lib/swagger/swagger.yaml index 63796124..0f44ef91 100644 --- a/lib/swagger/swagger.yaml +++ b/lib/swagger/swagger.yaml @@ -130,7 +130,62 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GeneralError' + $ref: '#/components/schemas/GeneralError' + /Accounts/{AccountSid}/RecentCalls/{callSid}/record/{year}/{month}/{day}/mp3: + get: + tags: + - Call Records + summary: 'Retrieve an MP3 recording of a recent call' + description: 'Gets the MP3 recording of a recent call by specifying the account ID, call ID, and the date of the call.' + operationId: getMp3Recording + security: + - ApiKeyAuth: [ ] + parameters: + - name: accountSid + in: path + required: true + schema: + type: string + - name: callSid + in: path + required: true + schema: + type: string + - name: year + in: path + required: true + schema: + type: string + - name: month + in: path + required: true + schema: + type: string + - name: day + in: path + required: true + schema: + type: string + responses: + 200: + description: Successfully retrieved the MP3 file. + content: + audio/mp3: + schema: + type: string + format: binary + 404: + description: Call record not found + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralError' + 500: + description: System error + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralError' /Sbcs: post: tags: From 1143cab6dfc441424bcc292fdbab9325547670d6 Mon Sep 17 00:00:00 2001 From: surajshivakumar Date: Mon, 10 Jun 2024 18:18:22 -0400 Subject: [PATCH 2/2] swagger updated for call records --- lib/swagger/swagger.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/swagger/swagger.yaml b/lib/swagger/swagger.yaml index 0f44ef91..5d23d008 100644 --- a/lib/swagger/swagger.yaml +++ b/lib/swagger/swagger.yaml @@ -131,13 +131,13 @@ paths: application/json: schema: $ref: '#/components/schemas/GeneralError' - /Accounts/{AccountSid}/RecentCalls/{callSid}/record/{year}/{month}/{day}/mp3: + /Accounts/{accountSid}/RecentCalls/{callSid}/record/{year}/{month}/{day}/{format}: get: tags: - Call Records - summary: 'Retrieve an MP3 recording of a recent call' - description: 'Gets the MP3 recording of a recent call by specifying the account ID, call ID, and the date of the call.' - operationId: getMp3Recording + summary: 'Retrieve a recording of a recent call in specified format' + description: 'Gets the recording of a recent call by specifying the account ID, call ID, the date of the call, and the format of the recording (e.g., MP3 or WAV).' + operationId: getRecordingByFormat security: - ApiKeyAuth: [ ] parameters: @@ -166,11 +166,19 @@ paths: required: true schema: type: string + - name: format + in: path + required: true + schema: + type: string + enum: + - mp3 + - wav responses: 200: - description: Successfully retrieved the MP3 file. + description: Successfully retrieved the recording file. content: - audio/mp3: + audio/*: schema: type: string format: binary @@ -186,6 +194,7 @@ paths: application/json: schema: $ref: '#/components/schemas/GeneralError' + /Sbcs: post: tags: