From c8afb7874c52df0ea029b3ec8b868ef85cb9a7e4 Mon Sep 17 00:00:00 2001 From: Ninika Sharma Date: Wed, 11 Aug 2021 00:14:12 -0700 Subject: [PATCH 1/4] Adding the existing folders to a new version --- .../communicationservicescallingserver.json | 1457 +++++++++++++++++ .../CallConnections_AddParticipant.json | 63 + ...lConnections_CancelAllMediaOperations.json | 58 + .../examples/CallConnections_CreateCall.json | 77 + .../examples/CallConnections_HangupCall.json | 50 + .../examples/CallConnections_PlayAudio.json | 61 + .../CallConnections_RemoveParticipant.json | 51 + .../examples/ServerCalls_AddParticipant.json | 63 + .../ServerCalls_GetRecordingProperties.json | 55 + .../examples/ServerCalls_JoinCall.json | 61 + .../examples/ServerCalls_PauseRecording.json | 51 + .../examples/ServerCalls_PlayAudio.json | 62 + .../ServerCalls_RemoveParticipant.json | 51 + .../examples/ServerCalls_ResumeRecording.json | 51 + .../examples/ServerCalls_StartRecording.json | 57 + .../examples/ServerCalls_StopRecording.json | 51 + 16 files changed, 2319 insertions(+) create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_AddParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CancelAllMediaOperations.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CreateCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_HangupCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_PlayAudio.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_RemoveParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_AddParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_GetRecordingProperties.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_JoinCall.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PauseRecording.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PlayAudio.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_RemoveParticipant.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_ResumeRecording.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StartRecording.json create mode 100644 specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StopRecording.json diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json new file mode 100644 index 000000000000..a529c3c06520 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json @@ -0,0 +1,1457 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-06-15-preview", + "title": "Azure Communication CallingServer Service", + "description": "Azure Communication CallingServer Service" + }, + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/calling/callConnections": { + "post": { + "tags": [ + "CallConnection" + ], + "summary": "Create a new call.", + "description": "Create a new call.", + "operationId": "CallConnections_CreateCall", + "parameters": [ + { + "name": "callRequest", + "in": "body", + "description": "Create call request.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateCallRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "Returns the create call response.", + "schema": { + "$ref": "#/definitions/CreateCallResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Create a new call.": { + "$ref": "./examples/CallConnections_CreateCall.json" + } + } + } + }, + "/calling/callConnections/{callConnectionId}/:hangup": { + "post": { + "tags": [ + "CallConnection" + ], + "summary": "Hangup the call.", + "description": "Hangup the call.", + "operationId": "CallConnections_HangupCall", + "parameters": [ + { + "name": "callConnectionId", + "in": "path", + "description": "The call connection id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the hangup call response." + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Hangup the call.": { + "$ref": "./examples/CallConnections_HangupCall.json" + } + } + } + }, + "/calling/callConnections/{callConnectionId}/:playAudio": { + "post": { + "tags": [ + "CallConnection" + ], + "summary": "Play audio in the call.", + "description": "Play audio in the call.", + "operationId": "CallConnections_PlayAudio", + "parameters": [ + { + "name": "callConnectionId", + "in": "path", + "description": "The call connection id.", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "Play audio request.", + "required": true, + "schema": { + "$ref": "#/definitions/PlayAudioRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the play audio response.", + "schema": { + "$ref": "#/definitions/PlayAudioResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Play audio in the call.": { + "$ref": "./examples/CallConnections_PlayAudio.json" + } + } + } + }, + "/calling/callConnections/{callConnectionId}/:cancelAllMediaOperations": { + "post": { + "tags": [ + "CallConnection" + ], + "summary": "Cancel all media operations.", + "description": "Cancel all media operations.", + "operationId": "CallConnections_CancelAllMediaOperations", + "parameters": [ + { + "name": "callConnectionId", + "in": "path", + "description": "The call connection id", + "required": true, + "type": "string" + }, + { + "name": "cancelAllMediaOperationRequest", + "in": "body", + "description": "The cancel all media operations context.", + "required": true, + "schema": { + "$ref": "#/definitions/CancelAllMediaOperationsRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the cancel all media operations response.", + "schema": { + "$ref": "#/definitions/CancelAllMediaOperationsResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Cancel all media operations.": { + "$ref": "./examples/CallConnections_CancelAllMediaOperations.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/participants": { + "post": { + "tags": [ + "ServerCall" + ], + "summary": "Add a participant to the call.", + "description": "Add a participant to the call.", + "operationId": "ServerCalls_AddParticipant", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "addParticipantRequest", + "in": "body", + "description": "The add participant request.", + "required": true, + "schema": { + "$ref": "#/definitions/AddParticipantRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the add participant response.", + "schema": { + "$ref": "#/definitions/AddParticipantResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Add a participant to the call.": { + "$ref": "./examples/ServerCalls_AddParticipant.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/participants/{participantId}": { + "delete": { + "tags": [ + "ServerCall" + ], + "summary": "Remove participant from the call.", + "description": "Remove participant from the call.", + "operationId": "ServerCalls_RemoveParticipant", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "Server call id.", + "required": true, + "type": "string" + }, + { + "name": "participantId", + "in": "path", + "description": "Participant id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the remove participant response." + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Remove participant from the call.": { + "$ref": "./examples/ServerCalls_RemoveParticipant.json" + } + } + } + }, + "/calling/callConnections/{callConnectionId}/participants": { + "post": { + "tags": [ + "CallConnection" + ], + "summary": "Add a participant to the call.", + "description": "Add a participant to the call.", + "operationId": "CallConnections_AddParticipant", + "parameters": [ + { + "name": "callConnectionId", + "in": "path", + "description": "The call connection id.", + "required": true, + "type": "string" + }, + { + "name": "addParticipantRequest", + "in": "body", + "description": "Add participant request.", + "required": true, + "schema": { + "$ref": "#/definitions/AddParticipantRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the add participant response.", + "schema": { + "$ref": "#/definitions/AddParticipantResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Add a participant to the call.": { + "$ref": "./examples/CallConnections_AddParticipant.json" + } + } + } + }, + "/calling/callConnections/{callConnectionId}/participants/{participantId}": { + "delete": { + "tags": [ + "CallConnection" + ], + "summary": "Remove a participant from the call.", + "description": "Remove a participant from the call.", + "operationId": "CallConnections_RemoveParticipant", + "parameters": [ + { + "name": "callConnectionId", + "in": "path", + "description": "The call connection id.", + "required": true, + "type": "string" + }, + { + "name": "participantId", + "in": "path", + "description": "The participant id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the remove participant response." + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Remove a participant from the call.": { + "$ref": "./examples/CallConnections_RemoveParticipant.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/recordings": { + "post": { + "tags": [ + "Recording" + ], + "summary": "Start recording of the call.", + "operationId": "ServerCalls_StartRecording", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "The request body of start call recording request.", + "required": true, + "schema": { + "$ref": "#/definitions/StartCallRecordingRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the start call recording response.", + "schema": { + "$ref": "#/definitions/StartCallRecordingResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Start recording of the call.": { + "$ref": "./examples/ServerCalls_StartRecording.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/recordings/{recordingId}": { + "get": { + "tags": [ + "Recording" + ], + "summary": "Get call recording properties.", + "operationId": "ServerCalls_GetRecordingProperties", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "recordingId", + "in": "path", + "description": "The recording id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the recording state.", + "schema": { + "$ref": "#/definitions/CallRecordingProperties" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Get call recording properties.": { + "$ref": "./examples/ServerCalls_GetRecordingProperties.json" + } + } + }, + "delete": { + "tags": [ + "Recording" + ], + "summary": "Stop recording the call.", + "operationId": "ServerCalls_StopRecording", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "recordingId", + "in": "path", + "description": "The recording id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the stop call recording response." + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Stop recording the call.": { + "$ref": "./examples/ServerCalls_StopRecording.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/recordings/{recordingId}/:pause": { + "post": { + "tags": [ + "Recording" + ], + "summary": "Pause recording the call.", + "operationId": "ServerCalls_PauseRecording", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "recordingId", + "in": "path", + "description": "The recording id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the pause call recording response." + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Pause recording the call.": { + "$ref": "./examples/ServerCalls_PauseRecording.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/recordings/{recordingId}/:resume": { + "post": { + "tags": [ + "Recording" + ], + "summary": "Resume recording the call.", + "operationId": "ServerCalls_ResumeRecording", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "recordingId", + "in": "path", + "description": "The recording id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the resume call recording response." + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Resume recording the call.": { + "$ref": "./examples/ServerCalls_ResumeRecording.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/:join": { + "post": { + "tags": [ + "ServerCall" + ], + "summary": "Join a call.", + "description": "Join a call.", + "operationId": "ServerCalls_JoinCall", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "callRequest", + "in": "body", + "description": "The join call request.", + "required": true, + "schema": { + "$ref": "#/definitions/JoinCallRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the join call response.", + "schema": { + "$ref": "#/definitions/JoinCallResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Join a call.": { + "$ref": "./examples/ServerCalls_JoinCall.json" + } + } + } + }, + "/calling/serverCalls/{serverCallId}/:playAudio": { + "post": { + "tags": [ + "ServerCall" + ], + "summary": "Play audio in the call.", + "description": "Play audio in the call.", + "operationId": "ServerCalls_PlayAudio", + "parameters": [ + { + "name": "serverCallId", + "in": "path", + "description": "The server call id.", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "Play audio request.", + "required": true, + "schema": { + "$ref": "#/definitions/PlayAudioRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "202": { + "description": "Returns the play audio response.", + "schema": { + "$ref": "#/definitions/PlayAudioResult" + } + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + }, + "404": { + "$ref": "#/responses/404" + }, + "500": { + "$ref": "#/responses/500" + } + }, + "x-ms-examples": { + "Play audio in the call.": { + "$ref": "./examples/ServerCalls_PlayAudio.json" + } + } + } + } + }, + "definitions": { + "MediaType": { + "enum": [ + "audio", + "video" + ], + "type": "string", + "x-ms-enum": { + "name": "MediaType", + "modelAsString": true + } + }, + "EventSubscriptionType": { + "enum": [ + "participantsUpdated", + "dtmfReceived" + ], + "type": "string", + "x-ms-enum": { + "name": "EventSubscriptionType", + "modelAsString": true + } + }, + "CreateCallRequest": { + "description": "The request payload for create call.", + "required": [ + "targets", + "source", + "callbackUri" + ], + "type": "object", + "properties": { + "alternateCallerId": { + "$ref": "#/definitions/PhoneNumberIdentifier", + "description": "The alternate identity of the source of the call if dialing out to a pstn number" + }, + "targets": { + "description": "The targets of the call.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationIdentifier" + } + }, + "source": { + "$ref": "#/definitions/CommunicationIdentifier", + "description": "The source of the call." + }, + "subject": { + "description": "The subject.", + "type": "string" + }, + "callbackUri": { + "description": "The callback URI.", + "type": "string" + }, + "requestedMediaTypes": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/MediaType" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "PhoneNumberIdentifier": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/PhoneNumberIdentifierModel" + }, + "CommunicationIdentifier": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationIdentifierModel" + }, + "CommunicationUserIdentifier": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationUserIdentifierModel" + }, + "CommunicationCloudEnvironment": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationCloudEnvironmentModel" + }, + "MicrosoftTeamsUserIdentifier": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/MicrosoftTeamsUserIdentifierModel" + }, + "CreateCallResult": { + "description": "The response payload of the create call operation.", + "type": "object", + "properties": { + "callConnectionId": { + "description": "The call connection id.", + "type": "string" + } + } + }, + "PlayAudioRequest": { + "description": "The request payload for playing audio.", + "type": "object", + "properties": { + "audioFileUri": { + "description": "The media resource uri of the play audio request. \r\nCurrently only Wave file (.wav) format audio prompts are supported.\r\nMore specifically, the audio content in the wave file must be mono (single-channel),\r\n16-bit samples with a 16,000 (16KHz) sampling rate.", + "type": "string" + }, + "loop": { + "description": "The flag indicating whether audio file needs to be played in loop or not.", + "type": "boolean" + }, + "operationContext": { + "description": "The value to identify context of the operation.", + "type": "string" + }, + "audioFileId": { + "description": "An id for the media in the AudioFileUri, using which we cache the media resource.", + "type": "string" + }, + "callbackUri": { + "description": "The callback Uri to receive PlayAudio status notifications.", + "type": "string" + } + } + }, + "OperationStatus": { + "description": "The status of the operation", + "enum": [ + "notStarted", + "running", + "completed", + "failed" + ], + "type": "string", + "x-ms-enum": { + "name": "OperationStatus", + "modelAsString": true + } + }, + "PlayAudioResult": { + "description": "The response payload for play audio operation.", + "required": [ + "status" + ], + "type": "object", + "properties": { + "operationId": { + "description": "The operation id.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + }, + "operationContext": { + "description": "The operation context provided by client.", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "The result info for the operation." + } + } + }, + "ResultInfo": { + "description": "Result info class to be used to report result status for actions/operations.", + "required": [ + "code", + "subcode" + ], + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "The result code associated with the operation.", + "type": "integer" + }, + "subcode": { + "format": "int32", + "description": "The subcode that further classifies the result.", + "type": "integer" + }, + "message": { + "description": "The message is a detail explanation of subcode.", + "type": "string" + } + } + }, + "CancelAllMediaOperationsRequest": { + "description": "The request payload for cancel all media operations", + "type": "object", + "properties": { + "operationContext": { + "description": "The context for this operation.", + "type": "string" + } + } + }, + "CancelAllMediaOperationsResult": { + "description": "The response payload of the cancel all media operations.", + "required": [ + "status" + ], + "type": "object", + "properties": { + "operationId": { + "description": "The operation id.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + }, + "operationContext": { + "description": "The operation context provided by client.", + "type": "string" + }, + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "The result info for the operation." + } + } + }, + "AddParticipantRequest": { + "description": "The add participant request.", + "type": "object", + "properties": { + "alternateCallerId": { + "$ref": "#/definitions/PhoneNumberIdentifier", + "description": "The alternate identity of source participant." + }, + "participant": { + "$ref": "#/definitions/CommunicationIdentifier", + "description": "The participant to be added to the call." + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "callbackUri": { + "description": "The callback URI.", + "type": "string" + } + } + }, + "AddParticipantResult": { + "description": "The add participant result", + "type": "object", + "properties": { + "participantId": { + "description": "The id of the added participant.", + "type": "string" + } + } + }, + "StartCallRecordingRequest": { + "description": "The request payload start call recording operation.", + "type": "object", + "properties": { + "recordingStateCallbackUri": { + "description": "The uri to send notifications to.", + "type": "string" + } + } + }, + "StartCallRecordingResult": { + "description": "The response payload of start call recording operation.", + "type": "object", + "properties": { + "recordingId": { + "description": "The recording id of the started recording", + "type": "string" + } + } + }, + "CallRecordingState": { + "description": "The state of the recording", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-ms-enum": { + "name": "CallRecordingState", + "modelAsString": true + } + }, + "CallRecordingProperties": { + "description": "The response payload of get call recording properties operation.", + "required": [ + "recordingState" + ], + "type": "object", + "properties": { + "recordingState": { + "$ref": "#/definitions/CallRecordingState" + } + } + }, + "JoinCallRequest": { + "description": "The request payload for join call.", + "required": [ + "source", + "callbackUri" + ], + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/CommunicationIdentifier", + "description": "The source of the call." + }, + "subject": { + "description": "The subject.", + "type": "string" + }, + "callbackUri": { + "description": "The callback URI.", + "type": "string" + }, + "requestedMediaTypes": { + "description": "The requested modalities.", + "type": "array", + "items": { + "$ref": "#/definitions/MediaType" + } + }, + "requestedCallEvents": { + "description": "The requested call events to subscribe to.", + "type": "array", + "items": { + "$ref": "#/definitions/EventSubscriptionType" + } + } + } + }, + "JoinCallResult": { + "description": "The response payload of the join call operation.", + "type": "object", + "properties": { + "callConnectionId": { + "description": "The call connection id.", + "type": "string" + } + } + }, + "CallConnectionState": { + "description": "The call connection state.", + "enum": [ + "incoming", + "connecting", + "connected", + "disconnecting", + "disconnected" + ], + "type": "string", + "x-ms-enum": { + "name": "CallConnectionState", + "modelAsString": true + } + }, + "CallConnectionStateChangedEvent": { + "description": "The call connection state changed event.", + "required": [ + "callConnectionState" + ], + "type": "object", + "properties": { + "serverCallId": { + "description": "The server call.id.", + "type": "string" + }, + "callConnectionId": { + "description": "The call connection id.", + "type": "string" + }, + "callConnectionState": { + "$ref": "#/definitions/CallConnectionState" + } + } + }, + "CallRecordingStateChangeEvent": { + "description": "The call recording state change event.", + "required": [ + "state", + "startDateTime" + ], + "type": "object", + "properties": { + "recordingId": { + "description": "The call recording id", + "type": "string" + }, + "state": { + "$ref": "#/definitions/CallRecordingState" + }, + "startDateTime": { + "format": "date-time", + "description": "The time of the recording started", + "type": "string" + }, + "serverCallId": { + "description": "The server call.id.", + "type": "string" + } + } + }, + "AddParticipantResultEvent": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "The result details." + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + } + } + }, + "ParticipantsUpdatedEvent": { + "description": "The participant update event", + "type": "object", + "properties": { + "callConnectionId": { + "description": "The call connection id.", + "type": "string" + }, + "participants": { + "description": "The list of participants.", + "type": "array", + "items": { + "$ref": "#/definitions/CallParticipant" + } + } + } + }, + "CallParticipant": { + "description": "A participant in a call.", + "required": [ + "isMuted" + ], + "type": "object", + "properties": { + "identifier": { + "$ref": "#/definitions/CommunicationIdentifier", + "description": "Communication identifier of the participant" + }, + "participantId": { + "description": "Participant id", + "type": "string" + }, + "isMuted": { + "description": "Is participant muted", + "type": "boolean" + } + } + }, + "PlayAudioResultEvent": { + "description": "The play audio result event.", + "required": [ + "status" + ], + "type": "object", + "properties": { + "resultInfo": { + "$ref": "#/definitions/ResultInfo", + "description": "The result details." + }, + "operationContext": { + "description": "The operation context.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + } + } + }, + "ToneReceivedEvent": { + "description": "The subscribe to tone event", + "required": [ + "toneInfo" + ], + "type": "object", + "properties": { + "toneInfo": { + "$ref": "#/definitions/ToneInfo", + "description": "The tone info." + }, + "callConnectionId": { + "description": "The call connection id.", + "type": "string" + } + } + }, + "ToneValue": { + "description": "The tone value.", + "enum": [ + "tone0", + "tone1", + "tone2", + "tone3", + "tone4", + "tone5", + "tone6", + "tone7", + "tone8", + "tone9", + "star", + "pound", + "a", + "b", + "c", + "d", + "flash" + ], + "type": "string", + "x-ms-enum": { + "name": "ToneValue", + "modelAsString": true + } + }, + "ToneInfo": { + "description": "The information about the tone.", + "required": [ + "sequenceId", + "tone" + ], + "type": "object", + "properties": { + "sequenceId": { + "format": "int32", + "description": "The sequence id which can be used to determine if the same tone was played multiple times or if any tones were missed.", + "type": "integer" + }, + "tone": { + "$ref": "#/definitions/ToneValue" + } + } + }, + "CommunicationErrorResponse": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, + "CommunicationError": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Version of API to invoke.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "Endpoint": { + "name": "endpoint", + "in": "path", + "description": "The endpoint of the Azure Communication resource.", + "required": true, + "type": "string", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + }, + "responses": { + "400": { + "description": "BadRequest", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "404": { + "description": "NotFound", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + }, + "500": { + "description": "InternalServerError", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_AddParticipant.json new file mode 100644 index 000000000000..e2d52eddcafd --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_AddParticipant.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c", + "addParticipantRequest": { + "participant": { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_387c0153-3b4d-4779-9ee3-a6e2440df075" + } + }, + "operationContext": "5161f20a-7225-4a74-a529-efaf8e7b351d", + "callbackUri": "https://app.contoso.com/callback" + } + }, + "responses": { + "202": { + "body": { + "participantId": "c736e607-5b39-42a7-a6bb-bb43029e5bac" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CancelAllMediaOperations.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CancelAllMediaOperations.json new file mode 100644 index 000000000000..03642fbb32b3 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CancelAllMediaOperations.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c", + "cancelAllMediaOperationRequest": { + "operationContext": "91848e99-0d36-4bca-ac06-6c38fe390289" + } + }, + "responses": { + "200": { + "body": { + "status": "completed", + "operationContext": "91848e99-0d36-4bca-ac06-6c38fe390289" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CreateCall.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CreateCall.json new file mode 100644 index 000000000000..071b505be1ee --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_CreateCall.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callRequest": { + "source": { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_da7be3a9-8788-42a6-85c6-56b2cf784fce" + } + }, + "targets": [ + { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_0f50d091-5bd3-448b-884d-44be7037d9b9" + } + }, + { + "phoneNumber": { + "value": "+14250123456" + } + } + ], + "alternateCallerId": { + "value": "+18440123456" + }, + "subject": "Reminder call", + "callbackUri": "https://app.contoso.com/callback", + "requestedMediaTypes": [ + "audio", + "video" + ], + "requestedCallEvents": [ + "dtmfReceived", + "participantsUpdated" + ] + } + }, + "responses": { + "201": { + "body": { + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_HangupCall.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_HangupCall.json new file mode 100644 index 000000000000..813b2fdf62fa --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_HangupCall.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c" + }, + "responses": { + "202": {}, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_PlayAudio.json new file mode 100644 index 000000000000..7eb69a0c1b39 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_PlayAudio.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c", + "request": { + "audioFileUri": "https://app.contoso.com/audio/message.wav", + "loop": false, + "operationContext": "31130c66-2f86-41b5-af61-23850243e093", + "audioFileId": "42922e2c-a204-4ac4-8d80-375ae2792389" + } + }, + "responses": { + "202": { + "body": { + "status": "running", + "operationContext": "31130c66-2f86-41b5-af61-23850243e093" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_RemoveParticipant.json new file mode 100644 index 000000000000..52b34a7ee44a --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/CallConnections_RemoveParticipant.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "callConnectionId": "18dea47f-b081-4107-9a5c-4300819d2c6c", + "participantId": "d8b26c04-7186-41e2-971a-bdfa9a662a53" + }, + "responses": { + "202": {}, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_AddParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_AddParticipant.json new file mode 100644 index 000000000000..df749269243e --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_AddParticipant.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "addParticipantRequest": { + "participant": { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538" + } + }, + "operationContext": "5161f20a-7225-4a74-a529-efaf8e7b351d", + "callbackUri": "https://app.contoso.com/callback" + } + }, + "responses": { + "202": { + "body": { + "participantId": "c736e607-5b39-42a7-a6bb-bb43029e5bac" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_GetRecordingProperties.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_GetRecordingProperties.json new file mode 100644 index 000000000000..784c30d73294 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_GetRecordingProperties.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": { + "body": { + "recordingState": "active" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_JoinCall.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_JoinCall.json new file mode 100644 index 000000000000..c6394104b9d1 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_JoinCall.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "callRequest": { + "source": { + "communicationUser": { + "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_f51123c4-004b-494d-98cf-802d4b824fc4" + } + }, + "subject": "Incident meeting", + "callbackUri": "https://app.contoso.com/callback", + "requestedMediaTypes": [ + "audio" + ], + "requestedCallEvents": [ + "participantsUpdated" + ] + } + }, + "responses": { + "202": { + "body": { + "callConnectionId": "b9614373-fd0b-480c-8fd2-cb58b70eab9f" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PauseRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PauseRecording.json new file mode 100644 index 000000000000..0015a5349313 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PauseRecording.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": {}, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PlayAudio.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PlayAudio.json new file mode 100644 index 000000000000..2f15ac48d2df --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_PlayAudio.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "request": { + "audioFileUri": "https://app.contoso.com/audio/message.wav", + "loop": false, + "operationContext": "31130c66-2f86-41b5-af61-23850243e093", + "audioFileId": "42922e2c-a204-4ac4-8d80-375ae2792389", + "callbackUri": "https://app.contoso.com/callback" + } + }, + "responses": { + "202": { + "body": { + "status": "running", + "operationContext": "31130c66-2f86-41b5-af61-23850243e093" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_RemoveParticipant.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_RemoveParticipant.json new file mode 100644 index 000000000000..1ab21f281dfd --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_RemoveParticipant.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "participantId": "d8b26c04-7186-41e2-971a-bdfa9a662a53" + }, + "responses": { + "202": {}, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_ResumeRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_ResumeRecording.json new file mode 100644 index 000000000000..0015a5349313 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_ResumeRecording.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": {}, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StartRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StartRecording.json new file mode 100644 index 000000000000..ac39cd68f62c --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StartRecording.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "request": { + "recordingStateCallbackUri": "https://app.contoso.com/callback" + } + }, + "responses": { + "200": { + "body": { + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + } + }, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StopRecording.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StopRecording.json new file mode 100644 index 000000000000..0015a5349313 --- /dev/null +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/examples/ServerCalls_StopRecording.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "endpoint": "https://contoso.communications.azure.com", + "api-version": "2021-06-15-preview", + "serverCallId": "aHR0cHM6Ly9jb252ZXJzYXRpb251cmwvdGVzdA", + "recordingId": "eyJQbGF0Zm9ybUVuZHBvaW50SWQiOiI3ZjQyNmI1OC03NTRmLTQ2M2UtYWRkMS0wNWFhNGNiYjliMzQiLCJSZXNvdXJjZVNwZWNpZmljSWQiOiJmNjMzODYwMS00MmE1LTRkMGUtODI3My01NjIwM2JhNzAzODYifQ" + }, + "responses": { + "200": {}, + "400": { + "body": { + "error": { + "code": "400", + "message": "The request contains invalid data." + } + } + }, + "401": { + "body": { + "error": { + "code": "401", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "error": { + "code": "403", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "404", + "message": "Resource not found on the server." + } + } + }, + "500": { + "body": { + "error": { + "code": "500", + "message": "Internal server error." + } + } + } + } +} From 9fa59c60c89ed6320c5aef1a44f1bf8302b2535b Mon Sep 17 00:00:00 2001 From: Ninika Sharma Date: Wed, 11 Aug 2021 00:18:12 -0700 Subject: [PATCH 2/4] Updating swagger file and readme --- .../communicationservicescallingserver.json | 48 ++++++++++++++++++- .../data-plane/CallingServer/readme.md | 13 ++++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json index a529c3c06520..e9889f354e11 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2021-06-15-preview", + "version": "2021-08-30-preview", "title": "Azure Communication CallingServer Service", "description": "Azure Communication CallingServer Service" }, @@ -1092,6 +1092,43 @@ } } }, + "RecordingContentType": { + "description": "Gets or sets the content type of call recording.", + "enum": [ + "audio", + "audioVideo" + ], + "type": "string", + "x-ms-enum": { + "name": "RecordingContentType", + "modelAsString": true + } + }, + "RecordingChannelType": { + "description": "Gets or sets the channel type of call recording.", + "enum": [ + "mixed", + "unmixed" + ], + "type": "string", + "x-ms-enum": { + "name": "RecordingChannelType", + "modelAsString": true + } + }, + "RecordingFormatType": { + "description": "Gets or sets the format type of call recording.", + "enum": [ + "wav", + "mp3", + "mp4" + ], + "type": "string", + "x-ms-enum": { + "name": "RecordingFormatType", + "modelAsString": true + } + }, "StartCallRecordingRequest": { "description": "The request payload start call recording operation.", "type": "object", @@ -1099,6 +1136,15 @@ "recordingStateCallbackUri": { "description": "The uri to send notifications to.", "type": "string" + }, + "recordingContentType": { + "$ref": "#/definitions/RecordingContentType" + }, + "recordingChannelType": { + "$ref": "#/definitions/RecordingChannelType" + }, + "recordingFormatType": { + "$ref": "#/definitions/RecordingFormatType" } } }, diff --git a/specification/communication/data-plane/CallingServer/readme.md b/specification/communication/data-plane/CallingServer/readme.md index 59b9562ec823..52a5cc0ce945 100644 --- a/specification/communication/data-plane/CallingServer/readme.md +++ b/specification/communication/data-plane/CallingServer/readme.md @@ -26,7 +26,7 @@ These are the global settings for the communicationservices. ```yaml openapi-type: data-plane -tag: package-2021-06-15-preview +tag: package-2021-08-30-preview ``` ### Tag: package-2021-06-15-preview @@ -40,6 +40,17 @@ title: Azure Communication Services ``` +### Tag: package-2021-08-30-preview + +These settings apply only when `--tag=package-2021-08-30-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-08-30-preview' +input-file: + - preview/2021-08-30-preview/communicationservicescallingserver.json +title: + Azure Communication Services +``` + --- # Code Generation From e039e4214239d610b26672307fe7e1cd5e4f4144 Mon Sep 17 00:00:00 2001 From: Ninika Sharma Date: Wed, 11 Aug 2021 23:58:41 -0700 Subject: [PATCH 3/4] Addressed PR comments --- .../communicationservicescallingserver.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json index e9889f354e11..9e790e5cb9b9 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json @@ -1093,7 +1093,7 @@ } }, "RecordingContentType": { - "description": "Gets or sets the content type of call recording.", + "description": "The content type of a call recording.", "enum": [ "audio", "audioVideo" @@ -1105,7 +1105,7 @@ } }, "RecordingChannelType": { - "description": "Gets or sets the channel type of call recording.", + "description": "The channel type of a call recording.", "enum": [ "mixed", "unmixed" @@ -1117,7 +1117,7 @@ } }, "RecordingFormatType": { - "description": "Gets or sets the format type of call recording.", + "description": "The media container format type of a call recording.", "enum": [ "wav", "mp3", @@ -1138,13 +1138,16 @@ "type": "string" }, "recordingContentType": { - "$ref": "#/definitions/RecordingContentType" + "$ref": "#/definitions/RecordingContentType", + "description": "Optional, AudioVideo by Default" }, "recordingChannelType": { - "$ref": "#/definitions/RecordingChannelType" + "$ref": "#/definitions/RecordingChannelType", + "description": "Optional, Mixed by Default" }, "recordingFormatType": { - "$ref": "#/definitions/RecordingFormatType" + "$ref": "#/definitions/RecordingFormatType", + "description": "Optional, Mp4 by Default" } } }, From b3eccb62c45edb9e1de26069554a94bea8a9a6b6 Mon Sep 17 00:00:00 2001 From: Ninika Sharma Date: Thu, 12 Aug 2021 11:20:10 -0700 Subject: [PATCH 4/4] Nit changes --- .../communicationservicescallingserver.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json index 9e790e5cb9b9..2d2379a0bcc1 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-08-30-preview/communicationservicescallingserver.json @@ -1139,15 +1139,15 @@ }, "recordingContentType": { "$ref": "#/definitions/RecordingContentType", - "description": "Optional, AudioVideo by Default" + "description": "Optional, audioVideo by default" }, "recordingChannelType": { "$ref": "#/definitions/RecordingChannelType", - "description": "Optional, Mixed by Default" + "description": "Optional, mixed by default" }, "recordingFormatType": { "$ref": "#/definitions/RecordingFormatType", - "description": "Optional, Mp4 by Default" + "description": "Optional, mp4 by default" } } },