diff --git a/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json b/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json index 86c937180e07..947542ad0e4c 100644 --- a/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json +++ b/specification/communication/data-plane/CallingServer/preview/2021-04-15-preview1/communicationservicescallingserver.json @@ -1,1253 +1,1323 @@ { - "swagger":"2.0", - "info":{ - "version":"2021-04-15-preview1", - "title":"Azure Communication CallingServer Service", - "description":"Azure Communication CallingServer Service" - }, - "schemes":[ - "https" - ], - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "paths":{ - "/calling/calls":{ - "post":{ - "tags":[ - "Call" - ], - "summary":"Create a new call.", - "description":"Create a new call.", - "operationId":"Call_CreateCall", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callRequest", - "in":"body", - "description":"Create call request.", - "required":true, - "schema":{ - "$ref":"#/definitions/CreateCallRequestInternal" - } - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "201":{ - "description":"Returns the create call response.", - "schema":{ - "$ref":"#/definitions/CreateCallResponse" - } - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/calls/{callId}/Hangup":{ - "post":{ - "tags":[ - "Call" - ], - "summary":"Hangup a call.", - "description":"Hangup a call.", - "operationId":"Call_HangupCall", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callId", - "in":"path", - "description":"Call id.", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "202":{ - "description":"Returns the hangup call response." - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/calls/{callId}":{ - "delete":{ - "tags":[ - "Call" - ], - "summary":"Delete a call.", - "description":"Delete a call.", - "operationId":"Call_DeleteCall", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callId", - "in":"path", - "description":"Call id.", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "202":{ - "description":"Returns the delete call response." - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/calls/{callId}/PlayAudio":{ - "post":{ - "tags":[ - "Call" - ], - "summary":"Play audio in a call.", - "description":"Play audio in a call.", - "operationId":"Call_PlayAudio", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callId", - "in":"path", - "description":"The call id.", - "required":true, - "type":"string" - }, - { - "name":"request", - "in":"body", - "description":"Play audio request.", - "required":true, - "schema":{ - "$ref":"#/definitions/PlayAudioRequestInternal" - } - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "202":{ - "description":"Returns the play audio response.", - "schema":{ - "$ref":"#/definitions/PlayAudioResponse" - } - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/calls/{callId}/CancelMediaOperations":{ - "post":{ - "tags":[ - "Call" - ], - "summary":"Cancel Media Processing.", - "description":"Cancel Media Processing.", - "operationId":"Call_CancelMediaOperations", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callId", - "in":"path", - "description":"The call id", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "200":{ - "description":"Returns the cancel media processing response.", - "schema":{ - "$ref":"#/definitions/CancelMediaOperationsResponse" - } - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/Join":{ - "post":{ - "tags":[ - "Call" - ], - "summary":"Join a call.", - "description":"Join a call.", - "operationId":"Conversation_JoinCall", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"The conversation id which can be guid or encoded cs url", - "required":true, - "type":"string" - }, - { - "name":"callRequest", - "in":"body", - "description":"The join call request.", - "required":true, - "schema":{ - "$ref":"#/definitions/JoinCallRequestInternal" - } - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "202":{ - "description":"Returns the join call response.", - "schema":{ - "$ref":"#/definitions/JoinCallResponse" - } - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/participants":{ - "post":{ - "tags":[ - "Participant" - ], - "summary":"Invite participants to the call.", - "description":"Invite participants to the call.", - "operationId":"Conversation_InviteParticipants", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Conversation id.", - "required":true, - "type":"string" - }, - { - "name":"inviteParticipantsRequest", - "in":"body", - "description":"Invite participant request.", - "required":true, - "schema":{ - "$ref":"#/definitions/InviteParticipantsRequestInternal" - } - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "202":{ - "description":"Returns the invite participants response." - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/participants/{participantId}":{ - "delete":{ - "tags":[ - "Participant" - ], - "summary":"Remove participant from the call.", - "description":"Remove participant from the call.", - "operationId":"Conversation_RemoveParticipant", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Conversation 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." - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/calls/{callId}/participants":{ - "post":{ - "tags":[ - "Participant" - ], - "summary":"Invite participants to the call.", - "description":"Invite participants to the call.", - "operationId":"Call_InviteParticipants", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callId", - "in":"path", - "description":"Call id.", - "required":true, - "type":"string" - }, - { - "name":"inviteParticipantsRequest", - "in":"body", - "description":"Invite participant request.", - "required":true, - "schema":{ - "$ref":"#/definitions/InviteParticipantsRequestInternal" - } - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "202":{ - "description":"Returns the invite participants response." - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/calls/{callId}/participants/{participantId}":{ - "delete":{ - "tags":[ - "Participant" - ], - "summary":"Remove participant from the call.", - "description":"Remove participant from the call.", - "operationId":"Call_RemoveParticipant", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"callId", - "in":"path", - "description":"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." - }, - "401":{ - "description":"Unauthorized", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/recordings":{ - "post":{ - "tags":[ - "Recording" - ], - "summary":"Start call recording request", - "operationId":"Conversation_StartRecording", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Encoded conversation url.", - "required":true, - "type":"string" - }, - { - "name":"request", - "in":"body", - "description":"Request body of start call recording request.", - "required":true, - "schema":{ - "$ref":"#/definitions/StartCallRecordingRequestInternal" - } - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "200":{ - "description":"Returns the start call recording response.", - "schema":{ - "$ref":"#/definitions/StartCallRecordingResponse" - } - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "404":{ - "description":"Not found.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/recordings/{recordingId}":{ - "get":{ - "tags":[ - "Recording" - ], - "summary":"Get call recording state.", - "operationId":"Conversation_RecordingState", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Encoded conversation url.", - "required":true, - "type":"string" - }, - { - "name":"recordingId", - "in":"path", - "description":"Recording id.", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "200":{ - "description":"Returns the recording state.", - "schema":{ - "$ref":"#/definitions/GetCallRecordingStateResponse" - } - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "404":{ - "description":"Not found.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - }, - "delete":{ - "tags":[ - "Recording" - ], - "summary":"Stop recording a call.", - "operationId":"Conversation_StopRecording", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Encoded conversation url.", - "required":true, - "type":"string" - }, - { - "name":"recordingId", - "in":"path", - "description":"Recording id.", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "200":{ - "description":"Returns the stop call recording response." - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/recordings/{recordingId}/Pause":{ - "post":{ - "tags":[ - "Recording" - ], - "summary":"Pause recording a call.", - "operationId":"Conversation_PauseRecording", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Encoded conversation url.", - "required":true, - "type":"string" - }, - { - "name":"recordingId", - "in":"path", - "description":"Recording id.", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "200":{ - "description":"Returns the pause call recording response." - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - }, - "/calling/conversations/{conversationId}/recordings/{recordingId}/Resume":{ - "post":{ - "tags":[ - "Recording" - ], - "summary":"Resume recording a call.", - "operationId":"Conversation_ResumeRecording", - "consumes":[ - "application/json" - ], - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"conversationId", - "in":"path", - "description":"Encoded conversation url.", - "required":true, - "type":"string" - }, - { - "name":"recordingId", - "in":"path", - "description":"Recording id.", - "required":true, - "type":"string" - }, - { - "$ref":"#/parameters/ApiVersionParameter" - } - ], - "responses":{ - "200":{ - "description":"Returns the resume call recording response." - }, - "400":{ - "description":"Bad request", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - }, - "500":{ - "description":"Internal server error.", - "schema":{ - "$ref":"#/definitions/CommunicationError" - }, - "x-ms-error-response":true - } - } - } - } - }, - "definitions":{ - "CallModalityModel":{ - "enum":[ - "audio", - "video" - ], - "type":"string", - "x-ms-enum":{ - "name":"CallModalityModel", - "modelAsString":true - } - }, - "EventSubscriptionTypeModel":{ - "enum":[ - "participantsUpdated", - "dtmfReceived" - ], - "type":"string", - "x-ms-enum":{ - "name":"EventSubscriptionTypeModel", - "modelAsString":true - } - }, - "CreateCallRequestInternal":{ - "description":"The request payload for create call.", - "required":[ - "targets", - "source", - "callbackUri", - "requestedModalities", - "requestedCallEvents" - ], - "type":"object", - "properties":{ - "sourceAlternateIdentity":{ - "$ref":"#/definitions/PhoneNumberIdentifierModel", - "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/CommunicationIdentifierModel" - } - }, - "source":{ - "$ref":"#/definitions/CommunicationIdentifierModel", - "description":"The source of the call." - }, - "subject":{ - "description":"The subject.", - "type":"string" - }, - "callbackUri":{ - "description":"The callback URI.", - "type":"string" - }, - "requestedModalities":{ - "description":"The requested modalities.", - "type":"array", - "items":{ - "$ref":"#/definitions/CallModalityModel" - } - }, - "requestedCallEvents":{ - "description":"The requested call events to subscribe to.", - "type":"array", - "items":{ - "$ref":"#/definitions/EventSubscriptionTypeModel" - } - } - } - }, - "PhoneNumberIdentifierModel":{ - "$ref":"https://github.com/Azure/azure-rest-api-specs/blob/master/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/PhoneNumberIdentifierModel" - }, - "CommunicationIdentifierModel":{ - "$ref":"https://github.com/Azure/azure-rest-api-specs/blob/master/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationIdentifierModel" - }, - "CommunicationUserIdentifierModel":{ - "$ref":"https://github.com/Azure/azure-rest-api-specs/blob/master/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationUserIdentifierModel" - }, - "CommunicationCloudEnvironmentModel":{ - "$ref":"https://github.com/Azure/azure-rest-api-specs/blob/master/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationCloudEnvironmentModel" - }, - "MicrosoftTeamsUserIdentifierModel":{ - "$ref":"https://github.com/Azure/azure-rest-api-specs/blob/master/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/MicrosoftTeamsUserIdentifierModel" - }, - "CreateCallResponse":{ - "description":"The response payload of the create call operation.", - "type":"object", - "properties":{ - "callLegId":{ - "description":"Call leg id of the call.", - "type":"string" - } - } - }, - "CommunicationError":{ - "$ref":"https://github.com/Azure/azure-rest-api-specs/blob/master/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationError" - }, - "PlayAudioRequestInternal":{ - "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" - } - } - }, - "OperationStatusModel":{ - "description":"Gets or sets the status of the operation", - "enum":[ - "notStarted", - "running", - "completed", - "failed" - ], - "type":"string", - "x-ms-enum":{ - "name":"OperationStatusModel", - "modelAsString":true - } - }, - "PlayAudioResponse":{ - "description":"The response payload for play audio operation.", - "type":"object", - "properties":{ - "id":{ - "description":"Gets or sets the identifier.", - "type":"string" - }, - "status":{ - "$ref":"#/definitions/OperationStatusModel" - }, - "operationContext":{ - "description":"Gets or sets the operation context", - "type":"string" - }, - "resultInfo":{ - "$ref":"#/definitions/ResultInfoInternal", - "description":"Gets or sets the result info" - } - } - }, - "ResultInfoInternal":{ - "description":"Result info class to be used to report result status for actions/operations.", - "type":"object", - "properties":{ - "code":{ - "format":"int32", - "description":"Gets or sets the result code\r\nFor synchronous failures, this maps one-to-one with HTTP responses. For asynchronous failures or messages, it is contextual.", - "type":"integer" - }, - "subcode":{ - "format":"int32", - "description":"Gets or sets the result subcode.\r\nThe subcode further classifies a failure. For example.", - "type":"integer" - }, - "message":{ - "description":"Gets or sets the message\r\nThe message is a detail explanation of subcode.", - "type":"string" - } - } - }, - "CancelMediaOperationsResponse":{ - "description":"The response payload of the cancel media processing operation.", - "type":"object", - "properties":{ - "id":{ - "description":"Gets or sets the identifier.", - "type":"string" - }, - "status":{ - "$ref":"#/definitions/OperationStatusModel" - }, - "operationContext":{ - "description":"Gets or sets the operation context", - "type":"string" - }, - "resultInfo":{ - "$ref":"#/definitions/ResultInfoInternal", - "description":"Gets or sets the result info" - } - } - }, - "JoinCallRequestInternal":{ - "description":"The request payload for join call.", - "required":[ - "source", - "callbackUri", - "requestedModalities", - "requestedCallEvents" - ], - "type":"object", - "properties":{ - "source":{ - "$ref":"#/definitions/CommunicationIdentifierModel", - "description":"The source of the call." - }, - "subject":{ - "description":"The subject.", - "type":"string" - }, - "callbackUri":{ - "description":"The callback URI.", - "type":"string" - }, - "requestedModalities":{ - "description":"The requested modalities.", - "type":"array", - "items":{ - "$ref":"#/definitions/CallModalityModel" - } - }, - "requestedCallEvents":{ - "description":"The requested call events to subscribe to.", - "type":"array", - "items":{ - "$ref":"#/definitions/EventSubscriptionTypeModel" - } - } - } - }, - "JoinCallResponse":{ - "description":"The response payload of the join call operation.", - "type":"object", - "properties":{ - "callLegId":{ - "description":"Call leg id of the call.", - "type":"string" - } - } - }, - "InviteParticipantsRequestInternal":{ - "description":"The invite participants request.", - "required":[ - "participants" - ], - "type":"object", - "properties":{ - "alternateCallerId":{ - "$ref":"#/definitions/PhoneNumberIdentifierModel", - "description":"The alternate identity of source participant." - }, - "participants":{ - "description":"The list of participants to be added to the call.", - "type":"array", - "items":{ - "$ref":"#/definitions/CommunicationIdentifierModel" - } - }, - "operationContext":{ - "description":"The operation context.", - "type":"string" - }, - "callbackUri":{ - "description":"The callback URI.", - "type":"string" - } - } - }, - "StartCallRecordingRequestInternal":{ - "description":"The request payload start call recording operation.", - "type":"object", - "properties":{ - "recordingStateCallbackUri":{ - "description":"The uri to send notifications to.", - "type":"string" - } - } - }, - "StartCallRecordingResponse":{ - "description":"The response payload of start call recording operation.", - "type":"object", - "properties":{ - "recordingId":{ - "description":"The recording id of the started recording", - "type":"string" - } - } - }, - "CallRecordingStateModel":{ - "description":"The recording state of the recording", - "enum":[ - "active", - "inactive" - ], - "type":"string", - "x-ms-enum":{ - "name":"CallRecordingStateModel", - "modelAsString":true - } - }, - "GetCallRecordingStateResponse":{ - "description":"The response payload of get call recording state operation.", - "type":"object", - "properties":{ - "recordingState":{ - "$ref":"#/definitions/CallRecordingStateModel" - } - } - } - }, - "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" - } - }, - "x-ms-parameterized-host":{ - "hostTemplate":"{endpoint}", - "useSchemePrefix":false, - "parameters":[ - { - "$ref":"#/parameters/Endpoint" - } - ] - } + "swagger":"2.0", + "info":{ + "version":"2021-04-15-preview1", + "title":"Azure Communication CallingServer Service", + "description":"Azure Communication CallingServer Service" + }, + "schemes":[ + "https" + ], + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "paths":{ + "/calling/calls":{ + "post":{ + "tags":[ + "Call" + ], + "summary":"Create a new call.", + "description":"Create a new call.", + "operationId":"Call_CreateCall", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callRequest", + "in":"body", + "description":"Create call request.", + "required":true, + "schema":{ + "$ref":"#/definitions/CreateCallRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "201":{ + "description":"Returns the create call response.", + "schema":{ + "$ref":"#/definitions/CreateCallResponse" + } + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/calls/{callId}/Hangup":{ + "post":{ + "tags":[ + "Call" + ], + "summary":"Hangup a call.", + "description":"Hangup a call.", + "operationId":"Call_HangupCall", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callId", + "in":"path", + "description":"Call id.", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the hangup call response." + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/calls/{callId}":{ + "delete":{ + "tags":[ + "Call" + ], + "summary":"Delete a call.", + "description":"Delete a call.", + "operationId":"Call_DeleteCall", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callId", + "in":"path", + "description":"Call id.", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the delete call response." + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/calls/{callId}/PlayAudio":{ + "post":{ + "tags":[ + "Call" + ], + "summary":"Play audio in a call.", + "description":"Play audio in a call.", + "operationId":"Call_PlayAudio", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callId", + "in":"path", + "description":"The call id.", + "required":true, + "type":"string" + }, + { + "name":"request", + "in":"body", + "description":"Play audio request.", + "required":true, + "schema":{ + "$ref":"#/definitions/PlayAudioRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the play audio response.", + "schema":{ + "$ref":"#/definitions/PlayAudioResponse" + } + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/calls/{callId}/CancelMediaOperations":{ + "post":{ + "tags":[ + "Call" + ], + "summary":"Cancel Media Processing.", + "description":"Cancel Media Processing.", + "operationId":"Call_CancelMediaOperations", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callId", + "in":"path", + "description":"The call id", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "200":{ + "description":"Returns the cancel media processing response.", + "schema":{ + "$ref":"#/definitions/CancelMediaOperationsResponse" + } + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/Join":{ + "post":{ + "tags":[ + "Call" + ], + "summary":"Join a call.", + "description":"Join a call.", + "operationId":"Conversation_JoinCall", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"The conversation id which can be guid or encoded cs url", + "required":true, + "type":"string" + }, + { + "name":"callRequest", + "in":"body", + "description":"The join call request.", + "required":true, + "schema":{ + "$ref":"#/definitions/JoinCallRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the join call response.", + "schema":{ + "$ref":"#/definitions/JoinCallResponse" + } + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/PlayAudio":{ + "post":{ + "tags":[ + "Call" + ], + "summary":"Play audio in a call.", + "description":"Play audio in a call.", + "operationId":"Conversation_PlayAudio", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"The conversation id which can be guid or encoded cs url", + "required":true, + "type":"string" + }, + { + "name":"request", + "in":"body", + "description":"Play audio request.", + "required":true, + "schema":{ + "$ref":"#/definitions/PlayAudioRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the play audio response.", + "schema":{ + "$ref":"#/definitions/PlayAudioResponse" + } + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/participants":{ + "post":{ + "tags":[ + "Participant" + ], + "summary":"Invite participants to the call.", + "description":"Invite participants to the call.", + "operationId":"Conversation_InviteParticipants", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Conversation id.", + "required":true, + "type":"string" + }, + { + "name":"inviteParticipantsRequest", + "in":"body", + "description":"Invite participant request.", + "required":true, + "schema":{ + "$ref":"#/definitions/InviteParticipantsRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the invite participants response." + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/participants/{participantId}":{ + "delete":{ + "tags":[ + "Participant" + ], + "summary":"Remove participant from the call.", + "description":"Remove participant from the call.", + "operationId":"Conversation_RemoveParticipant", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Conversation 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." + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/calls/{callId}/participants":{ + "post":{ + "tags":[ + "Participant" + ], + "summary":"Invite participants to the call.", + "description":"Invite participants to the call.", + "operationId":"Call_InviteParticipants", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callId", + "in":"path", + "description":"Call id.", + "required":true, + "type":"string" + }, + { + "name":"inviteParticipantsRequest", + "in":"body", + "description":"Invite participant request.", + "required":true, + "schema":{ + "$ref":"#/definitions/InviteParticipantsRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "202":{ + "description":"Returns the invite participants response." + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/calls/{callId}/participants/{participantId}":{ + "delete":{ + "tags":[ + "Participant" + ], + "summary":"Remove participant from the call.", + "description":"Remove participant from the call.", + "operationId":"Call_RemoveParticipant", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"callId", + "in":"path", + "description":"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." + }, + "401":{ + "description":"Unauthorized", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/recordings":{ + "post":{ + "tags":[ + "Recording" + ], + "summary":"Start call recording request", + "operationId":"Conversation_StartRecording", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Encoded conversation url.", + "required":true, + "type":"string" + }, + { + "name":"request", + "in":"body", + "description":"Request body of start call recording request.", + "required":true, + "schema":{ + "$ref":"#/definitions/StartCallRecordingRequestInternal" + } + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "200":{ + "description":"Returns the start call recording response.", + "schema":{ + "$ref":"#/definitions/StartCallRecordingResponse" + } + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "404":{ + "description":"Not found.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/recordings/{recordingId}":{ + "get":{ + "tags":[ + "Recording" + ], + "summary":"Get call recording state.", + "operationId":"Conversation_RecordingState", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Encoded conversation url.", + "required":true, + "type":"string" + }, + { + "name":"recordingId", + "in":"path", + "description":"Recording id.", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "200":{ + "description":"Returns the recording state.", + "schema":{ + "$ref":"#/definitions/GetCallRecordingStateResponse" + } + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "404":{ + "description":"Not found.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + }, + "delete":{ + "tags":[ + "Recording" + ], + "summary":"Stop recording a call.", + "operationId":"Conversation_StopRecording", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Encoded conversation url.", + "required":true, + "type":"string" + }, + { + "name":"recordingId", + "in":"path", + "description":"Recording id.", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "200":{ + "description":"Returns the stop call recording response." + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/recordings/{recordingId}/Pause":{ + "post":{ + "tags":[ + "Recording" + ], + "summary":"Pause recording a call.", + "operationId":"Conversation_PauseRecording", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Encoded conversation url.", + "required":true, + "type":"string" + }, + { + "name":"recordingId", + "in":"path", + "description":"Recording id.", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "200":{ + "description":"Returns the pause call recording response." + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + }, + "/calling/conversations/{conversationId}/recordings/{recordingId}/Resume":{ + "post":{ + "tags":[ + "Recording" + ], + "summary":"Resume recording a call.", + "operationId":"Conversation_ResumeRecording", + "consumes":[ + "application/json" + ], + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"conversationId", + "in":"path", + "description":"Encoded conversation url.", + "required":true, + "type":"string" + }, + { + "name":"recordingId", + "in":"path", + "description":"Recording id.", + "required":true, + "type":"string" + }, + { + "$ref":"#/parameters/ApiVersionParameter" + } + ], + "responses":{ + "200":{ + "description":"Returns the resume call recording response." + }, + "400":{ + "description":"Bad request", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + }, + "500":{ + "description":"Internal server error.", + "schema":{ + "$ref":"#/definitions/CommunicationError" + }, + "x-ms-error-response":true + } + } + } + } + }, + "definitions":{ + "CallModalityModel":{ + "enum":[ + "audio", + "video" + ], + "type":"string", + "x-ms-enum":{ + "name":"CallModalityModel", + "modelAsString":true + } + }, + "EventSubscriptionTypeModel":{ + "enum":[ + "participantsUpdated", + "dtmfReceived" + ], + "type":"string", + "x-ms-enum":{ + "name":"EventSubscriptionTypeModel", + "modelAsString":true + } + }, + "CreateCallRequestInternal":{ + "description":"The request payload for create call.", + "required":[ + "targets", + "source", + "callbackUri", + "requestedModalities", + "requestedCallEvents" + ], + "type":"object", + "properties":{ + "sourceAlternateIdentity":{ + "$ref":"#/definitions/PhoneNumberIdentifierModel", + "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/CommunicationIdentifierModel" + } + }, + "source":{ + "$ref":"#/definitions/CommunicationIdentifierModel", + "description":"The source of the call." + }, + "subject":{ + "description":"The subject.", + "type":"string" + }, + "callbackUri":{ + "description":"The callback URI.", + "type":"string" + }, + "requestedModalities":{ + "description":"The requested modalities.", + "type":"array", + "items":{ + "$ref":"#/definitions/CallModalityModel" + } + }, + "requestedCallEvents":{ + "description":"The requested call events to subscribe to.", + "type":"array", + "items":{ + "$ref":"#/definitions/EventSubscriptionTypeModel" + } + } + } + }, + "PhoneNumberIdentifierModel":{ + "$ref":"../../../Common/stable/2021-03-07/common.json#/definitions/PhoneNumberIdentifierModel" + }, + "CommunicationIdentifierModel":{ + "$ref":"../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationIdentifierModel" + }, + "CommunicationUserIdentifierModel":{ + "$ref":"../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationUserIdentifierModel" + }, + "CommunicationCloudEnvironmentModel":{ + "$ref":"../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationCloudEnvironmentModel" + }, + "MicrosoftTeamsUserIdentifierModel":{ + "$ref":"../../../Common/stable/2021-03-07/common.json#/definitions/MicrosoftTeamsUserIdentifierModel" + }, + "CreateCallResponse":{ + "description":"The response payload of the create call operation.", + "type":"object", + "properties":{ + "callLegId":{ + "description":"Call leg id of the call.", + "type":"string" + } + } + }, + "CommunicationError":{ + "$ref":"../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationError" + }, + "PlayAudioRequestInternal":{ + "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" + } + } + }, + "OperationStatusModel":{ + "description":"Gets or sets the status of the operation", + "enum":[ + "notStarted", + "running", + "completed", + "failed" + ], + "type":"string", + "x-ms-enum":{ + "name":"OperationStatusModel", + "modelAsString":true + } + }, + "PlayAudioResponse":{ + "description":"The response payload for play audio operation.", + "type":"object", + "properties":{ + "id":{ + "description":"Gets or sets the identifier.", + "type":"string" + }, + "status":{ + "$ref":"#/definitions/OperationStatusModel" + }, + "operationContext":{ + "description":"Gets or sets the operation context", + "type":"string" + }, + "resultInfo":{ + "$ref":"#/definitions/ResultInfoInternal", + "description":"Gets or sets the result info" + } + } + }, + "ResultInfoInternal":{ + "description":"Result info class to be used to report result status for actions/operations.", + "type":"object", + "properties":{ + "code":{ + "format":"int32", + "description":"Gets or sets the result code\r\nFor synchronous failures, this maps one-to-one with HTTP responses. For asynchronous failures or messages, it is contextual.", + "type":"integer" + }, + "subcode":{ + "format":"int32", + "description":"Gets or sets the result subcode.\r\nThe subcode further classifies a failure. For example.", + "type":"integer" + }, + "message":{ + "description":"Gets or sets the message\r\nThe message is a detail explanation of subcode.", + "type":"string" + } + } + }, + "CancelMediaOperationsResponse":{ + "description":"The response payload of the cancel media processing operation.", + "type":"object", + "properties":{ + "id":{ + "description":"Gets or sets the identifier.", + "type":"string" + }, + "status":{ + "$ref":"#/definitions/OperationStatusModel" + }, + "operationContext":{ + "description":"Gets or sets the operation context", + "type":"string" + }, + "resultInfo":{ + "$ref":"#/definitions/ResultInfoInternal", + "description":"Gets or sets the result info" + } + } + }, + "JoinCallRequestInternal":{ + "description":"The request payload for join call.", + "required":[ + "source", + "callbackUri", + "requestedModalities", + "requestedCallEvents" + ], + "type":"object", + "properties":{ + "source":{ + "$ref":"#/definitions/CommunicationIdentifierModel", + "description":"The source of the call." + }, + "subject":{ + "description":"The subject.", + "type":"string" + }, + "callbackUri":{ + "description":"The callback URI.", + "type":"string" + }, + "requestedModalities":{ + "description":"The requested modalities.", + "type":"array", + "items":{ + "$ref":"#/definitions/CallModalityModel" + } + }, + "requestedCallEvents":{ + "description":"The requested call events to subscribe to.", + "type":"array", + "items":{ + "$ref":"#/definitions/EventSubscriptionTypeModel" + } + } + } + }, + "JoinCallResponse":{ + "description":"The response payload of the join call operation.", + "type":"object", + "properties":{ + "callLegId":{ + "description":"Call leg id of the call.", + "type":"string" + } + } + }, + "InviteParticipantsRequestInternal":{ + "description":"The invite participants request.", + "required":[ + "participants" + ], + "type":"object", + "properties":{ + "alternateCallerId":{ + "$ref":"#/definitions/PhoneNumberIdentifierModel", + "description":"The alternate identity of source participant." + }, + "participants":{ + "description":"The list of participants to be added to the call.", + "type":"array", + "items":{ + "$ref":"#/definitions/CommunicationIdentifierModel" + } + }, + "operationContext":{ + "description":"The operation context.", + "type":"string" + }, + "callbackUri":{ + "description":"The callback URI.", + "type":"string" + } + } + }, + "StartCallRecordingRequestInternal":{ + "description":"The request payload start call recording operation.", + "type":"object", + "properties":{ + "recordingStateCallbackUri":{ + "description":"The uri to send notifications to.", + "type":"string" + } + } + }, + "StartCallRecordingResponse":{ + "description":"The response payload of start call recording operation.", + "type":"object", + "properties":{ + "recordingId":{ + "description":"The recording id of the started recording", + "type":"string" + } + } + }, + "CallRecordingStateModel":{ + "description":"The recording state of the recording", + "enum":[ + "active", + "inactive" + ], + "type":"string", + "x-ms-enum":{ + "name":"CallRecordingStateModel", + "modelAsString":true + } + }, + "GetCallRecordingStateResponse":{ + "description":"The response payload of get call recording state operation.", + "type":"object", + "properties":{ + "recordingState":{ + "$ref":"#/definitions/CallRecordingStateModel" + } + } + } + }, + "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" + } + }, + "x-ms-parameterized-host":{ + "hostTemplate":"{endpoint}", + "useSchemePrefix":false, + "parameters":[ + { + "$ref":"#/parameters/Endpoint" + } + ] + } }